/* ========================================================= */
/* PUBLIC PAGES STYLES */
/* Extracted from blade.php files */
/* ========================================================= */

/* --- CATEGORY BADGE --- */
.category-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 10px;
    background: #e3f2fd;
    color: #242d6b;
}

/* --- NAVIGATION BUTTONS --- */
.nav-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
}

.btn-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #242d6b 0%, #da291c 100%);
    color: white;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-reset {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-reset:hover {
    background: #5a6268;
}

/* --- BERITA DETAIL PAGE --- */
.detail-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.back-link {
    display: inline-block;
    margin-bottom: 30px;
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.back-link:hover {
    color: #333;
}

.detail-header {
    margin-bottom: 30px;
}

.detail-title {
    font-size: 36px;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.3;
}

.detail-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    color: #999;
    font-size: 14px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.detail-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-berita {
    background: #e3f2fd;
    color: #1976d2;
}

.category-buletin {
    background: #fff3e0;
    color: #f57c00;
}

.category-praktik-baik {
    background: #e8f5e9;
    color: #388e3c;
}

.detail-image {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.detail-video {
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.detail-video iframe {
    width: 100%;
    height: 500px;
    border: none;
}

.detail-content {
    line-height: 1.8;
    font-size: 17px;
    color: #333;
}

.detail-content p {
    margin-bottom: 20px;
}

.share-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

.share-title {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
}

.share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.share-facebook {
    background: #1877f2;
    color: white;
}

.share-twitter {
    background: #1da1f2;
    color: white;
}

.share-whatsapp {
    background: #25d366;
    color: white;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* --- MATERI PAGE --- */
.materi-layout {
    max-width: 1200px;
    margin: auto;
    padding: 40px 40px;
}

.search-materi-bar {
    display: flex;
    max-width: 600px;
    margin: 0 auto 30px;
    border: 2px solid #667eea;
    border-radius: 8px;
    overflow: hidden;
}

.search-materi-bar input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    font-size: 16px;
    outline: none;
}

.search-materi-bar .search-btn {
    background: #242d6b;
    color: white;
    padding: 12px 20px;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.search-materi-bar .search-btn:hover {
    background: #764ba2;
}

/* --- PASSWORD MODAL --- */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    position: relative;
    animation: slideDown 0.3s;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 22px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #333;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-body p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.materi-info {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.materi-info h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.materi-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.password-group {
    position: relative;
}

.password-input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.password-input:focus {
    outline: none;
    border-color: #4CAF50;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 18px;
}

.toggle-password:hover {
    color: #333;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-modal {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.success-message {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- MATERI CARD STYLES --- */
.materi-card {
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.materi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.materi-card::after {
    content: '\f023';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* --- MATERI DETAIL PAGE --- */
.materi-detail-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.materi-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.materi-header h1 {
    margin: 0 0 15px 0;
    font-size: 32px;
}

.materi-header p {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

.materi-meta {
    display: flex;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
    font-size: 14px;
}

.materi-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.files-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.files-section h2 {
    color: #333;
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #667eea;
    display: flex;
    align-items: center;
    gap: 10px;
}

.files-list {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    margin-bottom: 10px;
    background: #f9f9f9;
    border-left: 4px solid #667eea;
    border-radius: 5px;
    transition: all 0.3s;
}

.file-item:hover {
    background: #f0f0f0;
    transform: translateX(5px);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.file-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    flex-shrink: 0;
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.file-size {
    font-size: 12px;
    color: #999;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.description-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.description-section h2 {
    color: #333;
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #667eea;
}

.description-section p {
    color: #555;
    line-height: 1.8;
    margin: 20px 0;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.back-btn:hover {
    gap: 15px;
    color: #764ba2;
}

.empty-files {
    text-align: center;
    padding: 40px;
    color: #999;
}

.empty-files i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* --- RESPONSIVE STYLES --- */
@media (max-width: 768px) {
    .detail-title {
        font-size: 28px;
    }

    .detail-video iframe {
        height: 300px;
    }

    .detail-content {
        font-size: 16px;
    }

    .materi-header {
        padding: 20px;
    }

    .materi-header h1 {
        font-size: 24px;
    }

    .file-item {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .materi-meta {
        flex-direction: column;
        gap: 10px;
    }

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

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