/* ========================================
   Monte Cristo Health Care — Custom Styles
   Premium Dark Luxury | Terracotta + Sand
   ======================================== */

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

body {
  overflow-x: hidden;
}

::selection {
  background-color: rgba(200, 149, 108, 0.3);
  color: #f0e8e0;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #1a1614;
}
::-webkit-scrollbar-thumb {
  background: #4a2e20;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #c8956c;
}

/* --- Nav link underline animation --- */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: #c8956c;
  transition: width 0.3s ease;
}
.nav-link:hover::after {
  width: 100%;
}

/* --- Header scroll state --- */
#header.scrolled {
  background: rgba(26, 22, 20, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(200, 149, 108, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

/* --- Reveal animations (progressive enhancement) --- */
.reveal-up {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

/* When JS is unavailable, all reveal classes stay visible by default.
   JS adds 'reveal-hidden' to enable the hidden starting state. */
.reveal-hidden.reveal-up,
.reveal-hidden.reveal-left,
.reveal-hidden.reveal-right {
  opacity: 0;
  transform: translateY(24px);
}
.reveal-hidden.reveal-left {
  transform: translateX(-24px);
}
.reveal-hidden.reveal-right {
  transform: translateX(24px);
}

/* Reduced motion: never animate */
@media (prefers-reduced-motion: reduce) {
  .reveal-up,
  .reveal-left,
  .reveal-right {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* --- Service card shimmer on hover --- */
.group:hover .w-14 {
  background-color: rgba(200, 149, 108, 0.2) !important;
}

/* --- Form select arrow --- */
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='%23c8956c' stroke-width='2' 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;
}

/* --- Testimonial quote decoration --- */
/* Subtle gold accent line on testimonial cards */
.reveal-up > p::before {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, #c8956c, transparent);
  margin-bottom: 1rem;
}

/* --- Decorative cross pattern --- */
/* Subtle background texture */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c8956c' fill-opacity='1'%3E%3Cpath d='M40 0v80M0 40h80' stroke-width='0.5'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* --- Focus visible for accessibility --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #c8956c;
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Mobile menu link animation --- */
.mobile-link {
  position: relative;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}
#mobile-menu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}
#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }
#mobile-menu.open .mobile-link:nth-child(6) { transition-delay: 0.3s; }
#mobile-menu.open .mobile-link:nth-child(7) { transition-delay: 0.35s; }
#mobile-menu.open .mobile-link:nth-child(8) { transition-delay: 0.4s; }

/* --- Hero entrance animations --- */
.reveal-up {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Stagger hero reveals on load */
.reveal-up:nth-child(1) { transition-delay: 0.1s; }
.reveal-up:nth-child(2) { transition-delay: 0.25s; }
.reveal-up:nth-child(3) { transition-delay: 0.4s; }
.reveal-up:nth-child(4) { transition-delay: 0.55s; }

/* When JS enables hidden state, apply stagger delays */
.reveal-hidden.reveal-up:nth-child(1) { transition-delay: 0.1s; }
.reveal-hidden.reveal-up:nth-child(2) { transition-delay: 0.25s; }
.reveal-hidden.reveal-up:nth-child(3) { transition-delay: 0.4s; }
.reveal-hidden.reveal-up:nth-child(4) { transition-delay: 0.55s; }

/* --- Gold glow pulse for CTA buttons --- */
@keyframes gold-pulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(200, 149, 108, 0.2);
  }
  50% {
    box-shadow: 0 0 40px rgba(200, 149, 108, 0.4);
  }
}

/* Apply on hover only — no auto-animation */
