:root {
    --primary-color: #1a237e;
    /* Deep Indigo */
    --secondary-color: #3949ab;
    --accent-color: #ff6d00;
    /* Professional Orange */
    --bg-color: #f0f2f5;
    --text-color: #212121;
    --white: #ffffff;
    --success: #2e7d32;
    --border-color: #dadce0;
    --gray-bg: #f8f9fa;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

body.is-loading {
    overflow: hidden;
}

.page-loader {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, #ffffff 0%, #f1f3f8 40%, #e9edf7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.page-loader-inner {
    text-align: center;
    padding: 24px;
}

.page-loader-spinner {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 4px solid #dfe3f5;
    border-top-color: var(--accent-color);
    animation: loaderSpin 0.9s linear infinite;
    margin: 0 auto 14px;
}

.page-loader-text {
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 0.4px;
    font-size: 0.95rem;
}

@keyframes loaderSpin {
    to {
        transform: rotate(360deg);
    }
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

/* Slim Professional Header */
.premium-header {
    background: var(--primary-color);
    color: #fff;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.5px;
}

.brand-icon {
    width: 20px;
    height: 20px;
    color: var(--accent-color);
}

/* Professional Section Headers */
.section-header {
    background: var(--primary-color);
    color: #fff;
    padding: 12px 15px;
    font-weight: 800;
    font-size: 1rem;
    display: flex;
    align-items: center;
    border-bottom: 3px solid var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5px;
    /* Thin line separator */
    background: var(--border-color);
    border-bottom: 2px solid var(--border-color);
}

.category-card {
    background: #fff;
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s;
}

.category-card:active {
    background: #f0f7ff;
}

.category-icon {
    width: 32px;
    height: 32px;
    margin: 0 auto 8px;
    color: var(--primary-color);
}

.category-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Side Menu */
.side-menu {
    position: fixed;
    top: 0;
    left: -280px;
    /* Slide from left */
    width: 280px;
    height: 100vh;
    background: #fff;
    z-index: 2000;
    transition: 0.3s ease;
    padding: 0;
}

.side-menu.active {
    left: 0;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1999;
    display: none;
}

.menu-overlay.active {
    display: block;
}

.menu-header {
    background: var(--primary-color);
    color: #fff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-links li {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    color: #444;
    list-style: none;
}

/* Education Grid */
.filters-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 15px;
    background: #fff;
}

.filter-btn {
    padding: 12px 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.filter-btn:hover {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8ecff 100%);
    border-color: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(26, 35, 126, 0.12);
}

.filter-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Job Listing Styles */
.job-item {
    border-bottom: 5px solid #eee;
    padding: 15px;
    background: #fff;
}

.job-item:last-child {
    border-bottom: none;
}

.job-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.badge-new {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-urgent {
    background: #fff3e0;
    color: #e65100;
}

.job-title-link {
    font-size: 1.05rem;
    font-weight: 800;
    color: #cc0000;
    /* Professional 'Kaka' Red */
    text-decoration: none;
    line-height: 1.3;
    display: block;
    margin-bottom: 10px;
}

.job-meta {
    font-size: 0.85rem;
    color: #666;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 5px 15px;
}

/* Job Detail Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 0.9rem;
}

.data-table th,
.data-table td {
    padding: 12px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.data-table th {
    background: var(--gray-bg);
    width: 35%;
    font-weight: 700;
}

/* Footer Redesign */
.premium-footer {
    background: #f8f9fa;
    border-top: 1px solid #ddd;
    padding: 30px 15px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
    list-style: none;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color);
}

.footer-bottom {
    font-size: 0.75rem;
    color: #777;
}

/* Utlities */
.btn-primary {
    background: linear-gradient(135deg, #ff8534 0%, #ff6d00 50%, #e65100 100%);
    color: #fff;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    width: 100%;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(255, 109, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ff9a4d 0%, #ff7b1a 50%, #f56500 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 109, 0, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 109, 0, 0.3);
}

.hidden {
    display: none !important;
}

.view-container {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ===== Premium Live Search Styles ===== */
.search-trigger {
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.search-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
}

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.95) 0%, rgba(20, 20, 40, 0.98) 100%);
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.25s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.search-overlay.active {
    display: block;
    opacity: 1;
}

.search-container {
    max-width: 580px;
    margin: 0 auto;
    padding: 30px 20px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.search-header {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

#search-input {
    flex: 1;
    padding: 18px 24px;
    font-size: 1.1rem;
    border: none;
    border-radius: 16px;
    background: #fff;
    color: #1a1a2e;
    outline: none;
    font-family: inherit;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

#search-input:focus {
    box-shadow: 0 8px 40px rgba(255, 255, 255, 0.15);
    transform: scale(1.01);
}

#search-input::placeholder {
    color: #888;
    font-weight: 400;
}

.search-close {
    padding: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-close:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(90deg);
}

.search-results {
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.search-placeholder {
    padding: 50px 20px;
    text-align: center;
    color: #888;
    font-size: 0.95rem;
}

.search-placeholder::before {
    content: '';
    display: block;
    width: 48px;
    height: 48px;
    margin: 0 auto 15px;
    background: #f0f0f0;
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 24px;
}

.search-result-item {
    display: block;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s ease;
}

.search-result-item:hover {
    background: linear-gradient(90deg, #f8f9ff 0%, #fff 100%);
    padding-left: 24px;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-title {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
    line-height: 1.4;
    font-size: 0.95rem;
}

.search-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.8rem;
    color: #666;
    align-items: center;
}

.search-result-badge {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.75rem;
}

.search-result-date {
    color: #d32f2f;
    font-weight: 700;
}

.search-no-results {
    padding: 50px 20px;
    text-align: center;
    color: #666;
}

.search-loading {
    padding: 50px 20px;
    text-align: center;
    color: #888;
}

.search-loading::after {
    content: '';
    display: block;
    width: 32px;
    height: 32px;
    margin: 15px auto 0;
    border: 3px solid #eee;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Mobile responsive */
@media (max-width: 480px) {
    .search-container {
        padding: 15px;
    }

    #search-input {
        padding: 15px 18px;
        font-size: 1rem;
        border-radius: 12px;
    }

    .search-close {
        padding: 14px;
        border-radius: 12px;
    }

    .search-results {
        border-radius: 12px;
        max-height: calc(100vh - 120px);
    }

    .search-result-item {
        padding: 14px 16px;
    }

    .search-result-meta {
        gap: 8px;
    }
}