/* ============================================
   Palms Medical Group — Custom Styles
   Classic & Elegant | Terracotta + Sand
   ============================================ */

/* ---- Base / Reset ---- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

/* ---- Selection ---- */
::selection {
    background: #f9ddd3;
    color: #632515;
}

/* ---- Hero Animations ---- */
.hero-eyebrow {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards 0.2s;
}

.hero-title {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards 0.4s;
}

.hero-subtitle {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards 0.6s;
}

.hero-ctas {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards 0.8s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Scroll Line ---- */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ---- Section Animations ---- */
.section-eyebrow,
.section-title,
.section-desc {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.section-eyebrow.visible,
.section-title.visible,
.section-desc.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for section elements */
.section-title { transition-delay: 0.1s; }
.section-desc { transition-delay: 0.2s; }

/* ---- Service Cards ---- */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.5s ease, border-color 0.5s ease;
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

/* ---- About Image ---- */
.about-image {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.about-image.visible {
    opacity: 1;
    transform: translateX(0);
}

.about-content {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.about-content.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ---- Patient Cards ---- */
.patient-card {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.5s ease, border-color 0.5s ease;
}

.patient-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.patient-card:nth-child(1) { transition-delay: 0.05s; }
.patient-card:nth-child(2) { transition-delay: 0.15s; }
.patient-card:nth-child(3) { transition-delay: 0.25s; }

/* ---- Navbar Scroll State ---- */
.nav-scrolled {
    background: rgba(250, 248, 245, 0.97) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.nav-scrolled .font-serif {
    color: #632515 !important;
}

.nav-scrolled .menu-line {
    background: #632515 !important;
}

/* ---- Mobile Menu ---- */
.mobile-link {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

/* ---- Mobile Menu Button Animation ---- */
.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 24px !important;
    margin-left: 0 !important;
}

/* ---- Input Focus ---- */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* ---- Smooth Image Loading ---- */
img {
    display: block;
    max-width: 100%;
}

/* ---- Print Styles ---- */
@media print {
    nav, #contactForm, .scroll-line, .hero-ctas { display: none; }
    body { color: #000; background: #fff; }
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}
