/* style.css - CORETAX EDITION (Global Styles for Portal Administasi & Registrasi Pelatihan) */

/* --- GLOBAL STYLES --- */
@font-face {
    font-family: 'Gotham';
    src: local('Gotham'), local('Gotham-Medium'), url('https://fonts.cdnfonts.com/s/15038/GothamMedium.woff') format('woff');
}

body {
    font-family: 'Gotham', 'Inter', sans-serif;
    background: #f2f2f2;
    margin: 0;
    padding: 0;
    color: #000000;
    line-height: 1.6;
}

/* --- HEADER --- */
.header {
    background-image: url('header.png');
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    background-color: #FFC72C;
    color: #000000;
    padding: 50px 20px 100px;
    text-align: center;
    border-bottom: 4px solid transparent;
    border-image: linear-gradient(to right, #b8b8b8, #FFC72C, #b8b8b8) 1;
}

.header-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    transition: opacity 0.2s;
}

.header-link:hover {
    opacity: 0.8;
}

.header h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: -1px;
    text-shadow: none;
    display: inline-block;
    border-bottom: 5px solid #003366; /* Use original blue color */
    padding-bottom: 5px;
}

.header p {
    margin: 8px 0 0;
    opacity: 0.9;
    font-size: 15px;
    font-weight: 300;
    text-shadow: none;
}

.header-logo {
    max-width: 250px;
    margin: 0 auto 15px;
    display: none;
}

/* --- CONTAINER UTAMA --- */
.container {
    max-width: 720px;
    margin: -50px auto 40px;
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    border: 1px solid #d1d1d1;
}

@media (min-width: 1200px) {
    .admin-page .container {
        max-width: min(1265px, calc(90vw - 55px));
        padding: 48px 56px;
    }

    .admin-page .menu-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

/* --- TOMBOL --- */
/* Update pada class .btn agar padding tidak membuat tombol melebar keluar */
.btn {
    font-family: 'Gotham', sans-serif;
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    transition: 0.3s;
    margin-right: 5px;
    box-sizing: border-box;
    /* Pastikan padding dihitung di dalam lebar elemen */
    max-width: 100%;
    /* Mencegah elemen melebihi lebar kontainer */
}

.btn-primary {
    background: #FFC72C;
    color: #000000;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-warning {
    background: #ffc107;
    color: #333;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 199, 44, 0.4);
}

.btn-eval-full {
    width: 100%;
    margin-bottom: 10px;
    box-sizing: border-box;
}

/* --- FORM INPUT --- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #000000;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 15px;
}

.form-group input:focus {
    border-color: #FFC72C;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(255, 199, 44, 0.2);
}

/* --- ALERTS --- */
.alert {
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 8px;
    font-size: 15px;
    display: block;
}

.alert-success {
    background: #d1e7dd;
    color: #0f5132;
}

.alert-error {
    background: #f8d7da;
    color: #842029;
}

.alert-warning {
    background: #fff3cd;
    color: #664d03;
}

.alert-info {
    background: #cff4fc;
    color: #055160;
}

/* --- MENU GRID --- */
.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

.menu-item {
    padding: 15px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    transition: 0.3s;
}

.menu-item:hover {
    border-color: #FFC72C;
    background: #fffdf5;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(255, 199, 44, 0.15);
}

.menu-item b {
    font-size: 15px;
    font-weight: 600;
    text-align: center;
}

.menu-icon {
    font-size: 28px;
    margin-bottom: 15px;
    background: #e0e0e0; /* Changed from Gold to Silver base */
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #000000;
}

/* --- EXTRAS (Index) --- */
/* Memberi jarak antar kategori */
.faq-category {
    margin-bottom: 25px;
}

/* Mempercantik judul kategori */
.category-title {
    color: #000000;
    border-left: 5px solid #FFC72C;
    padding-left: 10px;
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
}

.faq-section {
    margin-top: 50px;
}

.faq-title {
    text-align: center;
    color: #000000;
    margin-bottom: 25px;
    font-weight: 700;
}

details.faq-item {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

details.faq-item[open] {
    border-color: #FFC72C;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

summary.faq-question {
    padding: 15px;
    cursor: pointer;
    font-weight: 600;
    color: #444;
    list-style: none;
    position: relative;
    padding-right: 40px;
}

summary.faq-question::after {
    content: '+';
    position: absolute;
    right: 20px;
    font-size: 20px;
    color: #FFC72C;
}

details.faq-item[open] summary.faq-question::after {
    content: '-';
    color: #dc3545;
}

.faq-answer {
    padding: 0 15px 20px;
    color: #555;
    line-height: 1.6;
    border-top: 1px solid #f9f9f9;
}

.carousel-wrapper {
    width: 100%;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.carousel-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.carousel-slide {
    min-width: 100%;
}

.carousel-slide img {
    width: 100%;
    aspect-ratio: 21 / 9;
    object-fit: cover;
    display: block;
}

.carousel-dots {
    text-align: center;
    position: absolute;
    bottom: 15px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.dot {
    height: 8px;
    width: 8px;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    transition: 0.3s;
    cursor: pointer;
}

.dot.active {
    background-color: white;
    width: 24px;
    border-radius: 4px;
}

.rating-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    gap: 5px;
}

.rating-side-text {
    font-size: 10px;
    color: #666;
    width: 60px;
    font-weight: 600;
    text-transform: uppercase;
}

.rating-option {
    flex: 1;
    text-align: center;
    cursor: pointer;
}

.rating-option input {
    display: block;
    margin: 0 auto 5px !important;
    width: 18px;
    height: 18px;
}

.info-box {
    background: #fff9e6;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #FFC72C;
    display: none;
    gap: 20px;
    margin-bottom: 20px;
}

.info-item span {
    font-weight: 800;
    color: #000000;
}

/* FAQ Search & Table Scroll */
.faq-search-container {
    margin-bottom: 15px;
}

.faq-search-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}

.faq-table-wrapper {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 8px;
}

.faq-table-wrapper table {
    margin-bottom: 0;
    border: none;
}

.faq-table-wrapper thead th {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    z-index: 1;
}

.select2-container .select2-selection--single {
    height: 48px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 10px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px;
}

/* --- GALLERY BANNER (Admin) --- */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.card-img {
    border: 1px solid #ddd;
    padding: 8px;
    border-radius: 8px;
    text-align: center;
    background: #fff;
}

.card-img img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .menu-grid {
        grid-template-columns: 1fr;
    }

    .container {
        width: 90%;
        padding: 25px;
        margin-top: -30px;
        margin-right: auto;
        margin-left: auto;
        box-sizing: border-box; /* Prevent padding from adding to the width */
    }

    /* Memaksa tombol menjadi full-width dan bertumpuk di HP */
    .btn {
        display: block;
        width: 100%;
        margin-bottom: 15px;
        /* Jarak antar tombol vertikal */
        margin-right: 0;
        box-sizing: border-box;
    }

    .header {
        background-image: linear-gradient(135deg, #FFC72C 0%, #f9a826 100%);
        padding: 30px 20px 70px;
        border-bottom: 4px solid transparent; 
        border-image: linear-gradient(to right, #b8b8b8, #FFC72C, #b8b8b8) 1;
    }

    .header-logo {
        width: 180px;
        margin: 0 auto 10px;
        display: block; /* Show logo on mobile */
    }
}

/* --- TABLE STYLE (Restored) --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
}

table th {
    background: #f0f0f0;
    font-weight: 600;
    color: #000;
    border-bottom: 2px solid #FFC72C;
    text-align: left;
    padding: 12px 15px;
    font-size: 14px;
}

table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

table tr:last-child td {
    border-bottom: none;
}
