/* =========================================================
   AFDES NETWORK
   File: /assets/css/network.css
========================================================= */

.network-page,
.network-profile-page {
    overflow-x: hidden;
}

.network-hero {
    position: relative;
}

.network-directory-section {
    padding: 58px 0;
    background: #ffffff;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.network-directory-heading,
.network-section-heading {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    align-items: end;
    margin-bottom: 28px;
}

.network-directory-heading > div,
.network-section-heading > div {
    max-width: 760px;
}

.network-directory-heading h2,
.network-section-heading h2,
.network-profile-section h2,
.network-profile-facts h2 {
    margin: 0;
    color: var(--navy);
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.08;
    letter-spacing: -.035em;
}

.network-directory-heading h2,
.network-section-heading h2 {
    font-size: clamp(2rem, 4vw, 3.15rem);
}

.network-directory-heading > p,
.network-section-heading > p {
    max-width: 430px;
    margin: 0;
    color: #64748b;
    line-height: 1.65;
}

.network-filters {
    display: grid;
    grid-template-columns: 1.35fr repeat(3, 1fr) auto;
    gap: 12px;
    align-items: end;
    padding: 22px;
    background: #f8fafc;
    border: 1px solid var(--border);
}

.network-filters label {
    min-width: 0;
}

.network-filters label > span {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.network-filters input,
.network-filters select {
    width: 100%;
    min-height: 46px;
    padding: 0 13px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #102033;
    font: inherit;
}

.network-filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.network-filter-actions button,
.network-filter-actions a {
    min-height: 46px;
    padding: 0 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: var(--primary);
    color: #ffffff;
    font: inherit;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
}

.network-filter-actions button:hover {
    background: var(--primary-dark);
}

.network-filter-actions a {
    background: #e2e8f0;
    color: #334155;
}

.network-featured-section,
.network-results-section {
    padding-top: 70px;
    padding-bottom: 70px;
}

.network-featured-section + .network-results-section {
    padding-top: 12px;
}

.network-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.network-grid.featured {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.network-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: 0 12px 35px rgba(15, 23, 42, .06);
    overflow: hidden;
    transition:
        transform .22s ease,
        box-shadow .22s ease,
        border-color .22s ease;
}

.network-card:hover {
    transform: translateY(-5px);
    border-color: rgba(4, 155, 206, .4);
    box-shadow: 0 22px 50px rgba(15, 23, 42, .11);
}

.network-card.featured-card {
    border-top: 5px solid var(--primary);
}

.network-logo-box {
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 27px;
    background:
        radial-gradient(
            circle at top right,
            rgba(4, 155, 206, .08),
            transparent 44%
        ),
        #f8fafc;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
}

.network-logo-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.network-logo-placeholder {
    width: 98px;
    height: 98px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--navy));
    color: #ffffff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.2rem;
    font-weight: 900;
    box-shadow: 0 16px 35px rgba(4, 155, 206, .18);
}

.network-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.network-relationship {
    align-self: flex-start;
    display: inline-flex;
    margin-bottom: 13px;
    padding: 6px 9px;
    background: rgba(4, 155, 206, .1);
    color: var(--primary-dark);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .07em;
    line-height: 1.25;
    text-transform: uppercase;
}

.network-card h3 {
    margin: 0 0 11px;
    color: var(--navy);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.33rem;
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.network-card h3 a {
    color: inherit;
    text-decoration: none;
}

.network-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 14px;
}

.network-card-meta span {
    display: inline-flex;
    padding: 5px 8px;
    background: #f1f5f9;
    color: #64748b;
    font-size: .72rem;
    font-weight: 800;
}

.network-card-body p {
    margin: 0 0 22px;
    color: #475569;
    font-size: .94rem;
    line-height: 1.65;
}

.network-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.network-card-actions a {
    min-height: 39px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 13px;
    background: var(--navy);
    color: #ffffff;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-decoration: none;
    text-transform: uppercase;
}

.network-card-actions a:hover {
    background: var(--primary);
}

.network-card-actions a.secondary {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #334155;
}

.network-card-actions a.secondary:hover {
    border-color: var(--primary);
    color: var(--primary-dark);
}

.network-empty-state,
.network-system-message {
    margin: 60px auto;
    padding: 48px;
    background: #ffffff;
    border: 1px solid var(--border);
    text-align: center;
}

.network-empty-state h3,
.network-system-message h2 {
    margin: 0 0 12px;
    color: var(--navy);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
}

.network-empty-state p,
.network-system-message p {
    margin: 0;
    color: #64748b;
    line-height: 1.65;
}

.network-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 40px;
}

.network-pagination a {
    min-width: 42px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    font-size: .82rem;
    font-weight: 900;
    text-decoration: none;
}

.network-pagination a:hover,
.network-pagination a.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.network-profile-hero {
    padding: clamp(55px, 7vw, 88px) 0;
    background:
        radial-gradient(
            circle at top right,
            rgba(4, 155, 206, .19),
            transparent 36%
        ),
        linear-gradient(180deg, #ffffff 0%, #f4f8fb 100%);
    border-bottom: 1px solid var(--border);
}

.network-profile-hero-inner {
    display: grid;
    grid-template-columns: minmax(240px, 340px) 1fr;
    gap: clamp(35px, 6vw, 74px);
    align-items: center;
}

.network-profile-logo {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 42px;
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: 0 20px 55px rgba(15, 23, 42, .1);
}

.network-profile-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.network-profile-logo > span {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--navy));
    color: #ffffff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 3.3rem;
    font-weight: 900;
}

.network-back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--primary-dark);
    font-size: .8rem;
    font-weight: 900;
    letter-spacing: .05em;
    text-decoration: none;
    text-transform: uppercase;
}

.network-profile-heading h1 {
    max-width: 900px;
    margin: 0;
    color: var(--navy);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1.02;
    letter-spacing: -.045em;
}

.network-profile-heading > p {
    max-width: 820px;
    margin: 20px 0 0;
    color: #475569;
    font-size: 1.12rem;
    line-height: 1.75;
}

.network-profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.network-profile-meta span {
    padding: 7px 10px;
    background: #ffffff;
    border: 1px solid var(--border);
    color: #475569;
    font-size: .78rem;
    font-weight: 850;
}

.network-profile-website {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 25px;
    padding: 0 18px;
    background: var(--primary);
    color: #ffffff;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-decoration: none;
    text-transform: uppercase;
}

.network-profile-website:hover {
    background: var(--primary-dark);
}

.network-profile-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 45px;
    align-items: start;
    padding-top: 70px;
    padding-bottom: 70px;
}

.network-profile-main {
    min-width: 0;
}

.network-profile-section {
    margin-bottom: 28px;
    padding: clamp(28px, 5vw, 45px);
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: 0 12px 36px rgba(15, 23, 42, .055);
}

.network-profile-section h2 {
    margin-bottom: 20px;
    font-size: clamp(1.8rem, 4vw, 2.75rem);
}

.network-profile-text,
.network-profile-section > p {
    color: #475569;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.network-profile-facts,
.network-profile-disclosure {
    padding: 27px;
    background: #ffffff;
    border: 1px solid var(--border);
}

.network-profile-facts h2 {
    margin-bottom: 20px;
    font-size: 1.65rem;
}

.network-profile-facts dl {
    margin: 0;
}

.network-profile-facts dl > div {
    padding: 15px 0;
    border-top: 1px solid #e2e8f0;
}

.network-profile-facts dt {
    margin-bottom: 5px;
    color: #64748b;
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.network-profile-facts dd {
    margin: 0;
    color: #102033;
    font-weight: 800;
    line-height: 1.5;
}

.network-profile-disclosure {
    margin-top: 18px;
    background: #f8fafc;
}

.network-profile-disclosure strong {
    color: var(--navy);
}

.network-profile-disclosure p {
    margin: 10px 0 0;
    color: #64748b;
    font-size: .88rem;
    line-height: 1.65;
}

@media (max-width: 1120px) {
    .network-grid,
    .network-grid.featured {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .network-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .network-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .network-grid,
    .network-grid.featured {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .network-profile-hero-inner,
    .network-profile-content {
        grid-template-columns: 1fr;
    }

    .network-profile-logo {
        width: min(100%, 330px);
    }

    .network-profile-sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .network-profile-disclosure {
        margin-top: 0;
    }
}

@media (max-width: 680px) {
    .network-directory-heading,
    .network-section-heading {
        display: block;
    }

    .network-directory-heading > p,
    .network-section-heading > p {
        margin-top: 12px;
    }

    .network-filters {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .network-filter-actions {
        grid-column: auto;
        flex-direction: column;
        align-items: stretch;
    }

    .network-grid,
    .network-grid.featured {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .network-logo-box {
        height: 145px;
        padding: 19px;
    }

    .network-card-body {
        padding: 17px;
    }

    .network-card h3 {
        font-size: 1.08rem;
    }

    .network-card-body p {
        font-size: .85rem;
    }

    .network-card-actions {
        display: grid;
    }

    .network-card-actions a {
        width: 100%;
    }

    .network-profile-sidebar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 440px) {
    .network-grid,
    .network-grid.featured {
        grid-template-columns: 1fr;
    }

    .network-logo-box {
        height: 180px;
    }

    .network-profile-logo {
        padding: 28px;
    }
}