/* ==========================================================================
   WEBSITE KELAS 10 PPLG 2 - GLOBAL STYLESHEET
   SMKN 1 Talaga | Dual Theme System (Dark/Light)
   ========================================================================== */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* --------------------------------------------------------------------------
   1. COLOR TOKENS & CSS VARIABLES
   -------------------------------------------------------------------------- */
:root {
    --primary-blue: #2563eb;
    --primary-blue-hover: #1d4ed8;
    --primary-purple: #7c3aed;
    --accent-glow: rgba(59, 130, 246, 0.35);

    /* Light Theme Palette */
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;

    --nav-bg: rgba(255, 255, 255, 0.88);
    --hero-overlay: linear-gradient(180deg, rgba(15, 23, 42, 0.75) 0%, rgba(15, 23, 42, 0.95) 100%);
    --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
    --card-shadow-hover: 0 12px 30px -5px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    /* Dark Theme Palette */
    --bg-main: #090d16;
    --bg-surface: #0f172a;
    --bg-card: #141e33;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #1e293b;
    --border-hover: #334155;

    --nav-bg: rgba(9, 13, 22, 0.88);
    --hero-overlay: linear-gradient(180deg, rgba(9, 13, 22, 0.75) 0%, rgba(9, 13, 22, 0.98) 100%);
    --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
    --card-shadow-hover: 0 18px 40px -5px rgba(0, 0, 0, 0.65);
}

/* --------------------------------------------------------------------------
   2. GLOBAL RESET & BASE STYLES
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input {
    font-family: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

.hidden {
    display: none !important;
}

/* --------------------------------------------------------------------------
   3. KEYFRAME ANIMATIONS & INTERACTIVE STATES
   -------------------------------------------------------------------------- */
@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* Page Transition States */
.page-enter {
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.page-exit {
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}

.animate-slide-up {
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-up-delay {
    opacity: 0;
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

.animate-fade-in {
    opacity: 0;
    animation: fadeIn 0.7s ease forwards 0.2s;
}

/* Interactive States: Button Scale & Ripple */
.btn:active, .btn-portal:active, .theme-toggle-btn:active, .nav-item:active {
    transform: scale(0.95) !important;
    transition: transform 0.1s ease !important;
}

/* Ripple Effect Styles */
.ripple-btn {
    position: relative;
    overflow: hidden;
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: rippleAnim 0.6s linear;
    pointer-events: none;
}

@keyframes rippleAnim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}


/* --------------------------------------------------------------------------
   4. HEADER & NAVBAR SECTION
   -------------------------------------------------------------------------- */
.navbar-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
    overflow: hidden;
}

.brand-logo {
    height: 38px;
    width: auto;
    border-radius: 6px;
    flex-shrink: 0;
    object-fit: contain;
}

.brand-text {
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Poppins', sans-serif;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    list-style: none;
}

.nav-item {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    position: relative;
    padding: 0.35rem 0;
    transition: color 0.2s ease;
}

.nav-item:hover, .nav-item.active {
    color: var(--primary-blue);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-blue);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--primary-blue);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.theme-toggle-btn:hover {
    transform: scale(1.05);
    border-color: var(--primary-blue);
}

.btn-portal {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-blue);
    color: #ffffff !important;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    white-space: nowrap;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-portal:hover {
    background: var(--primary-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 32px;
    height: 24px;
    padding: 0;
    z-index: 1001;
    flex-shrink: 0;
    background: transparent;
    border: none;
}

.hamburger-bar {
    width: 100%;
    height: 2.5px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
   5. FOOTER SECTION
   -------------------------------------------------------------------------- */
.main-footer {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    background: var(--bg-surface);
    padding: 3rem 1.5rem;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.footer-title {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 700;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-nav {
    display: flex;
    gap: 1.75rem;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--primary-blue);
}

/* --------------------------------------------------------------------------
   6. RESPONSIVE MEDIA QUERIES
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .navbar {
        padding: 0.9rem 1.25rem;
    }
    .nav-links {
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-surface);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
        gap: 1.25rem;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    }

    .nav-links.show {
        display: flex;
        animation: slideUpFade 0.3s ease forwards;
    }

    .nav-item {
        font-size: 0.95rem;
        width: 100%;
        padding: 0.5rem 0;
    }

    .nav-item.active::after {
        display: none;
    }

    .nav-controls .btn-portal {
        display: none;
    }

    .footer-container {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .brand-text {
        max-width: 170px;
        font-size: 0.95rem;
    }
    .main-footer {
        padding: 2rem 1.25rem;
    }
}
