@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    /* Colors */
    --primary: #1B5E20; /* dark green */
    --secondary: #4CAF50; /* green */
    --accent: #FFD700; /* gold */
    --bg-gradient: linear-gradient(135deg, #0a1a0a 0%, #1a2e1a 100%);
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    /* Text */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    
    /* Border Radius */
    --radius-card: 16px;
    --radius-btn: 12px;
    --radius-pill: 50px;
    
    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-medium: 0.6s ease;
    --transition-slow: 0.8s ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0a1a0a;
}
::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Typography & Utility */
.text-center { text-align: center; }
.text-gold { color: var(--accent); }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 12px 28px;
    background: var(--accent);
    color: #000;
    font-weight: 600;
    border-radius: var(--radius-btn);
    transition: var(--transition-fast);
    border: none;
    cursor: pointer;
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.3);
}

.btn-outline {
    display: inline-block;
    padding: 12px 28px;
    background: transparent;
    color: var(--text-primary);
    font-weight: 600;
    border-radius: var(--radius-btn);
    border: 2px solid var(--text-primary);
    transition: var(--transition-fast);
    cursor: pointer;
}
.btn-outline:hover {
    background: var(--text-primary);
    color: #000;
    transform: translateY(-3px);
}

/* Splash Screen */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0a1a0a;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#splash-screen img, #splash-screen .splash-logo {
    max-width: 160px;
    height: auto;
    border-radius: 12px;
    animation: scaleIn 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

#splash-screen h1, #splash-screen h2, #splash-screen .splash-title {
    margin-top: 20px;
    font-size: 1.4rem;
    color: var(--text-primary);
    letter-spacing: 1px;
    text-align: center;
}

.splash-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    display: none !important;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 5%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-fast);
}

.navbar.scrolled {
    background: rgba(10, 26, 10, 0.95);
    padding: 10px 5%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.nav-brand, .navbar .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-brand img, .navbar .logo img {
    width: 40px;
    height: 40px;
    max-width: 40px;
    max-height: 40px;
    object-fit: cover;
    border-radius: 50%;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: var(--transition-fast);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition-fast);
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: var(--transition-fast);
    border-radius: 2px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    min-height: max(600px, 100vh);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    position: relative;
    background: linear-gradient(rgba(10,26,10,0.6), rgba(10,26,10,0.8)), url('../images/hero-bg.jpg') center/cover;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, var(--primary) 150%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(to right, var(--accent), #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 1s ease forwards;
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    margin-bottom: 40px;
    animation: fadeInUp 1s ease 0.2s forwards;
    opacity: 0;
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
    animation: fadeInUp 1s ease 0.4s forwards;
    opacity: 0;
}

/* Section Common */
.section {
    padding: 80px 5%;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

/* Category Grid */
.kategori-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.kategori-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-card);
    padding: 30px;
    text-align: center;
    transition: var(--transition-fast);
}

.kategori-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.4);
}

.kategori-card i {
    font-size: 48px;
    color: var(--secondary);
    margin-bottom: 20px;
    display: block;
}

.kategori-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.kategori-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.kategori-link {
    color: var(--accent);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}
.kategori-link:hover { gap: 12px; }

/* Product Grid */
.produk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.produk-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    overflow: hidden;
    transition: var(--transition-fast);
}

.produk-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--glass-shadow);
}

.produk-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: var(--transition-medium);
}
.produk-card:hover .produk-img {
    transform: scale(1.05);
}

.produk-content {
    padding: 20px;
}

.produk-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.produk-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 15px;
}

.btn-wa {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    background: #25D366;
    color: white;
    border-radius: var(--radius-btn);
    font-weight: 600;
    transition: var(--transition-fast);
}
.btn-wa:hover {
    background: #128C7E;
}

/* Announcement Cards */
.filter-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 8px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: var(--transition-fast);
    font-weight: 500;
}
.filter-btn:hover, .filter-btn.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

.pengumuman-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.pengumuman-card {
    background: var(--glass-bg);
    border-radius: var(--radius-card);
    padding: 25px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-fast);
}

.pengumuman-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
}
.pengumuman-card[data-jenis="sekolah"]::before { background: #2196F3; }
.pengumuman-card[data-jenis="madrasah"]::before { background: #4CAF50; }
.pengumuman-card[data-jenis="umum"]::before { background: var(--accent); }

.pengumuman-card:hover {
    background: rgba(255,255,255,0.08);
}

.pengumuman-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.badge {
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 500;
}
.badge-sekolah { background: rgba(33, 150, 243, 0.2); color: #64B5F6; }
.badge-madrasah { background: rgba(76, 175, 80, 0.2); color: #81C784; }
.badge-umum { background: rgba(255, 215, 0, 0.2); color: var(--accent); }

.pengumuman-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.pengumuman-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}
.pengumuman-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Organization Structure */
.struktur-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.struktur-card {
    text-align: center;
}

.struktur-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    margin: 0 auto 15px;
    transition: var(--transition-fast);
}

.struktur-card.level-1 .struktur-img {
    width: 150px;
    height: 150px;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}
.struktur-card:hover .struktur-img {
    transform: scale(1.05);
}

.struktur-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}
.struktur-role {
    font-size: 0.9rem;
    color: var(--accent);
}

/* Maps Section */
.maps-section {
    background: var(--glass-bg);
    border-radius: var(--radius-card);
    border: 1px solid var(--glass-border);
    padding: 10px;
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
}
.maps-section iframe {
    width: 100%;
    height: 400px;
    border: none;
    border-radius: calc(var(--radius-card) - 6px);
}

/* Footer */
.footer {
    background: #050d05;
    padding: 60px 5% 20px;
    border-top: 1px solid var(--glass-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--accent);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-links li {
    margin-bottom: 10px;
}
.footer-links a {
    color: var(--text-secondary);
    transition: var(--transition-fast);
}
.footer-links a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* WhatsApp Float */
.wa-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: pulse 2s infinite;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}
@keyframes blink {
    50% { border-color: transparent }
}
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive System */
@media (max-width: 992px) {
    .container { padding: 0 20px; }
    .hero-title { font-size: 2.5rem; }
    .produk-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
}

@media (max-width: 768px) {
    .navbar { padding: 12px 4%; }
    .nav-brand { font-size: 0.95rem; gap: 8px; }
    .nav-brand img { width: 34px; height: 34px; }
    
    .nav-toggle { display: flex; }
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 280px;
        background: rgba(10, 26, 10, 0.98);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        flex-direction: column;
        padding: 90px 30px;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -8px 0 25px rgba(0,0,0,0.6);
        gap: 20px;
    }
    .navbar.nav-open .nav-links { right: 0; }
    .navbar.nav-open .nav-toggle span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
    .navbar.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
    .navbar.nav-open .nav-toggle span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }
    
    .hero { min-height: 500px; padding: 100px 20px 60px; }
    .hero-title { font-size: 2rem; line-height: 1.3; }
    .hero-subtitle { font-size: 0.95rem; }
    .hero-buttons { flex-direction: column; width: 100%; max-width: 320px; margin: 0 auto; gap: 12px; }
    .hero-buttons .btn-primary, .hero-buttons .btn-outline { width: 100%; text-align: center; }
    
    .section { padding: 50px 4%; }
    .section-title { font-size: 1.6rem; margin-bottom: 2rem; }
    
    .kategori-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .kategori-card { padding: 20px 15px; }
    
    .produk-grid { grid-template-columns: 1fr; gap: 20px; }
    
    .pengumuman-card { padding: 20px 15px; }
    .pengumuman-card > div { flex-direction: column; align-items: flex-start; gap: 8px; }
    
    .struktur-card { width: 100% !important; max-width: 320px; }
    
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .maps-container { height: 280px !important; }
}

@media (max-width: 480px) {
    .nav-brand span { font-size: 0.85rem; max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .hero-title { font-size: 1.65rem; }
    .kategori-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .kategori-card h3 { font-size: 0.95rem; }
    
    .filter-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
    .filter-btn { padding: 8px 16px; font-size: 0.85rem; }
    
    .wa-float { bottom: 20px; right: 20px; width: 52px; height: 52px; font-size: 26px; }
}
