/* ========================================
   Traditions Health Hospice — Custom Styles
   ======================================== */

/* Base & Typography */
html {
    scroll-behavior: smooth;
}

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

::selection {
    background-color: rgba(232, 106, 91, 0.15);
    color: #2D2D2D;
}

/* ========================================
   Navbar
   ======================================== */
#navbar {
    background: transparent;
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

#navbar.scrolled .font-serif {
    color: #2D2D2D;
}

#navbar.scrolled .menu-line {
    background: #2D2D2D;
}

#navbar.scrolled a:not(.px-8) {
    color: #6d6d6d;
}

#navbar.scrolled a:not(.px-8):hover {
    color: #D4534A;
}

/* ========================================
   Mobile Menu
   ======================================== */
.mobile-link {
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

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

/* Hamburger Animation */
#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 5px;
}

/* ========================================
   Hero Floating Cards
   ======================================== */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(1) {
    animation-delay: 0s;
}

.floating-card:nth-child(2) {
    animation-delay: -2s;
}

.floating-card:nth-child(3) {
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

/* ========================================
   Service Cards
   ======================================== */
.service-card {
    opacity: 1;
}

.service-card .aspect-\[4\/3\] {
    overflow: hidden;
}

/* ========================================
   Testimonial Cards
   ======================================== */
.testimonial-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

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

/* ========================================
   Scroll Reveal Animations
   (Progressive enhancement — content visible without JS)
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

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

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* ========================================
   Form Styles
   ======================================== */
input:focus,
textarea:focus {
    border-color: #F5A08A !important;
}

/* ========================================
   Smooth Scroll Offset for Fixed Nav
   ======================================== */
section[id] {
    scroll-margin-top: 80px;
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 1024px) {
    .floating-card {
        display: none;
    }
}

@media (max-width: 768px) {
    .font-serif {
        line-height: 1.15;
    }
}
