/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Warna berdasarkan logo SMA PLUS PGRI CIBINONG */
    --primary-color: #1a4b84; /* Biru tua dari logo */
    --secondary-color: #e63946; /* Merah dari logo */
    --accent-color: #f6f7f9; /* Putih dari logo */
    --accent-color-icon: #cfb10a; /* Kuning dari logo */
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--light-color);
    overflow-x: hidden;
    /* Menghapus height: 100vh untuk memungkinkan scrolling */
    min-height: 100vh; /* Menggunakan min-height sebagai gantinya */
}

/* Background Slider */
.slider-container {
    position: relative;
    width: 100%;
    /* Mengubah height: 100vh menjadi min-height untuk memungkinkan konten lebih panjang */
    min-height: 100vh;
    overflow: visible; /* Mengubah overflow: hidden menjadi visible */
}

.slider-background {
    position: fixed; /* Mengubah position: absolute menjadi fixed */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: opacity 1.5s ease-in-out;
    z-index: 1;
}

.overlay {
    position: fixed; /* Mengubah position: absolute menjadi fixed */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 75, 132, 0.8) 0%, rgba(33, 37, 41, 0.8) 100%);
    z-index: 2;
}

/* Content Styling */
.content {
    position: relative;
    z-index: 3;
    /* Menghapus height: 100% untuk memungkinkan konten lebih panjang */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
}

/* Header Styling */
.header {
    text-align: center;
    padding-top: 1.5rem;
}

.logo {
    margin-bottom: 1.5rem;
}

#logo-img {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

.header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    color: var(--light-color);
}

.header h2 {
    font-size: 1.8rem;
    font-weight: 500;
    /* margin-bottom: 2.5rem; */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    color: var(--accent-color);
}

/* Menu Container */
.menu-container {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.menu-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2.5rem;
    width: 280px;
    text-align: center;
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--secondary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.menu-item:hover::before {
    transform: scaleX(1);
}

.menu-item:hover {
    transform: translateY(-10px);
    background: rgba(26, 75, 132, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.menu-item a {
    text-decoration: none;
    color: var(--light-color);
    display: block;
}

.icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color-icon);
    transition: transform 0.3s ease;
}

.menu-item:hover .icon {
    transform: scale(1.1);
}

.menu-item h3 {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--light-color);
}

.menu-item p {
    font-size: 1rem;
    opacity: 0.9;
    color: var(--light-color);
}

/* Footer */
.footer {
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.95rem;
    opacity: 0.8;
}

/* Responsive Design */
/* Tambahan untuk responsivitas */
@media (max-width: 992px) {
    .menu-container {
        gap: 2rem;
    }
    
    .menu-item {
        width: 260px;
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .menu-container {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    
    .menu-item {
        width: 90%;
        max-width: 320px;
    }
    
    .header h1 {
        font-size: 2.8rem;
    }
    
    .header h2 {
        font-size: 1.5rem;
    }
    
    #logo-img {
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 2.2rem;
    }
    
    .header h2 {
        font-size: 1.2rem;
    }
    
    .menu-item {
        padding: 1.8rem;
    }
    
    #logo-img {
        max-width: 120px;
    }
    
    .content {
        padding: 1.5rem;
    }
}

/* Tambahan untuk perangkat sangat kecil */
@media (max-width: 360px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .header h2 {
        font-size: 1rem;
    }
    
    .menu-item {
        padding: 1.5rem;
    }
    
    .menu-item h3 {
        font-size: 1.5rem;
    }
    
    .menu-item h4 {
        font-size: 0.9rem;
    }
    
    .icon {
        font-size: 2.8rem;
        margin-bottom: 1rem;
    }
    
    #logo-img {
        max-width: 100px;
    }
}

/* Admin Panel Styling */
.admin-toggle {
    margin-top: 1rem;
    text-align: center;
}

/* Admin Link di Footer */
.admin-link {
    margin-top: 1rem;
    text-align: center;
}

.admin-button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--light-color);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.admin-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(30deg);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Responsive Admin Link */
@media (max-width: 480px) {
    .admin-button {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

.admin-button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    color: var(--light-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(30deg);
}

.admin-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--dark-color);
    border-radius: 15px;
    padding: 1.5rem;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.admin-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-header h3 {
    font-size: 1.3rem;
    color: var(--light-color);
    margin: 0;
}

.close-button {
    background: transparent;
    border: none;
    color: var(--light-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-button:hover {
    color: var(--secondary-color);
}

.menu-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.menu-toggle label {
    color: var(--light-color);
    font-weight: 500;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--secondary-color);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--secondary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.admin-actions {
    margin-top: 1.5rem;
    text-align: center;
}

.save-button {
    background: var(--primary-color);
    color: var(--light-color);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-button:hover {
    background: var(--secondary-color);
}

/* Disabled Menu Item */
.menu-item.disabled {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(1);
    transform: scale(0.95);
}

.menu-item.disabled::before {
    display: none;
}

/* Responsive Admin Panel */
@media (max-width: 480px) {
    .admin-panel {
        width: 95%;
        padding: 1.2rem;
    }
    
    .menu-toggle {
        padding: 0.6rem;
    }
    
    .admin-header h3 {
        font-size: 1.1rem;
    }
}