/* ==========================================================================
   COMPANY PAGE STYLES
   ========================================================================== */

/* Override base wrapper styles for company page */
#job-board-wrapper.company-page-wrapper {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ==========================================================================
   HEADER - Matches category page spacing
   ========================================================================== */

.company-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 200px 20px 40px 20px; /* Match category page top padding */
    margin-top: 0;
}

.company-header .container {
    max-width: 1200px;
    margin: 0 auto;
}

.header-content {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 50px;
}

.company-logo {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    color: #4ecca3; /* Brand green instead of blue */
    overflow: hidden;
    flex-shrink: 0;
    text-align: center;
}

.company-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.company-logo .logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.company-info {
    flex: 1;
    min-width: 280px;
}

.company-name {
    font-size: 32px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.company-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #64748b;
}

.meta-item a {
    color: #4ecca3;
    text-decoration: none;
}

.meta-item a:hover {
    text-decoration: underline;
}

.header-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
    flex-shrink: 0;
}

/* ==========================================================================
   COMPANY DESCRIPTION SECTION - New separate section
   ========================================================================== */

.company-description-section {
    background: white;
    padding: 40px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.company-description-section .container {
    max-width: 1200px;
    margin: 0 auto;
}

.company-description-section .section-title {
    font-size: 24px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 20px 0;
}

.company-description-content {
    font-size: 15px;
    line-height: 1.7;
    color: #475569;
}

.company-description-content p {
    margin: 0 0 16px 0;
}

.company-description-content p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   MAIN CONTENT
   ========================================================================== */

.company-main {
    padding: 32px 0;
    background: white;
    min-height: 60vh;
}

.company-main .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Updated grid - narrower sidebar for 3-column job grid */
.main-content {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 24px;
}

/* Full width when no sidebar */
.main-content.no-sidebar {
    grid-template-columns: 1fr;
}

.content-primary {
    min-width: 0;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
}

.btn-secondary {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    text-decoration: none;
}

/* ==========================================================================
   CARDS
   ========================================================================== */

.card {
    background: white;
    border-radius: 12px;
    border: none;
    padding: 24px;
    margin-bottom: 24px;
}

.card:last-child {
    margin-bottom: 0;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title svg {
    color: #64748b;
    flex-shrink: 0;
}

.jobs-count {
    margin-left: auto;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
}

/* ==========================================================================
   JOB LISTINGS
   ========================================================================== */

.jobs-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.job-listing {
    display: block;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    transition: all 0.2s;
    background: white;
}

.job-listing:hover {
    border-color: #4ecca3;
    background: #f8fafc;
    text-decoration: none;
}

.job-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 8px;
    line-height: 1.4;
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.job-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #64748b;
}

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

.job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.job-tag {
    display: inline-block;
    padding: 4px 8px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    border-radius: 4px;
}

.no-jobs-message {
    padding: 40px 20px;
    text-align: center;
    color: #64748b;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */

.quick-facts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fact-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.fact-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.fact-label {
    font-size: 14px;
    color: #64748b;
}

.fact-value {
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
    text-align: right;
}

.fact-value a {
    color: #4ecca3;
    text-decoration: none;
}

.fact-value a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */

.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.pagination-wrapper a,
.pagination-wrapper span {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
}

.pagination-wrapper a {
    background: white;
    border: 1px solid #e2e8f0;
    color: #374151;
}

.pagination-wrapper a:hover {
    background: #f1f5f9;
    border-color: #4ecca3;
    color: #4ecca3;
}

.pagination-wrapper span.current {
    background: #4ecca3;
    color: #000;
    border: 1px solid #4ecca3;
}

.pagination-wrapper .dots {
    background: none;
    border: none;
}

/* ==========================================================================
   JOB LISTINGS GRID - 3 Column Layout
   ========================================================================== */

/* Remove padding from card to maximize space */
.content-primary .card {
    padding: 0;
    overflow: visible;
}

.jobs-grid-container {
    margin: 0;
    padding-top: 16px;
}

/* Grid container */
.company-job-listings.job_listings {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    list-style-type: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Card styling */
.company-job-listings .job-card {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
}

/* 2 columns on medium screens */
@media (max-width: 1100px) {
    .company-job-listings.job_listings {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

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

@media (max-width: 968px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .content-sidebar {
        order: -1;
    }
    
    .company-job-listings.job_listings {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 640px) {
    .company-header {
        padding: 120px 20px 24px 20px;
    }
    
    .header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .company-meta {
        justify-content: center;
    }
    
    .header-actions {
        width: 100%;
        align-items: stretch;
    }
    
    .company-name {
        font-size: 24px;
    }
    
    .company-logo {
        width: 80px;
        height: 80px;
        font-size: 28px;
    }
    
    .company-description-section {
        padding: 24px 20px;
    }
    
    .company-description-section .section-title {
        font-size: 20px;
    }
    
    .company-job-listings.job_listings {
        grid-template-columns: 1fr !important;
    }
    
    .job-meta {
        flex-direction: column;
        gap: 6px;
    }
}

/* Hide tagline placeholder when empty */
.company-tagline-placeholder {
    display: none;
}

/* Pagination styling */
.company-main .job-board-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.company-main .job-board-pagination a,
.company-main .job-board-pagination span {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
}

.company-main .job-board-pagination a {
    background: white;
    border: 1px solid #e2e8f0;
    color: #374151;
}

.company-main .job-board-pagination a:hover {
    background: #f1f5f9;
    border-color: #4ecca3;
    color: #4ecca3;
}

.company-main .job-board-pagination span.current {
    background: #4ecca3;
    color: #000;
    border: 1px solid #4ecca3;
}