
/* =========================================================
   FZONE - COMPANIES PAGE
   Theme: Dark Navy + Magnetic Sky Blue
========================================================= */
:root {
    --fz-primary: #00BFFF;
    --fz-primary-hover: #009FE3;
    --fz-bg: #05070D;
    --fz-sidebar: #090C14;
    --fz-card: #0D111C;
    --fz-input: #080B12;
    --fz-text: #FFFFFF;
    --fz-text-secondary: #A7B0C0;
    --fz-text-muted: #7F8A9D;
    --fz-border: #1B2230;
    --fz-success: #22C55E;
    --fz-warning: #F59E0B;
    --fz-error: #EF4444;
}

/* BASE */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    margin: 0;
    background: var(--fz-bg);
    color: var(--fz-text);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

.companies-page {
    width: 100%;
    min-height: 100vh;
    padding: 34px 40px 70px;
    overflow: hidden;
}

.companies-page a {
    text-decoration: none;
}

/* SECTION HEADINGS */
.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 25px;
}

.section-heading-content {
    min-width: 0;
}

.section-eyebrow {
    display: block;
    margin-bottom: 9px;
    color: var(--fz-primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    line-height: 1.5;
}

.section-heading h1,
.stories-heading h2 {
    margin: 0;
    color: var(--fz-text);
    font-size: clamp(28px, 3vw, 38px);
    font-weight: 800;
    letter-spacing: -1.2px;
    line-height: 1.2;
}

.section-heading h1 span,
.stories-heading h2 span {
    color: var(--fz-primary);
}

.section-heading-content > p,
.stories-heading > div > p {
    margin: 10px 0 0;
    color: var(--fz-text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

/* COMPANY SEARCH */
.company-search {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 305px;
    min-width: 0;
    height: 46px;
    padding: 0 15px;
    background: var(--fz-input);
    border: 1px solid #263348;
    border-radius: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.company-search:focus-within {
    border-color: var(--fz-primary);
    box-shadow: 0 0 0 3px rgba(0, 191, 255, 0.08);
}

.company-search > i {
    flex-shrink: 0;
    color: var(--fz-text-secondary);
    font-size: 15px;
}

.company-search input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: none;
    outline: none;
    background: transparent;
    color: var(--fz-text);
    font-family: inherit;
    font-size: 13px;
}

.company-search input::placeholder {
    color: var(--fz-text-muted);
}

.company-search input::-webkit-search-cancel-button {
    cursor: pointer;
}

.clear-search {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    flex-shrink: 0;
    color: var(--fz-text-secondary);
    border-radius: 6px;
}

.clear-search:hover {
    color: var(--fz-primary);
    background: rgba(0, 191, 255, 0.08);
}

/* COMPANY GRID */
.companies-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.company-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 220px;
    padding: 17px;
    background: linear-gradient(145deg, #0A1019, #080C13);
    border: 1px solid var(--fz-border);
    border-radius: 12px;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.company-card:hover {
    border-color: rgba(0, 191, 255, 0.5);
    background: linear-gradient(145deg, #0D1520, #080C13);
    transform: translateY(-3px);
}

.company-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    margin-bottom: 13px;
}

.company-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    overflow: hidden;
    padding: 6px;
    background: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9px;
    color: #05070D;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.company-logo-placeholder img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

.company-logo-placeholder span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.company-heading {
    min-width: 0;
}

.company-heading h2 {
    margin: 0 0 8px;
    color: var(--fz-text);
    font-size: 15px;
    font-weight: 750;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.company-motto {
    margin: 0;
    color: var(--fz-primary);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
}

.company-description {
    margin: 0 0 16px;
    color: var(--fz-text-secondary);
    font-size: 13px;
    line-height: 1.65;
}

.company-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    width: fit-content;
    max-width: 100%;
    margin-top: auto;
    color: var(--fz-primary);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.5;
    transition: color 0.2s ease, gap 0.2s ease;
}

.company-link:hover {
    gap: 13px;
    color: #6DDBFF;
}

.company-link i {
    font-size: 12px;
}

.company-link-disabled {
    color: var(--fz-text-muted);
    cursor: default;
    font-size: 12px;
}

/* EMPTY STATES */
.companies-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 230px;
    padding: 35px 20px;
    text-align: center;
    background: var(--fz-card);
    border: 1px solid var(--fz-border);
    border-radius: 14px;
}

.companies-empty > i {
    margin-bottom: 17px;
    color: var(--fz-primary);
    font-size: 32px;
}

.companies-empty h2 {
    margin: 0;
    color: var(--fz-text);
    font-size: 20px;
    font-weight: 750;
}

.companies-empty p {
    max-width: 480px;
    margin: 10px 0 0;
    color: var(--fz-text-secondary);
    font-size: 13px;
    line-height: 1.7;
}

.text-link {
    margin-top: 18px;
    color: var(--fz-primary);
    font-size: 13px;
    font-weight: 650;
}

/* STORIES SECTION */
.stories-section {
    position: relative;
    margin-top: 30px;
    padding-top: 28px;
    border-top: 1px solid var(--fz-border);
}

.stories-section::before {
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 191, 255, 0.45), transparent);
    content: "";
}

.stories-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 22px;
}

.stories-heading > div {
    min-width: 0;
}

.stories-heading h2 {
    font-size: clamp(25px, 2.8vw, 35px);
}

.stories-heading > div > p {
    margin-top: 8px;
}

.stories-view-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 42px;
    flex-shrink: 0;
    padding: 0 16px;
    color: var(--fz-primary);
    border: 1px solid var(--fz-primary);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease;
}

.stories-view-all:hover {
    background: var(--fz-primary);
    color: #05070D;
}

/* STORY CARDS */
.stories-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Two columns match the image and content in the HTML */
.story-card {
    display: grid;
    grid-template-columns: minmax(0, 32%) minmax(0, 1fr);
    align-items: stretch;
    gap: 20px;
    min-width: 0;
    padding: 6px;
    overflow: hidden;
    background: linear-gradient(145deg, #0B1019, #080C13);
    border: 1px solid var(--fz-border);
    border-radius: 12px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.story-card:hover {
    border-color: rgba(0, 191, 255, 0.4);
    background: #0B111B;
}

/* Landscape image area: fills its grid column */
.story-image {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    aspect-ratio: 3 / 2;
    align-self: stretch;
    overflow: hidden;
    margin: 0;
    padding: 0;
    background: #101827;
    border: 0;
    border-radius: 8px;
}

.story-image img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.story-card:hover .story-image img {
    transform: scale(1.035);
}

.story-image-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top, #173248, #080C13 75%);
    color: var(--fz-primary);
    font-size: 35px;
    font-weight: 800;
    letter-spacing: 1px;
}

.story-content {
    min-width: 0;
    align-self: center;
    padding: 12px 12px 12px 0;
}

.story-topic {
    display: block;
    margin-bottom: 6px;
    color: var(--fz-primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.4px;
    line-height: 1.5;
}

.story-content h3 {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 12px;
    margin: 0 0 7px;
    color: var(--fz-text);
    font-size: 20px;
    font-weight: 750;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.story-divider {
    color: #536174;
    font-weight: 400;
}

.story-company {
    color: var(--fz-primary);
    font-size: 15px;
    font-weight: 700;
}

.story-description {
    margin: 0;
    color: var(--fz-text-secondary);
    font-size: 13px;
    line-height: 1.65;
}

.story-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.story-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    background: #151E2B;
    border: 1px solid rgba(167, 176, 192, 0.07);
    border-radius: 20px;
    color: #C5CEDC;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.3;
}

.story-action {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-top: 10px;
}

.story-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 40px;
    padding: 0 14px;
    white-space: nowrap;
    color: var(--fz-primary);
    border: 1px solid var(--fz-primary);
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease;
}

.story-link:hover {
    background: var(--fz-primary);
    color: #05070D;
}

/* LARGE TABLETS AND SMALL LAPTOPS */
@media (max-width: 1250px) {
    .companies-page {
        padding-right: 28px;
        padding-left: 28px;
    }

    .companies-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .company-card {
        min-height: 215px;
    }

    .story-card {
        grid-template-columns: minmax(0, 30%) minmax(0, 1fr);
        gap: 16px;
    }

    .story-content {
        padding-right: 8px;
    }
}

/* TABLETS */
@media (max-width: 900px) {
    .companies-page {
        padding: 28px 20px 55px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
    }

    .company-search {
        flex-basis: auto;
        width: 100%;
    }

    .companies-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stories-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
    }

    .story-card {
        grid-template-columns: minmax(0, 34%) minmax(0, 1fr);
        gap: 14px;
    }

    .story-content h3 {
        font-size: 18px;
    }

    .story-company {
        font-size: 14px;
    }
}

/* MOBILE */
@media (max-width: 600px) {
    html {
        scroll-padding-top: 85px;
    }

    .companies-page {
        padding: 24px 15px 45px;
    }

    .section-heading h1 {
        font-size: 29px;
        letter-spacing: -0.8px;
    }

    .section-heading-content > p,
    .stories-heading > div > p {
        font-size: 13px;
    }

    .companies-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .company-card {
        min-height: auto;
        padding: 16px;
    }

    .company-card-top {
        gap: 13px;
    }

    .company-logo-placeholder {
        width: 52px;
        height: 52px;
        flex-basis: 52px;
    }

    .company-description {
        margin-bottom: 15px;
    }

    .stories-section {
        margin-top: 25px;
        padding-top: 25px;
    }

    .stories-heading h2 {
        font-size: 26px;
        letter-spacing: -0.7px;
    }

    .stories-view-all {
        min-height: 40px;
    }

    .story-card {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        padding: 8px;
    }

    .story-image {
        width: 100%;
        aspect-ratio: 3 / 2;
        height: auto;
        border-radius: 8px;
    }

    .story-content {
        padding: 16px 5px 8px;
    }

    .story-content h3 {
        gap: 2px 9px;
        font-size: 19px;
    }

    .story-company {
        font-size: 14px;
    }

    .story-description {
        font-size: 13px;
    }

    .story-tags {
        gap: 6px;
    }

    .story-action {
        padding-top: 8px;
    }
}

/* SMALL MOBILE */
@media (max-width: 380px) {
    .companies-page {
        padding-right: 10px;
        padding-left: 10px;
    }

    .section-heading h1 {
        font-size: 26px;
    }

    .stories-heading h2 {
        font-size: 23px;
    }

    .story-content h3 {
        font-size: 17px;
    }

    .story-tags span {
        font-size: 9px;
    }
}

/* ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* NAVBAR AND FOOTER - REMOVE LINK UNDERLINES */
.fz-navbar a,
.fz-navbar a:hover,
.fz-navbar a:focus,
.fz-navbar a:active,
.fz-navbar a:visited,
.fz-mobile-menu a,
.fz-mobile-menu a:hover,
.fz-mobile-menu a:focus,
.fz-mobile-menu a:active,
.fz-mobile-menu a:visited,
footer a,
footer a:hover,
footer a:focus,
footer a:active,
footer a:visited {
    text-decoration: none !important;
}

/* Preserve existing navbar link colors */
.fz-navbar a,
.fz-navbar a:visited,
.fz-navbar a:hover,
.fz-navbar a:focus,
.fz-navbar a:active,
.fz-mobile-menu a,
.fz-mobile-menu a:visited,
.fz-mobile-menu a:hover,
.fz-mobile-menu a:focus,
.fz-mobile-menu a:active {
    text-decoration: none !important;
}

/* Fix Login button text color */
.fz-navbar a,
.fz-navbar a:visited,
.fz-navbar a:hover,
.fz-navbar a:focus,
.fz-navbar a:active,
.fz-mobile-menu a,
.fz-mobile-menu a:visited,
.fz-mobile-menu a:hover,
.fz-mobile-menu a:focus,
.fz-mobile-menu a:active {
    color: inherit;
    text-decoration: none !important;
}

/* Keep Login button text white */
.fz-navbar .fz-nav-actions a,
.fz-navbar .fz-nav-actions a:visited,
.fz-navbar .fz-nav-actions a:hover,
.fz-navbar .fz-nav-actions a:focus,
.fz-navbar .fz-nav-actions a:active {
    color: #FFFFFF;
}