/* ==================================================
   PAGE
================================================== */

.page-section{
    padding:24px 0 50px;
}

/* ==================================================
   BREADCRUMB
================================================== */

.breadcrumb-wrapper{
    margin-bottom:20px;
}

.breadcrumb{
    display:flex;
    flex-wrap:wrap;
    gap:6px;

    margin:0;

    font-size:14px;
    color:#64748b;
}

.breadcrumb a{
    color:var(--primary);
    text-decoration:none;
}

.breadcrumb span{
    color:#334155;
    word-break:break-word;
}

/* ==================================================
   CARD
================================================== */

.detail-card{
    background:#fff;

    border:1px solid #e5e7eb;
    border-radius:18px;

    overflow:hidden;

    box-shadow:
        0 10px 30px rgba(15,23,42,.05);
}

/* ==================================================
   HEADER
================================================== */

.detail-header{
    display:flex;
    gap:28px;

    padding:28px;

    border-bottom:
        1px solid #e5e7eb;
}

.detail-image{
    width:320px;
    min-width:320px;
}

.detail-image img{
    width:100%;
    height:220px;

    object-fit:cover;

    border-radius:14px;

    display:block;
}

.detail-info{
    flex:1;
    min-width:0;
}

.detail-title{
    margin:0 0 16px;

    font-size:32px;
    line-height:1.3;
    font-weight:700;

    color:#0f172a;
}

.detail-meta{
    display:flex;
    flex-wrap:wrap;

    gap:16px;

    margin-bottom:16px;

    color:#64748b;
    font-size:14px;
}

.detail-meta span{
    display:flex;
    align-items:center;
    gap:8px;
}

.detail-summary{
    padding:16px 18px;

    border-left:4px solid var(--primary);

    background:#f8fafc;

    border-radius:10px;

    color:#475569;

    line-height:1.7;
}

/* ==================================================
   GALLERY
================================================== */

.story-gallery{
    padding:24px 28px 0;

    display:grid;

    grid-template-columns:
        repeat(auto-fill,minmax(140px,1fr));

    gap:14px;
}

.story-item{
    border-radius:12px;

    overflow:hidden;

    cursor:pointer;

    border:1px solid #e5e7eb;

    background:#f8fafc;
}

.story-item img{
    width:100%;
    height:140px;

    object-fit:cover;

    transition:.3s ease;
}

.story-item:hover img{
    transform:scale(1.05);
}

/* ==================================================
   DOCUMENT
================================================== */

.document-section{
    padding:24px 28px 0;
}

.document-title{
    margin:0 0 18px;

    font-size:18px;
    font-weight:700;

    color:#0f172a;
}

.document-grid{
    display:grid;

    grid-template-columns:
        repeat(auto-fill,minmax(280px,1fr));

    gap:16px;
}

.document-card{
    display:flex;
    align-items:center;

    gap:14px;

    padding:16px;

    border:1px solid #e5e7eb;
    border-radius:14px;

    background:#fff;
}

.document-icon{
    font-size:32px;
    flex-shrink:0;
}

.document-icon .fa-file-pdf{
    color:#dc2626;
}

.document-icon .fa-file-word{
    color:#2563eb;
}

.document-icon .fa-file-excel{
    color:#16a34a;
}

.document-icon .fa-file-powerpoint{
    color:#ea580c;
}

.document-info{
    flex:1;
    min-width:0;
}

.document-name{
    font-size:14px;
    font-weight:600;

    color:#334155;

    word-break:break-word;
}

.btn-preview-file{
    border:none;

    background:var(--primary);
    color:#fff;

    padding:9px 14px;

    border-radius:10px;

    font-size:13px;

    flex-shrink:0;
}

/* ==================================================
   CONTENT
================================================== */

.detail-body{
    padding:30px 28px;
}

.detail-content{
    color:#334155;

    font-size:16px;
    line-height:1.9;
}

.detail-content img{
    max-width:100%;
    height:auto;

    border-radius:12px;
}

.detail-content iframe{
    max-width:100%;
}

.detail-content table{
    width:100%;

    display:block;
    overflow-x:auto;
}

.detail-content *{
    max-width:100%;
}

/* ==================================================
   STORY MODAL
================================================== */

.story-overlay{
    position:fixed;
    inset:0;

    background:rgba(0,0,0,.95);

    display:none;

    align-items:center;
    justify-content:center;

    z-index:999999;
}

.story-overlay.active{
    display:flex;
}

.story-container{
    position:relative;

    width:100%;
    height:100vh;

    display:flex;
    align-items:center;
    justify-content:center;
}

.story-image img{
    max-width:95%;
    max-height:90vh;

    object-fit:contain;
}

.story-close{
    position:absolute;

    top:20px;
    right:20px;

    width:46px;
    height:46px;

    border-radius:50%;

    background:rgba(255,255,255,.15);

    color:#fff;

    display:flex;
    align-items:center;
    justify-content:center;

    font-size:28px;

    cursor:pointer;

    z-index:10000;
}

.story-progress{
    position:absolute;

    top:0;
    left:0;
    right:0;

    display:flex;

    gap:6px;

    padding:15px;
}

.story-progress div{
    flex:1;

    height:4px;

    background:
        rgba(255,255,255,.25);

    border-radius:999px;
}

.story-progress div.active{
    background:#fff;
}

.story-nav{
    position:absolute;
    inset:0;

    display:flex;
}

.story-nav #prev,
.story-nav #next{
    flex:1;
    cursor:pointer;
}

/* ==================================================
   DOCUMENT MODAL
================================================== */

.document-overlay{
    position:fixed;
    inset:0;

    background:rgba(0,0,0,.95);

    display:none;

    align-items:center;
    justify-content:center;

    z-index:999999;
}

.document-overlay.active{
    display:flex;
}

.document-modal{
    width:95%;
    max-width:1200px;

    height:90vh;

    background:#fff;

    border-radius:14px;

    overflow:hidden;

    position:relative;
}

.document-close{
    position:absolute;

    top:12px;
    right:12px;

    width:42px;
    height:42px;

    border:none;

    border-radius:50%;

    background:rgba(0,0,0,.75);

    color:#fff;

    font-size:24px;

    cursor:pointer;

    z-index:999;
}

#documentFrame{
    width:100%;
    height:100%;

    border:none;
}

/* ==================================================
   TABLET
================================================== */

@media (max-width:991px){

    .detail-header{
        flex-direction:column;
    }

    .detail-image{
        width:100%;
        min-width:100%;
    }

    .detail-image img{
        height:260px;
    }

    .detail-title{
        font-size:28px;
    }
}

/* ==================================================
   MOBILE
================================================== */

@media (max-width:768px){

    .page-section{
        padding:15px 0 40px;
    }

    .detail-header{
        padding:20px;
        gap:18px;
    }

    .detail-body{
        padding:20px;
    }

    .document-section{
        padding:20px 20px 0;
    }

    .story-gallery{
        padding:20px 20px 0;

        grid-template-columns:
            repeat(2,1fr);
    }

    .detail-title{
        font-size:24px;
    }

    .detail-meta{
        flex-direction:column;
        gap:8px;
    }

    .document-grid{
        grid-template-columns:1fr;
    }

    .document-card{
        flex-wrap:wrap;
    }

    .btn-preview-file{
        width:100%;
    }

    .document-modal{
        width:100%;
        height:100vh;

        border-radius:0;
    }

    .story-image img{
        max-width:100%;
        max-height:85vh;
    }
}

/* ==================================================
   SMALL MOBILE
================================================== */

@media (max-width:480px){

    .detail-title{
        font-size:21px;
    }

    .detail-image img{
        height:220px;
    }

    .breadcrumb{
        font-size:12px;
    }

    .story-gallery{
        grid-template-columns:
            repeat(2,1fr);
    }
}