/* ===========================
    GLOBAL RESET & VARS
=========================== */
:root { 
    --paper-base: #e8e4df;      
    --brand-navy: #1B2A3B;      
    --brand-gold: #A68A64;      
    --brand-green: #7a5c3e; /* Reverting to your specific brown-gold tone from the code */
    --ink-dark: #3a2a1a;
}

body {
    margin: 0;
    font-family: "Inter", -apple-system, sans-serif;
    background: #f5f2ee; 
    color: #333;
    overflow-x: hidden;
}

/* ===========================
    HERO SECTION
=========================== */
.hero-wrapper {
    background: url("/images/SanctuaryStage.png") center/cover no-repeat;
    padding: 80px 20px; /* Increased padding for better vertical balance */
    margin-top: -20px;
    min-height: 550px;
    position: relative;
    z-index: 1;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* This is the motion layer */
.hero-wrapper::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("/images/SanctuaryStage.png") center/cover no-repeat;
    z-index: -1;
    
    /* THE MOTION: A slow, breathing zoom */
    animation: kenburns-bg 30s infinite alternate ease-in-out;
    filter: brightness(0.85); /* Dims the image slightly to make the Glass Card pop */
}

@keyframes kenburns-bg {
    0% { transform: scale(1); }
    100% { transform: scale(1.12); }
}

/* ===========================
    GLASS CARD
=========================== */
.glass-card {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 22px;
    padding: 40px;
    max-width: 650px;
    width: 100%;
    margin: 0 auto;
    box-shadow: 6px 6px 18px rgba(0,0,0,0.25);
    border: 2px solid rgba(166, 138, 100, 0.5); /* Brand Gold with transparency */
    text-align: center;
    position: relative;
    z-index: 5;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 8px 8px 25px rgba(0,0,0,0.3);
}

/* ===========================
    TYPOGRAPHY
=========================== */
h1 {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-style: italic;
    font-size: 36px;
    margin-bottom: 10px;
    color: var(--ink-dark);
}

.subtitle {
    font-size: 18px;
    color: #5a4633;
    font-weight: 500;
    margin-bottom: 10px;
}

.welcome {
    font-size: 16px;
    font-family: 'Georgia', serif;
    font-style: italic;
    color: #4a3a2a;
    margin-bottom: 25px;
}

/* ===========================
    BUTTONS
=========================== */
.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-main, .cta-btn {
    background: var(--brand-green);
    color: white;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    transition: background 0.3s ease;
}

.btn-main:hover, .cta-btn:hover {
    background: #5d462f;
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--brand-green);
    color: var(--brand-green);
    padding: 12px 26px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--brand-green);
    color: white;
}

/* ===========================
    MODAL & AUTH
=========================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.65);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 18px;
    padding: 40px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.4);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px; right: 15px;
    background: none; border: none;
    font-size: 24px; color: #333;
    cursor: pointer; line-height: 1;
}

.auth-input {
    width: 100%;
    padding: 8px 15px;
    margin-bottom: 5px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 16px;
    background: rgba(255,255,255,0.8);
}

.password-field { position: relative; 
    margin-bottom: 10px; 
}

#password-input {
    width: 100%;
    padding: 8px 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 16px;
    background: rgba(255,255,255,0.8);
    padding-right: 40px; /* Space for toggle button */
}
.password-toggle {
    position: absolute;
    right: 12px; top: 43%;
    transform: translateY(-50%);
    background: none; border: none;
    font-size: 20px; color: #666;
    cursor: pointer; line-height: 0;
}

.btn-submit {
    background: var(--brand-green);
    color: white;
    padding: 14px;
    width: 100%;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
}

.register-link { margin-top: 20px; font-size: 14px; }
.register-link a { color: var(--brand-green); font-weight: bold; text-decoration: none; }

/* ===========================
    PAGE CONTENT (Below Hero)
=========================== */
.page-gradient {
    background: linear-gradient(to bottom, #8a6f4e63 0%, #c8a57d2e 35%, #f5f2ee 100%);
    padding: 20px 0 60px 0;
}

.scripture {
    max-width: 650px;
    margin: 40px auto;
    padding: 24px 30px;
    font-family: "Georgia", serif;
    font-size: 20px;
    font-style: italic;
    line-height: 1.6;
    color: #4a3a2a;
    background: rgba(255, 255, 255, 0.7);
    border-left: 5px solid var(--brand-green);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    text-align: center;
    transition: opacity 0.4s ease-in-out;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.visit-cta {
    text-align: center;
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.visit-cta h2 { font-family: 'Georgia', serif; font-size: 32px; color: var(--ink-dark); margin-bottom: 15px; }
.visit-cta p { font-size: 18px; color: #4a3a2a; line-height: 1.6; margin-bottom: 30px; }

/* ===========================
    MOBILE RESPONSIVENESS
=========================== */
@media (min-width: 768px) {
    .hero-wrapper { padding: 40px 15px; min-height: 450px; }
    h1 { font-size: 28px; }
    .glass-card { padding: 30px 20px; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .btn-main, .btn-outline { width: 100%; }
    
 /*    .password-toggle {
        position: absolute;
        -webkit-appearance: none;
        appearance: none;
        top: 43%;
        background: none; border: none;
        font-size: 20px; color: #ff0000;
        transform: translateY(-50%);
        cursor: pointer; line-height: 0;
    } */
}

/* Putting this at the bottom ensures it's the last thing the browser reads */
.password-field {
    position: relative !important;
    display: block !important;
}

.password-toggle {
    position: absolute !important;
    right: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    
    /* The Nuclear Visual Test */
    color: #666 !important; 
    font-size: 18px !important;
    
    /* Kill all default mobile styling */
    background: none !important;
    border: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    padding: 0 !important;
    z-index: 999 !important;
}

/* ============================================================
   MOBILE BUTTON STACKING (768px and smaller)
   ============================================================ */
@media screen and (max-width: 768px) {
    
   .hero-wrapper .hero-buttons {
        display: flex !important;
        flex-direction: column !important; 
        width: 100% !important;
        gap: 15px !important;
        align-items: center !important; /* Centers the 100% width block */
        padding: 0 !important;
    }

    /* 2. Force the buttons to expand to 100% of the glass card */
    .hero-wrapper .hero-buttons .btn-main, 
    .hero-wrapper .hero-buttons .btn-outline {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important; /* Removes any width restrictions */
        box-sizing: border-box !important; /* Prevents padding from breaking the width */
        text-align: center !important;
        margin: 0 !important;
    }
}

/* ============================================================
   FILMSTRIP - CONSTRAINED WIDTH & OVERLAP
   ============================================================ */
.filmstrip-container {
    max-width: 1000px;      /* Matches the width of your glass card/container */
    width: 95%;             /* Ensures padding on mobile */
    margin: -40px auto 40px auto !important; /* -40px pulls it UP, auto centers it */
    overflow: hidden;
    position: relative;
    z-index: 10;
    background: transparent;
    display: block !important;
}

.filmstrip-item {
    width: 135px !important;  
    height: 90px !important;  
    margin: 0 8px !important;
    flex-shrink: 0 !important;
    cursor: pointer;          /* Shows it is clickable */
}

/* ============================================================
   FILMSTRIP SCROLLER & LIGHTBOX - MASTER BLOCK
   ============================================================ */
.filmstrip-container {
    max-width: 1000px !important;  /* Matches the Plan Your Visit width */
    width: 95% !important;
    margin: -40px auto 40px auto !important; /* -40px pulls it UP, auto centers it */
    overflow: hidden !important;
    position: relative !important;
    z-index: 10 !important;
    background: transparent !important;
    display: block !important;
}

/* THIS IS WHAT GOT DELETED: It forces the single line and motion */
.filmstrip-track {
    display: flex !important; 
    flex-direction: row !important;
    flex-wrap: nowrap !important; /* Strictly forbids stacking */
    width: max-content !important; 
    animation: scroll-filmstrip 45s linear infinite;
}

.filmstrip-track:hover {
    animation-play-state: paused;
}

.filmstrip-item {
    width: 135px !important;  
    height: 90px !important;  
    margin: 0 10px !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
}

.filmstrip-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 8px !important; 
    border: 3px solid #ffffff !important; 
    box-shadow: 0 6px 15px rgba(0,0,0,0.2) !important;
    transition: transform 0.3s ease !important;
}

.filmstrip-item img:hover {
    transform: scale(1.08) rotate(1deg) !important;
}

/* THE SCROLLING ENGINE */
@keyframes scroll-filmstrip {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===========================
    LIGHTBOX STYLES
   =========================== */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.lightbox-content {
    max-width: 90%;
    max-height: 85%;
    border: 5px solid white;
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}