/* Companies browse page - overrides and additions */
body.companies-page {
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 100vh;
    height: auto;
    display: block;
    align-items: stretch;
    justify-content: flex-start;
}

.companies-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 24px;
    background-color: rgba(184, 160, 130, 0.95);
    border-bottom: 2px solid rgba(91, 143, 199, 0.5);
}

.nav-link {
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: rgba(245, 242, 234, 0.95);
    text-decoration: none;
    letter-spacing: 0.05em;
}

.nav-link:hover {
    text-decoration: underline;
}

.companies-main {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 24px 48px;
}

.companies-header {
    text-align: center;
    margin-bottom: 48px;
}

.companies-header h1 {
    font-family: 'Asphaltic Grain Condensed', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: rgba(130, 170, 220, 0.95);
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2);
    margin-bottom: 0.5rem;
}

.companies-header p {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(245, 242, 234, 0.9);
}

.companies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.company-card {
    font-family: 'Oswald', sans-serif;
    background-color: rgba(245, 242, 234, 0.95);
    border: 3px solid rgba(91, 143, 199, 0.8);
    border-radius: 4px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 4px 4px 0px rgba(91, 143, 199, 0.3);
    display: flex;
    flex-direction: column;
}

.company-card:hover {
    transform: translateY(-2px);
    box-shadow: 6px 6px 0px rgba(91, 143, 199, 0.4);
    border-color: rgba(91, 143, 199, 1);
}

.company-card-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 12px;
}

.company-card-name,
.company-card-name-link {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    font-weight: 700;
    color: rgba(91, 143, 199, 0.95);
    margin-bottom: 12px;
    line-height: 1.3;
}

.company-card-name-link {
    text-decoration: none;
}

.company-card-name-link:hover {
    text-decoration: underline;
}

.company-card-description {
    font-size: clamp(0.9rem, 2vw, 1rem);
    font-weight: 400;
    color: rgba(91, 143, 199, 0.85);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    min-height: 0;
}

.company-card-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
    padding-top: 12px;
}

.role-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(91, 143, 199, 0.95);
    background-color: rgba(91, 143, 199, 0.15);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(91, 143, 199, 0.4);
}

/* Company detail modal */
.company-detail-modal .modal-content {
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    text-align: left;
}

.company-detail-logo-banner {
    width: calc(100% + 40px);
    margin: -20px -20px 20px -20px;
    padding: 24px 20px;
    background-color: rgba(91, 143, 199, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.company-detail-logo {
    max-width: 100%;
    max-height: 140px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.company-detail-content h2 {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    color: rgba(91, 143, 199, 0.95);
    margin-bottom: 16px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.3;
}

.company-detail-content h2 a {
    color: inherit;
    text-decoration: none;
}

.company-detail-content h2 a:hover {
    text-decoration: underline;
}

.company-detail-content .detail-description {
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    color: rgba(91, 143, 199, 0.9);
    line-height: 1.6;
    margin-bottom: 24px;
}

.company-detail-content .detail-section {
    margin-bottom: 20px;
}

.company-detail-content .detail-section-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: rgba(91, 143, 199, 0.95);
    margin-bottom: 8px;
}

.company-detail-content .detail-section-content {
    font-family: 'Oswald', sans-serif;
    font-size: 0.95rem;
    color: rgba(91, 143, 199, 0.85);
    line-height: 1.7;
    white-space: pre-wrap;
}

.company-detail-content .detail-section-content a {
    color: rgba(91, 143, 199, 1);
    text-decoration: underline;
}

.company-detail-content .detail-section-content a:hover {
    text-decoration: none;
}

.company-detail-content .detail-section-content a.express-interest-btn,
.company-detail-content .detail-express-interest a.express-interest-btn,
.company-detail-content h2 a.express-interest-btn {
    color: rgba(245, 242, 234, 0.95) !important;
    text-decoration: none !important;
}

.company-detail-content a.express-interest-btn:hover {
    color: rgba(245, 242, 234, 1) !important;
}

.detail-role-badges {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: 4px;
}

.detail-role-badges .role-badge {
    font-size: 0.8rem;
}

.express-interest-btn {
    display: inline-block;
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: rgba(245, 242, 234, 0.95);
    background-color: rgba(91, 143, 199, 0.95);
    border: 2px solid rgba(91, 143, 199, 1);
    border-radius: 4px;
    padding: 10px 20px;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-top: 8px;
    margin-left: 8px;
    vertical-align: middle;
}

.express-interest-btn:hover {
    background-color: rgba(91, 143, 199, 1);
    color: rgba(245, 242, 234, 1);
    transform: translateY(-1px);
}

/* Filter dropdown */
.filter-dropdowns {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.filter-dropdown-wrap {
    position: relative;
}

.filter-dropdown-trigger {
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: rgba(91, 143, 199, 0.95);
    background-color: rgba(245, 242, 234, 0.95);
    border: 2px solid rgba(91, 143, 199, 0.6);
    border-radius: 4px;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-dropdown-trigger:hover {
    background-color: rgba(91, 143, 199, 0.15);
    border-color: rgba(91, 143, 199, 0.9);
}

.filter-dropdown-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    min-width: 220px;
    max-width: 90vw;
    max-height: 320px;
    overflow-y: auto;
    background-color: rgba(245, 242, 234, 0.98);
    border: 2px solid rgba(91, 143, 199, 0.6);
    border-radius: 4px;
    box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 50;
}

.filter-dropdown-panel.is-open {
    display: block;
}

.filter-checkboxes {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Oswald', sans-serif;
    font-size: 0.95rem;
    color: rgba(91, 143, 199, 0.95);
    cursor: pointer;
    user-select: none;
}

.filter-checkbox-label:hover {
    color: rgba(91, 143, 199, 1);
}

.filter-checkbox {
    width: 16px;
    height: 16px;
    accent-color: rgba(91, 143, 199, 0.9);
    cursor: pointer;
}

.filter-no-results {
    grid-column: 1 / -1;
    text-align: center;
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    color: rgba(91, 143, 199, 0.85);
    padding: 48px 24px;
}
