/* ==========================================================================
   CUSTOM FONT: MANROPE (WOFF & WOFF2)
   ========================================================================== */
@font-face {
    font-family: 'Manrope';
    src: url('../fonts/manrope/Manrope-ExtraLight.woff2') format('woff2'),
         url('../fonts/manrope/Manrope-ExtraLight.woff') format('woff');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/manrope/Manrope-Light.woff2') format('woff2'),
         url('../fonts/manrope/Manrope-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/manrope/Manrope-Regular.woff2') format('woff2'),
         url('../fonts/manrope/Manrope-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/manrope/Manrope-Medium.woff2') format('woff2'),
         url('../fonts/manrope/Manrope-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/manrope/Manrope-SemiBold.woff2') format('woff2'),
         url('../fonts/manrope/Manrope-SemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/manrope/Manrope-Bold.woff2') format('woff2'),
         url('../fonts/manrope/Manrope-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/manrope/Manrope-ExtraBold.woff2') format('woff2'),
         url('../fonts/manrope/Manrope-ExtraBold.woff') format('woff');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* ============================================
   BASE STYLES
   ============================================ */
.single-berita-foto-layout {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #ffffff;
    color: #1a1a1a;
    -webkit-font-smoothing: antialiased;
}

.photo-story {
    padding: 16px 0;
}

/* ============================================
   PHOTO HEADER (Prefix photo- agar tidak bentrok)
   ============================================ */
.photo-header {
    margin-bottom: 20px;
}

.photo-category {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #e60012;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding: 3px 8px;
    background: rgba(230, 0, 18, 0.08);
    border-radius: 3px;
}

.photo-title {
    font-family: 'Manrope', sans-serif;
    font-size: 36px;
    font-weight: 900;
    line-height: 43px;
    letter-spacing: 0.4px;
    color: #212121;
    margin-bottom: 16px;
}

/* Photo Meta */
.photo-meta {
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.photo-meta-source {
    font-weight: 700;
    color: #333;
}

.photo-meta-separator {
    color: #999;
}

.photo-meta-date {
    color: #666;
}

/* Photo Author dengan Avatar */
.photo-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px 0;
    font-family: 'Manrope', sans-serif;
}

.photo-author-avatars {
    display: flex;
    gap: 0;
}

.photo-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-left: -8px;
}

.photo-author-avatar:first-child {
    margin-left: 0;
}

/* Warna Background Avatars (Prefix photo-) */
.photo-author-avatar.photo-bg-purple { background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%); }
.photo-author-avatar.photo-bg-green { background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%); }
.photo-author-avatar.photo-bg-blue { background: linear-gradient(135deg, #3498db 0%, #2980b9 100%); }
.photo-author-avatar.photo-bg-red { background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); }
.photo-author-avatar.photo-bg-orange { background: linear-gradient(135deg, #f39c12 0%, #d68910 100%); }

.photo-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.photo-author-names {
    font-size: 15px;
    font-weight: 700;
    color: #212121;
    line-height: 1.3;
}

.photo-author-team {
    font-size: 13px;
    font-weight: 500;
    color: #666;
}

/* Responsive untuk Photo Header */
@media (max-width: 768px) {
    .photo-title {
        font-size: 22px;
        line-height: 1.3;
    }
    
    .photo-meta {
        font-size: 12px;
    }
    
    .photo-author-avatar {
        width: 36px;
        height: 36px;
        font-size: 12px;
        margin-left: -6px;
    }
    
    .photo-author-names {
        font-size: 14px;
    }
    
    .photo-author-team {
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .photo-title {
        font-size: 20px;
    }
    
    .photo-meta {
        font-size: 11px;
    }
    
    .photo-author-avatar {
        width: 32px;
        height: 32px;
        font-size: 11px;
        margin-left: -5px;
    }
    
    .photo-author-names {
        font-size: 13px;
    }
    
    .photo-author-team {
        font-size: 11px;
    }
}

/* ============================================
   ACTION BAR
   ============================================ */
.photo-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.photo-action-item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #555;
    font-size: 14px;
    transition: color 0.2s ease;
}

.photo-action-item:hover {
    color: #1a73e8;
}

.photo-action-item svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ============================================
   PARAGRAPH
   ============================================ */
.photo-paragraph {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 14px;
    text-align: justify;
}

/* ============================================
   MOBILE STACK (Default: Tampil di Mobile)
   ============================================ */
.photo-desktop-slider {
    display: none;
}

.photo-action-bar-bottom {
    display: none;
}

.photo-mobile-stack {
    display: block;
}

.photo-mobile-item {
    margin: 0 0 24px 0;
}

.photo-mobile-img-wrapper {
    position: relative;
    width: 100%;
    border-radius: 2px;
    overflow: hidden;
    background: #000;
    margin-bottom: 12px;
}

.photo-mobile-img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

/* Counter Individual Mobile */
.photo-mobile-counter {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.5) 100%);
}

.photo-icon {
    width: 24px;
    height: 24px;
    background: #1a73e8;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-icon svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: #fff;
    stroke-width: 1.8;
}

.photo-counter-text {
    font-size: 12px;
    color: #fff;
    font-weight: 600;
    background: rgba(0,0,0,0.6);
    padding: 3px 7px;
    border-radius: 3px;
}

/* Caption Mobile */
.photo-mobile-caption {
    font-size: 13px;
    line-height: 1.5;
    color: #333;
    margin: 0;
}

.photo-mobile-caption .credit {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #666;
}

/* ============================================
   DESKTOP VERSION (min-width: 1024px)
   ============================================ */
@media (min-width: 1024px) {
    .photo-story {
        max-width: 800px;
        margin: 0 auto;
        padding: 16px 0;
    }

    /* Header Desktop */
    .photo-header {
        text-align: left;
        margin-bottom: 20px;
    }

    .photo-category {
        background: none;
        padding: 0;
        font-size: 13px;
    }

    .photo-title {
        font-size: 32px;
        line-height: 1.2;
        letter-spacing: -0.5px;
        margin-bottom: 16px;
    }

    .photo-meta {
        align-items: center;
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 20px;
    }

    .photo-meta-author {
        font-size: 14px;
    }

    .photo-meta-author .source {
        color: #e60012;
    }

    .photo-meta-date {
        font-size: 13px;
    }

    .photo-action-bar {
        padding: 12px 0;
        margin-bottom: 20px;
    }

    .photo-paragraph {
        font-size: 16px;
        margin-bottom: 20px;
    }

    /* TAMPILKAN Slider, Sembunyikan Stack di Desktop */
    .photo-desktop-slider {
        display: block;
    }

    .photo-mobile-stack {
        display: none;
    }

    .photo-action-bar-bottom {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 0;
        border-top: 1px solid #f0f0f0;
    }

    /* Desktop Slider Styles */
    .photo-main-wrapper {
        position: relative;
        width: 100%;
        border-radius: 8px;
        overflow: hidden;
        background: #000;
        margin-bottom: 16px;
    }

    /* Main Image - Tinggi 380px */
    .photo-main-image {
        width: 100%;
        height: 380px;
        object-fit: cover;
        display: block;
        transition: opacity 0.3s ease;
    }

    .photo-main-image.fade {
        opacity: 0.5;
    }

    /* Navigation Arrows untuk Main Image */
    .photo-nav-arrow {
        display: flex;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.9);
        border: none;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background 0.2s ease;
        z-index: 2;
    }

    .photo-nav-arrow:hover {
        background: #fff;
    }

    .photo-nav-arrow svg {
        width: 20px;
        height: 20px;
        fill: none;
        stroke: #1a1a1a;
        stroke-width: 2.5;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .photo-nav-arrow.left {
        left: 16px;
    }

    .photo-nav-arrow.right {
        right: 16px;
    }

    /* Caption Wrapper dengan tinggi absolut 5 baris */
    .photo-caption-wrapper {
        min-height: 105px; /* 14px × 1.5 × 5 baris */
        margin-bottom: 24px;
    }

    .photo-caption {
        font-size: 14px;
        line-height: 1.5;
        color: #333;
        margin: 0;
    }

    .photo-caption .credit {
        display: block;
        margin-top: 4px;
        font-size: 12px;
        color: #666;
    }

    /* ============================================
       THUMBNAILS WRAPPER - Container untuk thumbnail + panah
       Panah TERPISAH dari container scroll
       ============================================ */
    .photo-thumbnails-wrapper {
        position: relative;
        display: flex;
        align-items: center;
        margin-bottom: 20px;
    }

    /* Container Thumbnail yang Scroll */
    .photo-thumbnails {
        display: flex;
        align-items: center;
        gap: 6px;
        overflow-x: auto;
        scrollbar-width: none;
        padding: 8px 0;
        flex: 1;
    }

    .photo-thumbnails::-webkit-scrollbar {
        display: none;
    }

    /* Panah Navigasi Thumbnail - ABSOLUT terhadap wrapper (tidak ikut scroll) */
    .photo-thumb-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 36px;
        height: 36px;
        background: #ffffff;
        border: 1px solid #e0e0e0;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        color: #555;
        transition: all 0.2s ease;
        z-index: 10;
        box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    }

    .photo-thumb-arrow:hover {
        background: #1a73e8;
        color: #ffffff;
        border-color: #1a73e8;
        transform: translateY(-50%) scale(1.08);
        box-shadow: 0 4px 12px rgba(26,115,232,0.3);
    }

    .photo-thumb-arrow svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2.5;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    /* Posisi Panah Kiri */
    .photo-thumb-prev {
        left: -18px;
    }

    /* Posisi Panah Kanan */
    .photo-thumb-next {
        right: -18px;
    }

    /* Thumbnail Item - Default (Tidak Aktif) */
 
    .photo-thumb-item {
        flex: 0 0 calc(25% - 4.5px); /* 4 thumbnail pas dalam container */
        height: 100px;
        border-radius: 4px;
        overflow: hidden;
        cursor: pointer;
        transition: all 0.3s ease;
        border: none;
        opacity: 0.4;
        filter: brightness(0.6);
    }

    /* Thumbnail Item - Aktif (Lebih Jelas, Ukuran Sama) */
    .photo-thumb-item.active {
        opacity: 1;
        filter: brightness(1);
    }

    /* Thumbnail Hover */
    .photo-thumb-item:hover {
        opacity: 0.7;
        filter: brightness(0.85);
    }

    .photo-thumb-item.active:hover {
        opacity: 1;
        filter: brightness(1);
    }

    /* Gambar di dalam Thumbnail */
    .photo-thumb-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
}

/* ============================================
   TAGS & FOOTER
   ============================================ */
.berita-foto-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.bf-tags {
    font-size: 13px;
    color: #888;
}

.bf-tags span {
    font-weight: 600;
}

.bf-tags a {
    display: inline-block;
    background: #f0f0f0;
    color: #555;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    margin: 4px;
    transition: all 0.2s ease;
}

.bf-tags a:hover {
    background: #e60012;
    color: #fff;
}

/* Fallback */
.bf-gallery-fallback {
    margin-top: 20px;
}