/* ========================================
   Yeni Santiesteban — Custom Styles
   ======================================== */

/* Base & Typography */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* Selection Color */
::selection {
  background-color: #C8A44E;
  color: #0A1F44;
}

/* ========================================
   Navbar
   ======================================== */
#navbar {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#navbar.scrolled {
  background: rgba(10, 31, 68, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #C8A44E;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link:hover {
  color: #D4B563 !important;
}

/* ========================================
   Mobile Menu
   ======================================== */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

#mobile-menu.closed {
  opacity: 0;
  pointer-events: none;
}

.mobile-link {
  font-family: 'Playfair Display', Georgia, serif;
}

/* Hamburger Animation */
#menu-btn.active #bar1 {
  transform: translateY(4px) rotate(45deg);
}

#menu-btn.active #bar2 {
  opacity: 0;
  transform: scaleX(0);
}

#menu-btn.active #bar3 {
  transform: translateY(-4px) rotate(-45deg);
}

/* ========================================
   Hero
   ======================================== */
#hero {
  position: relative;
}

#hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(4, 14, 29, 0.95) 0%,
    rgba(10, 31, 68, 0.85) 50%,
    rgba(15, 45, 94, 0.70) 100%
  );
  z-index: 1;
}

#hero > .absolute {
  z-index: 0;
}

/* Scroll indicator animation */
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.5; }
}

/* ========================================
   Service Cards
   ======================================== */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0A1F44, #C8A44E);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

/* ========================================
   Stats Bar
   ======================================== */
.stats-number {
  position: relative;
  display: inline-block;
}

/* ========================================
   About Section
   ======================================== */
.about-image-wrapper {
  position: relative;
}

.about-image-wrapper::after {
  content: '';
  position: absolute;
  bottom: -12px;
  right: -12px;
  width: 60%;
  height: 60%;
  border: 2px solid rgba(200, 164, 78, 0.3);
  border-radius: 1rem;
  z-index: -1;
}

/* ========================================
   Patient Info Cards
   ======================================== */
.info-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
  transform: translateY(-4px);
}

/* ========================================
   Contact Form
   ======================================== */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(200, 164, 78, 0.15);
}

input::placeholder,
textarea::placeholder {
  color: #9CA3AF;
}

/* ========================================
   Scroll Reveal Animations
   (Progressive Enhancement — only apply
   when JS is enabled and user prefers motion)
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }

  .reveal[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }

  .reveal-left {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }

  .reveal-left[data-reveal] {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }

  .reveal-right {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }

  .reveal-right[data-reveal] {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }

  .reveal-scale {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }

  .reveal-scale[data-reveal] {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }
}

/* ========================================
   CTA Section
   ======================================== */
.cta-section {
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(4, 14, 29, 0.92) 0%,
    rgba(10, 31, 68, 0.88) 100%
  );
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 768px) {
  .font-serif {
    line-height: 1.15;
  }

  #hero h1 {
    font-size: 2.75rem;
  }

  @media (min-width: 769px) {
    #hero h1 {
      font-size: 3.5rem;
    }
  }

  @media (min-width: 1024px) {
    #hero h1 {
      font-size: 4.5rem;
    }
  }

  @media (min-width: 1280px) {
    #hero h1 {
      font-size: 5rem;
    }
  }
}

/* ========================================
   Utility / Misc
   ======================================== */
.text-balance {
  text-wrap: balance;
}

/* Smooth image loading */
img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Focus visible for accessibility */
*:focus-visible {
  outline: 2px solid #C8A44E;
  outline-offset: 2px;
}

/* Print styles */
@media print {
  #navbar, #mobile-menu, .scroll-indicator {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }
}
