/* ========================================================================== */
/*  1. BASE RESET & TYPOGRAPHY                                                */
/* ========================================================================== */

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: var(--font-family-base);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    background: var(--bg-page);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

* {
    box-sizing: border-box;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    color: var(--link-hover);
}

button {
    font-family: inherit;
    cursor: pointer;
}

html {
	scroll-behavior: smooth;
}


/* ========================================================================== */
/*  2. LAYOUT CONTAINERS                                                      */
/* ========================================================================== */

.container {
    width: 100%;
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}


/* ========================================================================== */
/*  3. TYPOGRAPHY HELPERS                                                     */
/* ========================================================================== */

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}


/* ========================================================================== */
/*  4. SPACING UTILITIES                                                      */
/* ========================================================================== */

.u-mt-1 { margin-top: var(--space-1); }
.u-mt-2 { margin-top: var(--space-2); }
.u-mt-3 { margin-top: var(--space-3); }
.u-mt-4 { margin-top: var(--space-4); }
.u-mt-6 { margin-top: var(--space-6); }
.u-mt-8 { margin-top: var(--space-8); }
.u-mt-12 { margin-top: var(--space-12); }

.u-mb-4 { margin-bottom: var(--space-4); }


/* ========================================================================== */
/*  5. BUTTONS                                                                */
/* ========================================================================== */

.btn {
    display: inline-block;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    transition: transform .12s ease, box-shadow .12s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--color-primary-500);
    color: var(--text-inverse);
    border: 0;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    filter: brightness(.98);
    background: var(--btn-primary-hover);
    color: #000;
}

.btn-secondary {
    background: transparent;
    color: var(--color-primary-700);
    border: 2px solid var(--color-primary-300);
}


/* ========================================================================== */
/*  6. ACCESSIBILITY                                                          */
/* ========================================================================== */

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    left: var(--space-4);
    top: var(--space-4);
    width: auto;
    height: auto;
    background: #ffffff;
    padding: var(--space-2) var(--space-3);
    z-index: 1000;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
}


/* ========================================================================== */
/*  7. CARD BASE                                                              */
/* ========================================================================== */

.card-base {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: var(--space-6);
    border: var(--border-light);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card-base:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}


/* ========================================================================== */
/*  8. TEASER BASE                                                            */
/* ========================================================================== */

.teaser {
    padding: 2rem 0;
    text-align: center;
}

.teaser h2 {
    font-size: 1.75rem;
    font-weight: 700;
}

.teaser p {
    max-width: 650px;
    margin: 0.75rem auto 1.5rem;
    color: var(--text-muted);
    line-height: 1.6;
}


/* ========================================================================== */
/*  9. UTILITY CLASSES                                                        */
/* ========================================================================== */

.hidden {
    display: none !important;
}


/* ========================================================================== */
/* 10. PRINT STYLES                                                           */
/* ========================================================================== */

@media print {
    .site-header,
    .site-footer,
    .mobile-menu-button {
        display: none !important;
    }

    body {
        background: #ffffff;
        color: #000000;
    }
}

/* ========================================================================== */
/* 11. MODAL OVERLAY & CONTENT                                                */
/* ========================================================================== */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 250ms ease;
    z-index: 9999;
}

.modal.visible {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #fff;
    padding: 2rem;
    max-width: 650px;
    width: 100%;
    border-radius: 10px;
    position: relative;
    animation: modalFadeIn 300ms ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

@media (max-width: 600px) {
    .modal {
        justify-content: flex-start;
        align-items: flex-start;
        padding: 0;
    }

    .modal-content {
        max-width: 100vw;
        width: 100%;
        margin: 0;
        border-radius: 0;
        padding: 1rem;
    }
}


/* ========================================================================== */
/* 12. MODAL CLOSE BUTTON                                                     */
/* ========================================================================== */

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: #444;
}


/* ========================================================================== */
/* 13. SCRIPTURE LINKS                                                        */
/* ========================================================================== */

.scripture-ref {
    color: var(--color-accent-gold);
    cursor: pointer;
    text-decoration: underline;
    font-weight: 500;
}


/* ========================================================================== */
/* 14. MODAL ANIMATION                                                        */
/* ========================================================================== */

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* ========================================================================== */
/* 15. VERSE PREVIEW (DESKTOP HOVER BOX)                                      */
/* ========================================================================== */

.verse-preview {
    position: absolute;
    background: #fff;
    border: 1px solid var(--border-light);
    padding: 0.75rem;
    max-width: 300px;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.verse-preview.hidden {
    opacity: 0;
    visibility: hidden;
    width: 0;
    height: 0;
    padding: 0;
    border: none;
    box-shadow: none;
}

.verse-preview.visible {
    opacity: 1;
    visibility: visible;
}


/* ========================================================================== */
/* 16. MOBILE — HIDE VERSE PREVIEW                                            */
/* ========================================================================== */

@media (max-width: 767px) {
    .verse-preview {
        display: none !important;
    }
    #verse-preview {
        display: none !important;
    }
}

/* ========================================================================== */
/* 17. SCRIPTURE MODAL — UNIFIED TYPOGRAPHY & VISUAL POLISH                   */
/* ========================================================================== */

.modal-content h3#modal-ref {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: var(--color-primary-700);
    margin-bottom: 0.75rem;
    line-height: 1.3;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border-light);
}

.modal-content p {
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--text-main);
    margin-top: 1rem;
    margin-bottom: 1.25rem;
    animation: verseFadeIn 220ms ease-out;
}

.modal-content p + p {
    margin-top: 0.75rem;
}

.modal-content button#copy-verse.copy-button {
    font-size: 0.9rem;
    padding: 0.45rem 0.9rem;
    border-radius: 6px;
    background: var(--color-primary-600);
    color: #fff;
    border: none;
    box-shadow: var(--shadow-sm);
    transition: background 0.2s ease, transform 0.15s ease;
    margin-top: 1rem;
}

.modal-content button#copy-verse.copy-button:hover {
    background: var(--color-primary-700);
}

.modal-content button#copy-verse.copy-button:active {
    transform: translateY(1px);
}

.modal-content {
    line-height: 1.55;
}

@keyframes verseFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .modal-content h3#modal-ref {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

    .modal-content p {
        font-size: 1.1rem;
        line-height: 1.7;
    }

    .modal-content p:first-child:first-letter {
        font-size: 1.8rem;
    }

    .modal-content p + p {
        margin-top: 0.25rem;
    }

    .modal-content {
        padding: 1.25rem 1.25rem;
        max-height: 85vh;
        overflow-y: auto;
    }
}

.video-responsive {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
}

/* -----------------------------------------
   Global Section Spacing
----------------------------------------- */

.section {
    padding: 1.0rem 0; /* adjust to taste */
    background: var(--bg-section-default);
}

.section.alt {
    background: var(--bg-section-alt);
}

/* Scripture references should look like text, not links */
.scripture-ref {
    color: inherit;
    text-decoration: none;
    cursor: default;
}