/* ============================================================
   STYLESHEET UTAMA — SMP Muhammadiyah Suruh
   ============================================================ */

/* ── GLOBAL ZOOM: 80% untuk semua tampilan website ── */
html {
    zoom: 0.8;
}

/* ── 1. GLOBALS & RESET ── */
:root {
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --primary-light: #e0f2fe;
    --success: #10b981;
    --warning: #f59e0b;
    --info: #06b6d4;
    --danger: #ef4444;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-700: #334155;
    --gray-900: #0f172a;
    --sidebar-w: 260px;
    --topbar-h: 70px;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--gray-700);
    background-color: #ffffff;
    overflow-x: hidden;
}

/* Bootstrap overrides */
.text-primary {
    color: var(--primary) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    font-weight: 500;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.bg-light {
    background-color: var(--gray-50) !important;
}

/* ── Soft badge helpers ── */
.badge-primary-soft {
    background-color: #e0f2fe;
    color: #0369a1;
    padding: .4em .85em;
    border-radius: 50rem;
}

.badge-success-soft {
    background-color: #dcfce7;
    color: #15803d;
    padding: .4em .85em;
    border-radius: 50rem;
}

.badge-warning-soft {
    background-color: #fef3c7;
    color: #b45309;
    padding: .4em .85em;
    border-radius: 50rem;
}

.badge-info-soft {
    background-color: #cffafe;
    color: #0e7490;
    padding: .4em .85em;
    border-radius: 50rem;
}

.badge-danger-soft {
    background-color: #fee2e2;
    color: #b91c1c;
    padding: .4em .85em;
    border-radius: 50rem;
}

.badge-secondary-soft {
    background-color: #f1f5f9;
    color: #475569;
    padding: .4em .85em;
    border-radius: 50rem;
}

.bg-primary-subtle {
    background-color: var(--primary-light) !important;
}

.bg-success-subtle {
    background-color: #dcfce7 !important;
}

.bg-warning-subtle {
    background-color: #fef3c7 !important;
}

.bg-info-subtle {
    background-color: #cffafe !important;
}

/* ── 2. NAVBAR (Public) ── */
.transition-navbar {
    transition: all .3s ease-in-out;
}

.navbar.fixed-top {
    background-color: rgba(255, 255, 255, .96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, .05);
}

.navbar.scrolled {
    background-color: #ffffff !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .08);
}

.nav-link {
    position: relative;
    color: var(--gray-500) !important;
    font-weight: 500;
    transition: color .2s;
}

.nav-link:hover {
    color: var(--primary) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 10px;
    background-color: var(--primary);
    transition: width .3s ease;
}

.nav-link:hover::after {
    width: calc(100% - 20px);
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        background: #fff;
        padding: 1.5rem;
        border-radius: 1rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, .1);
        margin-top: 1rem;
    }

    .nav-link::after {
        display: none;
    }
}

/* ── 3. HERO SECTION ── */
.hero-section {
    background-color: var(--gray-50);
    overflow: hidden;
    position: relative;
}

.hero-title {
    line-height: 1.2;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.15rem;
    line-height: 1.7;
}

.blob-bg {
    width: 450px;
    height: 450px;
    background: linear-gradient(135deg, rgba(2, 132, 199, .25) 0%, rgba(56, 189, 248, .15) 100%);
    border-radius: 50%;
    filter: blur(45px);
    z-index: 0;
}

.hero-img {
    z-index: 2;
    animation: floating 6s ease-in-out infinite;
}

@keyframes floating {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }

    100% {
        transform: translateY(0);
    }
}

/* ── 4. CARDS & HOVER ── */
.transition-all {
    transition: all .3s ease;
}

.transition-hover {
    transition: transform .3s ease, box-shadow .3s ease;
}

.transition-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, .08) !important;
}

.hover-shadow:hover {
    box-shadow: 0 10px 25px rgba(2, 132, 199, .3) !important;
    transform: translateY(-2px);
}

.news-card {
    border: 1px solid rgba(0, 0, 0, .04) !important;
}

.news-img {
    transition: transform .5s ease;
}

.news-card:hover .news-img {
    transform: scale(1.05);
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── 5. FOOTER ── */
.footer-section {
    background-color: var(--gray-900) !important;
}

.hover-link {
    transition: color .2s, transform .2s;
    display: inline-block;
}

.hover-link:hover {
    color: #7dd3fc !important;
    transform: translateX(4px);
}

.social-btn {
    border-color: rgba(255, 255, 255, .2) !important;
    width: 42px;
    height: 42px;
}

.social-btn:hover {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
    transform: translateY(-3px);
}

/* ── 6. PULSE (play button) ── */
.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(2, 132, 199, .4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(2, 132, 199, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(2, 132, 199, 0);
    }
}

/* ── 7. PPDB SECTION ── */
.ppdb-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

/* ── 8. RESPONSIVE PUBLIC ── */
@media (max-width: 575.98px) {
    .hero-title {
        font-size: 2rem;
    }
}

/* ════════════════════════════════════════════
   ADMIN CMS STYLES
   ════════════════════════════════════════════ */

/* Login Page */
.admin-login-body {
    font-family: 'Inter', sans-serif;
    background-color: var(--gray-100);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 10px 10px -5px rgba(0, 0, 0, .04);
    overflow: hidden;
    max-width: 900px;
    width: 100%;
}

.bg-login-panel {
    background: linear-gradient(150deg, var(--primary) 0%, var(--primary-dark) 100%);
}

/* Dashboard Layout */
.admin-body {
    background-color: var(--gray-50);
    overflow-x: hidden;
}

#sidebar {
    width: var(--sidebar-w);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background: #fff;
    border-right: 1px solid var(--gray-200);
    transition: all .3s ease;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    font-weight: 700;
    color: var(--primary);
    border-bottom: 1px solid var(--gray-100);
    text-decoration: none;
}

.sidebar-label {
    font-size: .68rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gray-400);
    padding: .75rem 1.5rem .25rem;
    display: block;
    font-weight: 600;
}

.sidebar-menu {
    list-style: none;
    padding: .25rem 0;
    margin: 0;
}

.sidebar-menu li {
    padding: .2rem .875rem;
}

.sidebar-menu .nav-link {
    display: flex;
    align-items: center;
    color: var(--gray-500) !important;
    padding: .65rem 1rem;
    border-radius: .5rem;
    font-weight: 500;
    font-size: .9rem;
    text-decoration: none;
    transition: all .2s;
}

.sidebar-menu .nav-link::after {
    display: none !important;
}

.sidebar-menu .nav-link:hover {
    color: var(--primary) !important;
    background: var(--gray-50);
}

.sidebar-menu .nav-link.active {
    color: #fff !important;
    background: var(--primary);
    box-shadow: 0 4px 6px -1px rgba(2, 132, 199, .3);
}

.sidebar-menu .nav-link i {
    width: 22px;
    font-size: 1rem;
    margin-right: .625rem;
    text-align: center;
}

#page-content-wrapper {
    width: calc(100% - var(--sidebar-w));
    margin-left: var(--sidebar-w);
    transition: all .3s;
}

/* Top Bar */
.top-navbar {
    background: #fff;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.75rem;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 900;
}

/* Content Area */
.cms-content {
    padding: 1.75rem 2rem;
}

/* Cards */
.card-stat {
    border: none !important;
    border-radius: 1rem !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .05), 0 2px 4px -2px rgba(0, 0, 0, .05) !important;
    transition: transform .2s;
}

.card-stat:hover {
    transform: translateY(-4px);
}

.icon-stat {
    width: 48px;
    height: 48px;
    border-radius: .75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Table */
.admin-table-wrap {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .05);
    overflow: hidden;
}

.admin-table thead th {
    font-size: .74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--gray-500);
    background: var(--gray-50);
    padding: 1rem 1.25rem;
    border-bottom: 2px solid var(--gray-200);
}

.admin-table tbody td {
    padding: .9rem 1.25rem;
    font-size: .88rem;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

/* Form */
.admin-form-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .05);
    padding: 2rem;
}

.form-control,
.form-select {
    padding: .65rem 1rem;
    border-radius: .5rem;
    border-color: var(--gray-200);
    font-size: .9rem;
}

.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 .2rem rgba(2, 132, 199, .2);
    border-color: var(--primary);
}

label.form-label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--gray-700);
}

/* Buttons */
.btn-primary {
    padding: .6rem 1.25rem;
    border-radius: .5rem;
    font-weight: 600;
}

.btn-sm {
    font-size: .8rem;
}

.btn-sidebar-toggle {
    background: none;
    border: none;
    color: var(--gray-500);
    font-size: 1.25rem;
    cursor: pointer;
}

/* Responsive Admin */
@media (max-width: 991.98px) {
    #sidebar {
        margin-left: calc(-1 * var(--sidebar-w));
        box-shadow: none;
    }

    #sidebar.open {
        margin-left: 0;
        box-shadow: 4px 0 20px rgba(0, 0, 0, .1);
    }

    #page-content-wrapper {
        width: 100%;
        margin-left: 0;
    }

    .cms-content {
        padding: 1rem 1.25rem;
    }
}

/* Toast */
.cms-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    min-width: 240px;
    background: var(--gray-900);
    color: #fff;
    padding: .875rem 1.25rem;
    border-radius: .75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .2);
    font-size: .88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: .75rem;
    z-index: 9999;
    animation: slideUp .3s ease;
}

.cms-toast.error {
    background: var(--danger);
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Misc */
.color-preview {
    width: 28px;
    height: 28px;
    border-radius: .35rem;
    border: 2px solid var(--gray-200);
}

.section-divider {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-400);
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--gray-100);
    margin-bottom: 1.25rem;
}

.img-preview {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: .5rem;
    display: none;
}

.img-preview.show {
    display: block;
}