/* =========================================
   PUBLIKASI STYLES
   ========================================= */

/* Modal Download Confirmation */
#downloadModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

#downloadModal .modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
    text-align: center;
}

#downloadModal .modal-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #023e8a 0%, #0077b6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

#downloadModal .modal-icon i {
    font-size: 2.5rem;
    color: white;
}

#downloadModal .modal-title {
    font-size: 1.5rem;
    color: #1a1a1a;
    margin-bottom: 10px;
    font-weight: 700;
}

#downloadModal .modal-file-name {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 25px;
    line-height: 1.6;
}

#downloadModal .modal-file-name strong {
    color: #023e8a;
    font-size: 1.05rem;
}

#downloadModal .modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

#downloadModal .btn-batal {
    flex: 1;
    padding: 14px 20px;
    background: #f0f0f0;
    color: #666;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

#downloadModal .btn-batal:hover {
    background: #e0e0e0;
}

#downloadModal .btn-download {
    flex: 1;
    padding: 14px 20px;
    background: linear-gradient(135deg, #023e8a 0%, #0077b6 100%);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

#downloadModal .btn-download:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Publikasi Detail Page */
.publikasi-detail-section {
    padding: 100px 5% 60px;
    background: #f8f9fa;
}

.publikasi-detail-container {
    max-width: 900px;
    margin: 0 auto;
}

.publikasi-detail-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.publikasi-detail-header {
    margin-bottom: 35px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.publikasi-detail-title {
    font-size: 2rem;
    margin: 0 0 20px 0;
    color: #1a1a1a;
    font-weight: 800;
    line-height: 1.3;
}

.publikasi-detail-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.publikasi-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: #e3f2fd;
    color: #023e8a;
}

.publikasi-meta-item {
    color: #666;
    font-size: 0.9rem;
}

.publikasi-file-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    border-left: 4px solid #023e8a;
}

.publikasi-file-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    font-size: 0.9rem;
}

.publikasi-info-label {
    color: #666;
}

.publikasi-info-value {
    color: #023e8a;
    font-weight: 600;
    margin-left: 5px;
}

.publikasi-description {
    margin-bottom: 35px;
}

.publikasi-description-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #023e8a;
    font-weight: 700;
}

.publikasi-description-text {
    color: #666;
    line-height: 1.8;
    text-align: justify;
}

.publikasi-download-section {
    text-align: center;
    padding: 35px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
}

.publikasi-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 50px;
    background: linear-gradient(135deg, #023e8a 0%, #0077b6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(2, 62, 138, 0.3);
}

.publikasi-download-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 62, 138, 0.4);
}

.publikasi-download-btn i {
    font-size: 1.3rem;
}

.publikasi-shield-text {
    margin-top: 15px;
    color: #666;
    font-size: 0.9rem;
}

/* =========================================
   PAGE HERO SECTION (PARTIAL)
   ========================================= */
.page-hero {
    background: linear-gradient(135deg, #023e8a 0%, #0077b6 100%);
    padding: 120px 20px 60px;
    text-align: center;
    color: white;
    width: 100%;
    position: relative;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 800;
    line-height: 1.3;
    text-align: center;
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 20px;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Live Clock */
.live-clock-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 10px 25px;
    background: #ffffff; /* Putih solid, tidak transparan */
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.dot-pulse {
    width: 10px;
    height: 10px;
    background-color: #ff3b30; /* Merah */
    border-radius: 50%;
    position: relative;
}

.dot-pulse::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background-color: #ff3b30; /* Merah */
    border-radius: 50%;
    animation: pulse-ring 2s infinite;
    opacity: 0.7;
}

@keyframes pulse-ring {
    0%,
    100% {
        width: 100%;
        height: 100%;
        opacity: 0.7;
    }
    50% {
        width: 200%;
        height: 200%;
        opacity: 0;
    }
}

.clock-text {
    color: #ff3b30; /* Merah */
    font-size: 0.95rem;
    font-weight: 600;
}

/* =========================================
   RESPONSIVE DESIGN - ALL DEVICES
   ========================================= */

/* Desktop Large (≥1024px) - Default styles apply */

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) {
    .page-hero {
        padding: 100px 20px 50px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }
}

/* Mobile Landscape (481px - 767px) */
@media (max-width: 767px) {
    .page-hero {
        padding: 100px 15px 40px;
    }

    .hero-title {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        padding: 0 10px;
    }

    .live-clock-wrapper {
        padding: 8px 20px;
        margin-top: 15px;
    }

    .clock-text {
        font-size: 0.85rem;
    }

    .dot-pulse {
        width: 8px;
        height: 8px;
    }
}

/* Mobile Portrait (≤480px) */
@media (max-width: 480px) {
    .page-hero {
        padding: 90px 15px 35px;
    }

    .hero-title {
        font-size: 1.5rem;
        line-height: 1.4;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }

    .live-clock-wrapper {
        padding: 6px 16px;
        margin-top: 12px;
    }

    .clock-text {
        font-size: 0.8rem;
    }

    .dot-pulse {
        width: 6px;
        height: 6px;
    }
}

/* Small Mobile (≤360px) */
@media (max-width: 360px) {
    .page-hero {
        padding: 85px 12px 30px;
    }

    .hero-title {
        font-size: 1.3rem;
    }

    .hero-subtitle {
        font-size: 0.85rem;
    }

    .live-clock-wrapper {
        padding: 5px 14px;
    }

    .clock-text {
        font-size: 0.75rem;
    }
}

/* =========================================
   PUBLIKASI DETAIL PAGE
   ========================================= */
.publikasi-detail-section {
    padding: 80px 5% 60px;
    background: #f8f9fa;
}

.publikasi-detail-container {
    max-width: 900px;
    margin: 0 auto;
}

.publikasi-detail-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.publikasi-detail-header {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.publikasi-detail-title {
    font-size: 2rem;
    margin: 0 0 20px 0;
    color: #1a1a1a;
    font-weight: 800;
    line-height: 1.3;
}

.publikasi-detail-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.publikasi-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: #e3f2fd;
    color: #023e8a;
}

.publikasi-meta-item {
    color: #666;
    font-size: 0.9rem;
}

.publikasi-description {
    margin-bottom: 30px;
}

.publikasi-description-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #023e8a;
    font-weight: 700;
}

.publikasi-description-text {
    color: #666;
    line-height: 1.8;
    text-align: justify;
}

.publikasi-download-section {
    text-align: center;
    padding: 35px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
}

.download-all-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 50px;
    background: linear-gradient(135deg, #023e8a 0%, #0077b6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(2, 62, 138, 0.3);
}

.download-all-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 62, 138, 0.4);
}

.download-info {
    margin-top: 20px;
    color: #666;
    font-size: 0.9rem;
}

.files-list {
    margin-top: 25px;
    text-align: left;
}

.files-list-title {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.file-item i {
    color: #023e8a;
    font-size: 1.2rem;
}

.file-name {
    flex: 1;
    color: #1a1a1a;
}

.file-size {
    color: #666;
    font-size: 0.85rem;
}

.no-files {
    text-align: center;
    color: #666;
    padding: 40px 20px;
}

.no-files i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 15px;
    display: block;
}

.security-note {
    margin-top: 25px;
    color: #666;
    font-size: 0.9rem;
    text-align: center;
}

/* Download Modal */
.download-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

.download-modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
    position: relative;
    z-index: 1000000;
}

.download-modal-body {
    text-align: center;
}

.download-modal-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #023e8a 0%, #0077b6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.download-modal-icon i {
    font-size: 2.5rem;
    color: white;
}

.download-modal-title {
    font-size: 1.5rem;
    color: #1a1a1a;
    margin-bottom: 10px;
    font-weight: 700;
}

.download-modal-text {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 25px;
    line-height: 1.6;
}

.modal-file-list {
    text-align: left;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.download-modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-batal {
    flex: 1;
    padding: 14px 20px;
    background: #f0f0f0;
    color: #666;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-batal:hover {
    background: #e0e0e0;
}

.btn-download {
    flex: 1;
    padding: 14px 20px;
    background: linear-gradient(135deg, #023e8a 0%, #0077b6 100%);
    color: white;
    text-align: center;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-download:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */

.publikasi-content {
    padding: 60px 5%;
    background: #f8f9fa;
}

.publikasi-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.publikasi-main {
    min-width: 0;
}

.filter-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
}

.search-btn {
    padding: 12px 25px;
    background: #023e8a;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #005f9a;
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-pill {
    padding: 8px 20px;
    background: #f0f0f0;
    color: #666;
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
}

.category-pill:hover,
.category-pill.active {
    background: #023e8a;
    color: white;
}

.publications-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.publication-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.publication-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.pub-header {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.pub-icon {
    font-size: 2.5rem;
    color: #023e8a;
    min-width: 50px;
}

.pub-info {
    flex: 1;
}

.pub-info h3 {
    font-size: 1.3rem;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.pub-meta {
    display: flex;
    gap: 15px;
    align-items: center;
}

.pub-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.pub-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.pub-stats {
    display: flex;
    gap: 20px;
    color: #666;
    font-size: 0.9rem;
}

.download-btn {
    padding: 10px 25px;
    background: #023e8a;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.download-btn:hover {
    background: #005f9a;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.pagination-container {
    margin-top: 30px;
}

.publikasi-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.sidebar-card h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-item {
    display: flex;
    gap: 15px;
    text-decoration: none;
    padding: 12px;
    border-radius: 10px;
    transition: background 0.3s;
    border: 1px solid #f0f0f0;
}

.sidebar-item:hover {
    background: #f8f9fa;
}

.sidebar-icon {
    font-size: 1.5rem;
    color: #023e8a;
    min-width: 30px;
}

.sidebar-info h4 {
    font-size: 0.95rem;
    color: #1a1a1a;
    margin-bottom: 5px;
    font-weight: 600;
    line-height: 1.4;
}

.sidebar-info span {
    font-size: 0.85rem;
    color: #666;
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */

/* Desktop Large (≥1024px) - Sidebar di kanan */
@media (min-width: 1024px) {
    .publikasi-grid {
        grid-template-columns: 1fr 350px;
        gap: 30px;
    }

    .publikasi-main {
        order: 1;
        min-width: 0; /* Prevent overflow */
    }

    .publikasi-sidebar {
        order: 2;
        min-width: 0;
    }
}

/* Tablet (768px - 1023px) - Sidebar di bawah */
@media (max-width: 1023px) {
    .publikasi-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .publikasi-main {
        order: 1;
        width: 100%;
    }

    .publikasi-sidebar {
        order: 2;
        width: 100%;
    }

    .publication-card {
        padding: 20px;
    }
}

/* Mobile Landscape (481px - 767px) */
@media (max-width: 767px) {
    .publikasi-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .publikasi-main {
        order: 1;
        width: 100%;
    }

    .publikasi-sidebar {
        order: 2;
        width: 100%;
    }

    .publikasi-detail-section {
        padding: 80px 5% 40px;
    }

    .publikasi-detail-card {
        padding: 25px;
    }

    .publikasi-content {
        padding: 40px 5%;
    }

    .publication-card {
        padding: 20px;
    }

    .pub-header {
        flex-direction: row;
        gap: 15px;
        align-items: flex-start;
    }

    .pub-icon {
        font-size: 2.5rem;
        min-width: 45px;
    }

    .pub-info h3 {
        font-size: 1.2rem;
    }

    .pub-meta {
        flex-wrap: wrap;
        gap: 12px;
    }

    .pub-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 15px;
    }

    .pub-stats {
        flex-wrap: nowrap;
        gap: 15px;
        font-size: 0.85rem;
    }

    .download-btn {
        width: auto;
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .filter-section {
        padding: 20px;
    }

    .search-box {
        flex-direction: row;
        gap: 10px;
    }

    .search-input {
        flex: 1;
        width: auto;
    }

    .search-btn {
        width: auto;
        padding: 12px 20px;
    }

    .category-filter {
        justify-content: flex-start;
    }

    .category-pill {
        font-size: 0.85rem;
        padding: 6px 16px;
    }

    .sidebar-card {
        padding: 20px;
    }

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

    .sidebar-item {
        padding: 12px;
    }

    .modal-buttons {
        flex-direction: row;
        gap: 15px;
    }

    .btn-batal,
    .btn-download {
        width: auto;
        flex: 1;
    }

    #downloadModal .modal-content {
        padding: 30px 20px;
        width: 90%;
        max-width: 400px;
    }
}

/* Mobile Portrait (≤480px) */
@media (max-width: 480px) {
    .publikasi-detail-section {
        padding: 70px 4% 30px;
    }

    .publikasi-detail-card {
        padding: 20px;
    }

    .publikasi-content {
        padding: 30px 4%;
    }

    .publication-card {
        padding: 18px;
    }

    .pub-header {
        flex-direction: column;
        gap: 12px;
    }

    .pub-icon {
        font-size: 2rem;
        min-width: 40px;
    }

    .pub-info h3 {
        font-size: 1.1rem;
    }

    .pub-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .pub-stats {
        flex-wrap: wrap;
        gap: 12px;
        font-size: 0.8rem;
    }

    .download-btn {
        width: 100%;
        justify-content: center;
    }

    .filter-section {
        padding: 15px;
    }

    .search-box {
        flex-direction: column;
    }

    .search-input,
    .search-btn {
        width: 100%;
    }

    .category-pill {
        font-size: 0.8rem;
        padding: 5px 14px;
    }

    .sidebar-card {
        padding: 18px;
    }

    .sidebar-card h3 {
        font-size: 0.95rem;
    }

    #downloadModal .modal-content {
        padding: 25px 15px;
        width: 95%;
    }

    .modal-buttons {
        flex-direction: column;
    }

    .btn-batal,
    .btn-download {
        width: 100%;
    }
}

/* Small Mobile (≤360px) */
@media (max-width: 360px) {
    .publikasi-content {
        padding: 25px 3%;
    }

    .publication-card {
        padding: 15px;
    }

    .pub-info h3 {
        font-size: 1rem;
    }

    .publikasi-download-btn {
        padding: 14px 25px;
        font-size: 0.95rem;
    }
}
