/* DESAKU ONLINE - Frontend Styles */
:root {
    --primary: #1e3a5f;
    --primary-dark: #152a45;
    --primary-light: #e8f4fc;
    --secondary: #b8860b;
    --secondary-light: #fef7e0;
    --accent: #c9a227;
    --text-dark: #1a202c;
    --text-body: #4a5568;
    --text-muted: #718096;
    --bg-light: #f7fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #d97706;
    --gradient-gov: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 50%, #1e3a5f 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-body);
    line-height: 1.7;
    background: var(--white);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* Navigation */
.frontend-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0.875rem 0;
    animation: slideDown 0.5s ease-out;
    transition: all 0.3s;
}

.frontend-nav.scrolled {
    box-shadow: 0 4px 30px rgba(30,58,95,0.1);
    padding: 0.625rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-dark);
    transition: transform 0.3s;
}

.nav-brand:hover { transform: scale(1.02); }

.nav-logo {
    width: 46px; height: 46px;
    background: var(--gradient-gov);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(30,58,95,0.25);
    transition: transform 0.3s;
}

.nav-logo:hover { transform: rotate(5deg) scale(1.05); }

.nav-logo img { width: 100%; height: 100%; object-fit: cover; }
.nav-logo svg { width: 22px; height: 22px; color: white; }

.brand-name { font-size: 1rem; font-weight: 700; display: block; color: var(--primary); }
.brand-sub { font-size: 0.75rem; color: var(--text-muted); }

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--text-body);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s;
    position: relative;
}

.nav-menu a:hover, .nav-menu a.active {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: all 0.3s;
    transform: translateX(-50%);
}

.nav-menu a:hover::after { width: 50%; }

.has-dropdown { position: relative; }
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    min-width: 180px;
    padding: 0.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    list-style: none;
}

.has-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a { padding: 0.6rem 1rem; display: block; border-radius: 6px; }

.nav-actions { display: flex; gap: 0.75rem; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}
.btn:hover::before { left: 100%; }

.btn-primary { 
    background: var(--gradient-gov); 
    color: white;
    box-shadow: 0 4px 15px rgba(30,58,95,0.3);
}
.btn-primary:hover { 
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30,58,95,0.4);
}
.btn-outline { 
    background: transparent; 
    color: var(--primary); 
    border: 2px solid var(--primary);
}
.btn-outline:hover { 
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0; left: -280px;
    width: 280px;
    height: 100vh;
    background: var(--white);
    z-index: 2000;
    transition: left 0.3s;
    overflow-y: auto;
}

.mobile-menu.open { left: 0; }

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
}

.mobile-menu-header button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-menu ul { list-style: none; padding: 1rem; }
.mobile-menu li { margin-bottom: 0.25rem; }
.mobile-menu a {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-dark);
    border-radius: 8px;
    font-weight: 500;
}
.mobile-menu a:hover { background: var(--primary-light); color: var(--primary); }

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
}
.mobile-overlay.open { display: block; }

/* Page Header */
.page-header {
    background: var(--gradient-gov);
    color: white;
    padding: 8rem 0 3.5rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="white" opacity="0.05"/><circle cx="80" cy="80" r="3" fill="white" opacity="0.03"/></svg>');
    background-size: 60px;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary) 0%, var(--accent) 50%, var(--secondary) 100%);
}

.page-header .container {
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease-out;
}

.page-header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.breadcrumb {
    font-size: 0.9rem;
    opacity: 0.85;
}

.breadcrumb a { 
    color: var(--secondary-light); 
    text-decoration: none;
    transition: color 0.2s;
}
.breadcrumb a:hover { color: var(--secondary); }

/* Content */
.page-content { min-height: 60vh; }

.content-section {
    background: var(--white);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(30,58,95,0.06);
    border: 1px solid var(--border);
    animation: fadeInUp 0.5s ease-out;
    transition: all 0.3s;
}

.content-section:hover {
    box-shadow: 0 8px 30px rgba(30,58,95,0.1);
}

.content-section h2 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid transparent;
    background: linear-gradient(var(--white), var(--white)) padding-box,
                linear-gradient(90deg, var(--primary), var(--secondary)) border-box;
    border-image-slice: 1;
}

.prose { line-height: 1.8; }
.prose p { margin-bottom: 1rem; }

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.stat-card .icon {
    width: 50px; height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.stat-card .icon.success { background: #dcfce7; color: #16a34a; }
.stat-card .icon.danger { background: #fee2e2; color: #dc2626; }
.stat-card .icon.warning { background: #fef3c7; color: #d97706; }
.stat-card .icon.info { background: #dbeafe; color: #2563eb; }

.stat-card .value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.stat-card .label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Team/Structure Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.team-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--border);
}

.team-card .photo {
    width: 100px; height: 100px;
    border-radius: 50%;
    background: var(--bg-light);
    margin: 0 auto 1rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.team-card .photo svg { width: 40px; height: 40px; color: var(--text-muted); }

.team-card h4 { font-size: 1rem; color: var(--text-dark); margin-bottom: 0.25rem; }
.team-card p { font-size: 0.85rem; color: var(--text-muted); }

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.service-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(22,101,52,0.1);
}

.service-card h4 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.service-card .icon {
    width: 40px; height: 40px;
    background: var(--primary-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.service-card p { font-size: 0.9rem; color: var(--text-muted); }

/* Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, .data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-dark);
}

.data-table tr:hover { background: var(--bg-light); }

/* Map */
.map-container {
    border-radius: 12px;
    overflow: hidden;
    height: 400px;
    background: var(--bg-light);
}

.map-container iframe { width: 100%; height: 100%; border: none; }

/* Footer */
.frontend-footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 1.5rem;
}

.footer-brand h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.footer-brand p { font-size: 0.9rem; opacity: 0.7; margin-bottom: 0.5rem; }

.footer-links h4, .footer-contact h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.footer-links a:hover { color: white; }

.footer-contact p { font-size: 0.9rem; opacity: 0.7; margin-bottom: 0.5rem; }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    opacity: 0.6;
}

.footer-bottom a { color: var(--primary-light); text-decoration: none; }

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0; right: -100%;
    width: 85%; max-width: 320px;
    height: 100vh;
    background: white;
    z-index: 1001;
    padding: 1.5rem;
    transition: right 0.3s ease;
    box-shadow: -5px 0 30px rgba(0,0,0,0.15);
    overflow-y: auto;
}
.mobile-menu.open { right: 0; }

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}
.mobile-menu-header span { font-size: 1.1rem; font-weight: 700; color: var(--primary); }

.mobile-menu-close {
    background: var(--bg-light); border: none;
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
}

.mobile-nav { list-style: none; }
.mobile-nav li { margin-bottom: 0.25rem; }
.mobile-nav a {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.875rem 1rem;
    text-decoration: none;
    color: var(--text-body);
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.2s;
}
.mobile-nav a:hover, .mobile-nav a.active {
    background: var(--primary-light);
    color: var(--primary);
}
.mobile-nav a svg { width: 20px; height: 20px; }

.mobile-menu-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex; flex-direction: column; gap: 0.75rem;
}
.mobile-menu-footer .btn { width: 100%; justify-content: center; }

.mobile-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.mobile-overlay.open { opacity: 1; visibility: visible; }

/* Nav Toggle Button */
.nav-toggle {
    display: none;
    background: var(--bg-light);
    border: none;
    width: 44px; height: 44px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.nav-toggle svg { width: 24px; height: 24px; color: var(--primary); }

/* Responsive */
@media (max-width: 1024px) {
    .nav-menu { gap: 0.25rem; }
    .nav-menu a { padding: 0.5rem 0.75rem; font-size: 0.85rem; }
}

@media (max-width: 968px) {
    .nav-menu, .nav-actions { display: none; }
    .nav-toggle { display: flex; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .content-grid { grid-template-columns: 1fr; }
    .struktur-grid { grid-template-columns: repeat(2, 1fr); }
    .service-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .container { padding: 0 1rem; }
    
    .page-header { padding: 5rem 0 2rem; }
    .page-header h1 { font-size: 1.5rem; }
    .breadcrumb { font-size: 0.8rem; }
    
    .content-section { padding: 1.5rem; margin-bottom: 1.5rem; }
    .content-section h2 { font-size: 1.25rem; }
    
    .struktur-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .struktur-card { padding: 1rem; }
    .struktur-card img { width: 70px; height: 70px; }
    .struktur-card h4 { font-size: 0.9rem; }
    .struktur-card .jabatan { font-size: 0.75rem; }
    
    .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .stat-card { padding: 1rem; }
    .stat-card .number { font-size: 1.5rem; }
    
    .info-grid { grid-template-columns: 1fr; }
    
    .data-table { font-size: 0.85rem; }
    .data-table th, .data-table td { padding: 0.75rem 0.5rem; }
    
    .map-container { height: 300px; }
    
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
    
    .potensi-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .page-header h1 { font-size: 1.25rem; }
    
    .struktur-grid { gap: 0.75rem; }
    .struktur-card img { width: 60px; height: 60px; }
    
    .stat-grid { gap: 0.75rem; }
    .stat-card .number { font-size: 1.25rem; }
    .stat-card .label { font-size: 0.7rem; }
    
    .nav-brand-text .brand-name { font-size: 0.9rem; }
    .nav-brand-text .brand-sub { font-size: 0.65rem; }
    .nav-logo { width: 38px; height: 38px; }
    
    .btn { padding: 0.7rem 1.25rem; font-size: 0.85rem; }
}
