/* =========================================================================
   PREMIUM STYLESHEET: WEB CALEG
   ========================================================================= */

/* 1. Global & Typography */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'Outfit', sans-serif;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* 2. Custom Navbar (Glassmorphism) */
.custom-navbar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
    padding: 15px 0;
}

.custom-navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 10px 0;
}

/* Teks link default (atas) */
.custom-navbar .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    position: relative;
}

/* Saat di-scroll, teks navbar & nama caleg menjadi gelap */
.custom-navbar.scrolled .nav-link,
.custom-navbar.scrolled .navbar-brand span,
.custom-navbar.scrolled .navbar-brand i {
    color: var(--text-color) !important;
}

/* Tombol hamburger icon saat di-scroll */
.custom-navbar.scrolled .navbar-toggler i {
    color: var(--text-color) !important;
}

.custom-navbar.scrolled .btn-light {
    background: var(--primary-color);
    color: white !important;
    border: none;
}

.custom-navbar .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #fff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.custom-navbar .nav-link:hover::after {
    width: 100%;
}

/* 3. Hero Section */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 160px 0 100px;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 10%, transparent 40%);
    animation: rotateBg 30s linear infinite;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

@keyframes rotateBg {
    100% { transform: rotate(360deg); }
}

/* 4. Cards & Glassmorphism */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.glass-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 45px rgba(0,0,0,0.1);
}

/* 5. Buttons */
.btn-primary-custom {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(var(--primary-color-rgb), 0.3);
}

.btn-primary-custom:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(var(--secondary-color-rgb), 0.4);
}

.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* 6. Admin Sidebar & Layout */
.admin-sidebar {
    background: var(--primary-color);
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    color: white;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    border-radius: 10px;
    margin: 5px 15px;
    padding: 12px 20px;
    transition: all 0.3s ease;
}

.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active {
    background: rgba(255,255,255,0.15);
    color: white;
    transform: translateX(5px);
}

.admin-content {
    background-color: #f4f7f6;
    min-height: 100vh;
}

.stat-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    overflow: hidden;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

/* 7. Section Padding */
.section-padding {
    padding: 100px 0;
}

/* 8. Text Utilities */
.text-primary-custom {
    color: var(--primary-color) !important;
}

/* Gradient Text */
.text-gradient {
    background: -webkit-linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Sidebar Collapse Transition */
.admin-sidebar {
    transition: width 0.3s ease;
    overflow-x: hidden;
    position: sticky;
    top: 0;
    height: 100vh;
}
.admin-sidebar.collapsed {
    width: 80px !important;
}
.admin-sidebar.collapsed .sidebar-text,
.admin-sidebar.collapsed .badge {
    display: none !important;
}
.admin-sidebar.collapsed .nav-item small {
    display: none !important;
}
.admin-sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 12px 0;
}
.admin-sidebar.collapsed .nav-link i {
    margin-right: 0 !important;
    font-size: 1.25rem !important;
}
.admin-sidebar.collapsed hr {
    margin: 10px;
}
.admin-sidebar.collapsed .text-center h5 {
    display: none;
}
.admin-sidebar.collapsed .text-center i.bi-shield-check {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 10px;
}
.admin-sidebar.collapsed .btn-outline-light {
    padding: 10px 0;
}
.admin-sidebar.collapsed .btn-outline-light span {
    display: none;
}
.admin-sidebar.collapsed .btn-outline-light i {
    margin: 0 !important;
}