/* 
   Hayes Dental - Modern Aesthetic Styles 
*/

/* --- Variables & Theming --- */
:root {
  /* Colors */
  --clr-primary: #0284c7;
  /* Trustworthy Blue */
  --clr-primary-dark: #0369a1;
  --clr-primary-light: #e0f2fe;

  --clr-secondary: #0f766e;
  /* Soft Teal - Dental vibe */
  --clr-secondary-dark: #0f5c56;

  --clr-accent: #f59e0b;
  /* Amber CTA */
  --clr-accent-hover: #d97706;

  --clr-text-main: #0f172a;
  /* Dark Slate */
  --clr-text-muted: #475569;
  /* Gray */
  --clr-text-light: #f8fafc;

  --clr-bg-main: #ffffff;
  --clr-bg-light: #f8fafc;
  --clr-bg-alt: #f1f5f9;

  /* Typography */
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;
  /* Gives that premium, trusted medical feel */

  /* Spacing */
  --sp-xs: 0.5rem;
  --sp-sm: 1rem;
  --sp-md: 2rem;
  --sp-lg: 4rem;
  --sp-xl: 6rem;

  /* Extras */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- Resets --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  /* offset for fixed header */
}

body {
  font-family: var(--font-main);
  color: var(--clr-text-main);
  background-color: var(--clr-bg-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* --- Premium Backgrounds & Blurs --- */
.bg-main {
  background-color: var(--clr-bg-main);
}

.relative {
  position: relative;
}

.overflow-hidden {
  overflow: hidden;
}

.decorative-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.6;
  pointer-events: none;
}

.blob-1 {
  top: -100px;
  left: -200px;
  width: 500px;
  height: 500px;
  background: var(--clr-primary-light);
}

.blob-2 {
  bottom: 0;
  right: -200px;
  width: 600px;
  height: 600px;
  background: rgba(15, 118, 110, 0.1);
}

img {
  max-width: 100%;
  display: block;
  object-fit: cover;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-main);
  /* we'll use inter for most, but playfair for hero/section titles */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--sp-sm);
  color: var(--clr-text-main);
}

.hero-title,
.section-title {
  font-family: var(--font-heading);
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--sp-xl) 0;
}

.text-center {
  text-align: center;
}

.bg-light {
  background-color: var(--clr-bg-light);
}

.bg-primary {
  background-color: var(--clr-primary);
}

.text-white {
  color: var(--clr-text-light) !important;
}

.mt-4 {
  margin-top: 2rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--clr-primary);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(2, 132, 199, 0.39);
}

.btn-primary:hover {
  background-color: var(--clr-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
}

.btn-secondary {
  background-color: var(--clr-accent);
  color: white;
}

.btn-secondary:hover {
  background-color: var(--clr-accent-hover);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--clr-text-main);
  color: var(--clr-text-main);
}

.btn-outline:hover {
  background-color: var(--clr-text-main);
  color: white;
}

.btn-block {
  width: 100%;
  display: block;
}

/* --- Header & Nav --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  z-index: 1000;
  transition: var(--transition);
  padding: 1rem 0;
}

.header.scrolled {
  padding: 0.75rem 0;
  box-shadow: var(--shadow-sm);
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-heading);
  letter-spacing: -0.5px;
}

.logo-highlight {
  color: var(--clr-primary);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-list {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-weight: 500;
  color: var(--clr-text-muted);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--clr-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--clr-primary);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--clr-text-main);
  position: relative;
  transition: var(--transition);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  bottom: -8px;
}

.nav-toggle.open .hamburger {
  background-color: transparent;
}

.nav-toggle.open .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle.open .hamburger::after {
  bottom: 0;
  transform: rotate(-45deg);
}


/* --- Hero Section --- */
.hero {
  position: relative;
  padding: calc(80px + var(--sp-xl)) 0 var(--sp-xl) 0;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: var(--clr-primary-light);
  border-bottom-left-radius: 200px;
  z-index: -1;
  opacity: 0.6;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

/* Mobile-only hero image – hidden on desktop */
.hero-mobile-img-wrapper {
  display: none;
}

.hero-mobile-img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.hero-content {
  max-width: 600px;
}

.badge {
  display: inline-block;
  padding: 0.25rem 1rem;
  background-color: rgba(2, 132, 199, 0.1);
  color: var(--clr-primary);
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 3.5rem;
  color: var(--clr-text-main);
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--clr-text-muted);
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-num {
  font-size: 2rem;
  color: var(--clr-primary);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-text {
  font-size: 0.875rem;
  color: var(--clr-text-muted);
  line-height: 1.2;
}

.hero-image-wrapper {
  position: relative;
}

.hero-img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 2;
  height: 600px;
  width: 100%;
  object-fit: cover;
}

.hero-image-dec {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  background-color: var(--clr-accent);
  border-radius: 50%;
  z-index: 1;
  opacity: 0.8;
}

.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-md);
}

.trust-card {
  position: absolute;
  bottom: 40px;
  left: -30px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  animation: float 6s ease-in-out infinite;
}

.stars {
  font-size: 1.25rem;
  letter-spacing: 2px;
}

.trust-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--clr-text-main);
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

/* --- Services Section --- */
.section-header {
  max-width: 700px;
  margin: 0 auto 4rem auto;
}

.section-subtitle {
  color: var(--clr-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.875rem;
  display: block;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.5rem;
}

.section-desc {
  color: var(--clr-text-muted);
  font-size: 1.125rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--clr-bg-alt);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--clr-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  background: var(--clr-primary-light);
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.service-title {
  font-family: var(--font-main);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.service-desc {
  color: var(--clr-text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.service-link {
  color: var(--clr-primary);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.service-link span {
  transition: transform 0.3s;
}

.service-link:hover span {
  transform: translateX(5px);
}


/* --- About Section (Doctor) --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  position: relative;
}

.doc-img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.experience-badge {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: var(--clr-primary);
  color: white;
  padding: 1.5rem;
  border-radius: 50%;
  width: 140px;
  height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 4px solid white;
}

.exp-num {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.exp-text {
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 0.25rem;
}

.doc-title {
  color: var(--clr-primary);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.about-desc {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  color: var(--clr-text-muted);
}

.credentials-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.credentials-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 500;
}

.check-icon {
  color: var(--clr-secondary);
}


/* --- Clinic Gallery --- */
.clinic-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 250px);
  gap: 1.5rem;
}

.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
}

.gallery-item.large {
  grid-row: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}


/* --- Contact / CTA Section --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-title {
  font-size: 2.5rem;
  color: white;
}

.contact-desc {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
  margin-bottom: 3rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.detail-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.detail-icon {
  font-size: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.detail-item h5 {
  color: white;
  margin-bottom: 0.25rem;
  font-size: 1.125rem;
}

.detail-item p,
.detail-item a {
  color: rgba(255, 255, 255, 0.8);
}

.detail-item a:hover {
  color: white;
  text-decoration: underline;
}

.glass-form {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  color: var(--clr-text-main);
  box-shadow: var(--shadow-lg);
}

.form-title {
  text-align: center;
  margin-bottom: 2rem;
  font-family: var(--font-heading);
}

.input-group {
  margin-bottom: 1.5rem;
}

.input-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--clr-text-muted);
}

.input-group input,
.input-group select,
.input-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 1rem;
  transition: border-color 0.3s;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  outline: none;
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

/* --- Footer --- */
.footer {
  background-color: var(--clr-text-main);
  color: white;
  padding: 4rem 0 2rem 0;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-desc {
  color: var(--clr-text-muted);
  margin-top: 1rem;
  max-width: 300px;
}

.footer-links h4,
.footer-legal h4 {
  color: white;
  margin-bottom: 1.5rem;
}

.footer-links ul,
.footer-legal ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a,
.footer-legal a {
  color: #94a3b8;
  transition: color 0.3s;
}

.footer-links a:hover,
.footer-legal a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  color: #64748b;
  font-size: 0.875rem;
}


/* --- Micro-animations / Reveal on scroll --- */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-up.active,
.reveal-left.active,
.reveal-right.active {
  opacity: 1;
  transform: translate(0);
}

/* --- Before & After Transformations Section --- */
.ba-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(350px, 100%), 1fr));
  gap: 3rem;
  margin-top: 3rem;
}

.ba-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.ba-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

/* Base slider container */
.ba-slider {
  position: relative;
  width: 100%;
  height: 350px;
  overflow: hidden;
}

/* Background/After image */
.ba-img-after {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Foreground/Before image */
.ba-img-before-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  /* Initial state – JS updates this on slider input */
  height: 100%;
  overflow: hidden;
  border-right: 3px solid white;
}

.ba-img-before {
  display: block;
  height: 100%;
  max-width: none;
  /* Override global max-width:100% on img */
  object-fit: cover;
  object-position: center;
  /* Match the after image – no left-side zoom */
}

/* JS sets the exact pixel width on load & resize;
   this fallback keeps things sane before JS runs */
.ba-slider .ba-img-before {
  width: 100%;
}

/* Labels */
.ba-label {
  position: absolute;
  bottom: 15px;
  padding: 0.35rem 1rem;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: none;
  z-index: 10;
}

.label-before {
  left: 15px;
}

.label-after {
  right: 15px;
}

/* Custom slider input overlay */
.ba-slider-input {
  position: absolute;
  top: 0;
  left: -2%;
  /* Allow sliding all the way to edges */
  width: 104%;
  height: 100%;
  opacity: 0;
  /* Hidden but clickable */
  cursor: ew-resize;
  z-index: 20;
}

/* Slider center handle design */
.ba-slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  background: white;
  z-index: 15;
  pointer-events: none;
}

.ba-slider-arrows {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  color: var(--clr-primary);
  gap: 2px;
}

.ba-slider-arrows svg {
  width: 16px;
  height: 16px;
}

.ba-content {
  padding: 2rem;
  background: linear-gradient(to bottom, #ffffff, var(--clr-bg-light));
}

.ba-content h4 {
  color: var(--clr-primary-dark);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.ba-content p {
  color: var(--clr-text-muted);
  font-size: 0.95rem;
  margin-bottom: 0;
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-up.active,
.reveal-left.active,
.reveal-right.active {
  opacity: 1;
  transform: translate(0);
}


/* --- Responsive Design --- */
@media (max-width: 992px) {

  .hero-container,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-mobile-img-wrapper {
    display: block;
  }

  .hero-bg {
    width: 100%;
    border-bottom-left-radius: 0;
    height: 70%;
  }

  .trust-card {
    left: 20px;
  }

  .hero-title {
    font-size: 3rem;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: calc(80px + 1rem) 0 1rem 0;
  }

  .nav-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: white;
    flex-direction: column;
    justify-content: flex-start;
    padding: 3rem 2rem;
    transition: 0.3s ease-in-out;
  }

  .nav.active {
    left: 0;
  }

  .nav-list {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .nav-btn {
    width: 100%;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 1.5rem;
  }

  .ba-grid {
    grid-template-columns: 1fr;
  }

  .ba-slider {
    height: 280px;
  }

  .clinic-gallery {
    grid-template-columns: 1fr;
  }

  .gallery-item.large {
    grid-row: auto;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .section {
    padding: var(--sp-lg) 0;
  }

  .ba-slider {
    height: 220px;
  }
}