/* Custom CSS for SMPN 3 Soreang Website */

/* =====================================
   Branding Resmi KEMDIKBUD RI (BIRU)
   ===================================== */

:root {
    --primary-color: #0A4D8C;     /* Biru tegas (authority blue) */
    --secondary-color: #083A6B;   /* Biru sangat tua / navy */
    --accent-color: #F4C430;      /* Emas (penegas & fokus) */

    --bg-light: #F5F7FA;          /* Abu-putih bersih */
    --bg-soft: #E2E8F0;           /* Soft tapi kontras jelas */

    --text-dark: #1E293B;         /* Hitam kebiruan (tegas, tidak pudar) */
    --text-light: #FFFFFF;
}



/* Update background colors */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.hero-section {
    background: linear-gradient(rgba(52, 152, 219, 0.9), rgba(41, 128, 185, 0.9)), 
                url('https://images.unsplash.com/photo-1546410531-bb4caa6b424d?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
}

.card-header.bg-primary {
    background-color: var(--primary-color) !important;
}

.card-header.bg-success {
    background-color: #27ae60 !important; /* Tetap hijau untuk variasi */
}

.card-header.bg-info {
    background-color: #17a2b8 !important; /* Tetap cyan untuk variasi */
}

.card-header.bg-warning {
    background-color: #f39c12 !important; /* Tetap oranye untuk variasi */
}

.alert-primary {
    background-color: #e3f2fd;
    border-color: #bbdefb;
    color: #1565c0;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.table-primary {
    background-color: #e3f2fd;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 76px; /* Adjust for fixed navbar */
    background-color: var(--light-bg);
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.navbar-brand h1 {
    font-size: 1.2rem;
}

.logo-circle {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden; /* penting */
}

.logo-circle img {
    width: 85%;
    height: 85%;
    object-fit: contain;
}


.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    transform: translateY(-2px);
}

.nav-link.active {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

/* Page Sections */
.page-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Spinner */
.loading-spinner {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 9999;
    background: rgba(255,255,255,0.9);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(44, 95, 45, 0.9), rgba(61, 124, 63, 0.9)), 
                url('https://images.unsplash.com/photo-1523050854058-8df90110c9f1?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 80px 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
}

/* Cards */
.card {
    transition: all 0.3s ease;
    border: none;
}

.hover-shadow:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

.news-card {
    border-top: 4px solid transparent;
}

.news-card:nth-child(1) {
    border-top-color: var(--primary-color);
}

.news-card:nth-child(2) {
    border-top-color: var(--accent-color);
}

/* Icons */
.icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.avatar-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--primary-color);
}

.avatar-circle-sm {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--primary-color);
}

/* Gallery */
.gallery-img {
    height: 200px;
    width: 100%;
}

.gallery-card {
    cursor: pointer;
    overflow: hidden;
}

.gallery-card:hover {
    transform: scale(1.03);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Form Styles */
.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(44, 95, 45, 0.25);
}

/* Badge Custom */
.badge {
    padding: 0.4em 0.8em;
}

/* Table Styles */
.table-hover tbody tr:hover {
    background-color: rgba(44, 95, 45, 0.05);
}

/* Footer */
footer a:hover {
    color: #fff !important;
    text-decoration: underline !important;
}

.social-links .btn:hover {
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }
    
    .navbar-brand h1 {
        font-size: 1rem;
    }
    
    .logo-circle {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    .hero-section {
        padding: 60px 0;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .gallery-img {
        height: 150px;
    }
}

@media (max-width: 576px) {
    .navbar-brand h1 {
        font-size: 0.9rem;
    }
    
    .logo-circle {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .hero-section {
        padding: 40px 0;
    }
    
    .display-5 {
        font-size: 1.8rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        margin-bottom: 5px;
        border-radius: 0.375rem !important;
    }
}

/* Animation for alerts */
@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.alert {
    animation: slideIn 0.3s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Print styles */
@media print {
    .navbar, footer, .back-to-top {
        display: none !important;
    }
    
    body {
        padding-top: 0;
    }
    
    .page-section {
        display: block !important;
    }
}