/* ============================================
   Two Rivers Hospice — Custom Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* ============================================
   Buttons
   ============================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #0d9468;
    color: #ffffff;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #0d9468;
    cursor: pointer;
}

.btn-primary:hover {
    background: #0a7a56;
    border-color: #0a7a56;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(13, 148, 104, 0.3);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: #0a1628;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    border: 2px solid #0a1628;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #0a1628;
    color: #ffffff;
    transform: translateY(-2px);
}

/* ============================================
   Form Inputs
   ============================================ */
.form-input {
    font-family: 'Inter', system-ui, sans-serif;
}

.form-input::placeholder {
    color: rgba(165, 180, 200, 0.6);
}

/* ============================================
   Navigation
   ============================================ */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #5fe8be;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(240, 253, 249, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(10, 22, 40, 0.08);
}

.navbar-scrolled .nav-link {
    color: #0a1628;
}

.navbar-scrolled .font-serif {
    color: #0a1628;
}

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

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

.hero-text {
    animation: slideUp 0.8s ease 0.3s forwards;
    opacity: 0;
    transform: translateY(30px);
}

.hero-cta {
    animation: slideUp 0.8s ease 0.45s forwards;
    opacity: 0;
    transform: translateY(30px);
}

.hero-image-wrapper {
    animation: fadeIn 1s ease 0.5s forwards;
    opacity: 0;
}

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

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* ============================================
   Scroll Reveal Animations
   ============================================ */
.about-label,
.about-title,
.about-text,
.about-stat,
.services-label,
.services-title,
.service-card,
.approach-label,
.approach-title,
.approach-text,
.approach-item,
.community-label,
.community-title,
.community-card,
.contact-label,
.contact-title,
.contact-text,
.contact-info-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Staggered delays for grid items */
.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; }

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

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    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; }

/* ============================================
   Image Hover Effects
   ============================================ */
.about-image-wrapper img,
.approach-image-wrapper img {
    transition: transform 0.5s ease;
}

.about-image-wrapper:hover img,
.approach-image-wrapper:hover img {
    transform: scale(1.02);
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }

    .about-title,
    .services-title,
    .approach-title,
    .community-title,
    .contact-title {
        font-size: 2.5rem;
    }

    .hero-image-wrapper img {
        height: 400px;
    }

    .approach-image-wrapper img {
        height: 400px;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2.75rem;
    }

    .about-title,
    .services-title,
    .approach-title,
    .community-title,
    .contact-title {
        font-size: 2rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.875rem 1.5rem;
        font-size: 0.875rem;
    }
}
