/* ==========================================================================
   PABU 2026 — Design System (main.css)
   "Trustworthy Warmth" — Clean, Hangat, Profesional, Cheerful
   ========================================================================== */

/* ---------- CSS Variables ---------- */
:root {
    /* Primary - Deep Blue */
    --color-primary: #000390;
    --color-primary-light: #1a1aab;
    --color-primary-dark: #000270;
    --color-primary-50: rgba(0, 3, 144, 0.05);
    --color-primary-100: rgba(0, 3, 144, 0.1);
    --color-primary-200: rgba(0, 3, 144, 0.2);

    /* Secondary - Warm Yellow */
    --color-secondary: #fec619;
    --color-secondary-light: #ffd54f;
    --color-secondary-dark: #f0b400;
    --color-secondary-50: rgba(254, 198, 25, 0.08);

    /* Neutral */
    --color-white: #ffffff;
    --color-gray-50: #f8f9fa;
    --color-gray-100: #f1f3f5;
    --color-gray-200: #e9ecef;
    --color-gray-300: #dee2e6;
    --color-gray-400: #ced4da;
    --color-gray-500: #868e96;
    --color-gray-600: #6c757d;
    --color-gray-700: #495057;
    --color-gray-800: #343a40;
    --color-gray-900: #212529;

    /* Semantic */
    --color-success: #2ecc71;
    --color-success-light: #d4efdf;
    --color-danger: #e74c3c;
    --color-danger-light: #fadbd8;
    --color-warning: #f39c12;
    --color-info: #3498db;

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #000390 0%, #1a1aab 50%, #2929c4 100%);
    --gradient-cta: linear-gradient(135deg, #fec619 0%, #ffd54f 100%);
    --gradient-overlay: linear-gradient(180deg, rgba(0,3,144,0.85) 0%, rgba(0,3,144,0.6) 100%);
    --gradient-card: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 100%);

    /* Typography */
    --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Borders & Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.12);
    --shadow-card: 0 2px 8px rgba(0, 3, 144, 0.06);
    --shadow-card-hover: 0 8px 32px rgba(0, 3, 144, 0.12);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease-out;

    /* Layout */
    --container-max: 1200px;
    --container-narrow: 960px;
    --container-wide: 1400px;
    --header-height: 80px;
    --topbar-height: 40px;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--color-gray-700);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-light);
}

ul, ol {
    list-style: none;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-gray-900);
    line-height: 1.3;
    margin-bottom: var(--space-4);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); font-weight: 600; }

p {
    margin-bottom: var(--space-4);
}

.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary-dark); }
.text-white { color: var(--color-white); }
.text-muted { color: var(--color-gray-500); }
.text-center { text-align: center; }
.text-sm { font-size: var(--text-sm); }
.text-lg { font-size: var(--text-lg); }

.font-heading { font-family: var(--font-heading); }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

/* ---------- Layout ---------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.container-narrow {
    max-width: var(--container-narrow);
}

.container-wide {
    max-width: var(--container-wide);
}

.section {
    padding: var(--space-20) 0;
}

.section-sm {
    padding: var(--space-12) 0;
}

.section-lg {
    padding: var(--space-24) 0;
}

/* Content area with sidebar */
.content-area {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-10);
}

.content-area.has-sidebar {
    grid-template-columns: 1fr 320px;
}

/* ---------- Grid System ---------- */
.grid {
    display: grid;
    gap: var(--space-8);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Flex Utilities ---------- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* ---------- Scroll Reveal Animation ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ---------- Background Colors ---------- */
.bg-primary { background-color: var(--color-primary); }
.bg-secondary { background-color: var(--color-secondary); }
.bg-white { background-color: var(--color-white); }
.bg-light { background-color: var(--color-gray-50); }
.bg-gradient-hero { background: var(--gradient-hero); }

/* ---------- Section Header ---------- */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-12);
}

.section-header .section-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-5);
    background: var(--color-primary-50);
    color: var(--color-primary);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    font-family: var(--font-heading);
    margin-bottom: var(--space-4);
    border: 1px solid var(--color-primary-100);
}

.section-header .section-badge .badge-dot {
    width: 6px;
    height: 6px;
    background: var(--color-secondary);
    border-radius: 50%;
}

.section-header h2 {
    font-size: var(--text-3xl);
    font-weight: 800;
    margin-bottom: var(--space-4);
}

.section-header p {
    color: var(--color-gray-600);
    font-size: var(--text-lg);
    margin-bottom: 0;
}

/* ---------- Screen Reader ---------- */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* ---------- Pagination ---------- */
.pagination {
    margin-top: var(--space-12);
    display: flex;
    justify-content: center;
}

.pagination .nav-links {
    display: flex;
    gap: var(--space-2);
}

.pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-gray-200);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-gray-700);
    transition: all var(--transition-fast);
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

/* ---------- No Results ---------- */
.no-results {
    text-align: center;
    padding: var(--space-20) var(--space-8);
}

.no-results h2 {
    color: var(--color-gray-700);
    margin-bottom: var(--space-4);
}

.no-results p {
    color: var(--color-gray-500);
}

/* ---------- Posts Grid ---------- */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-8);
}

/* ---------- Page Header ---------- */
.page-header {
    padding: var(--space-12) 0 var(--space-8);
    border-bottom: 1px solid var(--color-gray-200);
    margin-bottom: var(--space-10);
}

.page-header .page-title {
    font-size: var(--text-4xl);
    font-weight: 800;
    margin-bottom: var(--space-3);
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
    margin-bottom: var(--space-2);
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-gray-500);
}

.breadcrumb-item + .breadcrumb-item::before {
    content: '/';
    margin-right: var(--space-2);
    color: var(--color-gray-400);
}

.breadcrumb-item a {
    color: var(--color-primary);
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--color-gray-600);
}

/* Breadcrumb Category Badge/Pill */
.breadcrumb-category {
    display: inline-block;
    padding: 0.2em 0.7em;
    font-size: var(--text-xs, 0.75rem);
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-primary, #2563eb);
    background-color: var(--color-primary-light, #eff6ff);
    border-radius: 9999px;
    letter-spacing: 0.02em;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.breadcrumb-item a .breadcrumb-category {
    color: var(--color-primary, #2563eb);
    background-color: var(--color-primary-light, #eff6ff);
}

.breadcrumb-item a:hover .breadcrumb-category {
    color: #fff;
    background-color: var(--color-primary, #2563eb);
    text-decoration: none;
}

.breadcrumb-item.active .breadcrumb-category {
    color: var(--color-gray-700, #374151);
    background-color: var(--color-gray-100, #f3f4f6);
}

/* Page banner override for dark backgrounds */
.page-banner .breadcrumb-category {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
}

.page-banner .breadcrumb-item a:hover .breadcrumb-category {
    background-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
    :root {
        --text-5xl: 2.5rem;
        --text-4xl: 2rem;
    }
}

@media (max-width: 992px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .content-area.has-sidebar { grid-template-columns: 1fr; }

    :root {
        --text-5xl: 2.25rem;
        --text-4xl: 1.875rem;
        --text-3xl: 1.5rem;
    }
}

@media (max-width: 992px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
    .grid-3 { grid-template-columns: repeat(2, 1fr) !important; }
    .section { padding: var(--space-16) 0; }
}

@media (max-width: 768px) {
    .grid-4 { grid-template-columns: 1fr !important; }
    .grid-3 { grid-template-columns: 1fr !important; }
    .grid-2 { grid-template-columns: 1fr !important; }
    .posts-grid { grid-template-columns: 1fr !important; }

    .section { padding: var(--space-12) 0; }
    .container { padding: 0 var(--space-4); }

    :root {
        --text-5xl: 2rem;
        --text-4xl: 1.75rem;
        --text-3xl: 1.375rem;
        --text-2xl: 1.25rem;
    }
}

@media (max-width: 576px) {
    .container { padding: 0 var(--space-3); }
    .section { padding: var(--space-10) 0; }
}

@media (max-width: 425px) {
    :root {
        --text-4xl: 1.5rem;
        --text-3xl: 1.25rem;
        --text-2xl: 1.125rem;
    }
    .section { padding: var(--space-8) 0; }
    .container { padding: 0 var(--space-3); }
    .posts-grid { grid-template-columns: 1fr !important; }
}
