/* ===== Custom Styles for Dr. Martinez Clinic ===== */

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: rgba(185, 38, 71, 0.15);
  color: #7B2D3B;
}

/* ---------- Skip Link ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.5rem;
  background: #7B2D3B;
  color: white;
  font-weight: 700;
  border-radius: 0 0 0.5rem 0.5rem;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* ---------- Nav Links ---------- */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 20px;
  height: 2px;
  background: #b92647;
  border-radius: 1px;
  transition: transform 0.3s ease;
}
.nav-link:hover::after,
.nav-link:focus::after {
  transform: translateX(-50%) scaleX(1);
}

/* ---------- Mobile Nav ---------- */
.mobile-nav-link {
  display: block;
}
.mobile-nav-cta {
  display: flex;
}

/* ---------- Service Cards ---------- */
.service-card {
  transform: translateY(0);
}
.service-card:hover {
  transform: translateY(-4px);
}

/* ---------- FAQ ---------- */
.faq-item {
  transition: box-shadow 0.3s ease;
}
.faq-item:hover {
  box-shadow: 0 4px 20px rgba(123, 45, 59, 0.1);
}
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}
.faq-content.open {
  max-height: 300px;
}
.faq-icon {
  transition: transform 0.3s ease;
}
.faq-btn[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
}

/* ---------- Scroll Reveal ---------- */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .service-card:hover { transform: none; }
  .faq-content { transition: none; }
  .faq-icon { transition: none; }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Form ---------- */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237B2D3B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

input:focus,
textarea:focus,
select:focus {
  box-shadow: 0 0 0 3px rgba(185, 38, 71, 0.1);
}

/* ---------- Header scroll state ---------- */
#header-inner.scrolled {
  box-shadow: 0 4px 24px rgba(123, 45, 59, 0.1);
}

/* ---------- Hero decorative animations ---------- */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(2deg); }
}
.floating-card {
  animation: float 6s ease-in-out infinite;
}
