/* Responsive CSS untuk Kebi Website */

/* Desktop dan layar besar (default) */
.container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

#wrapper {
    width: 100%;
    max-width: 100%;
    background-color: #FFF;
    margin: 0;
    padding: 0;
    border: none;
    overflow-x: hidden;
    min-height: 100%;
    height: auto !important;
}

/* Header area */
#header {
    width: 100%;
    max-width: 1170px;
    margin: 0 auto;
    padding: 20px 15px;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#header .logo {
    flex: 0 0 35%;
    max-width: 400px;
}

#header .banner {
    flex: 0 0 auto;
    text-align: right;
}

#header .logo img,
#header .banner img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
}

/* Section titles */
.section-title {
    font-size: 24px;
    color: #03F;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #03F;
}

/* Navigation area */
#navigation {
    width: 100%;
    background-color: #03F;
    margin: 0;
    padding: 0;
    border-radius: 8px !important;
}

#navigation ul {
    max-width: 1170px;
    margin: 0 auto;
    padding: 8px 15px;
    list-style: none;
}

/* Content area */
#konten {
    width: 100%;
    max-width: 1170px;
    margin: 0 auto;
    padding: 15px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    box-sizing: border-box;
    min-height: 100%;
    height: auto !important;
    overflow: visible !important;
}

.span7 {
    flex: 1;
    min-width: 0;
    max-width: 75%;
}

/* Responsive table styles */
.table-responsive {
    width: 100%;
    margin-bottom: 15px;
    overflow-y: hidden;
    -ms-overflow-style: -ms-autohiding-scrollbar;
    overflow-x: auto;
}

/* Default table column widths for desktop */
.table th:nth-child(1), .table td:nth-child(1) {
    width: 25% !important; /* Tanggal upload - lebih kecil */
}

.table th:nth-child(2), .table td:nth-child(2) {
    width: 45% !important; /* Judul - sedikit lebih kecil */
}

.table th:nth-child(3), .table td:nth-child(3) {
    width: 30% !important; /* User - lebih besar */
}

/* Untuk tabel 4 kolom default */
.table-4-cols {
    table-layout: fixed !important;
}

.table-4-cols th:nth-child(1), .table-4-cols td:nth-child(1) {
    width: 15% !important; /* Tanggal upload - lebih kecil */
}

.table-4-cols th:nth-child(2), .table-4-cols td:nth-child(2) {
    width: 35% !important; /* Judul - sedikit lebih kecil */
}

.table-4-cols th:nth-child(3), .table-4-cols td:nth-child(3) {
    width: 30% !important; /* User - lebih besar */
}

.table-4-cols th:nth-child(4), .table-4-cols td:nth-child(4) {
    width: 20% !important; /* Dikerjakan */
}

/* Card Grid Layout */
.card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 0;
    list-style: none;
}

.card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-header h3 {
    margin: 0;
    font-size: 18px;
    color: #03F;
    line-height: 1.4;
}

.card-content {
    flex-grow: 1;
    padding: 15px 0;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-item .label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
}

.info-item .value {
    font-size: 14px;
    color: #333;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
    margin-top: auto;
}

.email {
    font-size: 12px;
    color: #666;
    word-break: break-all;
}

/* Badge styles */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

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

.badge-warning {
    background-color: #ffc107;
    color: #000;
}

/* Button styles */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #0056D8;
    color: white;
    border: 1px solid #0056D8;
}

.btn-primary:hover {
    background-color: #0048B8;
    border-color: #0048B8;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border: 1px solid #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

.kategori {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 12px;
    color: #666;
}

.card {
    transition: transform 0.2s ease;
}

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

.card-content p {
    font-size: 14px;
    line-height: 1.5;
    color: #444;
}

@media screen and (max-width: 480px) {
    .card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .btn {
        width: 100%;
    }
    
    .kategori {
        font-size: 10px;
    }
    
    .email {
        font-size: 10px;
    }
}

/* Responsive Breakpoints */
@media screen and (max-width: 1200px) {
    #header, #navigation ul, #konten {
        max-width: 960px;
    }
    
    .card-list {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media screen and (max-width: 992px) {
    #header, #navigation ul, #konten {
        max-width: 720px;
    }
    
    .span7 {
        max-width: 65%;
    }
    
    .card-list {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media screen and (max-width: 768px) {
    html, body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        margin: 0;
        padding: 0;
        position: relative;
        left: 0;
        right: 0;
        background-color: #f8f8f8;
    }
    
    .container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
        min-height: 100% !important;
        height: auto !important;
        position: relative !important;
        left: 0 !important;
        right: 0 !important;
    }
    
    #wrapper {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
        position: relative !important;
        left: 0 !important;
        right: 0 !important;
    }
    
    #header {
        max-width: 100%;
        padding: 10px;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    #header .logo,
    #header .banner {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
        text-align: center;
    }
    
    #header .banner img {
        max-width: 100%;
        margin: 0 auto;
    }
    
    .navigation-container {
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .mobile-menu-toggle {
        display: block;
        width: 100%;
        padding: 10px;
        text-align: center;
    }
    
    #navigation {
        width: 100%;
        margin: 0;
    }
    
    #navigation ul {
        max-width: 100%;
        padding: 10px;
    }
    
    #navigation ul li {
        display: block;
    }
    
    #navigation ul li a {
        display: block;
        padding: 10px;
        text-align: center;
    }
    
    #konten {
        max-width: 100%;
        padding: 10px;
        flex-direction: column;
        gap: 10px;
        box-sizing: border-box;
        overflow: visible !important;
        height: auto !important;
        min-height: auto !important;
    }
    
    .content-area {
        width: 100% !important;
        box-sizing: border-box !important;
        float: none !important;
        overflow: visible !important;
        height: auto !important;
        min-height: auto !important;
    }
    
    .isi {
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 10px !important;
        overflow: visible !important;
        height: auto !important;
        min-height: auto !important;
    }
    
    .main-content {
        width: 100% !important;
        overflow: visible !important;
        height: auto !important;
    }
    
    .main-content .container {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .row {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .card-list {
        grid-template-columns: 1fr;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    /* Perbaikan form pencarian */
    .pencarian-form {
        width: 100%;
        padding: 0;
        margin: 0;
    }
    
    .pencarian-form input[type="text"] {
        width: 100%;
        box-sizing: border-box;
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .pencarian-form button,
    .pencarian-form .btn {
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Perbaikan dropdown menu */
    .dropdown-menu {
        width: 100%;
        min-width: 100%;
        left: 0;
        right: 0;
    }
    
    /* Perbaikan table layout */
    table {
        width: 100% !important;
        table-layout: fixed !important;
        margin: 0 !important;
        border-collapse: collapse !important;
    }
    
    .table-responsive {
        padding: 0 !important;
        margin: 0 0 15px 0 !important;
        border: none !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        display: block !important;
    }
    
    .table {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        min-width: 500px !important;
    }
    
    .table th, .table td {
        word-break: break-word;
        padding: 8px 4px !important;
    }
    
    /* Kolom tabel proporsional */
    .table th:nth-child(1), .table td:nth-child(1) {
        width: 20% !important;
    }
    
    .table th:nth-child(2), .table td:nth-child(2) {
        width: 50% !important;
    }
    
    .table th:nth-child(3), .table td:nth-child(3) {
        width: 30% !important;
    }
    
    /* Untuk tabel 4 kolom */
    .table-4-cols {
        table-layout: fixed !important;
        min-width: 650px !important;
    }
    
    .table-4-cols th:nth-child(1), .table-4-cols td:nth-child(1) {
        width: 20% !important;
    }
    
    .table-4-cols th:nth-child(2), .table-4-cols td:nth-child(2) {
        width: 40% !important;
    }
    
    .table-4-cols th:nth-child(3), .table-4-cols td:nth-child(3) {
        width: 20% !important;
    }
    
    .table-4-cols th:nth-child(4), .table-4-cols td:nth-child(4) {
        width: 20% !important;
    }
    
    /* Fix untuk konten terpotong */
    .content-section {
        overflow: visible !important;
        height: auto !important;
        min-height: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 15px !important;
        padding: 10px !important;
        box-sizing: border-box !important;
    }
    
    .section-title {
        font-size: 18px !important;
        padding: 10px !important;
        text-align: center !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 0 10px 0 !important;
    }
    
    .main-content {
        overflow: visible !important;
        height: auto !important;
        min-height: auto !important;
        padding: 0 !important;
        width: 100% !important;
    }
    
    #footer {
        display: block !important;
        visibility: visible !important;
        position: relative !important;
        margin-top: 20px;
        bottom: 0;
        width: 100% !important;
    }
}

/* Perangkat dengan layar sangat kecil */
@media screen and (max-width: 480px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
        position: relative;
        left: 0;
        right: 0;
        height: auto !important;
        min-height: 100%;
        overflow-y: auto !important;
    }
    
    #header {
        padding: 5px;
        width: 100%;
        box-sizing: border-box;
    }

    #marqueenya {
        font-size: 12px;
        padding: 5px;
        line-height: 1.3;
        width: 100%;
        box-sizing: border-box;
    }

    h2 {
        font-size: 16px;
        margin: 10px 0;
    }
    
    /* Memaksimalkan area konten */
    .content-area {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    
    /* Perbaikan lebar tabel */
    .table-responsive {
        width: 100% !important;
        margin: 0 0 15px 0 !important;
        padding: 0 !important;
        border: none !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        display: block !important;
        box-sizing: border-box !important;
    }
    
    .table {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        min-width: 500px !important;
    }
    
    .table td {
        padding: 8px 4px !important;
        font-size: 13px !important;
        line-height: 1.3 !important;
        word-break: break-word !important;
    }
    
    .table th {
        padding: 10px 4px !important;
        font-size: 13px !important;
        font-weight: bold !important;
    }
    
    /* Kolom tabel proporsional untuk mobile kecil */
    .table th:nth-child(1), .table td:nth-child(1) {
        width: 20% !important;
    }
    
    .table th:nth-child(2), .table td:nth-child(2) {
        width: 50% !important;
    }
    
    .table th:nth-child(3), .table td:nth-child(3) {
        width: 30% !important;
    }
    
    /* Untuk tabel 4 kolom */
    .table-4-cols th:nth-child(1), .table-4-cols td:nth-child(1) {
        width: 20% !important;
    }
    
    .table-4-cols th:nth-child(2), .table-4-cols td:nth-child(2) {
        width: 40% !important;
    }
    
    .table-4-cols th:nth-child(3), .table-4-cols td:nth-child(3) {
        width: 20% !important;
    }
    
    .table-4-cols th:nth-child(4), .table-4-cols td:nth-child(4) {
        width: 20% !important;
    }
    
    /* Perbaikan padding konten */
    .content-section,
    .main-content {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        overflow: visible !important;
        height: auto !important;
        min-height: auto !important;
        box-sizing: border-box !important;
    }
    
    /* Memastikan gambar tidak melebihi container */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Penyesuaian pencarian */
    .section-title {
        font-size: 18px;
        padding: 10px;
        text-align: center;
        width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 0 10px 0 !important;
    }
    
    .card-body {
        padding: 10px;
        box-sizing: border-box !important;
    }
    
    .isi {
        padding: 10px !important;
        overflow: visible !important;
        height: auto !important;
        min-height: auto !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Memastikan footer tampil */
    #footer {
        display: block !important;
        visibility: visible !important;
        position: relative !important;
        margin-top: 20px;
        bottom: 0;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Memastikan konten panjang tidak terpotong */
    #wrapper, .container {
        overflow-y: visible !important;
        height: auto !important;
        min-height: auto !important;
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        position: relative !important;
        left: 0 !important;
        right: 0 !important;
    }
    
    /* Maksimalkan pencarian */
    .search-container {
        width: 100% !important;
        padding: 0 5px !important;
        margin-bottom: 15px !important;
        box-sizing: border-box !important;
    }
    
    .search-form {
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .search-form input[type="text"] {
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 10px !important;
    }
    
    .search-form button {
        width: 100% !important;
        padding: 10px !important;
        box-sizing: border-box !important;
    }
}

/* High contrast mode removed due to WCAG compliance issues */

/* Pengaturan untuk mode gelap */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #fff;
    }

    #wrapper {
        background-color: #2d2d2d;
        border-color: #404040;
    }

    .isi {
        background-color: #333;
    }

    a {
        color: #66b3ff;
    }

    .table-bordered td {
        border-color: #404040;
    }
}

/* Dukungan untuk pengurangan animasi */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Perbaikan untuk mobile */
@media (max-width: 480px) {
    /* Main Content Areas */
    #konten {
        max-width: 100%;
        padding: 10px;
        flex-direction: column;
        gap: 10px;
        box-sizing: border-box;
        overflow: visible !important;
        height: auto !important;
        min-height: auto !important;
    }
    
    .content-area {
        width: 100% !important;
        box-sizing: border-box !important;
        float: none !important;
        overflow: visible !important;
        height: auto !important;
        min-height: auto !important;
    }
    
    .isi {
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 10px !important;
        overflow: visible !important;
        height: auto !important;
        min-height: auto !important;
    }
} 