/* ===== GLOBAL ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

/* ===== HEADER ===== */
header {
    background: linear-gradient(90deg,#3b82f6,#ff9800);
    color: #fff;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header h1 {
    font-size: 1.35rem;
}

nav ul {
    display: flex;
    list-style: none;
}

nav li {
    margin-left: 20px;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s;
}

nav a:hover { opacity: 0.85; }
nav a.active { border-bottom: 2px solid #ffeb3b; color: #ffeb3b; font-weight: 600; }

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 20px;
    cursor: pointer;
}

.menu-toggle span {
    height: 3px;
    background: #fff;
    border-radius: 3px;
    display: block;
}

.close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 26px;
    color: #fff;
    cursor: pointer;
    display: none;
}

/* ===== MOBILE HEADER ===== */
@media(max-width: 768px){
    .menu-toggle { display: flex; }
    header h1 { order: 1; }
    .menu-toggle { order: 2; }

    nav ul {
        position: fixed;
        top: 0;
        right: -280px;
        height: 100%;
        width: 280px;
        flex-direction: column;
        background: linear-gradient(90deg,#4C2C96,#4634A7);
        padding-top: 80px;
        list-style: none;
        transition: right 0.25s;
        z-index: 1200;
    }

    nav ul.active { right: 0; }
    nav ul li { margin: 20px 0; text-align: center; }
    nav li { margin-left: 0; }
    .close-btn { display: block; }
}

/* ===== HERO ===== */
.hero {
    padding: 100px 18px;
    text-align: center;
    color: #fff;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('../images/bj-slide-img.jpg') no-repeat center center;
    background-size: cover;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero h2 { font-size: 1.9rem; margin-bottom: 18px; }

.search-bar {
    display: flex;
    max-width: 720px;
    margin: 0 auto;
    gap: 10px;
    flex-wrap: wrap;
}

.search-bar input {
    flex: 1;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

.search-bar button, #clearBtn, #downloadBtn {
    background: linear-gradient(90deg, #3b82f6, #ff9800);
    color: #fff;
    border: 0;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.search-bar button:hover, #clearBtn:hover, #downloadBtn:hover {
    background: linear-gradient(90deg, #ff9800, #3b82f6);
}

@media(max-width: 768px){
    .hero { padding: 70px 18px; }
    .hero h2 { font-size: 1.5rem; }
}

/* ===== JOB GRID ===== */
.jobs { padding: 36px 18px 60px; background: #fff; }
.jobs h3 { text-align: center; margin-bottom: 22px; font-size: 1.4rem; }

.job-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(4,1fr);
}

@media(max-width:1100px){ .job-grid { grid-template-columns: repeat(3,1fr); } }
@media(max-width:800px){ .job-grid { grid-template-columns: repeat(2,1fr); } }
@media(max-width:480px){ .job-grid { grid-template-columns: repeat(1,1fr); } }

/* ===== JOB CARD ===== */
.job-card {
    position: relative;
    overflow: visible;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 16px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    box-sizing: border-box;
    transition: transform 0.3s, box-shadow 0.3s;
}

.job-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    border-color: #ff9800;
}

.jc-top { display: flex; gap: 12px; align-items: flex-start; }
.jc-logo { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.jc-info h4 { font-size: 1rem; margin-bottom: 6px; }
.jc-info p { font-size: 0.9rem; color: #374151; }
.salary { margin-top: 8px; font-weight: 700; color: #0ea5e9; }
.job-meta { font-size: 0.82rem; color: #6b7280; margin-top: 6px; }

/* ===== JOB BUTTONS ===== */
.job-buttons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.job-buttons a {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 44px;
    padding: 0 16px;
    border-radius: 6px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
}

.job-buttons .view-link {
    background: linear-gradient(90deg,#4a90e2,#f2994a);
}

.job-buttons .share-link {
    background: linear-gradient(90deg, #10b981, #059669);
    color: #fff;
    border-radius: 6px;
    padding: 10px 16px;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: background 0.2s;
}

.share-link > *:first-child { margin-right: 6px; }

@media(max-width: 480px){
    .job-buttons { flex-direction: column; gap: 8px; }
    .job-buttons a { width: 100%; height: auto; padding: 12px 0; }
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 14px;
}

.modal.show { display: flex; }

.modal-box {
    width: 95%;
    max-width: 560px;
    max-height: 75vh;
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;   /* OK */
    overflow: hidden;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    z-index: 2;
}

.modal-scroll {
    margin-top: 30px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}

.modal-scroll ul {
    list-style: none;
    padding-left: 0;
}

.modal-scroll li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 6px;
    line-height: 1.5;
}

.modal-scroll li::before {
    content: "•";
    position: absolute;
    left: 0;
    font-weight: bold;
    color: #374151;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

@media(max-width:480px){
    .modal-box { max-height: 92vh; padding: 18px; border-radius: 16px; }
    .modal-scroll { margin-top: 34px; }
}

/* ===== RIBBON ===== */
.ribbon {
    position: absolute;
    top: 0;
    right: 0;
    color: #fff;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-bottom-left-radius: 6px;
    border-top-right-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    opacity: 0.6;
    transform: translateY(-5px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.job-card:hover .ribbon {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.ribbon.latest { background: linear-gradient(135deg, #8e2de2, #4a00e0); }
.ribbon.closing { background: linear-gradient(135deg, #28a745, #ffeb3b); color: #000; }

/* Closing Soon blink effect */
@keyframes blink {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0.3; }
}

.ribbon.closing {
    animation: blink 2s infinite;
}

/* ===== ANNOUNCEMENT ===== */
.announcement {
    width: 100%;
    background: #fffbeb;
    color: #b45309;
    padding: 8px 0;
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
    margin-bottom: 16px;
    border-radius: 6px;
    font-weight: 600;
}

.announcement span {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 15s linear infinite;
}

@keyframes marquee { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

/* ===== TERMS BAR ===== */
#termsBar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg,#3b82f6,#ff9800);
    color: #fff;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    font-size: 0.95rem;
    z-index: 1500;
    gap: 12px;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out;
}

#termsBar.show { transform: translateY(0); opacity: 1; animation: bounceIn 0.6s ease forwards; }

#acceptTerms {
    background: #fff;
    color: #3b82f6;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

#acceptTerms:hover { transform: scale(1.08); background: #f3f4f6; color: #2563eb; }

@keyframes bounceIn {
    0% { transform: translateY(100%) scaleY(0.8); opacity: 0; }
    60% { transform: translateY(-10%) scaleY(1.05); opacity: 1; }
    80% { transform: translateY(5%) scaleY(0.98); }
    100% { transform: translateY(0) scaleY(1); }
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    background: #0f1724;
    color: #9ca3af;
    padding: 20px 10px;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.fb-link { color: #3b82f6; font-weight: 600; text-decoration: none; }
.fb-link:hover { color: #60a5fa; }

/* ===== LOGO ===== */
.logo-img { max-height: 80px; max-width: 200px; width: auto; height: auto; display: block; }

/* ===== SCROLL UP ===== */
#scrollUp {
    display: none;
    position: fixed;
    bottom: 40px;
    right: 20px;
    z-index: 1000;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
    transition: 0.3s;
}

#scrollUp:hover { background: #2563eb; }

/* ===== PAGINATION ===== */
.pagination {
    text-align: center;
    margin-top: 26px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px; /* spacing between buttons */
}

.pagination a {
    display: inline-flex;          /* center content */
    justify-content: center;
    align-items: center;
    width: 40px;                   /* fixed width */
    height: 40px;                  /* fixed height */
    text-align: center;
    background: #3b82f6;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s, transform 0.2s;
}

.pagination a:hover {
    background: #2563eb;
    transform: scale(1.05);       /* subtle hover effect */
}

.pagination a.current {
    background: #ff9800;
    font-weight: 600;              /* bold but width stays fixed */
}

/* ===== MOBILE ===== */
@media (max-width: 480px) {
    .pagination a {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}

