/* Styling Umum */
body {
    font-family: 'Poppins', sans-serif; 
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #7cd1f9; 
    margin: 0;
    padding: 30px 15px; 
    min-height: 100vh; 
    box-sizing: border-box;
}

/* CONTAINER UTAMA BARU */
.main-container {
    width: 100%;
    /* Batasi lebar maksimum agar tampilan terpusat dan rapi */
    max-width: 600px; 
    /* Box-shadow opsional untuk memberikan sedikit kedalaman */
    /* box-shadow: 0 0 50px rgba(0, 0, 0, 0.05); */
    /* Opsional: Beri warna latar belakang putih untuk seluruh konten */
    /* background-color: #fff; */
    /* border-radius: 18px; */
    /* overflow: hidden; */
}

/* Header Logo Sekolah */
.header-portal {
    text-align: center;
    margin-bottom: 35px;
    padding: 25px 20px;
    background-color: #ffffff;
    border-radius: 18px; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); 
    /* Hapus max-width karena sudah dibatasi oleh .main-container */
    width: 100%;
    box-sizing: border-box; /* Pastikan padding tidak menambah lebar */
}

.logo-sekolah {
    width: 110px; 
    height: 110px;
    object-fit: contain; 
    margin-bottom: 15px;
}

.header-portal h1 {
    font-size: 2em;
    color: #004d99; 
    margin: 5px 0 8px 0;
    font-weight: 700;
}

.header-portal p {
    font-size: 1em;
    color: #6c757d;
    margin: 0;
}

/* Struktur Tombol Profil (Kunci) */
.container-tombol {
    width: 100%;
    /* Hapus max-width karena sudah dibatasi oleh .main-container */
    padding: 0;
}

.tombol-profil {
    display: flex; 
    align-items: center;
    justify-content: space-between; 
    
    width: 100%;
    padding: 20px 25px; 
    margin-bottom: 18px;
    
    background-color: white;
    border-radius: 18px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    
    text-decoration: none; 
    color: #333;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); 
    border: 1px solid transparent; 
    box-sizing: border-box;
}

/* Animasi Tombol saat Hover (lebih keren) */
.tombol-profil:hover {
    transform: translateY(-5px); 
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2); 
    border-color: #007bff; 
    background-color: #f0f8ff; 
}

/* Info di dalam Tombol */
.info-profil {
    display: flex;
    align-items: center;
}

.foto-profil-tombol {
    width: 60px; 
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 20px;
    border: 3px solid #007bff; 
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2); 
}

.teks-profil {
    min-width: 0; 
}

.nama {
    font-weight: 600; 
    margin: 0;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; 
}

.deskripsi {
    font-size: 0.9em;
    color: #6c757d;
    margin: 0;
}

.ikon-panah {
    font-size: 2em;
    color: #007bff;
    transition: transform 0.3s ease;
    flex-shrink: 0; 
}

.tombol-profil:hover .ikon-panah {
    transform: translateX(8px); 
}

/* --------------------
    MODAL (Pilihan Aksi)
-------------------- */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 40, 80, 0.7); 
    animation-name: fadeIn;
    animation-duration: 0.4s
}

.modal-konten {
    background-color: #ffffff;
    margin: 10% auto; 
    padding: 30px;
    border-radius: 12px;
    width: 95%; 
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    animation-name: slideDown;
    animation-duration: 0.4s
}

/* Animasi untuk Modal */
@keyframes fadeIn {
    from {opacity: 0} 
    to {opacity: 1}
}

@keyframes slideDown {
    from {transform: translateY(-70px); opacity: 0;} 
    to {transform: translateY(0); opacity: 1;}
}

.tutup-modal {
    color: #495057;
    float: right;
    font-size: 32px;
    font-weight: normal;
    transition: color 0.2s;
}

.tutup-modal:hover {
    color: #000;
    cursor: pointer;
}

.modal-tombol-container {
    display: flex;
    flex-direction: row; 
    justify-content: space-between;
    gap: 15px;
    margin-top: 25px;
}

.tombol-aksi {
    padding: 15px 20px;
    flex-grow: 1; 
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}

#tombolURL {
    background-color: #007bff; 
    color: white;
}

#tombolURL:hover {
    background-color: #0056b3;
}

#tombolQR {
    background-color: #28a745; 
    color: white;
}

#tombolQR:hover {
    background-color: #1e7e34;
}

.tombol-aksi:active {
    transform: scale(0.98);
}

.qr-container {
    margin-top: 25px;
    text-align: center;
    display: flex;
    justify-content: center; 
    align-items: center;
    padding: 20px;
    border: 2px dashed #adb5bd; 
    border-radius: 10px;
    background-color: #fafafa;
}

.qr-container img {
    max-width: 80%; 
    height: auto;
    display: block;
}

/* --------------------
    MEDIA QUERIES (RESPONSIVITAS)
-------------------- */

/* Smartphone (Portait dan Landscape) */
@media (max-width: 576px) {
    body {
        padding: 15px 10px;
    }
    
    .header-portal h1 {
        font-size: 1.5em;
    }

    .logo-sekolah {
        width: 80px;
        height: 80px;
    }
    
    .tombol-profil {
        padding: 15px 20px;
    }

    .foto-profil-tombol {
        width: 45px;
        height: 45px;
        margin-right: 15px;
    }

    .nama {
        font-size: 1em;
    }
    
    /* Tombol aksi di modal menjadi satu kolom pada HP */
    .modal-tombol-container {
        flex-direction: column; 
    }
    
    .modal-konten {
        margin: 5% auto; 
    }
}

/* --------------------
    STYLING KHUSUS SUBMENU SKP
-------------------- */

.submenu-header {
    margin-bottom: 25px; /* Kurangi margin untuk halaman submenu yang lebih fokus */
}

/* Duplikasi styling tombol utama agar sesuai tampilan */
.tombol-skp {
    display: flex; 
    align-items: center;
    justify-content: space-between; 
    
    width: 100%;
    padding: 20px 25px; 
    margin-bottom: 18px;
    
    background-color: white;
    border-radius: 18px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    
    text-decoration: none; 
    color: #333;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); 
    border: 1px solid transparent; 
    box-sizing: border-box;
}

/* Animasi Tombol SKP saat Hover */
.tombol-skp:hover {
    transform: translateY(-5px); 
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2); 
    border-color: #007bff; 
    background-color: #f0f8ff; 
}

/* Ikon Dokumen pengganti foto profil */
.ikon-dokumen {
    font-size: 2.5em; /* Ukuran ikon yang besar dan jelas */
    margin-right: 20px;
    flex-shrink: 0;
}

/* Styling Tombol Kembali */
.tombol-kembali {
    display: block;
    width: 100%;
    max-width: 600px;
    text-align: center;
    padding: 15px;
    margin-top: 30px;
    background-color: transparent;
    border: 2px solid #007bff;
    border-radius: 10px;
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s, color 0.3s;
}

.tombol-kembali:hover {
    background-color: #007bff;
    color: white;
}



/* ... (Gaya Modal sebelumnya, termasuk .modal-tombol-container) ... */

.modal-tombol-container {
    display: flex;
    /* Mengubah ke kolom agar tombol submenu dapat diletakkan di atas tombol lainnya pada HP */
    flex-direction: column; 
    gap: 15px;
    margin-top: 25px;
}

.tombol-aksi {
    padding: 15px 20px;
    /* ... (Gaya tombol aksi lainnya) ... */
    flex-grow: 1;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}

/* GAYA KHUSUS TOMBOL SUBMENU (Bisa gunakan warna yang berbeda, misalnya Biru Tua) */
.tombol-submenu {
    background-color: #004d99 !important; /* Biru Tua, agar terlihat sebagai aksi primer */
    color: white !important;
}

.tombol-submenu:hover {
    background-color: #003366 !important;
}

/* Styling untuk QR Section di Submenu */
.qr-section {
    width: 100%;
    margin-top: 30px;
    margin-bottom: 20px;
    padding: 25px 20px;
    background-color: #ffffff;
    border-radius: 18px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.qr-section-title {
    font-size: 1.3em;
    color: #004d99;
    margin: 0 0 20px 0;
    text-align: center;
    font-weight: 600;
}

.qr-section .qr-container {
    margin-top: 0;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    border: 2px dashed #adb5bd;
    border-radius: 10px;
    background-color: #fafafa;
    min-height: 200px;
}

.qr-section .qr-container img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Styling untuk menu item yang bisa diklik (popup) */
.menu-item-clickable {
    cursor: pointer;
}

.menu-item-clickable:hover {
    cursor: pointer;
}

/* Styling untuk modal popup menu */
#menuModal .modal-konten {
    max-width: 500px;
}

#menuModal #modal-judul-menu {
    color: #004d99;
    margin-bottom: 10px;
}

#menuModal #modal-deskripsi-menu {
    font-size: 0.95em;
}

#menuModal .qr-container {
    margin-top: 20px;
    min-height: 250px;
}

#menuModal #tombolBukaTautan {
    background-color: #007bff;
    color: white;
}

#menuModal #tombolBukaTautan:hover {
    background-color: #0056b3;
}

#menuModal #tombolTampilkanQR {
    background-color: #28a745;
    color: white;
}

#menuModal #tombolTampilkanQR:hover {
    background-color: #1e7e34;
}

#tombolURL {
    background-color: #007bff; 
    color: white;
}
/* ... (Gaya tombol lainnya) ... */


/* Media Query (Responsivitas) Disesuaikan */
@media (min-width: 577px) {
    /* Pada layar lebar, atur tombol kembali ke baris */
    .modal-tombol-container {
        flex-direction: row; 
        /* Pastikan tombol submenu tetap di depan, jika ada */
        flex-wrap: wrap; 
    }
    
    /* Tombol Submenu dan URL dapat berbagi baris jika perlu, tetapi kita biarkan dalam kolom untuk tampilan yang bersih*/
    .tombol-submenu, #tombolURL, #tombolQR {
        width: 100%;
    }
}

@media (max-width: 576px) {
    /* Pada HP, pastikan semua tombol tetap dalam satu kolom */
    .modal-tombol-container {
        flex-direction: column; 
    }
}