/**
 * carian_sijil.css - Stylesheet untuk Sistem Semakan Sijil
 * Optimized & Organized CSS
 */

:root {
    --primary-color: #1e3a8a; 
    --secondary-color: #f59e0b; 
    --bg-color: #f3f4f6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --text-dark: #111827;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

/* ========== GLOBAL STYLES ========== */
body {
    background-color: var(--bg-color);
    font-family: 'Plus Jakarta Sans', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========== HEADER SECTION ========== */
.header-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 40px 0 80px 0;
    color: white;
    text-align: center;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.header-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    background-image: radial-gradient(#ffffff 1px, transparent 1px);
    background-size: 30px 30px;
}

.logo-img {
    height: 80px;
    margin-bottom: 15px;
    background: white;
    padding: 8px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.page-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 5px;
    text-transform: uppercase;
    position: relative;
}

.page-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* ========== SECURITY BADGE ========== */
.security-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* ========== CONTENT CONTAINER ========== */
.content-container {
    margin-top: -60px;
    flex: 1;
    padding-bottom: 40px;
    position: relative;
    z-index: 10;
}

/* ========== SEARCH BOX ========== */
.search-box {
    background: white;
    border-radius: 15px;
    padding: 35px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-top: 5px solid var(--secondary-color);
}

.input-group-text {
    background-color: white;
    border-right: none;
    border-color: var(--border-color);
}

.form-control-lg {
    border-left: none;
    border-color: var(--border-color);
    font-size: 1.1rem;
    font-weight: 500;
}

.form-control-lg:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

.input-group:focus-within .input-group-text {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ========== BUTTONS ========== */
.btn-search {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 700;
    padding: 12px 35px;
    transition: all 0.3s;
    border-radius: 0 8px 8px 0;
}

.btn-search:hover {
    background-color: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.3);
}

.btn-search:disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

.btn-back-home {
    background-color: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.5);
    color: white;
    font-weight: 600;
    padding: 10px 25px;
    border-radius: 50px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-back-home:hover {
    background-color: white;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-cetak {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    font-weight: 700;
    border-radius: 50px;
    padding: 10px 25px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-cetak:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.3);
}

/* ========== LOADING OVERLAY ========== */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(255,255,255,0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

/* ========== RESULT CARDS ========== */
.result-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: all 0.3s;
    overflow: hidden;
    margin-bottom: 20px;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

.card-left-border {
    width: 6px;
    flex-shrink: 0;
}

.border-ro { 
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%); 
}

.border-guru { 
    background: linear-gradient(180deg, #6b7280 0%, #4b5563 100%); 
}

.border-suka { 
    background: linear-gradient(180deg, #10b981 0%, #059669 100%); 
}

.card-body-custom {
    padding: 25px;
    flex: 1;
}

/* ========== BADGES ========== */
.info-badge {
    font-size: 0.7rem;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========== PROGRAM TITLE ========== */
.program-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 12px 0;
    line-height: 1.4;
}

/* ========== DETAIL ROW ========== */
.detail-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: #4b5563;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-item i {
    width: 20px;
    color: var(--primary-color);
    text-align: center;
}

/* ========== RATE LIMIT INFO ========== */
.rate-limit-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 10px;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
    .header-section { 
        padding: 30px 0 60px 0; 
        border-bottom-left-radius: 20px;
        border-bottom-right-radius: 20px;
    }
    
    .page-title { 
        font-size: 1.4rem; 
    }
    
    .page-subtitle { 
        font-size: 0.85rem; 
    }
    
    .logo-img { 
        height: 60px; 
    }
    
    .search-box { 
        padding: 25px 20px; 
    }
    
    .btn-search { 
        padding: 10px 20px; 
        font-size: 0.9rem; 
    }
    
    .content-container { 
        margin-top: -40px; 
    }
    
    .security-badge { 
        font-size: 0.6rem; 
        padding: 4px 8px; 
    }
    
    .card-body-custom {
        padding: 20px;
    }
    
    .program-title {
        font-size: 1rem;
    }
    
    .detail-row {
        gap: 10px;
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .header-section {
        padding: 25px 0 50px 0;
    }
    
    .page-title {
        font-size: 1.2rem;
    }
    
    .logo-img {
        height: 50px;
    }
    
    .search-box {
        padding: 20px 15px;
    }
    
    .btn-search {
        padding: 10px 15px;
        font-size: 0.85rem;
    }
    
    .btn-cetak {
        padding: 8px 20px;
        font-size: 0.85rem;
    }
}

/* ========== PRINT STYLES ========== */
@media print {
    .header-section,
    .search-box,
    .btn-cetak,
    .btn-back-home,
    .security-badge,
    .rate-limit-info {
        display: none !important;
    }
    
    .result-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ========== ACCESSIBILITY ========== */
.btn-search:focus,
.btn-cetak:focus,
.btn-back-home:focus,
.form-control-lg:focus {
    outline: 3px solid rgba(30, 58, 138, 0.5);
    outline-offset: 2px;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card {
    animation: fadeIn 0.3s ease-out;
}

/* ========== UTILITY CLASSES ========== */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.border-custom {
    border: 2px solid var(--border-color);
}