/* -------------------------------------------------------
   VISUAL REFINEMENTS & HEADROOM ADJUSTMENTS
   ------------------------------------------------------- */

/* Global Hero Slider Headroom (index.html) */
.hero-slide img {
    object-position: center 25% !important;
}

/* Global About-Hero Headroom (site-wide) */
.about-hero__bg img {
    object-position: center 25% !important;
}

/* Specific Fix for Sections using background-image on div */
.about-hero__bg {
    background-position: center 25% !important;
}

/* Guiding Scripture Section styling */
.scripture-quote {
    padding: 100px 0;
    background: var(--bg-elevated);
    position: relative;
    overflow: hidden;
}

.quote-bg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(8rem, 20vw, 20rem);
    font-weight: 900;
    opacity: 0.02;
    white-space: nowrap;
    pointer-events: none;
    color: var(--white);
}

/* Missing Margin Utility Classes */
.mt-30 {
    margin-top: 30px !important;
}

.mt-100 {
    margin-top: 100px !important;
}

.mt-150 {
    margin-top: 150px !important;
}

/* --- GALLERY INTERACTIVE FEATURES --- */

/* Filters */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    padding: 12px 30px;
    font-family: var(--font-serif);
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 30px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: 0.05em;
    backdrop-filter: blur(10px);
}

.filter-btn:hover {
    color: var(--white);
    border-color: rgba(212, 175, 55, 0.4);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--gold-gradient);
    border-color: transparent;
    color: var(--navy-dark);
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.25);
    transform: translateY(-2px);
}

/* Smooth filtering transitions */
.portal-item {
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.4s ease;
}

.portal-item.is-hidden {
    opacity: 0;
    transform: scale(0.85);
    pointer-events: none;
}

/* Lightbox Modal overlay */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 8, 20, 0.97);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 85%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9);
    transform: scale(0.92) translateY(10px);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-lightbox.is-open .lightbox-content img {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.lightbox-title {
    margin-top: 25px;
    font-family: var(--font-serif);
    color: var(--gold);
    font-size: 1.6rem;
    letter-spacing: 0.02em;
    text-align: center;
    opacity: 0;
    transform: translateY(15px);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s,
        opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s;
}

.gallery-lightbox.is-open .lightbox-title {
    opacity: 1;
    transform: translateY(0);
}

/* Lightbox UI Controls */
.lightbox-close {
    position: absolute;
    top: -55px;
    right: 10px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 2.8rem;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    color: var(--gold);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    width: 65px;
    height: 65px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 1.4rem;
    backdrop-filter: blur(10px);
}

.lightbox-nav:hover {
    background: var(--gold-gradient);
    color: var(--navy-dark);
    border-color: transparent;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.lightbox-prev {
    left: -100px;
}

.lightbox-next {
    right: -100px;
}

@media (max-width: 992px) {
    .lightbox-prev {
        left: -5px;
        background: rgba(4, 8, 20, 0.8);
    }

    .lightbox-next {
        right: -5px;
        background: rgba(4, 8, 20, 0.8);
    }

    .lightbox-close {
        top: -45px;
        right: 0;
    }
}

/* --- BENTO EVENTS HOVER REFINEMENTS (Minimal Clean Visuals) --- */
.ev-b-content {
    justify-content: flex-end;
    padding: 30px 25px !important;
}

/* Hide description paragraphs and links by default and animate them smoothly */
.ev-b-text p,
.ev-b-link {
    max-height: 0;
    opacity: 0;
    margin: 0 !important;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        opacity 0.3s ease,
        margin 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        visibility 0.3s ease;
}

/* Reduce tight margins in default collapsed state */
.ev-b-tag {
    margin-bottom: 6px !important;
}

.ev-b-text h3 {
    margin-bottom: 0 !important;
    transition: margin-bottom 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Expand content smoothly on hover */
.ev-b-card:hover .ev-b-text h3 {
    margin-bottom: 10px !important;
}

.ev-b-card:hover .ev-b-text p {
    max-height: 120px;
    opacity: 0.9;
    visibility: visible;
    margin-top: 10px !important;
}

.ev-b-card:hover .ev-b-link {
    max-height: 50px;
    opacity: 1;
    visibility: visible;
    margin-top: 18px !important;
}

/* Support responsive heights for mobile viewports */
@media (max-width: 768px) {
    .ev-b-card:hover .ev-b-text p {
        max-height: 200px;
    }
}