@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* Global Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    /* Brand Colors - Modern Edutech Palette */
    /* Primary: Bright Blue (Intelligence & Trust) */
    --primary-main: #2563EB;
    --primary-dark: #1E40AF;
    --primary-light: #EFF6FF;

    /* Accent: Playful Orange/Amber (Gamification) */
    --accent-main: #F59E0B;
    --accent-hover: #D97706;
    --accent-light: #FFFBEB;

    /* Functional Colors */
    --success-main: #10B981;
    /* Soft Green */
    --success-bg: #D1FAE5;

    --danger-main: #EF4444;
    /* Soft Red */
    --danger-bg: #FEE2E2;

    /* Neutrals */
    --bg-body: #F8FAFC;
    /* Very light cool grey */
    --bg-surface: #FFFFFF;

    --text-main: #1E293B;
    /* Slate 800 */
    --text-muted: #64748B;
    /* Slate 500 */
    --border-light: #E2E8F0;

    /* Shapes & Elevation */
    --radius-sm: 0.75rem;
    /* 12px */
    --radius-md: 1.5rem;
    /* 24px - More playful */
    --radius-full: 9999px;
    /* Pills */

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Animation */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === GAMIFICATION MODULE === */
.gamification-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1rem 6rem;
    position: relative;
    background-image: radial-gradient(var(--border-light) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Topic Isles */
.topic-island {
    background: white;
    border-radius: 2rem;
    padding: 0;
    margin-bottom: 4rem;
    box-shadow: 0 8px 0 var(--border-light);
    border: 2px solid var(--border-light);
    overflow: hidden;
}

.topic-header-modern {
    padding: 2rem;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.topic-header-modern.theme-blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.topic-header-modern.theme-purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.topic-header-modern.theme-orange {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* The Path (Winding Road) */
.path-container {
    position: relative;
    padding: 3rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

/* Level Node Button 3D */
.level-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 10;
    transition: transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
}

/* Locked State */
.level-btn.locked {
    background-color: #e2e8f0;
    box-shadow: 0 6px 0 #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
}

/* Active/Unlocked State */
.level-btn.active {
    background-color: var(--primary-main);
    box-shadow: 0 6px 0 var(--primary-dark);
}

.level-btn.completed {
    background-color: var(--accent-main);
    box-shadow: 0 6px 0 var(--accent-hover);
}

/* Press Effect */
.level-btn:active:not(.locked) {
    transform: translateY(4px);
    box-shadow: 0 2px 0 var(--primary-dark);
}

.level-btn.completed:active {
    box-shadow: 0 2px 0 var(--accent-hover);
}

/* Floating Label */
.level-tooltip {
    position: absolute;
    top: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-main);
    border: 2px solid var(--border-light);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s, top 0.2s;
    pointer-events: none;
}

.level-btn:hover .level-tooltip {
    opacity: 1;
    top: 115%;
}

/* Connecting Lines (Pseudo-elements hard without JS for perfect snake, using simpler central line for MVP) */
.path-line {
    position: absolute;
    top: 50px;
    bottom: 50px;
    left: 50%;
    width: 6px;
    background: #e2e8f0;
    transform: translateX(-50%);
    z-index: 1;
}

/* Floating Header Stats */
.floating-stats {
    position: sticky;
    top: 20px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    box-shadow: var(--shadow-md);
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    border: 1px solid var(--border-light);
    margin-bottom: 2rem;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.6;
    background-color: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

/* --- Navigation --- */
nav {
    background: rgba(255, 255, 255, 0.8);
    /* Semi-transparent White */
    backdrop-filter: blur(12px);
    /* Modern Glass Blur */
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    /* Subtle border */
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    /* Very subtle shadow */
}

nav .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

nav .brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav ul,
.nav-links {
    display: flex;
    gap: 0.5rem;
    /* Using buttons style links */
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Nav Dropdown */
.nav-dropdown-container {
    position: relative;
}

.nav-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-light);
    min-width: 200px;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1001;
}

.nav-dropdown-container:hover .nav-dropdown-menu,
.nav-dropdown-container:focus-within .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.2s;
}

.nav-dropdown-item:hover {
    background: var(--primary-light);
    color: var(--primary-main);
}

nav a.active {
    background-color: var(--primary-light);
    color: var(--primary-main);
}

nav a.nav-link,
.nav-dropdown-trigger {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

nav a.nav-link:hover,
.nav-dropdown-trigger:hover,
.nav-dropdown-container:hover .nav-dropdown-trigger {
    color: var(--primary-main);
    background-color: var(--primary-light);
}

/* --- Forms & Inputs --- */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-main);
    background-color: var(--bg-body);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    /* Rounded corners */
    transition: var(--transition-fast);
    outline: none;
    box-sizing: border-box;
    /* Fix sizing */
}

.form-control:focus {
    border-color: var(--primary-main);
    background-color: white;
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* Custom Range Slider */
input[type=range] {
    -webkit-appearance: none;
    /* Hides default slider */
    width: 100%;
    background: transparent;
    margin: 0.5rem 0;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: var(--primary-main);
    cursor: pointer;
    margin-top: -10px;
    /* You need to specify a margin in Chrome */
    box-shadow: var(--shadow-sm);
    border: 2px solid white;
    transition: transform 0.1s;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: var(--border-light);
    border-radius: var(--radius-full);
}

input[type=range]:focus::-webkit-slider-runnable-track {
    background: var(--primary-light);
}

/* Firefox Styles */
input[type=range]::-moz-range-thumb {
    height: 24px;
    width: 24px;
    border: 2px solid white;
    border-radius: 50%;
    background: var(--primary-main);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

input[type=range]::-moz-range-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: var(--border-light);
    border-radius: var(--radius-full);
}

/* --- Buttons & Inputs --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-full);
    /* Pill shape */
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    font-size: 0.95rem;
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background-color: var(--primary-main);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-accent {
    background-color: var(--accent-main);
    color: white;
}

.btn-accent:hover {
    background-color: var(--accent-hover);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--border-light);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary-main);
    color: var(--primary-main);
}

.btn-danger {
    background-color: var(--danger-main);
    color: white;
}

.card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: 2rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* --- Responsive Utilities & Mobile Adaptation --- */

/* Hamburger Menu Button */
.hamburger {
    display: none;
    /* Hidden on desktop */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    /* Above menu */
    gap: 6px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.hamburger:hover {
    background-color: var(--neutral-100);
}

.hamburger span {
    width: 24px;
    height: 2.5px;
    /* Thinner, more elegant */
    background-color: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    transform-origin: center;
}

/* Base Nav Menu (Desktop) */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-grow: 1;
    justify-content: flex-end;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Dashboard Grid - Mobile Friendly */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Responsive Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

table {
    width: 100%;
    min-width: 600px;
}

/* Mobile Media Queries */
@media (max-width: 768px) {

    /* Layout */
    .container {
        padding: 1.5rem 1rem;
        /* Smaller padding on mobile */
    }

    /* Hamburger Visible */
    .hamburger {
        display: flex;
    }

    /* Mobile Menu Container - The "Drawer" */
    .nav-menu {
        display: none;
        /* Strictly hidden by default */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        /* Less transparent for readability */
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 1.5rem;
        flex-direction: column;
        align-items: stretch;
        /* Full width items */
        gap: 1rem;
        border-bottom: 1px solid var(--border-light);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        margin-top: 1px;
        /* Offset for border */

        /* Animation Base */
        transform: translateY(-10px);
        opacity: 0;
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    /* Active State for Menu */
    .nav-menu.active {
        display: flex;
        /* Turn flex on */
        opacity: 1;
        transform: translateY(0);
    }

    /* Mobile Links Styling */
    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .nav-link {
        display: block;
        width: 100%;
        text-align: center;
        padding: 0.8rem !important;
        border-radius: var(--radius-sm);
        background-color: var(--neutral-50);
        /* Subtle background for touch targets */
    }

    .nav-link.active {
        background-color: var(--primary-light);
    }

    /* Mobile Auth Styling */
    .nav-auth {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
        margin-top: 0.5rem;
        border-top: 1px solid var(--border-light);
        padding-top: 1rem;
    }

    .nav-auth .btn {
        width: 100%;
        justify-content: center;
    }

    .user-status {
        width: 100%;
        justify-content: center;
    }

    /* Hamburger Animation: Transform to X */
    .hamburger.active span:nth-child(1) {
        transform: translateY(8.5px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
        transform: scale(0);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8.5px) rotate(-45deg);
    }

    /* Typography Scale Down */
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .hero-section {
        padding: 2rem 1rem !important;
        text-align: center;
    }

    .hero-section h1 {
        font-size: 2.25rem !important;
    }

    .hero-section p {
        font-size: 1rem !important;
    }

    /* Cards */
    .card {
        padding: 1.5rem;
        /* Reduce padding on mobile */
    }

    /* Buttons Stack */
    .hero-section div[style*="display: flex"] {
        flex-direction: column;
        width: 100%;
    }

    .hero-section .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Animations */
@keyframes pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* --- Profile Dropdown Component --- */

/* Trigger Container */
.profile-container {
    position: relative;
    /* Ensure dropdown is positioned relative to this */
}

.profile-trigger {
    display: flex;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    padding: 4px;
    padding-left: 1rem;
    gap: 0.75rem;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.profile-trigger:hover {
    border-color: var(--primary-main);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* XP Badge inside trigger */
.xp-badge {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--accent-hover);
    white-space: nowrap;
}

/* Avatar Circle */
.avatar-circle {
    width: 36px;
    height: 36px;
    background: var(--primary-main);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
}

/* Dropdown Menu */
.profile-dropdown {
    position: absolute;
    top: 125%;
    right: 0;
    width: 250px;
    background: var(--bg-surface);
    /* Restored Background */
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1001;
    overflow: hidden;
}

/* Show State (Hover on Desktop, Click via JS) */
.profile-container:hover .profile-dropdown,
.profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 1rem;
    background: var(--neutral-50);
    border-bottom: 1px solid var(--border-light);
}

.user-info strong {
    display: block;
    color: var(--text-main);
    font-size: 1rem;
}

.user-role {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-light);
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background 0.2s;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.dropdown-item:hover {
    background: var(--primary-light);
    color: var(--primary-main);
}

.dropdown-item.text-danger {
    color: var(--danger-main);
}

.dropdown-item.text-danger:hover {
    background: var(--danger-bg);
    color: var(--danger-main);
}

/* === TOAST ALERTS (PREMIUM) === */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast-notification {
    min-width: 300px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: toast-slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.3s ease;
    border-left: 5px solid;
    cursor: pointer;
}

.toast-notification.hide {
    animation: toast-slide-out 0.4s forwards;
}

.toast-notification.success {
    border-color: var(--success-main);
}

.toast-notification.error {
    border-color: var(--danger-main);
}

.toast-notification.info {
    border-color: var(--primary-main);
}

.toast-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.toast-content {
    flex-grow: 1;
}

.toast-title {
    font-weight: 700;
    margin-bottom: 2px;
    font-size: 0.95rem;
    color: var(--text-main);
}

.toast-message {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

@keyframes toast-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toast-slide-out {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Mobile Adjustments for Profile */
@media (max-width: 768px) {
    .profile-container {
        width: 100%;
    }

    .profile-trigger {
        justify-content: space-between;
        width: 100%;
        padding: 0.75rem 1rem;
        background: var(--neutral-50);
        margin-bottom: 0.5rem;
    }

    .profile-dropdown {
        position: static;
        /* Stack naturally on mobile */
        width: 100%;
        box-shadow: none;
        border: 1px solid var(--border-light);
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        /* Hide default, toggle with JS or CSS */
        margin-top: 0.5rem;
    }

    .profile-dropdown.show {
        display: block;
        /* Expand like accordion on mobile */
    }
}

/* --- OJK Directory Module --- */

.ojk-header {
    text-align: center;
    margin-bottom: 3rem;
}

.ojk-header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.ojk-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.ojk-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--success-bg);
    color: #065f46;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 1.5rem;
}

.ojk-verified-badge svg {
    width: 16px;
    height: 16px;
}

.search-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.search-form {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.search-input-group {
    flex: 1;
    min-width: 200px;
}

.search-filters {
    display: flex;
    gap: 1rem;
    flex: 2;
    min-width: 300px;
}

.search-field-container {
    flex: 1;
    position: relative;
}

.search-field-container label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-main);
    background-color: var(--bg-body);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.institution-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.inst-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: var(--transition-fast);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.inst-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.inst-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.inst-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.badge-type {
    display: inline-flex;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    background-color: var(--primary-light);
    color: var(--primary-main);
}

.verified-icon {
    color: var(--success-main);
    display: flex;
    /* Fix alignment */
    align-items: center;
}

.verified-icon svg {
    width: 20px;
    height: 20px;
}

.inst-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.inst-license {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: monospace;
    background: var(--bg-body);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 1rem;
}

.inst-details {
    margin-top: auto;
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.inst-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.inst-detail-row svg {
    width: 16px;
    height: 16px;
    margin-top: 3px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .search-filters {
        flex-direction: column;
    }

    .ojk-header h1 {
        font-size: 1.75rem;
    }
}

/* Pagination Custom Styles */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
}

.pagination li {
    display: inline-block;
}

.pagination li a,
.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: white;
    border: 1px solid var(--border-light);
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
}

.pagination li.active span,
.pagination li a:hover {
    background: var(--primary-main);
    color: white;
    border-color: var(--primary-main);
}

.pagination li.disabled span {
    background: var(--bg-body);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Fix large SVG in pagination arrows */
.pagination svg {
    width: 20px;
    height: 20px;
}