/* ===== Hero ===== */
.kosher-hero {
    --hero-fade: var(--white);
}

.kosher-hero::after {
    /* Bright sanctuary photo: darker veil so the gold subtitle stays readable */
    background: linear-gradient(180deg, rgba(5, 18, 12, .6) 0%, rgba(5, 18, 12, .5) 80%, var(--hero-fade) 100%);
}

.kosher-hero h1 {
    font-size: clamp(2.4rem, 7vw, 5rem);
}

.kosher-hero .page-hero-sub {
    font-weight: 700;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.7);
}


/* ===== Intro: framed photo + story ===== */
.kosher-intro {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    align-items: center;
    gap: 4rem;
}

.kosher-photo {
    position: relative;
    padding: 0 1.5rem 1.5rem 0;
}

.kosher-photo::before {
    content: "";
    position: absolute;
    inset: 1.5rem 0 0 1.5rem;
    border: 4px solid var(--golden-frog);
    border-radius: 24px;
}

.kosher-photo img {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
}

.kosher-text {
    font-size: 1.1rem;
    line-height: 1.75;
    color: #333;
}

.kosher-text p + p {
    margin-top: 1.1rem;
}

.kosher-eyebrow {
    text-align: left;
}

.kosher-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.kosher-lead {
    font-size: 1.25rem;
    line-height: 1.65;
    color: var(--forest-dark);
}

.admission-note {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.1rem 1.3rem;
    border-left: 4px solid var(--golden-frog);
    border-radius: 0 14px 14px 0;
    background: rgba(244, 208, 63, 0.14);
}

.admission-note svg {
    flex: none;
    width: 26px;
    height: 26px;
    margin-top: 0.15rem;
    fill: none;
    stroke: var(--forest-green);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.kosher-text .admission-note p {
    margin: 0;
    line-height: 1.5;
    color: var(--forest-dark);
}

.admission-note strong {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--forest-light);
}


/* ===== What we'll visit ===== */
.visit-grid {
    list-style: none;
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.visit-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    padding: 2.4rem 1.5rem;
    text-align: center;
    border-radius: 18px;
    background: var(--forest-green);
    border: 1px solid rgba(244, 208, 63, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.visit-card:hover {
    transform: translateY(-4px);
    border-color: var(--golden-frog);
}

.visit-card svg {
    width: 48px;
    height: 48px;
    fill: none;
    stroke: var(--golden-frog);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.visit-card h3 {
    font-size: 1.15rem;
    color: var(--white);
}


/* ===== Gallery: asymmetric grid on desktop, carousel on mobile ===== */
.kosher-gallery-section {
    background: var(--off-white);
}

.photo-gallery {
    max-width: 1200px;
    margin: 0 auto;
}

/* Desktop: three columns of different widths, aligned top and bottom,
   with tiles of varied heights so the seams between rows stagger (grid-area: row-start / col-start / row-end / col-end) */
.gallery-stage {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 40px;
    gap: 1rem;
}

.gallery-item {
    position: relative;
    grid-column: span 4;
    grid-row: span 4;
    padding: 0;
    border: 3px solid var(--golden-frog);
    border-radius: 14px;
    overflow: hidden;
    background: var(--golden-frog);
    cursor: zoom-in;
    box-shadow: 0 8px 20px rgba(10, 31, 21, 0.15);
}

.gallery-item:nth-child(1)  { grid-area: 1 / 1 / 9 / 6; }
.gallery-item:nth-child(2)  { grid-area: 1 / 6 / 7 / 10; }
.gallery-item:nth-child(3)  { grid-area: 1 / 10 / 10 / 13; }
.gallery-item:nth-child(4)  { grid-area: 9 / 1 / 15 / 6; }
.gallery-item:nth-child(5)  { grid-area: 7 / 6 / 13 / 10; }
.gallery-item:nth-child(6)  { grid-area: 10 / 10 / 16 / 13; }
.gallery-item:nth-child(7)  { grid-area: 15 / 1 / 23 / 6; }
.gallery-item:nth-child(8)  { grid-area: 13 / 6 / 22 / 10; }
.gallery-item:nth-child(9)  { grid-area: 16 / 10 / 24 / 13; }
.gallery-item:nth-child(10) { grid-area: 23 / 1 / 29 / 6; }
.gallery-item:nth-child(11) { grid-area: 22 / 6 / 35 / 10; }
.gallery-item:nth-child(12) { grid-area: 24 / 10 / 35 / 13; }
.gallery-item:nth-child(13) { grid-area: 29 / 1 / 35 / 6; }

.gallery-item img {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease, opacity 0.3s ease;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
    transform: scale(1.05);
    opacity: 0.9;
}

.gallery-item:focus-visible {
    outline: 3px solid var(--golden-frog);
    outline-offset: 2px;
}

/* Carousel controls only exist on mobile */
.gallery-stage .car-arrow,
.gallery-thumbs {
    display: none;
}

@media (max-width: 768px) {
    .photo-gallery {
        max-width: 960px;
    }

    .gallery-stage {
        display: block;
        position: relative;
        height: 62vh;
        padding: 0;
        border-radius: 16px;
        overflow: hidden;
        background: var(--forest-dark);
        box-shadow: 0 20px 45px rgba(10, 31, 21, 0.2);
        touch-action: pan-y;
    }

    .gallery-stage .car-arrow {
        display: block;
    }

    /* Stacked photos, crossfade between them */
    .gallery-item,
    .gallery-item:nth-child(n) {
        grid-area: auto;
        position: absolute;
        border: none;
        inset: 0;
        border-radius: 0;
        box-shadow: none;
        background: none;
        transform: none;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.5s ease;
    }

    .gallery-item.is-active {
        opacity: 1;
        pointer-events: auto;
    }

    /* Blurred copy of the photo fills the sides behind portrait shots */
    .gallery-item::before {
        content: "";
        position: absolute;
        inset: -30px;
        background: var(--bg) center / cover no-repeat;
        filter: blur(24px) brightness(0.55);
    }

    .gallery-item img {
        object-fit: contain;
    }

    .gallery-item:hover img,
    .gallery-item:focus-visible img {
        transform: none;
        opacity: 1;
    }

    .gallery-item:focus-visible {
        outline-offset: -3px;
    }

    .gallery-thumbs {
        position: relative;
        display: flex;
        justify-content: safe center;
        gap: 0.5rem;
        margin-top: 1rem;
        padding: 0.35rem 0.25rem 0.6rem;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .gallery-thumb {
        flex: 0 0 auto;
        width: 50px;
        height: 50px;
        padding: 0;
        border: 2px solid transparent;
        border-radius: 10px;
        overflow: hidden;
        cursor: pointer;
        opacity: 0.6;
        background: none;
        box-shadow: 0 4px 12px rgba(10, 31, 21, 0.2);
        transition: opacity 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
    }

    .gallery-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .gallery-thumb:hover,
    .gallery-thumb.is-active {
        opacity: 1;
        border-color: var(--golden-frog);
        transform: translateY(-2px);
    }
}


/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .visit-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .kosher-intro {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .kosher-photo {
        max-width: 360px;
        margin: 0 auto;
    }

    .kosher-lead {
        font-size: 1.15rem;
    }
}

@media (max-width: 560px) {
    .kosher-text {
        font-size: 1rem;
    }

    .visit-grid {
        gap: 0.75rem;
    }

    .visit-card {
        padding: 1.8rem 1rem;
    }

    .visit-card h3 {
        font-size: 1rem;
    }
}
