/* Beranda — Galeri Foto & Video */
.home-media-section {
    padding: 90px 0;
}

.home-media-section--photos {
    background: #fff;
}

.home-media-section--videos {
    background: linear-gradient(180deg, #f4faf6 0%, #eef6f1 100%);
    padding-bottom: 72px;
    border-bottom: 1px solid #dce8e0;
}

.home-media-head {
    text-align: center;
    margin-bottom: 40px;
}

.home-media-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--theme-primary, #00a651);
    background: color-mix(in srgb, var(--theme-primary, #00a651) 10%, #fff);
    border: 1px solid color-mix(in srgb, var(--theme-primary, #00a651) 25%, #fff);
    padding: 5px 14px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.home-photo-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 180px;
    gap: 16px;
}

.home-photo-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    display: block;
    text-decoration: none;
    color: #fff;
    box-shadow: 0 10px 32px rgba(0, 40, 20, .12);
    animation: homeMediaFadeIn .55s ease backwards;
    animation-delay: var(--delay, 0s);
}

.home-photo-item:nth-child(1) { grid-column: span 6; grid-row: span 2; }
.home-photo-item:nth-child(2) { grid-column: span 3; }
.home-photo-item:nth-child(3) { grid-column: span 3; }
.home-photo-item:nth-child(4) { grid-column: span 3; }
.home-photo-item:nth-child(5) { grid-column: span 3; }
.home-photo-item:nth-child(6) { grid-column: span 6; }

.home-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.home-photo-item:hover img {
    transform: scale(1.06);
}

.home-photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(10, 22, 16, .82) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 18px;
    transition: background .3s;
}

.home-photo-item:hover .home-photo-overlay {
    background: linear-gradient(180deg, rgba(0, 166, 81, .15) 0%, rgba(10, 22, 16, .88) 100%);
}

.home-photo-cat {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: color-mix(in srgb, var(--theme-primary, #00a651) 70%, #fff);
    margin-bottom: 4px;
}

.home-photo-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
}

.home-photo-zoom {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--theme-primary, #00a651);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0;
    transform: scale(.8);
    transition: opacity .25s, transform .25s;
}

.home-photo-item:hover .home-photo-zoom {
    opacity: 1;
    transform: scale(1);
}

.home-video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.home-video-card {
    position: relative;
    border: none;
    padding: 0;
    border-radius: 18px;
    overflow: hidden;
    background: #1a2030;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 14px 40px rgba(0, 40, 20, .14);
    transition: transform .3s ease, box-shadow .3s ease;
    animation: homeMediaFadeIn .55s ease backwards;
    animation-delay: var(--delay, 0s);
}

.home-video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 50px rgba(0, 80, 40, .18);
}

.home-video-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.home-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}

.home-video-card:hover .home-video-thumb img {
    transform: scale(1.05);
}

.home-video-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .28);
    transition: background .3s;
}

.home-video-card:hover .home-video-play {
    background: rgba(0, 166, 81, .35);
}

.home-video-play span {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .95);
    color: var(--theme-primary, #00a651);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    padding-left: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
    transition: transform .25s;
}

.home-video-card:hover .home-video-play span {
    transform: scale(1.08);
}

.home-video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: rgba(0, 0, 0, .65);
    padding: 3px 8px;
    border-radius: 6px;
}

.home-video-body {
    padding: 16px 18px 18px;
    background: #fff;
}

.home-video-cat {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--theme-primary, #00a651);
    margin-bottom: 6px;
}

.home-video-body h4 {
    font-size: 15px;
    font-weight: 700;
    color: #1f3d2d;
    line-height: 1.4;
    margin: 0;
    min-height: calc(1.4em * 2);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.home-media-cta {
    text-align: center;
    margin-top: 36px;
}

.home-media-empty {
    text-align: center;
    padding: 48px 20px;
    color: #6b8f7b;
    border: 1px dashed #cfe0d6;
    border-radius: 16px;
    background: rgba(255, 255, 255, .6);
}

.home-video-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .82);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s;
}

.home-video-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.home-video-modal-dialog {
    width: min(960px, 100%);
    background: #111;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .5);
    transform: scale(.94);
    transition: transform .3s;
}

.home-video-modal.is-open .home-video-modal-dialog {
    transform: scale(1);
}

.home-video-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: #1a1a1a;
    color: #fff;
}

.home-video-modal-head h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.home-video-modal-close {
    border: none;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.home-video-modal-player {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.home-video-modal-player iframe,
.home-video-modal-player video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

@keyframes homeMediaFadeIn {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 991px) {
    .home-photo-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 160px;
    }
    .home-photo-item:nth-child(n) {
        grid-column: span 1;
        grid-row: span 1;
    }
    .home-photo-item:nth-child(1) {
        grid-column: span 2;
        grid-row: span 2;
    }
    .home-video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .home-media-section { padding: 70px 0; }
    .home-media-section--videos { padding-bottom: 56px; }
    .home-photo-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 200px;
    }
    .home-photo-item:nth-child(n) {
        grid-column: span 1;
        grid-row: span 1;
    }
    .home-video-grid {
        grid-template-columns: 1fr;
    }
}
