/* ===== RESET & BASE ===== */
@import url('/static/fonts/poppins/poppins.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0a66c2;
    --primary-dark: #004182;
    --secondary: #f3a000;
    --white: #ffffff;
    --light-bg: #f3f2ee;
    --card-bg: #ffffff;
    --text-dark: #191919;
    --text-mid: #555555;
    --text-light: #888888;
    --blue-collar: #e65c00;
    --white-collar: #0a66c2;
    --border: #e0e0e0;
    --shadow: 0 2px 14px rgba(17,24,39,0.08);
    --shadow-lg: 0 8px 28px rgba(17,24,39,0.12);
    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 20px;
}

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
    background: var(--light-bg);
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── App-style global polish ───────────────────────────────── */
a, button, input, select, textarea { font-family: inherit; }

button, .apply-btn, .filter-btn, .hs-btn, .qa-card, .job-card, .jlc-apply-btn,
.afc, .admin-go-btn, a[class*="btn"] {
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}

button:active, a[class*="btn"]:active { transform: scale(0.97); }

.job-card, .jlc-info, .job-list-card, .filter-sidebar, .jd-header-card,
.jd-section-card, .jd-info-card, .qa-card {
    border-radius: var(--radius) !important;
}

input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="number"], input[type="url"], input[type="date"], textarea, select {
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c7ccd6; border-radius: 20px; }
::-webkit-scrollbar-thumb:hover { background: #a7aebb; }

/* ===== NAVBAR ===== */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.nav-logo img {
    height: 40px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    display: block;
}
@media(max-width:700px){
    .nav-logo img { height: 34px; max-width: 120px; }
}

.nav-logo i {
    font-size: 28px;
    display:inline-block;
    animation:pinDrop .6s cubic-bezier(.22,.68,0,1.4) both;
}
.nav-logo span{
    animation:logoTextIn .5s .25s ease both;
}
.nav-logo:hover i{
    animation:pinPulse .45s ease;
}

@keyframes pinDrop{
  0%  {transform:translateY(-18px) scale(1.3);opacity:0}
  60% {transform:translateY(4px)   scale(.9); opacity:1}
  80% {transform:translateY(-4px)  scale(1.05)}
  100%{transform:translateY(0)     scale(1)}
}
@keyframes logoTextIn{
  0%  {opacity:0;letter-spacing:.15em}
  100%{opacity:1;letter-spacing:normal}
}
@keyframes pinPulse{
  0%,100%{transform:scale(1)  rotate(0deg)}
  25%    {transform:scale(1.2) rotate(-12deg)}
  75%    {transform:scale(1.2) rotate(12deg)}
}

.nav-search {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--light-bg);
    border: 1.5px solid var(--border);
    border-radius: 25px;
    overflow: hidden;
    max-width: 500px;
}

.nav-search input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
}

.nav-search button {
    background: var(--primary);
    border: none;
    color: white;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-mid);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

.btn-signin {
    border: 1.5px solid var(--primary) !important;
    color: var(--primary) !important;
    padding: 8px 18px;
    border-radius: 25px;
}

.btn-join {
    background: var(--primary);
    color: white !important;
    padding: 8px 18px;
    border-radius: 25px;
}

.btn-join:hover {
    background: var(--primary-dark) !important;
}

.hamburger {
    display: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-dark);
    margin-left: auto;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    background: white;
    padding: 10px 20px;
    border-top: 1px solid var(--border);
}

.mobile-menu a {
    padding: 12px 0;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 15px;
    border-bottom: 1px solid var(--border);
}

.mobile-menu.open {
    display: flex;
}

/* ===== HERO ===== */
.hero {
    background: linear-gradient(135deg, #0a66c2 0%, #004182 60%, #002855 100%);
    color: white;
    padding: 70px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
}

.hero-content {
    max-width: 580px;
}

.hero-content h1 {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 14px;
}

.hero-content p {
    font-size: 18px;
    opacity: 0.85;
    margin-bottom: 28px;
}

.hero-search {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.hero-search input {
    flex: 1;
    min-width: 160px;
    padding: 14px 18px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
}

.hero-search button {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.hero-search button:hover {
    background: #d48800;
}

.hero-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-tags span {
    background: rgba(255,255,255,0.15);
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-tags span:hover {
    background: rgba(255,255,255,0.3);
}

.hero-card {
    background: rgba(255,255,255,0.12);
    border-radius: var(--radius);
    padding: 30px;
    display: flex;
    gap: 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.stat-box {
    text-align: center;
    padding: 16px 20px;
}

.stat-box h3 {
    font-size: 32px;
    font-weight: 800;
    color: var(--secondary);
}

.stat-box p {
    font-size: 13px;
    opacity: 0.8;
    margin-top: 4px;
}

/* ===== SECTIONS COMMON ===== */
.section-header {
    text-align: center;
    margin-bottom: 36px;
}

.section-header h2 {
    font-size: 30px;
    font-weight: 700;
    color: var(--text-dark);
}

.section-header p {
    color: var(--text-mid);
    margin-top: 8px;
    font-size: 15px;
}

/* ===== CHOOSE TYPE MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal-overlay.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-box {
    background: white;
    border-radius: 20px;
    padding: 36px 32px 28px;
    max-width: 560px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.modal-header {
    text-align: center;
    margin-bottom: 28px;
}

.modal-logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.modal-header p {
    color: var(--text-mid);
    font-size: 14px;
}

.modal-type-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.modal-type-card {
    text-decoration: none;
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 16px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafafa;
    display: block;
}

.modal-type-card:hover {
    border-color: var(--primary);
    background: #e8f0fe;
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(10,102,194,0.15);
}

.modal-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 22px;
}

.modal-icon.blue   { background: #e8f0fe; color: #0a66c2; }
.modal-icon.green  { background: #e6f4ea; color: #2e7d32; }
.modal-icon.orange { background: #fff3e0; color: #e65100; }
.modal-icon.purple { background: #f3e5f5; color: #6a1b9a; }
.modal-icon.red    { background: #fce4ec; color: #c62828; }

.modal-type-card h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 3px;
}

.modal-type-card p {
    font-size: 11px;
    color: var(--text-light);
}

.modal-footer {
    text-align: center;
    border-top: 1px solid var(--border);
    padding-top: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.modal-footer p {
    font-size: 13px;
    color: var(--text-mid);
}

.modal-footer p a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.modal-skip {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-skip:hover { color: var(--text-dark); }

@media (max-width: 480px) {
    .modal-type-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .modal-box { padding: 24px 16px 20px; }
}

/* ===== CATEGORIES ===== */
.categories {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 28px;
}

.tab-btn {
    padding: 9px 24px;
    border: 2px solid var(--border);
    background: white;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-mid);
    transition: all 0.2s;
}

.tab-btn.active, .tab-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
}

.cat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border-top: 4px solid transparent;
}

.cat-card.white-collar {
    border-top-color: var(--white-collar);
}

.cat-card.blue-collar {
    border-top-color: var(--blue-collar);
}

.cat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.cat-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 22px;
    background: var(--light-bg);
    color: var(--primary);
}

.blue-collar .cat-icon {
    color: var(--blue-collar);
}

.cat-card h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}

.cat-card span {
    font-size: 13px;
    color: var(--text-light);
    background: var(--light-bg);
    padding: 3px 10px;
    border-radius: 12px;
}

/* ===== FEATURED JOBS ===== */
.featured-jobs {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
    text-align: left;
}

.section-header h2 {
    font-size: 26px;
}

.view-all {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.job-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border);
}

.job-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.company-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #e8f0fe;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary);
}

.blue-logo {
    background: #fff0e6;
    color: var(--blue-collar);
}

.job-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.white-badge {
    background: #e8f0fe;
    color: var(--primary);
}

.blue-badge {
    background: #fff0e6;
    color: var(--blue-collar);
}

.job-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.company-name, .job-location {
    font-size: 13px;
    color: var(--text-mid);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.job-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 14px 0;
}

.job-tags span {
    background: var(--light-bg);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    color: var(--text-mid);
    font-weight: 500;
}

.apply-btn {
    width: 100%;
    padding: 10px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.apply-btn:hover {
    background: var(--primary-dark);
}

/* ===== SPONSORS ===== */
.sponsors {
    background: white;
    padding: 50px 20px;
    margin: 40px 0;
}

.sponsors .section-header {
    flex-direction: column;
    text-align: center;
    align-items: center;
}

.sponsor-join-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 22px;
    background: var(--secondary);
    color: white;
    border-radius: 25px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.sponsor-join-btn:hover {
    background: #d48800;
}

.sponsors-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.sponsor-card {
    background: var(--light-bg);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
}

.sponsor-card:hover {
    border-color: var(--primary);
    background: white;
    box-shadow: var(--shadow);
}

.sponsor-add {
    border: 2px dashed var(--border);
    background: white;
}

.sponsor-add:hover {
    border-color: var(--secondary);
}

.sponsor-logo {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 24px;
    color: var(--primary);
    box-shadow: var(--shadow);
}

.sponsor-add .sponsor-logo {
    color: var(--secondary);
}

.sponsor-card h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.sponsor-card p {
    font-size: 12px;
    color: var(--text-light);
}

/* ===== HOW IT WORKS ===== */
.how-it-works {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

.step {
    background: white;
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
}

.step-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 26px;
    color: white;
}

.step h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.step p {
    font-size: 13px;
    color: var(--text-mid);
    line-height: 1.5;
}

/* ===== FOOTER ===== */
.footer {
    background: #1d2226;
    color: #b0b7bc;
    padding: 50px 20px 0;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-brand h3 {
    color: white;
    font-size: 20px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-brand p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 18px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 16px;
    transition: background 0.2s;
}

.social-links a:hover {
    background: var(--primary);
}

.footer-links h4 {
    color: white;
    font-size: 15px;
    margin-bottom: 16px;
}

.footer-links a {
    display: block;
    color: #b0b7bc;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 10px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    padding: 18px 0;
    font-size: 13px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-search {
        display: none;
    }

    .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .hero {
        padding: 40px 20px;
        flex-direction: column;
        gap: 30px;
    }

    .hero-content h1 {
        font-size: 28px;
    }

    .hero-card {
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 480px) {
    .hero-search {
        flex-direction: column;
    }

    .hero-search input,
    .hero-search button {
        width: 100%;
        box-sizing: border-box;
    }

    .jobs-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 { font-size: 22px; }
    .hero p  { font-size: 14px; }

    /* Prevent horizontal overflow globally */
    .container, .section-wrap, .ar-wrap, .ar-wrap-sm { padding-left: 12px; padding-right: 12px; }
}

/* Global overflow guard */
*, *::before, *::after { box-sizing: border-box; }
img, video { max-width: 100%; }
.overflow-x-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* post_job / edit_job form on mobile */
@media (max-width: 600px) {
    .pj-section { padding: 16px 12px; }
    .pj-row { grid-template-columns: 1fr !important; }
    .pj-topbar-actions a, .pj-topbar-actions button { font-size: 12px; padding: 7px 10px; }
}
