/* ============================================
   Portal Karang Taruna Melong - Design System
   Theme: Professional NGO Navy Blue
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- CSS Variables --- */
:root {
    --primary: #0B3D91;
    --primary-light: #1A56B8;
    --primary-dark: #072A66;
    --primary-50: #E8EEF8;
    --primary-100: #C5D4ED;
    --secondary: #11B827;
    --tertiary: #F0F4FB;
    --bg-white: #FFFFFF;
    --bg-light: #F5F7FA;
    --bg-dark: #0A1628;
    --text-dark: #1A1A2E;
    --text-body: #4A4A6A;
    --text-muted: #8892A5;
    --text-white: #FFFFFF;
    --border: #E2E8F0;
    --border-light: #F1F5F9;
    --accent-gold: #F5A623;
    --accent-red: #E53935;
    --success: #22C55E;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.2s ease;
    --container: 1280px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-body);
    background: var(--bg-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-light); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 {
    color: var(--text-dark);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
p { margin-bottom: 1rem; }

/* --- Container --- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }

/* --- Navbar --- */
.navbar {
    background: var(--primary-dark);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-white);
    font-weight: 700;
    font-size: 1.15rem;
}
.navbar-brand img { height: 42px; width: 42px; object-fit: contain; }
.navbar-brand span { letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: 0; }
.nav-links a {
    color: rgba(255,255,255,0.8);
    padding: 0 1.1rem;
    height: 70px;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active {
    color: var(--text-white);
    background: rgba(255,255,255,0.08);
}
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1.1rem;
    right: 1.1rem;
    height: 3px;
    background: var(--accent-gold);
    border-radius: 3px 3px 0 0;
}
.btn-nav-login {
    background: var(--text-white) !important;
    color: var(--primary-dark) !important;
    padding: 0.5rem 1.5rem !important;
    height: auto !important;
    border-radius: var(--radius) !important;
    font-weight: 600 !important;
    margin-left: 0.5rem;
}
.btn-nav-login:hover {
    background: var(--primary-50) !important;
    transform: translateY(-1px);
}

/* Mobile menu */
.nav-toggle { display: none; background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; padding: 0.5rem; }

/* --- Hero Section --- */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    color: var(--text-white);
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    border-radius: 50%;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
    border-radius: 50%;
}
.hero .container { position: relative; z-index: 1; text-align: center; max-width: 800px; }
.hero h1 { font-size: 2.75rem; font-weight: 800; margin-bottom: 1.25rem; letter-spacing: -0.03em; line-height: 1.15; }
.hero p { font-size: 1.1rem; opacity: 0.85; margin-bottom: 2rem; line-height: 1.7; max-width: 600px; margin-left: auto; margin-right: auto; }

/* --- Stats Bar --- */
.stats-bar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: -1px;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    text-align: center;
}
.stat-item h3 { font-size: 2.25rem; font-weight: 800; color: var(--primary); margin-bottom: 0.25rem; }
.stat-item p { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; margin: 0; }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.75rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    text-align: center;
    justify-content: center;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-light); color: white; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--bg-white); color: var(--primary); border-color: var(--primary); }
.btn-secondary:hover { background: var(--primary-50); color: var(--primary); }
.btn-outline { background: transparent; color: white; border-color: rgba(255,255,255,0.4); }
.btn-outline:hover { background: rgba(255,255,255,0.1); color: white; border-color: white; }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.8rem; }
.btn-lg { padding: 0.9rem 2.25rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* --- Cards --- */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-light);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card-img { width: 100%; height: 200px; object-fit: cover; }
.card-body { padding: 1.5rem; }
.card-body h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.card-body p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; }
.card-meta { display: flex; align-items: center; gap: 1rem; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.card-meta i { color: var(--primary); }

/* --- Section --- */
.section { padding: 4rem 0; }
.section-alt { background: var(--bg-white); }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { margin-bottom: 0.75rem; }
.section-header p { color: var(--text-muted); max-width: 600px; margin: 0 auto; }
.section-header .line {
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
    margin: 1rem auto 0;
}

/* --- Grid Layouts --- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-primary { background: var(--primary-50); color: var(--primary); }
.badge-success { background: #DCFCE7; color: #16A34A; }
.badge-warning { background: #FEF3C7; color: #D97706; }
.badge-danger { background: #FEE2E2; color: #DC2626; }
.badge-info { background: #DBEAFE; color: #2563EB; }
.badge-secondary { background: #F1F5F9; color: #64748B; }

/* --- Forms --- */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-weight: 600; font-size: 0.875rem; color: var(--text-dark); margin-bottom: 0.5rem; }
.form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--bg-white);
    color: var(--text-dark);
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control { cursor: pointer; }

/* --- Tables --- */
.table-responsive { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.85rem 1rem; text-align: left; font-size: 0.9rem; }
th { background: var(--tertiary); font-weight: 600; color: var(--text-dark); border-bottom: 2px solid var(--border); }
td { border-bottom: 1px solid var(--border-light); }
tr:hover td { background: var(--tertiary); }

/* --- Alerts / Flash --- */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideDown 0.3s ease;
}
.alert-success { background: #DCFCE7; color: #166534; border-left: 4px solid var(--success); }
.alert-danger { background: #FEE2E2; color: #991B1B; border-left: 4px solid var(--danger); }
.alert-warning { background: #FEF3C7; color: #92400E; border-left: 4px solid var(--warning); }
.alert-info { background: #DBEAFE; color: #1E40AF; border-left: 4px solid var(--info); }

/* --- Footer --- */
.footer {
    background: var(--bg-dark);
    color: rgba(255,255,255,0.7);
    padding: 3rem 0 0;
    margin-top: 4rem;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 2rem; }
.footer h4 { color: var(--text-white); margin-bottom: 1rem; font-size: 1rem; }
.footer p, .footer a { font-size: 0.875rem; color: rgba(255,255,255,0.6); }
.footer a:hover { color: var(--text-white); }
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 1.25rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}
.footer-social { display: flex; gap: 1rem; }
.footer-social a { font-size: 1.1rem; }

/* --- Pagination --- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-top: 2rem; }
.pagination a, .pagination span {
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border);
    color: var(--text-body);
    transition: var(--transition);
}
.pagination a:hover { background: var(--primary-50); color: var(--primary); border-color: var(--primary); }
.pagination .active { background: var(--primary); color: white; border-color: var(--primary); }

/* --- Animations --- */
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.5s ease; }
.fade-in-up { animation: fadeInUp 0.5s ease; }

/* --- Utility --- */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }
.text-white { color: var(--text-white); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* --- Empty State --- */
.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-state i { font-size: 3rem; color: var(--text-muted); margin-bottom: 1rem; }
.empty-state h3 { color: var(--text-muted); font-weight: 600; }
.empty-state p { color: var(--text-muted); font-size: 0.9rem; }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    html { font-size: 15px; }
    .nav-links { display: none; position: absolute; top: 70px; left: 0; right: 0; background: var(--primary-dark); flex-direction: column; padding: 1rem 0; box-shadow: var(--shadow-lg); }
    .nav-links.active { display: flex; }
    .nav-links a { height: auto; padding: 0.85rem 1.5rem; }
    .nav-links a.active::after { display: none; }
    .nav-toggle { display: block; }
    .hero { padding: 3rem 0; }
    .hero h1 { font-size: 1.8rem; }
    .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
    .stat-item h3 { font-size: 1.5rem; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .section { padding: 2.5rem 0; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 0.75rem; text-align: center; }
}
@media (max-width: 480px) {
    .hero h1 { font-size: 1.5rem; }
    .stats-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .container { padding: 0 1rem; }
}
