/* ============================================
   SMKN 2 RANGKASBITUNG - MODERN CSS
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f8fafd;
    color: #0f172a;
    scroll-behavior: smooth;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #60a5fa;
    --primary-glow: rgba(37, 99, 235, 0.2);
    --secondary: #f97316;
    --accent: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --dark: #0f172a;
    --dark-soft: #334155;
    --light: #f8fafc;
    --glass-bg: rgba(255, 255, 255, 0.92);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow-sm: 0 8px 20px rgba(0, 0, 0, 0.03), 0 2px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 20px 30px -12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 30px 50px -15px rgba(0, 0, 0, 0.12);
    --radius-card: 32px;
    --transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #eef2ff; border-radius: 10px; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }

/* ========== NAVBAR ========== */
.navbar {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 0.8rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.5rem 5%;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary), #1e40af);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.logo-text h1 {
    font-size: 1.3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1e3a8a, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0;
    line-height: 1.2;
}

.logo-text span {
    font-size: 0.7rem;
    color: #64748b;
}

/* Nav Links */
.nav-links {
    display: flex;
    gap: 1.8rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links > li {
    position: relative;
}

.nav-links > li > a {
    text-decoration: none;
    color: #1e293b;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.nav-links > li > a i {
    font-size: 1rem;
    color: var(--primary);
}

.dropdown-icon {
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.nav-links > li:hover .dropdown-icon {
    transform: rotate(180deg);
}

.nav-links > li > a:hover,
.nav-links > li > a.active {
    color: var(--primary);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 120%;
    left: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    list-style: none;
    padding: 0.8rem 0;
    border: 1px solid rgba(37, 99, 235, 0.1);
    z-index: 100;
}

.dropdown:hover .dropdown-menu,
.mega-dropdown:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.7rem 1.5rem;
    color: #334155;
    text-decoration: none;
    transition: 0.2s;
    font-size: 0.85rem;
}

.dropdown-menu a i {
    width: 20px;
    color: var(--primary);
}

.dropdown-menu a:hover {
    background: #f0f9ff;
    color: var(--primary);
    padding-left: 1.8rem;
}

/* Mega Menu */
.mega-menu {
    position: absolute;
    top: 120%;
    left: -100px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    width: 680px;
    padding: 1.5rem;
    border: 1px solid rgba(37, 99, 235, 0.1);
    z-index: 100;
}

.mega-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.mega-col h4 {
    font-size: 0.9rem;
    color: #1e293b;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.mega-col a {
    display: block;
    padding: 0.5rem 0;
    color: #475569;
    text-decoration: none;
    font-size: 0.85rem;
    transition: 0.2s;
}

.mega-col a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

/* Highlight Link */
.highlight-link a {
    background: linear-gradient(135deg, var(--secondary), #ea580c);
    padding: 0.5rem 1.2rem !important;
    border-radius: 40px;
    color: white !important;
    gap: 8px;
}

.highlight-link a i {
    color: white !important;
}

.badge-new {
    background: #ff4d4d;
    color: white;
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    border-radius: 30px;
    font-weight: 700;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-container {
    width: 90%;
    max-width: 600px;
    position: relative;
}

.search-container input {
    width: 100%;
    padding: 1.2rem 1.5rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 60px;
    background: white;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.search-container button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    border: none;
    color: white;
    padding: 0.7rem 1.2rem;
    border-radius: 40px;
    cursor: pointer;
}

.close-search {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Admin Button */
.admin-btn {
    background: linear-gradient(135deg, var(--primary), #1e40af);
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    transition: var(--transition);
}

.admin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--primary-glow);
}

.search-toggle {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: #1e293b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: 0.2s;
}

.search-toggle:hover {
    background: #f1f5f9;
    color: var(--primary);
}

/* ========== HERO SLIDER ========== */
.hero-slider {
    position: relative;
    width: 100%;
    height: 85vh;
    min-height: 600px;
    overflow: hidden;
    margin-top: 70px;
}

.slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 30%;
    opacity: 0;
    transition: opacity 1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.slide.active {
    opacity: 1;
}

.slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3));
}

.slide-content {
    position: relative;
    z-index: 3;
    max-width: 860px;
    padding: 2rem;
}

.slide-content h1 {
    font-size: 3.8rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff, #e0e7ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.slide-content p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
}

.btn-slide {
    display: inline-block;
    margin-top: 1.8rem;
    padding: 0.8rem 2rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    border-radius: 60px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.btn-slide:hover {
    background: white;
    color: var(--primary);
    transform: scale(1.02);
}

.slider-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 14px;
    z-index: 3;
}

.slider-dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    cursor: pointer;
    transition: 0.2s;
}

.slider-dot.active {
    width: 28px;
    background: white;
}

.slider-prev,
.slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 60px;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    transition: 0.2s;
    z-index: 3;
}

.slider-prev:hover,
.slider-next:hover {
    background: var(--primary);
}

.slider-prev {
    left: 20px;
}

.slider-next {
    right: 20px;
}

/* Hero Default */
.hero-default {
    background: linear-gradient(135deg, #1e3a8a, var(--primary));
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-top: 70px;
}

.hero-default-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* ========== CONTAINER ========== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 5%;
}

/* ========== PENGUMUMAN MODERN ========== */
.pengumuman-modern {
    background: rgba(255, 251, 235, 0.9);
    backdrop-filter: blur(4px);
    border-radius: 32px;
    padding: 1.2rem 1.8rem;
    margin: -30px auto 3rem;
    border: 1px solid #ffedd5;
    box-shadow: var(--shadow-sm);
    transition: 0.2s;
}

.pengumuman-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.pengumuman-header i {
    font-size: 1.6rem;
    color: var(--secondary);
}

.pengumuman-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.pengumuman-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.05);
    padding-bottom: 8px;
}

/* ========== SECTION TITLE ========== */
.section-title {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(125deg, #0f172a, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-align: center;
    margin-bottom: 3rem;
}

/* ========== BERITA GRID ========== */
.berita-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.card {
    background: white;
    border-radius: 36px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.card-img {
    height: 220px;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s;
}

.card:hover .card-img {
    transform: scale(1.02);
}

.card-content {
    padding: 1.8rem;
}

.card-date {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.6rem;
}

.card-title a {
    font-size: 1.35rem;
    font-weight: 700;
    text-decoration: none;
    color: #0f172a;
    line-height: 1.3;
    transition: 0.2s;
}

.card-title a:hover {
    color: var(--primary);
}

.card-excerpt {
    color: #4a5568;
    margin: 1rem 0;
    line-height: 1.5;
}

.btn-read {
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}

.btn-read:hover {
    gap: 10px;
}

/* ========== STATISTIK MODERN ========== */
.stats-modern {
    background: linear-gradient(115deg, #0f172a 0%, #1e293b 100%);
    border-radius: 48px;
    padding: 3rem 2rem;
    margin: 3rem 0;
    color: white;
}

.stats-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
    text-align: center;
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat-label {
    margin-top: 0.5rem;
    color: #94a3b8;
    font-weight: 500;
}

/* ========== PRESTASI GRID ========== */
.prestasi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.8rem;
    margin-top: 2rem;
}

.prestasi-card {
    background: white;
    border-radius: 28px;
    padding: 1.5rem;
    text-align: center;
    transition: 0.2s;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f1f5f9;
}

.prestasi-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.prestasi-icon {
    font-size: 2.8rem;
    color: var(--secondary);
}

.prestasi-card h4 {
    font-size: 1.2rem;
    margin: 1rem 0 0.4rem;
}

.badge-tahun {
    background: #eef2ff;
    padding: 0.2rem 1rem;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    display: inline-block;
    margin-top: 0.8rem;
}

/* ========== FOOTER ========== */
footer {
    background: #0b1120;
    border-radius: 40px 40px 0 0;
    margin-top: 5rem;
    padding: 3rem 5% 1.5rem;
    color: #94a3b8;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    max-width: 1280px;
    margin: 0 auto;
}

.footer-col h3,
.footer-col h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-col p {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: 0.3s;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid #1e2a44;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1100px) {
    .nav-links {
        gap: 1rem;
    }
    .mega-menu {
        width: 580px;
        left: -150px;
    }
}

@media (max-width: 900px) {
    .nav-links {
        display: none;
    }
    /* Tambahkan hamburger menu untuk mobile jika diperlukan */
}

@media (max-width: 768px) {
    .hero-slider {
        height: 65vh;
        margin-top: 70px;
    }
    .slide-content h1 {
        font-size: 2rem;
    }
    .slide-content p {
        font-size: 1rem;
    }
    .section-title {
        font-size: 1.8rem;
    }
    .stats-grid {
        flex-direction: column;
        gap: 1.5rem;
    }
    .stat-number {
        font-size: 2rem;
    }
    .slider-prev,
    .slider-next {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    .mega-menu {
        display: none;
    }
}