/* ============================================================
   TEMA MODERN MTS MA'ARIF 02 - V78 (FINAL PERFECT: 135px/83px)
   ============================================================ */

/* 1. IMPORT FONT POPPINS */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* --- SETUP HALAMAN --- */
:root { color-scheme: light; } 
html, body { height: 100%; margin: 0; padding: 0; }

body {
    font-family: 'Poppins', sans-serif; 
    background-color: #f4f6f9 !important; 
    color: #333333 !important; 
    font-size: 14px; line-height: 1.6; 
    overflow-x: hidden; display: flex; flex-direction: column;
    
    /* Background Gambar Alat Tulis */
    background-image: url('https://images.unsplash.com/photo-1456735190827-d1262f71b8a6?q=80&w=1448&auto=format&fit=crop'); 
    background-size: cover; background-position: center; background-attachment: fixed; background-repeat: no-repeat;

    -webkit-user-select: text !important; -moz-user-select: text !important; -ms-user-select: text !important; user-select: text !important; 
}

body::before {
    content: ""; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.6); z-index: -1; 
}

.content { flex: 1 0 auto; width: 100%; padding-top: 30px; }
input, textarea { -webkit-user-select: text !important; user-select: text !important; }
img { pointer-events: none; -webkit-user-drag: none; }
@media print { html, body { display: none !important; } }
a { text-decoration: none !important; transition: all 0.3s ease; }

/* ============================================================
   ANTI-DARK MODE
   ============================================================ */
.card, .panel, .sidebar .list-group-item, .form-control, input, textarea, select {
    background-color: #ffffff !important;
    color: #333333 !important;
    border-color: #eaeaea !important;
}
.table { background-color: #fff !important; color: #333 !important; }
.table th, .table td { border-color: #eee !important; color: #333 !important; }

/* ============================================================
   HEADER & TOP BAR
   ============================================================ */
.top-bar {
    background: linear-gradient(90deg, #002905 0%, #006400 40%, #2e7d32 100%) !important;
    color: #fff !important; padding: 8px 0; font-size: 13px; border-bottom: 3px solid #fbbc05;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.top-header { display: flex; align-items: center; }
.top-header img { 
    margin-right: 15px; width: 60px; height: 60px; background: #fff; border-radius: 50%; padding: 2px;
    box-shadow: 0 0 10px rgba(255,255,255,0.3);
}
.top-left h5 {
    font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 22px;
    color: #fff !important; margin-bottom: 0; line-height: 1.2; text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.top-left small { font-size: 12px; color: #ffd54f !important; font-weight: 500; }
.top-right { margin-top: 10px; }
.top-right li { font-size: 13px; color: #fff !important; border-left: 1px solid rgba(255,255,255,0.2); padding-left: 12px; margin-left: 5px; }
.top-right li:first-child { border: none; }
.top-right i { color: #fbbc05 !important; font-size: 15px; margin-right: 5px; vertical-align: middle; }
.top-right a { color: #fff !important; }
@media (max-width: 768px) {
    .top-header { 
        display: flex !important; flex-direction: column !important; justify-content: center !important; 
        align-items: center !important; text-align: center !important; padding-bottom: 15px !important; width: 100% !important;
    }
    .top-header img { display: block !important; float: none !important; margin: 0 auto 12px auto !important; width: 80px !important; height: 80px !important; }
    .top-left { width: 100% !important; text-align: center !important; display: block !important; }
    .top-left h5 { font-size: 19px !important; text-align: center !important; margin: 0 auto 5px auto !important; }
    .top-left small { text-align: center !important; display: block !important; }
    .top-right { display: none !important; } 
}

/* ============================================================
   MENU NAVIGASI
   ============================================================ */
.menu-bar {
    background: linear-gradient(120deg, #003300 0%, #1b5e20 50%, #4caf50 100%) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); border: none; height: auto; position: relative; min-height: 60px;
}
.sticky.is-sticky {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    background: linear-gradient(120deg, #003300 0%, #2e7d32 100%) !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); animation: slideDown 0.3s ease-out;
}
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }

.sm-clean { background: transparent; }
.sm-clean a {
    color: #fff !important; font-weight: 600; text-transform: uppercase;
    font-size: 13px !important; letter-spacing: 0.3px;
    white-space: nowrap; position: relative; text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.sm-clean a:hover { background-color: rgba(0,0,0,0.3); color: #fbbc05 !important; border-radius: 0; }
.sm-clean a .sub-arrow {
    display: inline-block !important; position: static !important; margin-left: 5px !important; 
    color: #fbbc05 !important; font-size: 10px !important; 
    border-color: #fbbc05 transparent transparent transparent !important;
    vertical-align: middle !important; margin-top: 0 !important;
}

@media (max-width: 991px) {
    .navbar-toggler {
        position: absolute !important; left: 15px !important; top: 12px !important; right: auto !important;
        float: none !important; display: flex !important; align-items: center;
        border: 2px solid #fbbc05 !important; border-radius: 6px !important; padding: 5px 12px; margin: 0; z-index: 1001;
        background: transparent !important;
    }
    .navbar-toggler::after { content: "MENU"; color: #fbbc05 !important; font-weight: 700; font-size: 14px; margin-left: 8px; text-transform: uppercase; }
    .navbar-toggler span { color: #fbbc05 !important; font-size: 24px; }

    .navbar-collapse {
        background: linear-gradient(180deg, #003300 0%, #2e7d32 100%) !important;
        border-radius: 0 0 8px 8px; padding: 0; border-top: 2px solid #fbbc05; width: 100%; margin-top: 65px; 
        max-height: 80vh; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 20px;
    }
    .sm-clean a {
        display: block !important; padding: 14px 20px !important; text-align: left !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
        color: #ffffff !important; font-size: 13px !important; width: 100% !important; line-height: 1.5 !important; position: relative !important; background: transparent !important;
    }
    .sm-clean > li:first-child > a { font-size: 0 !important; padding: 14px 20px !important; }
    .sm-clean > li:first-child > a i { display: none !important; }
    .sm-clean > li:first-child > a::before { content: "BERANDA"; font-size: 13px !important; font-weight: 700; color: #fbbc05 !important; text-transform: uppercase; display: block; }
    .sm-clean a .sub-arrow {
        position: absolute !important; top: 50% !important; right: 15px !important; margin-top: 0 !important; transform: translateY(-50%) !important;
        display: flex !important; align-items: center; justify-content: center;
        width: 30px !important; height: 30px !important; background: rgba(0,0,0,0.3) !important; border-radius: 4px;
        font-size: 16px !important; font-weight: bold !important; color: #fbbc05 !important; border: none !important;
    }
    .sm-clean ul { background: rgba(0,0,0,0.2) !important; border: none; padding: 0; display: none; }
    .sm-clean ul a { padding-left: 40px !important; color: #e0e0e0 !important; }
}

@media (min-width: 992px) {
    .sm-clean a { padding: 14px 10px !important; font-size: 12px !important; }
    .sm-clean > li:first-child > a {
        background: linear-gradient(135deg, #fbbc05 0%, #ffca28 100%) !important;
        color: #003300 !important; border-radius: 6px !important;
        box-shadow: 0 0 10px rgba(251, 188, 5, 0.3); transition: all 0.3s ease;
        display: inline-flex !important; align-items: center; justify-content: center;
        margin-right: 5px; margin-top: 2px; padding: 10px 20px !important; height: 42px; font-size: 0 !important; min-width: 80px;
    }
    .sm-clean > li:first-child > a i { display: none !important; }
    .sm-clean > li:first-child > a::before { content: "BERANDA"; font-size: 12px !important; font-weight: 800; color: #003300; text-transform: uppercase; }
    .sm-clean > li:first-child > a:hover { background: #fff !important; transform: scale(1.05); }
    .sm-clean > li:first-child > a:hover::before { color: #fbbc05 !important; }
    .sm-clean ul {
        background-color: #fff !important; border-top: 3px solid #fbbc05; border-radius: 0 0 6px 6px; 
        box-shadow: 0 8px 20px rgba(0,0,0,0.2); padding: 0; min-width: 220px; top: 100% !important;
        display: block !important; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.2s ease-in-out;
    }
    .sm-clean li:hover > ul { opacity: 1; visibility: visible; transform: translateY(0); z-index: 9999; }
    .sm-clean ul a { color: #333 !important; font-weight: 500; border-bottom: 1px solid #f1f1f1; white-space: normal; padding: 12px 15px !important; font-size: 13px !important; }
    .sm-clean ul a:hover { background-color: #e8f5e9 !important; color: #2e7d32 !important; padding-left: 20px !important; }
}

/* ============================================================
   CAROUSEL (SLIDER)
   ============================================================ */
.carousel-item img { transition: filter 0.5s ease-in-out; cursor: pointer; border-radius: 10px !important; }
.carousel-item img.flash-active { filter: brightness(1.4) contrast(1.1); }

.carousel-control-prev, .carousel-control-next {
    width: 50px !important; height: 50px !important;
    background: rgba(251, 188, 5, 0.7); border-radius: 50%;
    top: 50%; transform: translateY(-50%); opacity: 0.8; transition: all 0.3s; z-index: 10;
}
.carousel-control-prev { left: 20px; }
.carousel-control-next { right: 20px; }
.carousel-control-prev:hover, .carousel-control-next:hover { background: #fbbc05; opacity: 1; transform: translateY(-50%) scale(1.1); }
.carousel-control-prev-icon, .carousel-control-next-icon { width: 20px; height: 20px; filter: invert(1) brightness(0); }
.carousel-indicators li {
    width: 12px !important; height: 12px !important;
    border-radius: 50%; background-color: rgba(255,255,255,0.5);
    margin: 0 5px; border: 2px solid #fff; opacity: 1;
}
.carousel-indicators .active { background-color: #fbbc05 !important; width: 30px !important; border-radius: 10px; border-color: #fbbc05; }
.carousel-caption {
    background: rgba(0, 41, 5, 0.75); backdrop-filter: blur(5px);
    border-radius: 10px; bottom: 40px; padding: 20px 30px; border-bottom: 4px solid #fbbc05;
}
.carousel-caption h2 { color: #fff !important; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }

@media (max-width: 768px) {
    .carousel-control-prev, .carousel-control-next { width: 30px !important; height: 30px !important; background: rgba(251, 188, 5, 0.5); }
    .carousel-control-prev { left: 10px; }
    .carousel-control-next { right: 10px; }
    .carousel-control-prev-icon, .carousel-control-next-icon { width: 12px; height: 12px; }
    .carousel-indicators li { width: 6px !important; height: 6px !important; margin: 0 3px; }
    .carousel-indicators .active { width: 15px !important; }
    .carousel-caption { padding: 10px 15px; bottom: 20px; border-radius: 6px; }
    .carousel-caption h2 { font-size: 14px; margin: 0; }
    .carousel-caption p { font-size: 10px; display: block !important; margin: 0; }
}

/* ============================================================
   KONTEN: CARD & JUDUL
   ============================================================ */
.page-title, h5.card-title {
    font-weight: 800; color: #003300; text-transform: uppercase; letter-spacing: 0.5px;
    border-left: 6px solid #fbbc05; padding-left: 15px; margin-bottom: 25px; position: relative;
}

.card, .panel, .sidebar .list-group-item {
    border: none !important; border-radius: 8px !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08) !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    margin-bottom: 40px !important; overflow: hidden; position: relative; z-index: 1;
}
.card:hover, .panel:hover, .sidebar .list-group-item:hover {
    transform: translateY(-5px) !important; 
    box-shadow: 0 15px 30px rgba(0,0,0,0.15) !important; z-index: 2;
}
.card-img-top, .card-img {
    border-radius: 8px 8px 0 0 !important; height: 200px; object-fit: cover; transition: transform 0.5s ease;
}
.card:hover .card-img-top { transform: scale(1.05); }

/* ============================================================
   FIX KUTIPAN (USER FIXED: 135PX & 83PX)
   ============================================================ */
div.quote {
   overflow: hidden; background: linear-gradient(90deg, #2e7d32 0%, #66bb6a 100%) !important;
   border-radius: 8px; box-shadow: 0 8px 20px rgba(46, 125, 50, 0.3); 
   margin-bottom: 30px; position: relative; height: 50px;
}
.quote-title {
   font-size: 14px; font-weight: 800; text-transform: uppercase; display: inline-block; padding: 0 25px; 
   color: #000; float: left; 
   background: linear-gradient(135deg, #ffb300 0%, #ffca28 100%); 
   height: 50px; line-height: 50px; position: relative; z-index: 20; 
   box-shadow: 4px 0 10px rgba(0,0,0,0.2);
}
ul.quote { 
    display: block; padding: 0; margin: 0; list-style: none !important; 
    line-height: 1; position: absolute; top: 0; left: 0; width: 100%; height: 50px;
    background: transparent !important;
}
ul.quote li {
   color: #fff; position: absolute; top: -9999em; left: 0;
   display: block; white-space: nowrap;
   font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 500; 
   height: 50px; line-height: 50px; 
   padding: 0; 
   
   /* --- DESKTOP FIXED: 135PX --- */
   margin-left: 135px !important; 
}
ul.quote li span { color: #ffe082; font-weight: 700; }

@media (max-width: 576px) {
    .quote-title { padding: 0 10px; font-size: 11px; width: auto; }
    /* --- MOBILE FIXED: 83PX --- */
    ul.quote li { margin-left: 83px !important; font-size: 12px; }
}

/* ============================================================
   FIX TABEL UNDUHAN MOBILE
   ============================================================ */
.table-responsive {
    display: block !important; width: 100% !important; 
    overflow-x: auto !important; -webkit-overflow-scrolling: touch;
    margin-bottom: 15px; border: none; border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.table thead th {
    background-color: #004d00 !important; color: #ffffff !important;
    white-space: nowrap; padding: 12px 10px !important;
}
.table tbody td {
    vertical-align: middle !important; padding: 10px !important; color: #444 !important;
}

@media (max-width: 768px) {
    .table thead th:nth-child(1), .table tbody td:nth-child(1) { display: none !important; }
    .table thead th:nth-child(4), .table tbody td:nth-child(4) { display: none !important; }

    .table tbody td:nth-child(2) {
        white-space: normal !important; word-break: break-word !important; min-width: 120px !important; font-size: 12px !important;
    }
    .table .btn { padding: 6px 10px !important; font-size: 11px !important; white-space: nowrap !important; }
}

/* ============================================================
   FOOTER & BUTTONS
   ============================================================ */
#return-to-top {
    position: fixed; bottom: 25px; right: 25px; background: #fbbc05; color: #000;
    width: 45px; height: 45px; border-radius: 8px; 
    text-align: center; line-height: 45px; font-size: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); z-index: 9999; transition: all 0.3s ease; display: block; opacity: 0.8;
}
#return-to-top:hover { background: #fff; color: #2e7d32; transform: translateY(-5px); opacity: 1; }
#return-to-top i { margin: 0; line-height: 45px; }

footer {
    flex-shrink: 0; background: linear-gradient(180deg, rgba(5, 30, 5, 0.98) 0%, rgba(20, 60, 20, 0.95) 100%);
    backdrop-filter: blur(15px); color: #ccc; margin-top: 60px; font-size: 13px; border-top: 4px solid #fbbc05;
}
footer .primary-footer { padding: 40px 0 20px 0; background: transparent; }
footer a { color: #ddd; font-weight: 500; }
footer a:hover { color: #fbbc05; padding-left: 5px; }
footer .page-title {
    color: #fff; font-weight: 800; font-size: 15px; border-left: 4px solid #fbbc05 !important; border-bottom: none !important;
    padding-left: 10px; margin-bottom: 15px; text-transform: uppercase; text-shadow: none;
}
footer .page-title:after { display: none; }
@media (max-width: 768px) {
    footer { text-align: center; }
    footer .page-title { border-left: none !important; border-bottom: 2px solid #fbbc05 !important; padding-left: 0; display: inline-block; padding-bottom: 5px; margin-bottom: 10px; }
    .tag-content-block { display: none !important; } 
    footer .col-md-4:nth-child(2) { display: none; } 
    .list-unstyled li.float-left { float: none !important; display: inline-block !important; }
    .social-icon { margin: 0 5px 10px 5px; }
}

.tag-content-block a {
    display: inline-block; background-color: rgba(255,255,255,0.08); color: #fff; padding: 5px 12px; border-radius: 50px;
    margin: 0 4px 8px 0; font-size: 11px; font-weight: 500; border: 1px solid rgba(255,255,255,0.15); transition: all 0.3s ease; transform: none !important; 
}
.tag-content-block a:hover { background: linear-gradient(45deg, #ff8f00, #ffca28); color: #000; border-color: #ffca28; text-decoration: none; box-shadow: 0 0 10px rgba(255, 143, 0, 0.4); }
.social-icon {
    width: 38px !important; height: 38px !important; font-size: 16px !important; line-height: 38px !important;
    background-color: rgba(255,255,255,0.08); color: #fff; text-align: center; border-radius: 50%; display: inline-block; transition: 0.3s; margin-right: 5px; border: 1px solid rgba(255,255,255,0.15);
}
.social-icon:hover { background: #fbbc05; color: #000; transform: rotate(360deg); border-color: #fbbc05; }
.secondary-footer { background: rgba(0, 0, 0, 0.6); padding: 15px 0; border-top: 1px solid rgba(255,255,255,0.05); font-size: 11px; color: #888; }
.secondary-footer a { color: #aaa; font-weight: 600; }

.btn, .action-button, .input-group-btn .btn {
    border-radius: 8px !important; /* Konsisten Rounded 8px */
    background: linear-gradient(135deg, #1b5e20 0%, #66bb6a 100%) !important;
    color: #fff !important; border: none; font-size: 12px; font-weight: 600; padding: 8px 25px; transition: 0.3s;
}
.btn:hover, .action-button:hover, .input-group-btn .btn:hover { background: linear-gradient(135deg, #ffa000 0%, #ffca28 100%) !important; color: #000 !important; transform: scale(1.05); }
#search_form { z-index: 999999; position: fixed; top: 0px; left: 0px; width: 100%; height: 100%; background-color: rgba(10, 30, 10, 0.98); transition: all 0.4s ease-in-out; transform: translate(0px, -100%); opacity: 0; visibility: hidden; }
#search_form.open { transform: translate(0px, 0px); opacity: 1; visibility: visible; }
#search_form input[type="search_form"] { position: absolute; top: 40%; width: 100%; color: #fff; background: transparent; font-size: 30px; font-weight: 300; text-align: center; border: none; border-bottom: 2px solid #fbbc05; margin-top: -51px; padding: 15px 30px; outline: none; }
#search_form .btn { position: absolute; top: 55%; left: 50%; transform: translateX(-50%); background: transparent !important; border: 2px solid #fff !important; color: #fff !important; border-radius: 50px !important; padding: 10px 40px; }

/* FIX IFRAME & SIDEBAR */
iframe[src*="google.com/maps"], iframe[src*="googleusercontent.com"] { width: 100% !important; height: 400px !important; border: none !important; border-radius: 8px !important; box-shadow: 0 4px 10px rgba(0,0,0,0.1); margin-bottom: 20px; }
iframe[src*="youtube.com"], iframe[src*="youtu.be"] { width: 100% !important; height: auto !important; aspect-ratio: 16 / 9 !important; border-radius: 8px !important; margin-bottom: 20px; }
@supports not (aspect-ratio: 16 / 9) { iframe[src*="youtube.com"], iframe[src*="youtu.be"] { height: 300px !important; } }
.sidebar .card:has(a[href*="sambutan-kepala"]), .sidebar .card:has(img[src*="headmaster"]), .sidebar .card img.rounded-circle, .sidebar .card h5.text-success, .sidebar .card h6.text-muted.text-center, .sidebar .card a[href*="sambutan-kepala"] { display: none !important; }
/* ============================================================
   OPTIMASI PERFORMA KHUSUS SMARTPHONE (HP) - LITE MODE
   Menghapus efek berat (blur/shadow) tapi animasi tetap jalan
   ============================================================ */
@media (max-width: 768px) {
    
    /* 1. Matikan Background Fixed (Penyebab utama lag saat scroll di HP) */
    body {
        background-attachment: scroll !important;
        background-position: top center !important;
        /* Opsional: Jika masih berat, hapus gambar background dengan uncomment baris bawah ini */
        /* background-image: none !important; */
    }

    /* 2. Matikan Efek Kaca (Blur) yang memberatkan GPU */
    .navbar, .footer, .carousel-caption, div.quote, .top-bar, .menu-bar {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background-color: rgba(255, 255, 255, 0.98) !important; /* Ganti blur dengan solid */
    }
    
    /* Khusus elemen gelap/hijau */
    .top-bar, .menu-bar, footer {
        background: #003300 !important; /* Warna solid hijau tua */
    }

    /* 3. Matikan Bayangan (Shadows) & Text Shadow */
    *, .card, .btn, .top-header img, .quote-title, #return-to-top {
        box-shadow: none !important;
        text-shadow: none !important;
    }

    /* 4. Beri Garis Tipis sebagai pengganti Shadow (Supaya tetap rapi) */
    .card, .panel, .sidebar .list-group-item {
        border: 1px solid #e0e0e0 !important;
    }

    /* 5. Matikan Efek Hover Transform (Zoom/Naik) di HP */
    /* Karena di HP tidak ada mouse hover, efek ini sering nyangkut */
    .card:hover, .panel:hover, .btn:hover {
        transform: none !important;
    }

    /* 6. Pastikan Animasi/Transisi tetap AKTIF */
    /* Kita tidak men-set transition: none, jadi animasi gerak tetap jalan */
    
    /* 7. Perbaikan Tampilan Card Gambar di HP */
    .card-img-top, .card-img {
        height: 180px !important; /* Sedikit dikecilkan agar proporsional */
    }
}