/* ============================================
   Trinity Dental Centers Spring — Custom Styles
   ============================================ */

/* Base & Typography */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

::selection {
    background-color: #962525;
    color: #fff9f5;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf8ef;
}
::-webkit-scrollbar-thumb {
    background: #d44848;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7a2020;
}

/* Hero Clip */
.clip-hero-left {
    clip-path: polygon(35% 0, 100% 0, 100% 100%, 0% 100%);
}

/* Scroll Line Animation */
@keyframes scrollLine {
    0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
    50% { opacity: 1; }
    100% { transform: scaleY(1); transform-origin: top; opacity: 1; }
}

.animate-scroll-line {
    animation: scrollLine 1.2s ease-out forwards;
}

/* Service Cards */
.service-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

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

/* Experience Cards */
.experience-card {
    transition: transform 0.4s ease, background-color 0.4s ease, border-color 0.4s ease;
}

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

/* Navbar Transition */
#navbar.scrolled {
    background-color: rgba(254, 252, 248, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(150, 37, 37, 0.08);
}

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

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

/* Hamburger Animation */
#menu-icon.active #bar1 {
    transform: translateY(4px) rotate(45deg);
}
#menu-icon.active #bar2 {
    opacity: 0;
    transform: scaleX(0);
}
#menu-icon.active #bar3 {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem;
}

/* Mobile Links */
.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    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.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }
#mobile-menu.open .mobile-link:nth-child(6) { transition-delay: 0.35s; }

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .animate-scroll-line {
        animation: none;
        opacity: 1;
    }
    .service-card,
    .experience-card {
        transition: none;
    }
}

/* Responsive */
@media (max-width: 1023px) {
    .clip-hero-left {
        clip-path: none;
    }
}

@media (max-width: 767px) {
    #navbar {
        background-color: rgba(254, 252, 248, 0.97);
        backdrop-filter: blur(12px);
        box-shadow: 0 1px 0 rgba(150, 37, 37, 0.08);
    }
}
