@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* --- Reset & Core --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-y: scroll;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* --- Universal Header Styles --- */
.site-header {
    width: 100%;
    height: 70px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.header-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 50px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 32px;
    height: 100%;
}

.header-brand {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding-right: 28px;
    margin-right: 4px;
    border-right: 1px solid #e2e8f0;
}

.logo-link {
    display: block;
    line-height: 0;
}

.logo-link img {
    height: 50px;
    width: auto;
    max-width: 200px;
    display: block;
    object-fit: contain;
    object-position: left center;
}

.main-nav {
    display: flex;
    flex: 1;
    justify-content: center;
    gap: 23px;
    align-items: flex-end;
    height: 50px;
    padding-bottom: 0;
    min-width: 0;
}

.main-nav a {
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    color: #64748b;
    padding: 13px 0 3px 0;
    border-bottom: 3px solid transparent;
    transition: none !important;
}

.main-nav a:hover {
    color: #0f172a;
    border-bottom-color: #cbd5e1;
}

.active-link {
    color: #0f172a !important;
}

.nav-jobs.active-link {
    border-bottom-color: #008DD2 !important;
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 100%;
    flex-shrink: 0;
    margin-left: auto;
}

.nav-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: none !important;
}

.btn-login {
    background: #0f172a;
    color: white;
}

.btn-login:hover {
    background: #334155;
}

/* --- Layout Specifics --- */
.page-wrapper {
    padding: 20px 15px;
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
}

.classifieds-filter-bar {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.filter-item {
    display: flex;
    align-items: center;
    background: #f8fafc;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.filter-item select {
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: #334155;
    font-weight: 500;
    cursor: pointer;
}

.search-filter {
    background: #f1f5f9;
    width: 450px;
}

.search-filter input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    width: 100%;
    color: #334155;
}

.header-actions-group {
    display: flex;
    gap: 10px;
}

.post-ad-btn {
    background: #1e293b;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.post-ad-btn.blue-btn {
    background: #008DD2;
}

.post-ad-btn:hover {
    opacity: 0.9;
}

/* Grid Cards */
.dual-columns-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.dual-col {
    background: transparent;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.red {
    background: #ffeeee;
    color: #D92226;
}

.badge.blue {
    background: #e0f2fe;
    color: #008DD2;
}

.vertical-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* --- New V2 Card Design (from image) --- */
.job-card-v2 {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    height: 160px;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    padding: 0 15px;
}

.job-card-v2:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Logo Box (Employer) - Slightly Rounded */
.logo-box {
    width: 100px;
    height: 100px;
    border: 3px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    /* Little bit round corner */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    flex-shrink: 0;
    font-weight: 600;
    font-size: 20px;
    color: #333;
}

/* Employee Box - Perfect Round */
.avatar-box {
    width: 100px;
    height: 100px;
    border: 3px solid rgba(0, 0, 0, 0.12);
    border-radius: 50%;
    /* Employee place round */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    flex-shrink: 0;
    font-weight: 500;
    font-size: 16px;
    color: #333;
}

/* Card Content */
.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 10px 0 0 0;
    /* Removed side/bottom padding for footer to span full width */
}

.card-content .card-title,
.card-content .card-snippet {
    padding: 0 15px;
    /* Re-added padding for text only */
}

.card-content .card-title {
    font-size: 18px;
    /* Slightly reduced for better balance */
    font-weight: 700;
    color: #000;
    text-align: center;
    margin-bottom: 2px;
}

.company-name {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-align: center;
    margin-bottom: 6px;
}

.card-content .card-snippet {
    font-size: 11px;
    color: #333;
    text-align: center;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* Compatibility fix */
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 5px;
}

.card-footer-info {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 500;
    color: #333;
    padding: 8px 15px;
    /* Added internal padding */
    background: #f8fafc;
    /* Light background for footer */
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    /* Subtle separation */
    margin-top: auto;
    /* Push to bottom */
}

.salary-tag {
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 700;
    color: #0f172a;
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-action {
    background: #D92226;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 11px;
    /* Slightly smaller to fit label */
    cursor: pointer;
    white-space: nowrap;
}

.btn-action.btn-contact {
    background: #008DD2;
}

.btn-action:hover {
    opacity: 0.9;
}

/* --- Details Wrapper & Layout --- */
.details-wrapper {
    padding: 40px 15px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
}

.container-narrow {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    text-align: right;
    /* Move back button to right */
}

.details-layout {
    background: white;
    border-radius: 16px;
    border: 5px solid rgba(0, 0, 0, 0.12);
    /* Matching new style */
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.back-link {
    display: inline-block;
    margin-bottom: 15px;
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
}

.back-link:hover {
    color: #0f172a;
}

/* Details Header */
.details-header-box {
    padding: 30px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.company-logo-large {
    width: 80px;
    height: 80px;
    background: white;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

.candidate-avatar-large {
    width: 80px;
    height: 80px;
    background: white;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    object-fit: cover;
}

.title-group h1 {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.company-p {
    font-size: 16px;
    font-weight: 500;
    color: #64748b;
}

/* Details Grid Layout */
.details-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    padding: 30px;
}

.info-section {
    margin-bottom: 30px;
}

.info-section h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
}

.info-section p {
    font-size: 15px;
    line-height: 1.6;
    color: #475569;
}

.requirements-list {
    list-style: none;
}

.requirements-list li {
    font-size: 15px;
    color: #475569;
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
}

.requirements-list li::before {
    content: "✓";
    color: #D92226;
    font-weight: 700;
}

/* Action Card */
.action-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
}

.salary-box {
    margin-bottom: 20px;
}

.salary-box span {
    font-size: 13px;
    color: #64748b;
    display: block;
    margin-bottom: 5px;
}

.salary-box h2 {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
}

.apply-now-btn,
.contact-now-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: #D92226;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    transition: opacity 0.2s;
}

.contact-now-btn {
    background: #008DD2;
}

.apply-now-btn:hover,
.contact-now-btn:hover {
    opacity: 0.9;
}

/* Quick Info List */
.quick-info-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.info-item .icon {
    font-size: 20px;
}

.info-item label {
    display: block;
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
}

.info-item strong {
    display: block;
    font-size: 14px;
    color: #1e293b;
}

.site-footer {
    background: white;
    border-top: 1px solid #e2e8f0;
    padding: 32px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
    margin-top: auto;
}

/* --- Form Styles (Post Job / Upload CV) --- */
.form-toggle-wrapper {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.toggle-btn {
    background: white;
    border: 3px solid #e2e8f0;
    padding: 12px 25px;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    min-width: 180px;
}

.toggle-btn.active {
    border-color: #D92226;
    background: #fff5f5;
}

.toggle-btn span {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

.toggle-btn small {
    font-size: 12px;
    color: #64748b;
}

.form-container {
    display: none;
    background: white;
    padding: 40px;
    border-radius: 16px;
    border: 5px solid rgba(0, 0, 0, 0.12);
    /* Matching user's favorite style */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.3s ease-out;
}

.form-container.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-header h2 {
    font-size: 24px;
    color: #0f172a;
    margin-bottom: 5px;
}

.form-header p {
    color: #64748b;
    font-size: 14px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #D92226;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.red-btn {
    background: #D92226;
    color: white;
}

.blue-btn-submit {
    background: #008DD2;
    color: white;
}

.submit-btn:hover {
    opacity: 0.9;
}

@media (max-width: 1024px) {
    .dual-columns-container {
        grid-template-columns: 1fr;
    }

    .page-wrapper {
        padding: 20px 20px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-container {
        padding: 20px;
    }

    .details-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .details-header-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 20px;
    }
}

/* Tablet Responsiveness */
@media (max-width: 768px) {
    .classifieds-filter-bar {
        flex-direction: column;
        padding: 10px;
    }
    .search-filter {
        width: 100%;
    }
    .header-actions-group {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    .post-ad-btn {
        flex: 1;
        margin: 0 5px;
        text-align: center;
    }
    .job-card-v2 {
        height: auto;
        padding: 15px;
        flex-direction: column;
    }
    .logo-box, .avatar-box {
        margin-left: 0;
        margin-bottom: 10px;
    }
    .card-content {
        padding: 0;
    }
    .card-footer-info {
        flex-direction: column;
        gap: 10px;
        padding: 12px 15px;
    }
    .action-buttons {
        width: 100%;
        justify-content: center;
    }
    .btn-action {
        width: 100%;
        text-align: center;
    }
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .section-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    .card-content .card-title {
        font-size: 16px;
    }
    .company-name {
        font-size: 12px;
    }
    .card-content .card-snippet {
        font-size: 11px;
    }
}