/* =====================================================
   SIPAKARIO — Design System
   Palet: Biru Elegan | Tipografi: Fraunces + Inter
   ===================================================== */
:root {
    --ink: #16232F;
    --primary: #1B4B6E;
    --primary-dark: #123449;
    --primary-mid: #2C7DA0;
    --primary-light: #EAF3F8;
    --primary-light-2: #F3F8FB;
    --gold: #C6A15B;
    --gold-dark: #A9843F;
    --danger: #C0392B;
    --danger-light: #FBEAE8;
    --warning: #B9832B;
    --warning-light: #FBF1E1;
    --online: #3FA66E;
    --online-light: #E7F6EE;
    --muted: #64748B;
    --border: #E2E8F0;
    --bg: #F6F9FB;
    --surface: #FFFFFF;

    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --shadow-sm: 0 1px 3px rgba(18, 52, 73, 0.06);
    --shadow-md: 0 6px 20px rgba(18, 52, 73, 0.08);
    --shadow-lg: 0 16px 40px rgba(18, 52, 73, 0.14);
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--primary-dark);
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 12px;
}
h1 { font-size: 34px; }
h2 { font-size: 26px; }
h3 { font-size: 19px; margin-top: 32px; }

a { color: var(--primary-mid); }

:focus-visible {
    outline: 2px solid var(--primary-mid);
    outline-offset: 2px;
    border-radius: 4px;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 32px 20px 60px;
    animation: page-fade-in 0.45s var(--ease);
}

@keyframes page-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* =====================================================
   LOADING SCREEN
   ===================================================== */
.app-loader {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: linear-gradient(160deg, #0F2B40 0%, var(--primary-dark) 55%, var(--primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.45s var(--ease), visibility 0.45s var(--ease);
}
.app-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.app-loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}
.loader-arc {
    width: 64px;
    height: 64px;
    animation: loader-spin 1.1s linear infinite;
}
@keyframes loader-spin {
    to { transform: rotate(360deg); }
}
.loader-brand {
    font-family: var(--font-display);
    color: #fff;
    font-size: 15px;
    letter-spacing: 0.28em;
    opacity: 0.9;
}

/* =====================================================
   NAVBAR — dengan pola geometris Islami tipis & animasi menu
   ===================================================== */
.navbar {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(120deg, var(--primary-dark), var(--primary) 70%);
    color: #fff;
    padding: 16px 28px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.navbar::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.10;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23FFFFFF' stroke-width='1'%3E%3Cpath d='M28 2 L34 14 L48 14 L38 22 L42 36 L28 28 L14 36 L18 22 L8 14 L22 14 Z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 56px 56px;
}
.navbar .brand {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 21px;
    text-decoration: none;
    letter-spacing: 0.04em;
}
.brand-logo-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    flex-shrink: 0;
}
.brand-logo-chip--sm {
    width: 28px;
    height: 28px;
}
.brand-logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
    flex-shrink: 0;
}
.nav-links {
    position: relative;
    display: flex;
    align-items: center;
    gap: 22px;
}
.nav-link {
    position: relative;
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 0;
    transition: color 0.2s var(--ease);
}
.nav-link::after {
    content: '';
    position: absolute;
    left: 0; right: 100%;
    bottom: -2px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
    transition: right 0.28s var(--ease);
}
.nav-link:hover { color: #fff; }
.nav-link:hover::after { right: 0; }
.nav-link.active { color: #fff; font-weight: 600; }
.nav-link.active::after { right: 0; background: #fff; }

.user-name { font-weight: 600; font-size: 14px; }
.btn-logout {
    background: rgba(255,255,255,0.14);
    color: #fff;
    padding: 7px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn-logout:hover { background: rgba(255,255,255,0.24); transform: translateY(-1px); }
.btn-nav-cta {
    background: var(--gold);
    color: var(--primary-dark);
    padding: 8px 18px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn-nav-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(198,161,91,0.4); }

/* Catatan: style menu hamburger & drawer kiri sekarang ditulis sebagai
   critical inline CSS langsung di app/Views/layouts/main.php (bukan di
   sini), supaya dijamin aktif walau file ini gagal/telat dimuat. */

/* =====================================================
   ALERTS
   ===================================================== */
.alert {
    padding: 13px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 14px;
    list-style: none;
    animation: page-fade-in 0.3s var(--ease);
}
.alert-success { background: var(--online-light); color: #1E7A4C; border: 1px solid #BEE6D0; }
.alert-error { background: var(--danger-light); color: #9A2A20; border: 1px solid #F2C6C1; }

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
    display: inline-block;
    padding: 11px 20px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(27,75,110,0.25); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(27,75,110,0.32); }
.btn-outline { background: var(--surface); color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); transform: translateY(-1px); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #9E2E22; transform: translateY(-1px); }
.btn-success { background: var(--online); color: #fff; }
.btn-success:hover { background: #338F5D; }
.btn-disabled { background: #E5E9ED; color: #94A3B8; cursor: not-allowed; }
.btn-link { background: none; color: var(--muted); text-decoration: underline; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.w-100 { width: 100%; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 16px; }
.text-center { text-align: center; }
.text-muted { color: var(--muted); font-size: 13px; }
.text-error { color: var(--danger); font-size: 13px; }
.hidden { display: none !important; }

/* =====================================================
   AUTH PAGES
   ===================================================== */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at 20% 20%, #E9F2F8 0%, var(--bg) 55%);
    position: relative;
    overflow-y: auto;
    padding: 40px 16px;
}
.auth-pattern {
    position: fixed;
    inset: 0;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90' viewBox='0 0 90 90'%3E%3Cg fill='none' stroke='%231B4B6E' stroke-width='0.6' opacity='0.18'%3E%3Cpath d='M45 4 L54 22 L74 22 L58 34 L64 54 L45 42 L26 54 L32 34 L16 22 L36 22 Z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 90px 90px;
}
.auth-card {
    position: relative;
    z-index: 1;
    background: var(--surface);
    padding: 40px 38px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 430px;
    animation: card-rise 0.5s var(--ease);
}
@keyframes card-rise {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.auth-logo {
    display: block;
    width: 76px;
    height: 76px;
    margin: 0 auto 12px;
    object-fit: contain;
}
.auth-brand {
    text-align: center;
    color: var(--primary-dark);
    font-size: 30px;
    margin-bottom: 4px;
    letter-spacing: 0.03em;
}
.auth-tagline { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 26px; line-height: 1.5; }
.auth-footer { text-align: center; font-size: 14px; margin-top: 18px; color: var(--muted); }
.auth-footer a { color: var(--primary); font-weight: 600; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }
.register-choice { display: flex; flex-direction: column; gap: 10px; }

form label { display: block; margin: 14px 0 5px; font-size: 13px; font-weight: 600; color: var(--ink); }
form input[type=text], form input[type=email], form input[type=password],
form input[type=file], form textarea, form select {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font-body);
    background: var(--surface);
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
form input:focus, form textarea:focus, form select:focus {
    outline: none;
    border-color: var(--primary-mid);
    box-shadow: 0 0 0 3px rgba(44, 125, 160, 0.15);
}
.checkbox-group { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.checkbox-inline { display: flex; align-items: center; gap: 6px; font-weight: 400 !important; font-size: 14px; }

/* =====================================================
   SPECIALIZATION PICKER — chip selector untuk pilih spesialisasi
   (dipakai di registrasi & edit profil penyuluh)
   ===================================================== */
.spec-picker-header {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-top: 14px; margin-bottom: 6px;
}
.spec-picker-header label { margin: 0; }
.spec-picker-counter {
    font-size: 12.5px; font-weight: 600; color: var(--muted);
    padding: 2px 10px; border-radius: 12px; background: var(--primary-light);
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.spec-picker-counter.is-max { background: var(--gold); color: #fff; }

.spec-picker {
    display: flex; flex-wrap: wrap; gap: 9px;
    margin-bottom: 4px;
}
.spec-chip {
    position: relative;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 16px 9px 14px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    font-size: 13px; font-weight: 500;
    color: var(--ink);
    background: var(--surface);
    cursor: pointer;
    user-select: none;
    transition: border-color 0.18s var(--ease), background 0.18s var(--ease),
                color 0.18s var(--ease), transform 0.15s var(--ease);
}
.spec-chip input[type="checkbox"] {
    position: absolute; opacity: 0; width: 0; height: 0;
}
.spec-chip .spec-chip-check {
    display: inline-flex; align-items: center; justify-content: center;
    width: 16px; height: 16px; border-radius: 50%;
    border: 1.5px solid var(--border);
    font-size: 10px; color: transparent;
    background: #fff;
    transition: all 0.18s var(--ease);
    flex-shrink: 0;
}
.spec-chip:hover { border-color: var(--primary-mid); transform: translateY(-1px); }
.spec-chip.is-checked {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-dark);
    font-weight: 600;
}
.spec-chip.is-checked .spec-chip-check {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.spec-chip.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}
.spec-picker-hint { font-size: 12px; color: var(--muted); margin: 4px 0 0; }

/* =====================================================
   CARDS / DASHBOARD
   ===================================================== */
.summary-cards, .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin: 18px 0 30px;
}
.card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card h5 { margin: 0 0 8px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.card h2 { margin: 0; color: var(--primary-dark); font-size: 26px; }
.card-alert { border-left: 4px solid var(--danger); }

.dashboard-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.status-toggle select {
    padding: 9px 14px; border-radius: 20px; border: 1px solid var(--border);
    font-weight: 600; font-size: 14px; background: var(--surface);
    transition: border-color 0.2s var(--ease);
}
.status-toggle select:focus { border-color: var(--primary-mid); outline: none; }

/* ACTIVE SESSION BANNER */
.active-session-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: linear-gradient(120deg, var(--primary-light), var(--primary-light-2));
    border: 1px solid #CFE3ED;
    border-radius: var(--radius-md);
    padding: 18px 22px;
    margin-bottom: 22px;
    animation: card-rise 0.4s var(--ease);
}
.active-session-banner strong { color: var(--primary-dark); font-family: var(--font-display); font-size: 16px; }

/* =====================================================
   TABLES
   ===================================================== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 8px;
}
.table-responsive .table { box-shadow: none; border-radius: 0; margin-bottom: 0; }

@media (max-width: 700px) {
    .table-responsive .table { min-width: 640px; }
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.table th { background: var(--primary-light); color: var(--primary-dark); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; }
.table tbody tr { transition: background 0.15s var(--ease); }
.table tbody tr:hover { background: var(--primary-light-2); }
.table tbody tr:last-child td { border-bottom: none; }
.row-alert { background: var(--danger-light); }

/* =====================================================
   BADGES
   ===================================================== */
.badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; letter-spacing: 0.01em; }
.badge-online, .badge-active, .badge-approved, .badge-completed { background: var(--online-light); color: #1E7A4C; }
.badge-offline, .badge-cancelled { background: #EEF1F4; color: #64748B; }
.badge-busy, .badge-waiting, .badge-pending { background: var(--warning-light); color: #93650F; }
.badge-banned, .badge-rejected, .badge-open { background: var(--danger-light); color: #9A2A20; }
.badge-ongoing, .badge-in_review { background: var(--primary-light); color: var(--primary-dark); }
.badge-warning { background: var(--gold); color: #fff; text-decoration: none; }
.badge-points { background: var(--primary-light); color: var(--primary-dark); margin-left: 8px; }

/* =====================================================
   PENYULUH GRID
   ===================================================== */
.filter-bar { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.filter-bar select {
    padding: 9px 14px; border-radius: 20px; border: 1px solid var(--border);
    font-size: 14px; background: var(--surface); font-family: var(--font-body);
}
.penyuluh-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 22px 18px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.penyuluh-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #CFE3ED; }
.avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary-light); }
.avatar-lg {
    width: 92px; height: 92px; border-radius: 50%; object-fit: cover; margin-bottom: 12px;
    border: 3px solid var(--primary-light); box-shadow: var(--shadow-sm);
}
.rating { color: var(--gold-dark); font-weight: 700; }
.card-actions { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }

.profile-detail { background: var(--surface); padding: 28px; border-radius: var(--radius-lg); text-align: center; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.tag-list { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 12px 0; }
.tag { background: var(--primary-light); color: var(--primary-dark); padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }

.review-list { display: flex; flex-direction: column; gap: 12px; }
.review-item { background: var(--surface); padding: 16px; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); border: 1px solid var(--border); }

/* =====================================================
   CHAT ROOM
   ===================================================== */
.chat-container {
    background: var(--surface);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    height: 70vh;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}
.chat-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--primary-light-2);
}
.chat-header h4 { margin: 0; font-size: 16px; }
.chat-header > div { flex: 1; }
.chat-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.chat-body-readonly { height: 400px; }
.bubble {
    max-width: 70%;
    padding: 11px 16px;
    border-radius: 16px;
    font-size: 14px;
    position: relative;
    animation: bubble-in 0.22s var(--ease);
}
@keyframes bubble-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.bubble-me { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.bubble-other { align-self: flex-start; background: #EEF2F6; color: var(--ink); border-bottom-left-radius: 4px; }
.bubble-system { align-self: center; background: var(--warning-light); color: #93650F; font-size: 12px; padding: 7px 14px; border-radius: 12px; }
.timestamp { display: block; font-size: 10px; opacity: 0.7; margin-top: 4px; text-align: right; }
.chat-input { display: flex; gap: 10px; padding: 16px; border-top: 1px solid var(--border); background: var(--surface); }
.chat-input input {
    flex: 1; padding: 11px 16px; border-radius: 24px; border: 1px solid var(--border);
    font-family: var(--font-body); font-size: 14px; transition: border-color 0.2s var(--ease);
}
.chat-input input:focus { outline: none; border-color: var(--primary-mid); }
.chat-input button {
    background: var(--primary); color: #fff; border: none;
    padding: 11px 22px; border-radius: 24px; cursor: pointer; font-weight: 600;
    transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.chat-input button:hover { background: var(--primary-dark); transform: translateY(-1px); }

.btn-attach {
    background: var(--primary-light);
    border: 1px solid var(--border);
    color: var(--primary-dark);
    width: 42px; height: 42px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn-attach:hover:not(:disabled) { background: var(--primary); color: #fff; transform: translateY(-1px); }
.btn-attach:disabled { opacity: 0.6; cursor: default; }

.chat-image {
    max-width: 220px;
    max-height: 220px;
    border-radius: 10px;
    display: block;
    object-fit: cover;
}
.chat-file-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    font-size: 13.5px;
    font-weight: 600;
    max-width: 220px;
}
.bubble-other .chat-file-card { background: #fff; border: 1px solid var(--border); color: var(--ink); }
.chat-file-card span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =====================================================
   MODAL
   ===================================================== */
.modal-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(18, 52, 73, 0.55);
    align-items: center; justify-content: center;
    z-index: 999;
    backdrop-filter: blur(2px);
}
.modal-overlay.show { display: flex; animation: page-fade-in 0.25s var(--ease); }
.modal-box {
    background: var(--surface);
    padding: 30px;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    animation: card-rise 0.3s var(--ease);
}
.star-rating { font-size: 34px; color: #E2E8F0; cursor: pointer; margin: 16px 0; text-align: center; }
.star-rating .star { transition: transform 0.15s var(--ease), color 0.15s var(--ease); display: inline-block; }
.star-rating .star:hover { transform: scale(1.15); }
.star-rating .star.active { color: var(--gold); }

/* =====================================================
   DIRECTORY CARD (Home & Cari Penyuluh) — layout horizontal
   ===================================================== */
.directory-list { display: flex; flex-direction: column; gap: 14px; }
.directory-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.directory-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #CFE3ED; }
.directory-card__avatar {
    width: 68px; height: 68px; border-radius: 50%;
    object-fit: cover; border: 2px solid var(--primary-light); flex-shrink: 0;
}
.directory-card__body { flex: 1; min-width: 0; }
.directory-card__header {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 12px; flex-wrap: wrap;
}
.directory-card__name { font-family: var(--font-display); font-size: 17px; color: var(--primary-dark); margin: 0 0 4px; }
.directory-card__meta { color: var(--muted); font-size: 12.5px; display: inline-flex; align-items: center; }
.directory-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.directory-card__rating { color: var(--gold-dark); font-weight: 700; font-size: 14px; }
.directory-card__rating .count { color: var(--muted); font-weight: 500; font-size: 12.5px; margin-left: 4px; }

/* Stat sejajar: Rating & Jumlah Pelayanan ditampilkan berdampingan
   dengan bobot visual yang sama, bukan satu di dalam kurung kecil. */
.stat-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin: 8px 0;
}
.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
}
.stat-item .stat-icon { font-size: 15px; }
.stat-item .stat-value { font-weight: 700; color: var(--primary-dark); }
.stat-item .stat-label { color: var(--muted); font-size: 12px; }
.stat-item.stat-rating .stat-value { color: var(--gold-dark); }
.directory-card__action { flex-shrink: 0; }

.status-dot {
    width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px;
}
.status-dot.online { background: var(--online); box-shadow: 0 0 0 3px var(--online-light); }
.status-dot.offline { background: #B7C0CA; }

.landing-showcase { margin-top: 40px; }

/* =====================================================
   SHOWCASE GRID — kartu penyuluh 2 kolom bergaya direktori
   ===================================================== */
.showcase-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.showcase-card {
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 13px 14px;
    background: var(--surface);
    transition: background 0.2s var(--ease);
}
.showcase-card:hover { background: var(--primary-light-2); }
.showcase-card__top { display: flex; gap: 10px; margin-bottom: 10px; }
.showcase-card__avatar {
    width: 46px; height: 46px;
    border-radius: 9px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border);
}
.showcase-card__info { flex: 1; min-width: 0; }
.showcase-card__name {
    font-family: var(--font-display);
    font-size: 13.5px;
    margin: 0 0 2px;
    color: var(--primary-dark);
    line-height: 1.25;
}
.showcase-card__meta {
    font-size: 10.5px; color: var(--muted); margin: 0 0 5px;
    display: flex; align-items: center;
}
.agama-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 10px;
    margin-bottom: 5px;
}
.showcase-card__bottom {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; padding-top: 2px;
}
.showcase-card .stat-item { font-size: 11.5px; gap: 4px; }
.showcase-card .stat-item .stat-icon { font-size: 12px; }
.showcase-card .stat-item .stat-label { font-size: 10.5px; }
.showcase-card .directory-card__tags { gap: 4px; margin: 6px 0; }
.showcase-card .tag { font-size: 10px; padding: 2px 8px; }
.showcase-card .btn-sm { padding: 5px 12px; font-size: 12px; }
.showcase-card .status-dot { width: 6px; height: 6px; }

@media (max-width: 700px) {
    .showcase-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .directory-card { flex-direction: column; }
    .directory-card__header { flex-direction: column; align-items: flex-start; }
    .directory-card__action { width: 100%; }
    .directory-card__action .btn { width: 100%; }
}

/* =====================================================
   LANDING PAGE
   ===================================================== */
.landing-hero {
    text-align: center;
    padding: 70px 20px 50px;
    position: relative;
}
.landing-hero h1 {
    font-size: 46px;
    color: var(--primary-dark);
    margin-bottom: 10px;
    letter-spacing: 0.01em;
}
.tagline { color: var(--muted); font-size: 16px; margin-bottom: 22px; max-width: 560px; margin-left: auto; margin-right: auto; }
.landing-cta { display: flex; gap: 14px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.landing-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 22px;
    margin-top: 46px;
}
.feature-item {
    background: var(--surface);
    padding: 26px 22px;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.feature-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-item h3 { margin-top: 0; font-size: 17px; }
