/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif;
    background-color: #f8f9fa;
    color: #1a1a1a;
    line-height: 1.6;
}

/* Page Layout */
.page-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ========================================
   SIDEBAR STYLES
======================================== */
.sidebar {
    width: 280px;
    background-color: #ffffff;
    border-right: 1px solid #e5e7eb;
    padding: 24px 20px;
    overflow-y: auto;
    position: sticky;
    top: 0;
    height: 100vh;
}

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

.sidebar-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}

.clear-all-link {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #00897b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
}

.clear-all-link:hover {
    color: #00695c;
}

/* Filter Groups */
.filter-group {
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 16px;
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    padding: 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2e7d32;
    cursor: pointer;
    transition: color 0.2s;
}

.filter-header:hover {
    color: #1b5e20;
}

.filter-header .chevron {
    transition: transform 0.3s;
}

.filter-header.collapsed .chevron {
    transform: rotate(-90deg);
}

.filter-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.filter-content.active {
    max-height: 1000px;
    padding-top: 8px;
}

/* Checkbox Styles */
.checkbox-label {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
    position: relative;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.checkbox-label:hover .checkmark {
    border-color: #2e7d32;
}

.checkbox-label input[type="checkbox"]:checked ~ .checkmark {
    background-color: #2e7d32;
    border-color: #2e7d32;
}

.checkbox-label input[type="checkbox"]:checked ~ .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.label-text {
    font-size: 14px;
    color: #374151;
    line-height: 1.4;
}

/* Input Styles */
.other-input,
.location-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 8px;
    transition: border-color 0.2s;
}

.other-input:focus,
.location-input:focus {
    outline: none;
    border-color: #2e7d32;
}

.location-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background-color: #ffffff;
    cursor: pointer;
    transition: border-color 0.2s;
}

.location-select:focus {
    outline: none;
    border-color: #2e7d32;
}

.location-divider {
    text-align: center;
    margin: 16px 0;
    position: relative;
}

.location-divider::before,
.location-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background-color: #e5e7eb;
}

.location-divider::before {
    left: 0;
}

.location-divider::after {
    right: 0;
}

.location-divider span {
    font-size: 13px;
    color: #6b7280;
    background-color: #ffffff;
    padding: 0 12px;
    position: relative;
}

.location-checkboxes {
    margin-top: 12px;
}

/* ========================================
   MAIN CONTENT STYLES
======================================== */
.main-content {
    flex: 1;
    padding: 24px 32px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.content-header {
    margin-bottom: 24px;
}

.logo-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
}

/* Results Info */
.results-info {
    margin-bottom: 20px;
}

.results-count {
    font-size: 15px;
    color: #6b7280;
}

/* Active Filters */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.filter-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #2d5016;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.tag-remove {
    background: none;
    border: none;
    color: #2d5016;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.tag-remove:hover {
    color: #1b5e20;
}

.clear-filters-btn {
    background: none;
    border: none;
    color: #00897b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
    transition: color 0.2s;
}

.clear-filters-btn:hover {
    color: #00695c;
    text-decoration: underline;
}

/* ========================================
   JOB CARDS
======================================== */
.job-listings {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.job-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
}

.job-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.job-card.featured {
    background: linear-gradient(135deg, #2e7d32 0%, #388e3c 100%);
    color: #ffffff;
    border: none;
}

/* Job Card Header */
.job-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 20px;
}

.job-info {
    flex: 1;
}

.job-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    color: inherit;
}

.company-name {
    font-size: 15px;
    opacity: 0.9;
    color: inherit;
}

.job-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.post-time {
    font-size: 13px;
    opacity: 0.85;
    color: inherit;
    white-space: nowrap;
}

/* Job Meta Info */
.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 16px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: inherit;
    opacity: 0.85;
}

.job-card:not(.featured) .meta-item {
    color: #4b5563;
}

.meta-item svg {
    flex-shrink: 0;
}

/* Job Tags */
.job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.job-tag {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.job-card.featured .job-tag {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.job-card:not(.featured) .job-tag {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

/* Apply Button */
.apply-btn {
    position: absolute;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.job-card.featured .apply-btn {
    background: #ffffff;
    color: #2e7d32;
}

.job-card.featured .apply-btn:hover {
    background: #f5f5f5;
    transform: translateX(3px);
}

.job-card:not(.featured) .apply-btn {
    background: #2e7d32;
    color: #ffffff;
}

.job-card:not(.featured) .apply-btn:hover {
    background: #1b5e20;
    transform: translateX(3px);
}

.apply-btn svg {
    transition: transform 0.2s;
}

.apply-btn:hover svg {
    transform: translateX(2px);
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

/* Tablet */
@media (max-width: 1024px) {
    .sidebar {
        width: 260px;
    }

    .main-content {
        padding: 20px 24px;
    }
}

/* Mobile - Sidebar becomes overlay */
@media (max-width: 768px) {
    .page-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: fixed;
        top: 0;
        left: -100%;
        z-index: 1000;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        padding: 16px;
        width: 100%;
    }

    .content-header {
        margin-bottom: 20px;
    }

    .page-title {
        font-size: 24px;
    }

    .active-filters {
        margin-bottom: 20px;
    }

    .job-card {
        padding: 20px;
    }

    .job-card-header {
        flex-direction: column;
        gap: 12px;
    }

    .job-actions {
        width: 100%;
        justify-content: space-between;
    }

    .job-title {
        font-size: 20px;
    }

    .job-meta {
        gap: 16px;
    }

    .apply-btn {
        position: static;
        width: 100%;
        justify-content: center;
        margin-top: 16px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .main-content {
        padding: 12px;
    }

    .page-title {
        font-size: 20px;
    }

    .logo {
        width: 32px;
        height: 32px;
    }

    .logo svg {
        width: 32px;
        height: 32px;
    }

    .job-card {
        padding: 16px;
    }

    .job-title {
        font-size: 18px;
    }

    .filter-tag {
        font-size: 13px;
        padding: 6px 10px;
    }

    .job-tag {
        font-size: 12px;
        padding: 5px 12px;
    }

    .job-meta {
        flex-direction: column;
        gap: 8px;
    }

    .icon-btn {
        width: 32px;
        height: 32px;
    }

    .icon-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #2e7d32;
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.4);
    cursor: pointer;
    z-index: 999;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
}

/* Scrollbar Styles */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Animation for cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.job-card {
    animation: fadeInUp 0.5s ease forwards;
}

.job-card:nth-child(1) {
    animation-delay: 0.1s;
}

.job-card:nth-child(2) {
    animation-delay: 0.2s;
}

.job-card:nth-child(3) {
    animation-delay: 0.3s;
}