/* ==========================================================================
   RohithBuilds Placement Portal stylesheet - Clean, Modern Jobs Board
   ========================================================================== */

/* Container & Header */
.jobs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 5rem 1.5rem;
}

.jobs-header {
    text-align: center;
    margin-bottom: 3rem;
}

.jobs-header-badge {
    display: inline-block;
    background: rgba(251, 191, 36, 0.08);
    color: var(--primary-dark);
    border: 1px solid rgba(251, 191, 36, 0.25);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 5px 12px;
    border-radius: 30px;
    margin-bottom: 0.8rem;
}

.jobs-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
}

.jobs-subtitle {
    color: var(--text-light);
    font-size: 1.05rem;
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Main Layout Grid */
.jobs-board-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
    align-items: start;
    margin-top: 1rem;
}

/* Sidebar Filters (Left Column) */
.jobs-sidebar {
    position: sticky;
    top: 100px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    transition: all 0.3s ease;
}

/* Sidebar Backdrop Overlay on Mobile */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1009; /* sits just below mobile sidebar z-index 1010 */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.sidebar-header-mobile {
    display: none;
}

.sidebar-group {
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
}

.sidebar-group:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.sidebar-group-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    font-weight: 700;
    margin: 0 0 10px 0;
}

/* Search Box Group */
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon-span {
    position: absolute;
    left: 12px;
    color: var(--text-lighter);
    font-size: 0.9rem;
    pointer-events: none;
}

.sidebar-search-input {
    width: 100%;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.65rem 2.2rem 0.65rem 2rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    outline: none;
    transition: all 0.2s;
}

.sidebar-search-input:focus {
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
}

.search-clear-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-lighter);
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
}

.search-clear-btn:hover {
    color: var(--text);
}

/* Sidebar Links */
.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background: var(--surface-hover);
    color: var(--accent);
}

.sidebar-link.active {
    background: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 700;
    border-left-color: var(--primary);
}

.sidebar-reset-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    color: var(--text-light);
    padding: 8px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-reset-btn:hover {
    background: rgba(239, 68, 68, 0.06);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

/* Main Content Area */
.jobs-main-content {
    flex: 1;
}

.jobs-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.total-jobs-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-light);
}

.total-jobs-badge {
    color: var(--accent);
    font-weight: 800;
    background: rgba(251, 191, 36, 0.15);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.mobile-filter-trigger-btn {
    display: none;
    background: var(--primary);
    color: #111827;
    border: none;
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.mobile-filter-trigger-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* Job Cards Stack (New Layout) */
.jobs-list-layout {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.job-card-new {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.job-card-new:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Logo & Company info */
.job-card-top {
    display: flex;
    gap: 16px;
    margin-bottom: 1rem;
}

.job-card-logo-container {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
    border: 1px solid var(--border-light);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.job-card-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.job-card-logo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-light);
    background: var(--accent-light);
    width: 100%;
    height: 100%;
}

.job-card-header-details {
    flex: 1;
}

.job-card-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.job-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent);
    margin: 0;
    line-height: 1.3;
}

.badge-new-job {
    background: #fef08a;
    color: #854d0e;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border: 1px solid #fde047;
}

.badge-applied-job {
    background: #d1fae5;
    color: #065f46;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border: 1px solid #a7f3d0;
}

.job-card-company {
    display: block;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 2px;
}

/* Meta badges */
.job-card-meta-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.meta-tag-badge {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 600;
    color: var(--text-light);
    background: var(--surface-alt);
    border: 1px solid var(--border);
}

/* Skills list */
.job-card-skills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 1rem;
}

.job-card-skill-badge {
    font-size: 0.72rem;
    background: var(--border-light);
    color: var(--text);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 500;
}

.job-card-skill-badge-more {
    font-size: 0.72rem;
    background: transparent;
    color: var(--text-light);
    padding: 2px 6px;
    font-weight: 700;
}

/* Syllabus outcome match block */
.job-card-syllabus-fit {
    background: rgba(251, 191, 36, 0.03);
    border-left: 3px solid var(--primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 8px 12px;
    margin-bottom: 1.25rem;
}

.syllabus-fit-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 2px;
}

.syllabus-fit-desc {
    color: var(--text-light);
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
}

/* Footer & Actions */
.job-card-footer-new {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-light);
    padding-top: 1rem;
}

.job-card-views-info {
    font-size: 0.8rem;
    color: var(--text-lighter);
    display: flex;
    align-items: center;
    gap: 6px;
}

.bullet-divider {
    color: var(--border);
}

.job-card-actions-new {
    display: flex;
    gap: 8px;
}

.btn-secondary-details {
    background: var(--surface-alt);
    color: var(--text-light);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary-details:hover {
    background: var(--border-light);
    color: var(--accent);
    border-color: var(--text-lighter);
}

.btn-primary-apply {
    background: var(--primary);
    color: var(--accent);
    border: none;
    padding: 7px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
}

.btn-primary-apply:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* Empty State */
.jobs-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.jobs-empty-state h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    margin: 0 0 0.5rem 0;
    color: var(--accent);
}

.jobs-empty-state p {
    color: var(--text-light);
    font-size: 0.95rem;
    max-width: 400px;
    margin: 0 auto 1.5rem auto;
    line-height: 1.5;
}

.btn-reset-empty {
    display: inline-block;
    background: var(--primary);
    color: var(--accent);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-reset-empty:hover {
    background: var(--primary-hover);
}

/* ==========================================================================
   Slide-out Details Drawer Panels
   ========================================================================== */
.job-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.job-drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.job-details-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 550px;
    height: 100%;
    background: var(--surface);
    border-left: 1px solid var(--border);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-xl);
}

.job-details-drawer.active {
    transform: translateX(0);
}

/* Drawer Header */
.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--surface);
}

.drawer-header-left {
    display: flex;
    gap: 12px;
    align-items: center;
    flex: 1;
}

.drawer-logo-container {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
    border: 1px solid var(--border-light);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.drawer-header-title-block {
    flex: 1;
}

.drawer-job-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
    margin: 0;
    line-height: 1.3;
}

.drawer-company-name {
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.9rem;
    margin: 2px 0 0 0;
}

.drawer-close-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.drawer-close-btn:hover {
    color: var(--accent);
}

/* Drawer Body Content */
.drawer-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.drawer-section {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1.5rem;
}

.drawer-section.last {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.drawer-section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    margin: 0 0 12px 0;
}

/* Syllabus match details in drawer */
.syllabus-match-section {
    background: rgba(251, 191, 36, 0.05);
    border: 1px dashed rgba(251, 191, 36, 0.4);
    border-radius: var(--radius-sm);
    padding: 1rem;
    border-bottom: none;
}

.syllabus-match-heading {
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 6px;
}

.syllabus-match-text {
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* Metadata Overview Cards */
.drawer-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.drawer-meta-card {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
}

.meta-card-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-light);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.meta-card-value {
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 600;
    margin-top: 3px;
}

/* Description Typography */
.drawer-description-text {
    font-size: 0.92rem;
    color: var(--text);
    line-height: 1.6;
}

.drawer-description-text p {
    margin: 0 0 10px 0;
}

.drawer-description-text ul {
    padding-left: 1.25rem;
    margin: 0 0 15px 0;
}

.drawer-description-text li {
    margin-bottom: 5px;
}

/* Drawer Sticky Footer */
.drawer-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-light);
    background: var(--surface);
    display: flex;
}

.drawer-apply-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--primary);
    color: var(--accent);
    padding: 12px;
    border-radius: var(--radius-sm);
    font-weight: 750;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(251, 191, 36, 0.2);
}

.drawer-apply-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(251, 191, 36, 0.3);
}

/* ==========================================================================
   Mobile & Responsive Adaptations
   ========================================================================== */
@media (max-width: 992px) {
    .jobs-board-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .jobs-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        max-width: 320px;
        height: 100%;
        max-height: 100vh;
        z-index: 1010;
        border-radius: 0;
        transform: translateX(-100%);
        box-shadow: var(--shadow-xl);
    }

    .jobs-sidebar.active {
        transform: translateX(0);
    }

    .sidebar-header-mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1.5rem;
        border-bottom: 1px solid var(--border);
        padding-bottom: 0.75rem;
    }

    .sidebar-header-mobile h3 {
        margin: 0;
        font-family: 'Space Grotesk', sans-serif;
    }

    .close-sidebar-btn {
        background: none;
        border: none;
        font-size: 1.4rem;
        color: var(--text-light);
        cursor: pointer;
    }

    .mobile-filter-trigger-btn {
        display: flex;
        align-items: center;
        gap: 6px;
    }
}

@media (max-width: 768px) {
    .jobs-container {
        padding: 1.5rem 1rem;
    }

    .jobs-title {
        font-size: 2rem;
    }

    .job-card-footer-new {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding-right: 64px; /* Leave space for floating chatbot toggle */
    }

    .job-card-views-info {
        justify-content: center;
    }

    .job-card-actions-new {
        width: 100%;
    }

    .job-card-actions-new button,
    .job-card-actions-new a {
        flex: 1;
        text-align: center;
        justify-content: center;
    }

    .job-details-drawer {
        max-width: 100%;
    }
}

/* ==========================================================================
   Pagination Styling
   ========================================================================== */
.jobs-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.page-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
    background: var(--surface);
}

.page-number:hover {
    border-color: var(--primary);
    color: var(--accent);
    background: var(--surface-hover);
    transform: translateY(-1px);
}

.page-number.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--accent);
    font-weight: 750;
    box-shadow: 0 4px 10px rgba(251, 191, 36, 0.2);
}

.page-dots {
    color: var(--text-lighter);
    font-weight: 600;
    padding: 0 4px;
}

.page-nav-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    transition: all 0.2s;
}

.page-nav-btn:hover:not(.disabled) {
    border-color: var(--primary);
    color: var(--accent);
    background: var(--surface-hover);
    transform: translateY(-1px);
}

.page-nav-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--surface-alt);
    border-color: var(--border-light);
    color: var(--text-lighter);
}

