/* =========================================================
   JobPortal public site
   ========================================================= */

:root {
    --jp-brand: #2554d8;
    --jp-brand-dark: #1d43b3;
}

html {
    -webkit-tap-highlight-color: transparent;
}

body {
    text-rendering: optimizeLegibility;
}

::selection {
    background: #dbe8ff;
    color: #1b3374;
}

/* Thin, unobtrusive scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #f8fafc; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border: 2px solid #f8fafc; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Accessibility */
.skip-link {
    position: fixed;
    left: 1rem;
    top: -4rem;
    z-index: 100;
    border-radius: 0.75rem;
    background: #0f172a;
    color: #fff;
    padding: 0.65rem 1rem;
    font-size: 0.75rem;
    font-weight: 800;
    transition: top 0.18s ease;
}
.skip-link:focus { top: 1rem; }

:focus-visible {
    outline: 2px solid var(--jp-brand);
    outline-offset: 2px;
}

/* Header + footer links */
.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.8rem;
    border-radius: 0.65rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #475569;
    transition: background-color 0.18s ease, color 0.18s ease;
}
.nav-link:hover { background: #f1f5f9; color: #0f172a; }
.nav-link-active { background: #eff5ff; color: var(--jp-brand); }

.mobile-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.8rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #334155;
    transition: background-color 0.18s ease, color 0.18s ease;
}
.mobile-link:hover { background: #f8fafc; color: var(--jp-brand-dark); }

.footer-link {
    transition: color 0.18s ease;
}
.footer-link:hover { color: var(--jp-brand); }

/* Job cards */
.job-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.job-card:hover {
    transform: translateY(-3px);
    border-color: #bfd6ff;
    box-shadow: 0 18px 40px -22px rgba(37, 84, 216, 0.45), 0 2px 6px rgba(15, 23, 42, 0.04);
}

/* Decorative hero backgrounds */
.hero-dots {
    background-image: radial-gradient(circle, rgba(37, 84, 216, 0.16) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(to bottom, black, transparent 85%);
    -webkit-mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.hero-grid {
    background-image:
        linear-gradient(rgba(37, 84, 216, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 84, 216, 0.055) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(ellipse 78% 72% at 55% 30%, black 20%, transparent 76%);
    -webkit-mask-image: radial-gradient(ellipse 78% 72% at 55% 30%, black 20%, transparent 76%);
}

/* Slow float for the hero job previews */
@keyframes jp-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-9px); }
}
.float-card { animation: jp-float 7s ease-in-out infinite; }
.float-card-delay { animation-delay: 1.4s; animation-duration: 8.5s; }

.hero-glow {
    background:
        radial-gradient(closest-side, rgba(59, 110, 242, 0.18), transparent),
        radial-gradient(closest-side, rgba(99, 102, 241, 0.12), transparent);
    filter: blur(10px);
}

.cta-pattern {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: radial-gradient(ellipse at top right, black, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at top right, black, transparent 70%);
}

/* Search field focus halo */
.search-shell {
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.search-shell:focus-within {
    border-color: #93b8ff;
    box-shadow: 0 0 0 4px rgba(37, 84, 216, 0.12), 0 18px 40px -24px rgba(15, 23, 42, 0.35);
}

/* Hide scrollbars on horizontal chip rails */
.no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* Entrance animation (hero) */
@keyframes jp-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
.rise { animation: jp-rise 0.55s ease-out both; }
.rise-1 { animation-delay: 0.05s; }
.rise-2 { animation-delay: 0.12s; }
.rise-3 { animation-delay: 0.19s; }

/* Toast */
#jp-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* Filter panel */
.filter-panel { transition: max-height 0.25s ease; }

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border-radius: 0.5rem;
    padding: 0.32rem 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.filter-option:hover { background: #f8fafc; color: #0f172a; }
.filter-option input { width: 0.9rem; height: 0.9rem; flex: none; cursor: pointer; }

/* Responsive refinements */
@media (max-width: 1023px) {
    .job-card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .job-card:hover { transform: none; }
}
