/* =============================================
   REACH-AN-ELDER - Main Stylesheet
   Brand Colors & Design System
   ============================================= */

:root {
    /* Brand Colors - DIMMED */
    --blue: #006D8A;
    --red: #8B2E2E;
    --green: #1F7A35;
    --light-blue: #3D8BA0;
    --dark: #2B2B2B;
    --white: #FFFFFF;
    
    /* Extended Palette */
    --blue-dark: #005570;
    --green-dark: #18602A;
    --cream: #FAF5F0;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-500: #6B7280;
    --gray-700: #374151;
    --gray-900: #111827;
    
    /* Typography */
    --font-display: 'Georgia', 'Times New Roman', serif;
    --font-body: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    
    /* Spacing */
    --section-padding: 100px;
    --container-width: 1200px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 18px;
    color: var(--gray-900);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

p, li, td {
    max-width: 70ch;
}

.text-muted, .text-light {
    color: #555;
}

body.modal-open {
    overflow: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid #f4a020;
    outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid #f4a020;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(244, 160, 32, 0.15);
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px 16px;
    z-index: 1000;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =============================================
   ANIMATIONS
   ============================================= */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-60px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(60px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hero-rotator {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.hero-rotator-frame {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.45);
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.hero-rotator-frame.active {
    opacity: 1;
}

.video-carousel {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 0 32px;
}

.video-track {
    position: relative;
    height: 420px;
    perspective: 1600px;
}

.video-slide {
    position: absolute;
    top: 0;
    left: 50%;
    width: 72%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    background: var(--gray-900);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.25);
    transform: translateX(-50%) scale(0.85);
    opacity: 0;
    transition: transform var(--transition-slow), opacity var(--transition-slow);
}

.video-slide.active {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    z-index: 3;
}

.video-slide.prev {
    opacity: 0.7;
    transform: translateX(-78%) scale(0.9);
    z-index: 2;
    filter: grayscale(0.15);
}

.video-slide.next {
    opacity: 0.7;
    transform: translateX(-22%) scale(0.9);
    z-index: 2;
    filter: grayscale(0.15);
}

.video-slide video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.video-slide .video-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
    color: var(--white);
}

.video-slide .video-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
}

.video-slide .video-duration {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}

.video-carousel-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}

.video-carousel button {
    background: var(--dark);
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.12);
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-normal);
}

.video-carousel button:hover {
    background: var(--blue);
    border-color: var(--blue);
}

.video-carousel-status {
    font-size: 14px;
    color: var(--gray-500);
}

.video-bullets {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
}

.video-bullet {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gray-200);
    border: 1px solid var(--gray-300);
}

.video-bullet.active {
    background: var(--blue);
    border-color: var(--blue);
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================
   UTILITIES
   ============================================= */

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: var(--section-padding) 0;
}

.home .section {
    padding: 80px 0;
}

.text-center { text-align: center; }
.text-white { color: var(--white); }

/* =============================================
   BUTTONS
   ============================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-primary {
    background: #B82222;
    color: var(--white);
    box-shadow: 0 4px 20px rgba(184, 34, 34, 0.3);
}

.btn-primary:hover {
    background: #8B2E2E;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(184, 34, 34, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: var(--white);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
}

.btn-red {
    background: var(--red);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(214, 40, 40, 0.4);
}

.btn-red:hover {
    background: #B82222;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(214, 40, 40, 0.5);
}

.btn-blue {
    background: var(--blue);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(0, 163, 224, 0.3);
}

.btn-blue:hover {
    background: var(--blue-dark);
    transform: translateY(-3px);
}

.btn-white {
    background: var(--white);
    color: var(--red);
}

.btn-white:hover {
    background: var(--gray-50);
    transform: translateY(-3px);
}

.btn-green {
    background: var(--green);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(47, 182, 76, 0.3);
}

.btn-green:hover {
    background: var(--green-dark);
    transform: translateY(-3px);
}

/* =============================================
   HEADER / NAVIGATION
   ============================================= */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    padding: 16px 0;
    transition: all 0.4s ease;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    padding: 12px 0;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--blue), var(--light-blue));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
}

.logo-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.2) 50%, transparent 60%);
    animation: shimmer 3s infinite;
}

.logo-icon span {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    position: relative;
    z-index: 1;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--white);
    transition: color var(--transition-normal);
}

.header.scrolled .logo-text {
    color: var(--dark);
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    transition: all var(--transition-normal);
}

.header.scrolled .nav-link {
    color: var(--gray-700);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
}

.header.scrolled .nav-link:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.nav-link.active,
.nav-link[aria-current="page"] {
    background: var(--white);
    color: var(--blue);
    box-shadow: 0 0 0 2px rgba(255,255,255,0.4);
}

.header.scrolled .nav-link.active,
.header.scrolled .nav-link[aria-current="page"] {
    background: var(--blue);
    color: var(--white);
    box-shadow: 0 0 0 2px rgba(0,109,138,0.2);
}

.nav-cta {
    background: var(--red);
    color: var(--white) !important;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    margin-left: 8px;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px rgba(214, 40, 40, 0.3);
}

.nav-cta:hover {
    background: #B82222;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(214, 40, 40, 0.4);
}

.nav-cta.active,
.nav-cta[aria-current="page"] {
    background: var(--red);
    color: var(--white) !important;
    box-shadow: 0 0 0 2px rgba(139, 46, 46, 0.2);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    margin: 6px 0;
    transition: all var(--transition-normal);
}

.header.scrolled .mobile-menu-btn span {
    background: var(--dark);
}

/* =============================================
   SECTION STYLES
   ============================================= */

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--blue);
    margin-bottom: 16px;
}

.section-label::before {
    content: '';
    width: 40px;
    height: 2px;
    background: var(--blue);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
    margin-bottom: 24px;
}

.section-text {
    font-size: 17px;
    color: var(--gray-500);
    line-height: 1.8;
    margin-bottom: 32px;
}

/* =============================================
   FORMS
   ============================================= */

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    font-family: inherit;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    background: var(--white);
    transition: all var(--transition-normal);
    outline: none;
}

.form-control:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(0, 163, 224, 0.1);
}

.form-control::placeholder {
    color: var(--gray-500);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* =============================================
   CARDS
   ============================================= */

.card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    transition: all 0.4s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

/* =============================================
   FOOTER
   ============================================= */

.footer {
    background: var(--dark);
    color: var(--white);
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    margin-top: 20px;
    line-height: 1.7;
}

.footer-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--white);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    transition: color var(--transition-normal);
}

.footer-links a:hover {
    color: var(--light-blue);
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.6);
}

.footer-contact-item svg {
    width: 20px;
    height: 20px;
    color: var(--light-blue);
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.footer-scripture {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-style: italic;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all var(--transition-normal);
}

.footer-social a:hover {
    background: var(--blue);
    transform: translateY(-4px);
}

/* =============================================
   ALERTS & NOTIFICATIONS
   ============================================= */

.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: rgba(47, 182, 76, 0.1);
    color: var(--green);
    border: 1px solid rgba(47, 182, 76, 0.2);
}

.alert-error {
    background: rgba(214, 40, 40, 0.1);
    color: var(--red);
    border: 1px solid rgba(214, 40, 40, 0.2);
}

.alert-info {
    background: rgba(0, 163, 224, 0.1);
    color: var(--blue);
    border: 1px solid rgba(0, 163, 224, 0.2);
}

.form-feedback {
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
}

.form-feedback.success {
    background: rgba(47, 182, 76, 0.1);
    color: var(--green);
    border: 1px solid rgba(47, 182, 76, 0.2);
}

.form-feedback.error {
    background: rgba(214, 40, 40, 0.1);
    color: var(--red);
    border: 1px solid rgba(214, 40, 40, 0.2);
}

/* =============================================
   LOADING STATES
   ============================================= */

.loading {
    pointer-events: none;
    opacity: 0.7;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

    .hero-video {
        display: none !important;
    }
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 1024px) {
    :root {
        --section-padding: 80px;
    }

    .video-track {
        height: 360px;
    }

    .video-slide {
        width: 80%;
    }

    .video-slide.prev {
        transform: translateX(-80%) scale(0.92);
    }

    .video-slide.next {
        transform: translateX(-20%) scale(0.92);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
    }

    /* Mobile menu - simple, works everywhere */
    .nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: #ffffff;
        flex-direction: column;
        padding: 80px 24px 24px;
        z-index: 999;
        overflow-y: auto;
    }
    
    .nav.active {
        display: flex;
    }
    
    .nav-link {
        padding: 16px 0;
        font-size: 18px;
        color: #2B2B2B;
        border-bottom: 1px solid #eee;
    }
    
    .nav-cta {
        margin-top: 24px;
        width: 100%;
        text-align: center;
    }
    
    /* Keep logo visible */
    .logo {
        position: relative;
        z-index: 1000;
    }
    
    /* Hamburger stays on top */
    .mobile-menu-btn {
        display: block;
        position: relative;
        z-index: 1001;
    }

    .video-track {
        height: 260px;
    }

    .video-slide {
        width: 88%;
    }

    .video-slide.prev {
        transform: translateX(-68%) scale(0.94);
    }

    .video-slide.next {
        transform: translateX(-32%) scale(0.94);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}
