/* =============================================================
   SHARED COMPONENTS — Navbar & Footer
   =============================================================
   File ini digunakan oleh SEMUA modul untuk navbar dan footer
   yang konsisten. Class menggunakan prefix "site-" agar tidak
   konflik dengan CSS modul yang sudah ada.
   ============================================================= */

/* ─────────────────────────────────────────────
   GOOGLE FONTS IMPORT (fallback jika modul belum load)
   ───────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ─────────────────────────────────────────────
   SHARED VARIABLES
   ───────────────────────────────────────────── */
:root {
    --site-nav-height: 64px;
    --site-nav-bg: rgba(10, 14, 26, 0.85);
    --site-nav-border: rgba(255, 255, 255, 0.08);
    --site-nav-text: #e2e8f0;
    --site-nav-text-hover: #0ea5e9;
    --site-nav-accent: #0ea5e9;
    --site-footer-bg: rgba(10, 14, 26, 0.9);
    --site-footer-border: rgba(255, 255, 255, 0.06);
    --site-footer-text: #94a3b8;
    --site-font: 'Inter', 'Outfit', system-ui, sans-serif;
    --site-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* =============================================================
       OVERRIDE VARIABLE MODUL EXISTING KE TEMA STANDAR UAS
       ============================================================= */
    /* DES Modul */
    --bg-base: #0f172a;
    --accent-primary: #06b6d4;
    --accent-secondary: #8b5cf6;
    --accent-success: #10b981;
    --accent-danger: #ef4444;

    /* AES Modul */
    --bg-primary: #0f172a;
    --bg-secondary: #0a0e1a;
    --bg-glass: rgba(15, 23, 42, 0.6);
    --border-primary: rgba(14, 165, 233, 0.2);
    --border-hover: rgba(14, 165, 233, 0.4);
    --text-accent: #06b6d4;
    --accent-warning: #fbbf24;
    --gradient-primary: linear-gradient(135deg, #0ea5e9 0%, #8b5cf6 100%);

    /* S-AES Modul */
    --bg-app: #0f172a;
    --primary: #8b5cf6;
    --primary-hover: #0ea5e9;
    --secondary: #0ea5e9;
    --secondary-hover: #06b6d4;
    --text-primary: #a5b4fc;

    /* S-DES Modul */
    --bg-dark: #0f172a;
    --primary-hover: #0ea5e9;
    --accent: #06b6d4;
}

/* ─────────────────────────────────────────────
   NAVBAR
   ───────────────────────────────────────────── */
.site-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    height: var(--site-nav-height);
    background: var(--site-nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--site-nav-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    font-family: var(--site-font);
    transition: background var(--site-transition),
                box-shadow var(--site-transition);
}

.site-navbar.scrolled {
    background: rgba(10, 14, 26, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Logo Section */
.site-navbar__logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--site-nav-text);
    transition: color var(--site-transition);
}

.site-navbar__logo:hover {
    color: var(--site-nav-accent);
}

.site-navbar__logo-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.site-navbar__logo-text {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.site-navbar__logo-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 0.3rem;
}

.site-navbar__logo-module {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--site-nav-accent);
    opacity: 0.9;
}

/* Navigation Links */
.site-navbar__nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-navbar__link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--site-nav-text);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--site-font);
    background: transparent;
    border: 1px solid transparent;
    transition: all var(--site-transition);
    cursor: pointer;
}

.site-navbar__link:hover {
    color: var(--site-nav-accent);
    background: rgba(14, 165, 233, 0.08);
    border-color: rgba(14, 165, 233, 0.15);
}

.site-navbar__link--active {
    color: var(--site-nav-accent);
    background: rgba(14, 165, 233, 0.1);
    border-color: rgba(14, 165, 233, 0.2);
}

.site-navbar__link-icon {
    font-size: 1rem;
    line-height: 1;
}

/* Body padding agar konten tidak ketutup navbar */
body.has-site-navbar {
    padding-top: var(--site-nav-height) !important;
}

/* ─────────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────────── */
.site-footer {
    width: 100%;
    background: var(--site-footer-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--site-footer-border);
    padding: 1.5rem 2rem;
    text-align: center;
    font-family: var(--site-font);
    margin-top: 3rem;
}

.site-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.site-footer__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--site-nav-text);
}

.site-footer__brand-icon {
    font-size: 1.1rem;
}

.site-footer__text {
    font-size: 0.8rem;
    color: var(--site-footer-text);
    line-height: 1.5;
}

.site-footer__text a {
    color: var(--site-nav-accent);
    text-decoration: none;
    transition: opacity var(--site-transition);
}

.site-footer__text a:hover {
    opacity: 0.8;
}

.site-footer__divider {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.3), transparent);
    margin: 0.25rem 0;
}

/* ─────────────────────────────────────────────
   RESPONSIVE & COMMON STYLING OVERRIDES
   ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .site-navbar {
        padding: 0 1rem;
    }

    .site-navbar__logo-text {
        font-size: 0.85rem;
    }

    .site-navbar__logo-divider,
    .site-navbar__logo-module {
        display: none;
    }

    .site-navbar__link {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    .site-footer {
        padding: 1.25rem 1rem;
    }
}

@media (max-width: 480px) {
    :root {
        --site-nav-height: 56px;
    }

    .site-navbar__logo-icon {
        font-size: 1.25rem;
    }

    .site-navbar__logo-text {
        font-size: 0.8rem;
    }
}

/* ─────────────────────────────────────────────
   ACCESSIBILITY CONTRAST & TYPOGRAPHY HARMONIZATION
   ───────────────────────────────────────────── */
.control-hint, 
.helper-text, 
.input-helper, 
.form-label__hint, 
.subtitle,
.panel-description,
.header-subtitle {
    color: #94a3b8 !important; /* Tingkatkan rasio kontras teks deskripsi/muted */
}

/* Scrollbar Customization untuk Tampilan Premium */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #0f172a;
}
::-webkit-scrollbar-thumb {
    background: rgba(14, 165, 233, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(14, 165, 233, 0.5);
}

/* Input Focus States global untuk modul */
input[type="text"]:focus, 
input[type="password"]:focus, 
select:focus {
    outline: none !important;
    border-color: #0ea5e9 !important;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25) !important;
    transition: all 0.2s ease-in-out !important;
}

/* Animasi Error shake */
.error-shake {
    animation: siteErrorShake 0.4s ease-in-out;
}

@keyframes siteErrorShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* Smooth Accordion opening transition */
.accordion-content {
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease !important;
}

