/* ==========================================================================
   1. RESET & BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Warna lebih hidup */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #facc15;
}

.container {
    width: calc(100% - 80px);
    max-width: none;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   2. HEADER & LOGO
   ========================================================================== */
.header-logo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.left-logos, .right-logos {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-logo img {
    height: 60px;
    max-width: 200px;
    object-fit: contain;
}

/* Header Utama (Home) */
.home .header {
    text-align: center;
    padding: 48px 20px 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 0 0 24px 24px;
    margin-bottom: 22px;
}

.home .header h1 {
    font-size: 3rem;
    margin-bottom: 4px;
    font-weight: 800;
    text-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.home .subtitle {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
    opacity: 0.95;
    letter-spacing: 0.5px;
}

.home .tagline {
    font-size: 1rem;
    margin-top: 4px;
    opacity: 0.85;
    letter-spacing: 0.3px;
}

/* Description Section */
.home .description {
    background: white;
    padding: 26px 30px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    margin-bottom: 26px;
    text-align: center;
    width: calc(100% - 80px);
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid rgba(59,130,246,0.1);
}

.home .description p {
    font-size: 1.15rem;
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 8px;
}

.home .description p:last-child {
    margin-bottom: 0;
}



/* Divider */
.home .divider {
    height: 3px;
    background: linear-gradient(90deg, transparent, #3b82f6, transparent);
    margin: 20px 0;
}

/* ==========================================================================
   3. CATEGORIES SECTION
   ========================================================================== */
.categories {
    padding: 3rem 0 2rem;
}

.categories h2 {
    text-align: center;
    color: #1e40af;
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 60px;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(30,64,175,0.15);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); /* min 380px - cukup untuk 3 kolom di layar 1200px+ */
    gap: 1.8rem; /* gap nyaman */
    max-width: 100%;
    width: 100%;
    padding: 0 1rem;
    margin: 0 auto;
}

.category-card {
    background: white;
    border-radius: 28px;
    padding: 1.8rem 2.8rem;
    height: 240px;
    min-height: unset;
    max-height: 260px;
    border-radius: 1.5rem;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid rgba(59,130,246,0.08);
    border-radius: 1.6rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.category-card:hover,
.news-card:hover,
.testimonial-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 30px 60px rgba(37,99,235,0.25);
}

.category-icon {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 110px;
    max-height: 130px;
    width: 100%;
    max-width: 280px;
}

lottie-player {
    margin: 0 auto;
    display: block;
    filter: drop-shadow(0 10px 20px rgba(30,64,175,0.3));
    transition: filter 0.5s ease, transform 0.5s ease;
}

.category-card:hover lottie-player {
    filter: drop-shadow(0 25px 50px rgba(30,64,175,0.55));
    transform: scale(1.12);
}

.category-card h3 {
    color: #1e40af;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.category-card p {
    color: #4b5563;
    font-size: 0.98rem;
    max-width: 95%;
    line-height: 1.4;
    font-weight: 500;
    margin: 0 auto;
    margin-top: auto;
}

/* ==========================================================================
   4. FILTER & RESULTS SECTION
   ========================================================================== */
.filter-section {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.1);
    margin: 30px 0;
    border: 2px solid #e5e7eb;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}

.section-header h2 {
    color: #1e40af;
    margin: 0;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.filter-col {
    flex: 1;
    min-width: 220px;
}

.filter-col label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.filter-select,
.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
}

.filter-select:focus,
.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}

.filter-buttons {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

/* Results Table */
.table-fullwidth-container {
    width: calc(100% - 80px);
    max-width: none;
    margin: 30px auto;
    padding: 0 15px;
    overflow-x: auto;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    background: white;
}

.catalog-table,
#resultsTable {
    width: 100%;
    min-width: 1000px;
    border-collapse: collapse;
    font-size: 14px;
    background: white;
}

.results-section {
    width: calc(100% - 80px);
    max-width: none;
    margin: 0 auto;
    padding: 0 15px;
}

.catalog-table thead th,
#resultsTable thead th {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    padding: 16px 12px;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}

.catalog-table td,
#resultsTable td {
    padding: 14px 12px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

/* Lebar kolom proporsional (results table) */
#resultsTable th:nth-child(1), #resultsTable td:nth-child(1) { width: 12%; }
#resultsTable th:nth-child(2), #resultsTable td:nth-child(2) { width: 14%; }
#resultsTable th:nth-child(3), #resultsTable td:nth-child(3) { width: 14%; }
#resultsTable th:nth-child(4), #resultsTable td:nth-child(4) { width: 20%; }
#resultsTable th:nth-child(5), #resultsTable td:nth-child(5) { width: 12%; }
#resultsTable th:nth-child(6), #resultsTable td:nth-child(6) { width: 10%; }
#resultsTable th:nth-child(7), #resultsTable td:nth-child(7) { width: 12%; }
#resultsTable th:nth-child(8), #resultsTable td:nth-child(8) {
    width: 25%;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#resultsTable th:nth-child(9), #resultsTable td:nth-child(9) { width: 8%; text-align: center; }

/* Tooltip deskripsi */
#resultsTable td:nth-child(8):hover::after {
    content: attr(data-full-text);
    position: absolute;
    left: 0;
    top: 100%;
    background: #111827;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    z-index: 100;
    width: 400px;
    max-width: 90vw;
    white-space: normal;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    font-size: 13px;
    line-height: 1.6;
}

/* Hover baris */
.catalog-table tr:hover,
#resultsTable tr:hover {
    background: #eff6ff;
}

/* Gambar di table */
.catalog-table img,
#resultsTable img {
    max-width: 90px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
    cursor: pointer;
    transition: all 0.3s ease;
}

.catalog-table img:hover,
#resultsTable img:hover {
    transform: scale(1.1);
}

.thumbnail {
    max-width: 100px;
    max-height: 80px;
    object-fit: cover;
    border-radius: 6px;
    transition: all 0.3s;
}

.image-container {
    position: relative;
    display: inline-block;
}

.image-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 6px;
    font-size: 12px;
}

.image-container:hover .image-overlay {
    opacity: 1;
}

#zoomedImage {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.detail-section img {
    opacity: 0;
    filter: blur(8px);
    transition: opacity 0.8s ease, filter 0.8s ease;
}

/* ==========================================================================
   5. PAGINATION
   ========================================================================== */
.pagination-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    margin: 30px 0;
}

.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.pagination-info {
    color: #4b5563;
    font-size: 1rem;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.page-size-select {
    padding: 10px 16px;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    font-size: 1rem;
}

/* ==========================================================================
   6. MODAL & DETAIL
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 20px 15px;
}

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: fadeInScale 0.4s ease;
}

.modal-content.large {
    max-width: 1000px;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

.close {
    position: sticky;
    top: 15px;
    right: 20px;
    float: right;
    font-size: 2.5rem;
    color: #6b7280;
    cursor: pointer;
    z-index: 10;
    background: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.close:hover {
    color: #1e40af;
    background: #eff6ff;
}

/* Detail Section (Modal) */
.detail-section {
    margin-bottom: 30px;
    padding: 25px;
    background: #f8fafc;
    border-radius: 12px;
    border-left: 5px solid #3b82f6;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.detail-section h3 {
    color: #1e40af;
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #bfdbfe;
}

.detail-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 18px;
    padding: 14px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.detail-label {
    font-weight: 700;
    color: #1e40af;
    min-width: 180px;
    flex-shrink: 0;
    font-size: 1.05rem;
}

.detail-value {
    flex: 1;
    color: #374151;
    line-height: 1.6;
    font-size: 1.05rem;
}

.detail-description {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #bfdbfe;
    line-height: 1.7;
    font-size: 1.05rem;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.03);
}

.createImageSection img {
    max-width: 100%;
    max-height: 500px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    margin: 20px auto;
    display: block;
    cursor: zoom-in;
}

/* ==========================================================================
   7. FORM LAPORAN (DI MODAL)
   ========================================================================== */
.laporan-form-container {
    background: #fffde7;
    padding: 35px;
    border-radius: 24px;
    border: 3px solid #ff8f00;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: 0 15px 50px rgba(0,0,0,0.12);
}

.laporan-title {
    text-align: center;
    color: #d97706;
    margin-bottom: 25px;
    font-size: 1.6rem;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 1rem;
}

.required {
    color: #ef4444;
    font-weight: bold;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #d97706;
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #b45309;
    box-shadow: 0 0 0 3px rgba(180,83,9,0.2);
}

.form-textarea {
    height: 140px;
    resize: vertical;
}

.upload-area {
    border: 3px dashed #d97706;
    padding: 35px;
    text-align: center;
    border-radius: 16px;
    background: #fffde7;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-area:hover {
    background: #fefce8;
    border-color: #b45309;
}

.upload-text {
    margin: 0;
    color: #92400e;
    font-weight: bold;
    font-size: 1.1rem;
}

.upload-info {
    margin-top: 10px;
    color: #d97706;
    font-weight: 600;
}

.form-actions {
    text-align: center;
    margin-top: 30px;
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* ==========================================================================
   8. BUTTONS (UMUM)
   ========================================================================== */
.btn {
    padding: 14px 30px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    color: white !important;
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
    box-shadow: 0 6px 20px rgb(247, 247, 247);
}

.btn-primary:hover {
    background: linear-gradient(to right, #1d4ed8, #2563eb);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(246, 246, 247, 0.945);
}

.btn-outline {
    background: transparent;
    border: 2px solid #6b7280;
    color: #6b7280;
}

.btn-outline:hover {
    background: #6b7280;
    color: white;
}

.btn-outline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================================================
   9. CATALOG.HTML KHUSUS
   ========================================================================== */
.catalog-section .table-fullwidth-container {
    width: calc(100% - 80px);
    max-width: none;
    margin: 30px auto;
    padding: 0 15px;
    overflow-x: auto;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    background: white;
}

#catalogTable {
    width: 100%;
    min-width: 100%;
    border-collapse: collapse;
}

#catalogTable thead th {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    padding: 16px 12px;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}

/* Lebar kolom catalog (10 kolom) */
#catalogTable th:nth-child(1), #catalogTable td:nth-child(1) { width: 8%; }   /* JENIS */
#catalogTable th:nth-child(2), #catalogTable td:nth-child(2) { width: 10%; }  /* OBJEK */
#catalogTable th:nth-child(3), #catalogTable td:nth-child(3) { width: 12%; }  /* RINCIAN OBJEK */
#catalogTable th:nth-child(4), #catalogTable td:nth-child(4) { width: 12%; }  /* SUB RINCIAN OBJEK */
#catalogTable th:nth-child(5), #catalogTable td:nth-child(5) { width: 18%; }  /* NAMA BARANG */
#catalogTable th:nth-child(6), #catalogTable td:nth-child(6) { width: 10%; }  /* KODE BARANG */
#catalogTable th:nth-child(7), #catalogTable td:nth-child(7) { width: 10%; }  /* MASA MANFAAT */
#catalogTable th:nth-child(8), #catalogTable td:nth-child(8) { width: 12%; }  /* BATAS KAPITALISASI */
#catalogTable th:nth-child(9), #catalogTable td:nth-child(9) { width: 25%; } /* DESKRIPSI */
#catalogTable th:nth-child(10), #catalogTable td:nth-child(10) { width: 8%; text-align: center; } /* VISUAL */

/* Deskripsi tooltip di catalog */
#catalogTable td:nth-child(9) {
    max-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: relative;
    cursor: help;
}

#catalogTable td:nth-child(9):hover::after {
    content: attr(data-full-text);
    position: absolute;
    left: 0;
    top: 100%;
    background: #111827;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    z-index: 100;
    min-width: 300px;
    max-width: 600px;
    white-space: normal;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    font-size: 13px;
    line-height: 1.6;
}

/* Tombol Kembali di catalog */
.header-actions .btn.btn-secondary {
    background: #6b7280;
    color: white;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(107,114,128,0.3);
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.header-actions .btn.btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(107,114,128,0.4);
}

.catalog-section .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0 20px;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    border-radius: 0 0 20px 20px;
    margin-bottom: 30px;
}

.catalog-section .header h1 {
    margin: 0;
    font-size: 2.2rem;
}

/* ==========================================================================
   10. FEEDBACK & TESTIMONIAL
   ========================================================================== */
.feedback-section {
    background: #f8fafc;
    padding: 80px 0;
    text-align: center;
}

.feedback-section h2 {
    color: #1e40af;
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.feedback-subtitle {
    color: #4b5563;
    font-size: 1.2rem;
    margin-bottom: 40px;
}

.feedback-form {
    max-width: 600px;
    margin: 0 auto 60px;
}

.rating-stars {
    font-size: 3.5rem;
    margin-bottom: 30px;
    color: #d1d5db;
}

.rating-stars .star {
    cursor: pointer;
    transition: color 0.3s;
    color: #d1d5db;
}

.rating-stars .star.active,
.rating-stars .star:hover {
    color: #fbbf24;
}

.feedback-form input,
.feedback-form textarea {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 15px;
    border: 2px solid #d1d5db;
    border-radius: 12px;
    font-size: 1rem;
}

.feedback-form textarea {
    min-height: 140px;
    resize: vertical;
}

.feedback-message.success { color: #10b981; font-size: 1.2rem; }
.feedback-message.error { color: #ef4444; font-size: 1.2rem; }

/* Testimonial Carousel */
.testimonial-carousel {
    max-width: 1200px;
    margin: 0 auto;
}

.testimonial-carousel h3 {
    color: #1e40af;
    font-size: 2rem;
    margin-bottom: 30px;
}

.carousel-wrapper {
    display: flex;
    overflow-x: auto;
    gap: 25px;
    padding: 20px 0;
    scroll-behavior: smooth;
}

.testimonial-card {
    flex: 0 0 360px;
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.08);
    text-align: left;
    transition: transform 0.3s;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.card-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #64748b;
    object-fit: cover;
}

.card-info h4 {
    margin: 0 0 5px;
    font-size: 1.2rem;
    color: #1e293b;
}

.card-rating {
    color: #fbbf24;
    font-size: 1.3rem;
}

.card-text {
    color: #475569;
    line-height: 1.6;
    font-size: 1rem;
    margin: 10px 0;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.carousel-prev, .carousel-next {
    background: #3b82f6;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-prev:hover, .carousel-next:hover {
    background: #2563eb;
    transform: scale(1.1);
}

/* News Carousel */
.home .news-carousel-section {
    background: #f8fafc;
    padding: 50px 0 65px;
    text-align: center;
    padding-bottom: 40px !important; /* kurangi padding bawah dari 65px */
    margin-bottom: -20px !important; /* tarik sedikit ke bawah biar overlap ringan */
}

.home .news-carousel-section h2 {
    color: #1e40af;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.home .news-subtitle {
    color: #64748b;
    font-size: 1.15rem;
    margin-bottom: 28px;
}

.home .news-carousel-wrapper {
    display: flex;
    overflow-x: auto;
    gap: 28px;
    padding: 12px 0;
    scroll-behavior: smooth;
    width: calc(100% - 80px);
    max-width: none;
    margin: 0 auto;
}

.home .news-card {
    flex: 0 0 380px;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 12px 35px rgba(0,0,0,0.1);
    transition: all 0.5s ease;
    border: 1px solid rgba(59,130,246,0.1);
}

.news-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.news-card:hover img {
    transform: scale(1.08);
}

.news-card-content {
    padding: 25px;
    text-align: left;
}

.news-card h4 {
    color: #1e40af;
    font-size: 1.45rem;
    margin: 0 0 12px;
    font-weight: 700;
}

.news-card .kode {
    color: #2563eb;
    font-weight: bold;
    font-size: 1.15rem;
    margin-bottom: 10px;
}

.news-card .date {
    color: #64748b;
    font-size: 0.95rem;
    margin-top: 12px;
}

.home .carousel-controls {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 22px;
}

.carousel-prev, .carousel-next {
    background: #3b82f6;
    color: white;
    border: none;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    font-size: 1.6rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(59,130,246,0.3);
}

.carousel-prev:hover, .carousel-next:hover {
    background: #2563eb;
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(59,130,246,0.45);
}

/* ==========================================================================
   11. FOOTER & GLOBAL ELEMENTS
   ========================================================================== */
.footer {
    text-align: center;
    padding: 30px 0;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    margin-top: 60px;
    font-size: 1rem;
}

.footer-line-1 {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 8px;
}

/* Loading Global */
#globalLoading {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
}

#loadBar {
    width: 300px;
    height: 12px;
    background: #444;
    border-radius: 6px;
    overflow: hidden;
}

#loadBar div {
    height: 100%;
    background: #3b82f6;
    width: 0%;
    transition: width 1s ease;
}

/* Visitor Counter */
.visitor-counter-footer {
    margin: 40px 0;
    text-align: center;
}

/* ==========================================================================
   BOTTOM ACTION BAR - Permohonan kiri, Admin kanan, di atas footer
   ========================================================================== */
.bottom-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid #e0e7ff;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
    z-index: 997;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

/* Biar konten utama tidak ketutupan bottom bar */
body {
    padding-bottom: 70px;          /* sesuaikan dengan tinggi bottom bar + margin */
}

.bottom-action-bar .btn-action {
    flex: 1;
    max-width: 180px;
    padding: 10px 16px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-permohonan {
    background: linear-gradient(135deg, #3c37ff, #2563eb);
    color: white;
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.25);
}

.btn-permohonan:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
}

.btn-admin {
    background: #dc2626;
    color: white;
    border: none;
    box-shadow: 0 3px 10px rgba(220, 38, 38, 0.25);
}

.btn-admin:hover {
    background: #b91c1c;
    transform: translateY(-2px);
}

/* Khusus catalog.html: sembunyikan tombol permohonan di bottom bar */
.catalog .bottom-action-bar .btn-permohonan {
    display: none;
}

html {
    scroll-behavior: smooth;
}

/* ==========================================================================
   RESPONSIVE - SEMUA MEDIA QUERY DI SINI (PALING BAWAH)
   ========================================================================== */
@media (min-width: 1400px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.6rem;
        max-width: 1920px;
    }

    .category-card {
        padding: 2rem 3rem;
        height: 260px;
    }

    .category-icon {
        max-height: 140px;
    }
}

/* Desktop lebar: fix 3 kolom kategori */
@media (min-width: 1200px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
        max-width: 1200px;
    }
}

/* Tablet: 2 kolom kategori */
@media (min-width: 768px) and (max-width: 1199px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile utama (max-width 768px) - semua aturan digabung di sini */
@media (max-width: 768px) {
    /* Full width container & section */
    body, html {
        margin: 0 !important;
        padding: 0 !important;
    }

    .container,
    .table-fullwidth-container,
    .results-section,
    .catalog-section .table-fullwidth-container,
    .categories,
    .news-carousel-section,
    .feedback-section {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 12px !important;
    }

    /* Header lebih compact */
    .header-logo {
        padding: 12px 10px !important;
        flex-direction: column !important;
        gap: 10px !important;
        text-align: center;
    }

    .home .header {
        padding: 25px 12px 15px !important;
    }

    .home .header h1 {
        font-size: 2.1rem !important;
    }

    .home .subtitle {
        font-size: 1.1rem !important;
    }

    /* Kategori & carousel jadi 1 kolom */
    .category-grid,
    .news-carousel-wrapper,
    .carousel-wrapper {
        grid-template-columns: 1fr !important;
        gap: 1.2rem;
        padding: 0 0.8rem;
    }

    .category-card,
    .news-card,
    .testimonial-card {
        transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        box-shadow: 0 10px 30px rgba(0,0,0,0.08);
        padding: 1.8rem 2rem;
        height: 220px;
    }

    lottie-player {
        width: 120px !important;
        height: 120px !important;
    }

    /* Bottom action bar lebih compact */
    .bottom-action-bar {
        padding: 10px 12px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .bottom-action-bar .btn-action {
        max-width: 48%;
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    /* Table → Card style (no horizontal scroll) */
    .catalog-table,
    #resultsTable,
    #catalogTable {
        min-width: 100% !important;
        width: 100% !important;
        border-collapse: separate !important;
        border-spacing: 0 12px !important;
    }

    .catalog-table thead,
    .catalog-table tbody,
    .catalog-table tr,
    .catalog-table th,
    .catalog-table td,
    #resultsTable thead,
    #resultsTable tr,
    #resultsTable td,
    #catalogTable thead,
    #catalogTable tr,
    #catalogTable td {
        display: block !important;
        width: 100% !important;
    }

    .catalog-table thead tr,
    #resultsTable thead tr,
    #catalogTable thead tr {
        display: none !important;
    }

    .catalog-table tr,
    #resultsTable tr,
    #catalogTable tr {
        margin-bottom: 16px !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 10px !important;
        padding: 12px !important;
        background: white !important;
        box-shadow: 0 3px 10px rgba(0,0,0,0.06) !important;
    }

    .catalog-table td,
    #resultsTable td,
    #catalogTable td {
        border: none !important;
        padding: 8px 0 !important;
        text-align: right !important;
        position: relative !important;
        padding-left: 48% !important;
        font-size: 14px !important;
        line-height: 1.45 !important;
    }

    .catalog-table td:before,
    #resultsTable td:before,
    #catalogTable td:before {
        content: attr(data-label) !important;
        position: absolute !important;
        left: 12px !important;
        width: 45% !important;
        font-weight: 600 !important;
        text-align: left !important;
        color: #1e40af !important;
    }

    .catalog-table td:last-child,
    #resultsTable td:last-child,
    #catalogTable td:last-child {
        text-align: center !important;
        padding-left: 12px !important;
    }

    /* Deskripsi full di mobile */
    .catalog-table td[data-label="DESKRIPSI"],
    #resultsTable td[data-label="DESKRIPSI"],
    #catalogTable td:nth-child(9) {
        white-space: normal !important;
        text-align: left !important;
        padding-left: 12px !important;
        max-height: none !important;
        overflow: visible !important;
        line-height: 1.5 !important;
    }

    /* Gambar kecil di card */
    .catalog-table img,
    #resultsTable img,
    #catalogTable img {
        max-width: 80px !important;
        margin: 10px auto !important;
        display: block !important;
    }

    /* Flex items jadi vertikal */
    .filter-row,
    .pagination-controls,
    .form-row,
    .form-actions,
    .header-actions {
        flex-direction: column !important;
        gap: 12px !important;
        align-items: stretch !important;
    }

    .filter-col,
    .filter-select,
    .search-input,
    .page-size-select,
    .form-group {
        min-width: 100% !important;
        width: 100% !important;
    }

    /* Tombol full width di mobile */
    .btn-primary,
    .btn-outline,
    .btn-request,
    .btn-back,
    .btn-submit,
    .btn,
    .btn-action {
        width: 100% !important;
        padding: 12px 20px !important;
        font-size: 1rem !important;
    }

    /* Modal lebih nyaman */
    .modal {
        padding: 10px !important;
    }

    .modal-content {
        width: 98% !important;
        margin: 10px auto !important;
        max-height: 95vh !important;
        padding: 15px !important;
    }

    .detail-row {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .detail-description {
        font-size: 0.95rem !important;
        max-height: 220px !important;
    }

    /* Upload box kecil */
    .upload-area {
        padding: 20px !important;
    }

    /* Bottom bar khusus HP kecil (stack vertikal) */
    @media (max-width: 480px) {
        .bottom-action-bar {
            flex-direction: column !important;
            gap: 8px !important;
            padding: 12px 10px !important;
        }

        .bottom-action-bar .btn-action {
            max-width: 100% !important;
            padding: 10px 16px !important;
        }
    }
}