:root {
    /* Synchronized with logosmkbaru.png */
    --primary: #2b509e;
    --primary-dark: #1e3a7a;
    --secondary: #4fb1e9;
    --accent: #ffcc00;
    --highlight: #d9232a;
    --primary-glow: rgba(43, 80, 158, 0.25);
    
    /* Premium Fonts */
    --font-body: 'Plus Jakarta Sans', 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    
    /* Neutral Palette */
    --bg-body: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.75);
    --bg-surface: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-on-primary: #ffffff;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(43, 80, 158, 0.08);
    
    /* Layout */
    --nav-height: 80px;
    --border-radius: 24px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 25px -3px rgba(43, 80, 158, 0.08), 0 4px 6px -2px rgba(43, 80, 158, 0.03);
    --shadow-lg: 0 25px 50px -12px rgba(43, 80, 158, 0.12), 0 8px 20px -6px rgba(43, 80, 158, 0.05);
    
    /* Background Mesh */
    --bg-mesh: radial-gradient(at 0% 0%, rgba(43, 80, 158, 0.05) 0, transparent 50%), 
               radial-gradient(at 100% 0%, rgba(79, 177, 233, 0.06) 0, transparent 50%),
               radial-gradient(at 100% 100%, rgba(255, 204, 0, 0.03) 0, transparent 50%),
               radial-gradient(at 0% 100%, rgba(43, 80, 158, 0.04) 0, transparent 50%);
}

[data-theme="dark"] {
    --bg-body: #020617;
    --bg-card: rgba(15, 23, 42, 0.75);
    --bg-surface: #0b0f19;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(15, 23, 42, 0.65);
    --glass-border: rgba(255, 255, 255, 0.06);
    --bg-mesh: radial-gradient(at 0% 0%, rgba(43, 80, 158, 0.15) 0, transparent 60%), 
               radial-gradient(at 100% 0%, rgba(79, 177, 233, 0.12) 0, transparent 60%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-body);
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: var(--bg-body);
    background-image: var(--bg-mesh);
    background-attachment: fixed;
    color: var(--text-main);
    overflow-x: hidden;
    width: 100%;
    line-height: 1.6;
    transition: background 0.5s cubic-bezier(0.4, 0, 0.2, 1), color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Typography Refinement */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.reveal { 
    opacity: 0; 
    transform: translateY(24px); 
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1); 
}
.reveal.active { 
    opacity: 1; 
    transform: translateY(0); 
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.03);
}

/* Header Redesign */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    z-index: 1000;
    transition: all 0.3s ease;
}

header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-md);
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo img { height: 40px; width: auto; }

/* Desktop Nav */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.desktop-nav a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    transition: 0.3s;
    position: relative;
    padding: 8px 0;
}

.desktop-nav a:hover {
    color: var(--primary);
}

.desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: 0.3s;
}

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


@media (max-width: 1024px) {
    .desktop-nav { display: none; }
}

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

.mobile-toggle span {
    width: 28px;
    height: 3px;
    background: var(--text-main);
    border-radius: 3px;
    transition: 0.3s;
}

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

/* Modern Offcanvas Menu (Salas-inspired) */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100vh;
    background: var(--bg-surface);
    z-index: 5000;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    transform: translateX(105%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 4999;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-header-modern {
    background: var(--primary);
    padding: 24px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.mobile-menu-header-modern .logo {
    color: white;
}

.mobile-menu-header-modern .logo img {
    height: 35px;
}

.close-menu-modern {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
}

.close-menu-modern:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-menu-footer-modern {
    padding: 20px;
    background: var(--bg-body);
    border-bottom: 1px solid var(--glass-border);
}

.user-info-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.user-avatar-small {
    width: 36px;
    height: 36px;
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.9rem;
    line-height: 1.2;
}

.user-status {
    font-size: 11px;
    color: var(--text-muted);
}

.footer-btns-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.btn-footer-primary,
.btn-footer-danger,
.btn-footer-primary-full {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.75rem;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-footer-primary {
    background: var(--primary);
    color: white;
}

.btn-footer-primary-full {
    background: var(--primary);
    color: white;
    width: 100%;
}

.btn-footer-danger {
    background: rgba(217, 35, 42, 0.1);
    color: var(--highlight);
}

.btn-footer-danger:hover {
    background: var(--highlight);
    color: white;
}

.mobile-menu-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--bg-surface);
}

.menu-section-label {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    margin: 15px 0 10px;
    text-transform: uppercase;
}

.mobile-nav-list-modern {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 10px;
    transition: all 0.3s;
}

.menu-item-link i {
    font-size: 16px;
    width: 18px;
    text-align: center;
    color: var(--primary);
}

.menu-item-link:hover,
.menu-item-link.active {
    background: var(--primary);
    color: white;
}

.menu-item-link:hover i,
.menu-item-link.active i {
    color: var(--accent);
}

.menu-item-link-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.toggle-sub-modern {
    padding: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s;
}

.mobile-sub-menu-modern {
    list-style: none;
    padding: 4px 0 8px 36px;
    margin: 0;
    display: none;
}

.mobile-sub-menu-modern a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.mobile-sub-menu-modern a:hover {
    color: var(--primary);
}


.dropdown { position: relative; }
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-body);
    min-width: 240px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 8px;
    z-index: 3000;
    opacity: 0;
    transform: translateY(10px);
    transition: 0.3s ease;
}

/* Invisible bridge to keep dropdown open */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

.dropdown:hover .dropdown-content,
.dropdown-content:hover {
    display: block;
    opacity: 1;
    transform: translateY(0);
}
.footer-info a:hover {
    transform: translateY(-5px);
    background: var(--primary) !important;
}
.footer-info a:hover img {
    filter: brightness(0) invert(1);
}

.dropdown-content a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.dropdown-content a:hover {
    background: rgba(0, 102, 255, 0.05);
}

/* Button Styling */
.btn-portal {
    background: var(--primary);
    color: var(--text-on-primary);
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 16px var(--primary-glow);
}

.btn-portal:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px var(--primary-glow);
    background: var(--primary-dark);
}

/* Hero Section Redesign */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 5% 60px;
    position: relative;
    overflow: hidden;
}

.hero-bg-vectors {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.vector-shape {
    position: absolute;
    color: var(--primary);
    opacity: 0.15;
    animation: rotate3D 15s infinite linear;
}

.shape-book {
    width: 280px;
    top: 5%;
    left: 2%;
    animation-duration: 20s;
    opacity: 0.2;
}

.shape-pencil {
    width: 180px;
    top: 15%;
    right: 5%;
    animation-duration: 25s;
    animation-direction: reverse;
    color: var(--secondary);
    opacity: 0.2;
}

.shape-pentagon {
    width: 240px;
    bottom: 10%;
    left: 15%;
    animation-duration: 30s;
    color: var(--accent);
    opacity: 0.15;
}



@keyframes rotate3D {
    0% { transform: perspective(1000px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1); }
    50% { transform: perspective(1000px) rotateX(180deg) rotateY(90deg) rotateZ(45deg) scale(1.1); }
    100% { transform: perspective(1000px) rotateX(360deg) rotateY(360deg) rotateZ(0deg) scale(1); }
}

.vector-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--glass-border) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at 50% 50%, black, transparent 80%);
    opacity: 0.5;
}



.hero-container {
    max-width: 1300px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 10;
    width: 100%;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 24px;
    color: var(--text-main);
}

.hero h1 span {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-flyer {
    position: relative;
    width: 100%;
    max-width: 480px;
    justify-self: center;
}

.flyer-img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--glass-border);
    transition: transform 0.5s ease;
}

.hero-flyer:hover .flyer-img {
    transform: scale(1.02) rotate(1deg);
}

/* Section Common Styling */
section {
    padding: 100px 5%;
}

.section-tag {
    color: var(--primary);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.8rem;
    margin-bottom: 16px;
    display: block;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 48px;
}

/* Principal Section Redesign */
.principal-section {
    background: var(--bg-surface);
}

.principal-container {
    display: flex;
    align-items: center;
    gap: 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.principal-img-wrapper {
    position: relative;
    flex-shrink: 0;
    width: 320px;
}

.principal-img {
    width: 100%;
    border-radius: var(--border-radius);
    position: relative;
    z-index: 2;
    box-shadow: var(--shadow-lg);
}

.principal-content p {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-muted);
}

/* Staff Slider Modernization */
.staff-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 36px 28px;
    text-align: center;
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    height: 100%;
    box-shadow: var(--shadow-sm);
}

.staff-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.staff-avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    margin: 0 auto 24px;
    object-fit: cover;
    border: 4px solid var(--bg-body);
    box-shadow: var(--shadow-sm);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.staff-card:hover .staff-avatar {
    transform: scale(1.05);
}

/* News Grid Modernization */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.news-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.news-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.news-card:hover .news-img {
    transform: scale(1.05);
}

.news-content {
    padding: 28px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(43, 80, 158, 0.08);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 800;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}

/* Footer Redesign */
footer {
    padding: 100px 5% 40px;
    background: var(--bg-surface);
    border-top: 1px solid var(--glass-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
}

@media (max-width: 1024px) {
    .hero-container { grid-template-columns: 1fr; text-align: center; }
    .hero p { margin-left: auto; margin-right: auto; }
    .principal-container { flex-direction: column; text-align: center; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Achievement Card Redesign (Portrait-Friendly) */
.prestasi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.prestasi-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 28px;
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.prestasi-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.prestasi-img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 24px;
    border: 1px solid var(--glass-border);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.prestasi-card:hover .prestasi-img {
    transform: scale(1.03);
}

.prestasi-content h4 {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.prestasi-winner {
    font-weight: 800;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 12px;
    color: var(--text-main);
}

.prestasi-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}


/* Theme Toggle Modern */
.theme-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid var(--glass-border);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

@media (max-width: 900px) {
    nav { display: none; }
    .mobile-toggle { display: flex; }
}
