/* ============================================================
   ClickCOSMO Team Grid + Producer Program Archives
============================================================ */

/* Team grid */
.cc-team-grid-wrap {
    display: grid;
    grid-template-columns: repeat(var(--cc-team-columns, 4), minmax(0, 1fr));
    gap: 42px 34px;
    align-items: start;
}

/* Team card reset */
.cc-team-card,
.cc-team-card:hover,
.cc-team-card:focus,
.cc-team-card:active {
    appearance: none !important;
    -webkit-appearance: none !important;
    border: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: center;
    cursor: pointer;
    color: inherit;
    font: inherit;
    width: 100%;
    display: block;
    min-height: 0;
    transform: none !important;
}

/* Team grid photo */
.cc-team-card-photo-wrap {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
    overflow: hidden;
    border-radius: 18px;
    margin: 0 0 18px 0;
    background: #f2f2f2;
}

.cc-team-card-photo {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center center;
}

.cc-team-card-photo-placeholder {
    background: #e5e5e5;
}

/* Team grid text */
.cc-team-card-name {
    display: block;
    font-weight: 800;
    font-size: 20px;
    line-height: 1.2;
    color: #777;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin: 0;
    padding: 0;
}

.cc-team-card-role {
    display: block;
    font-size: 14px;
    line-height: 1.3;
    color: #999;
    text-transform: uppercase;
    margin-top: 7px;
    padding: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    max-width: 100%;
}

/* Modal */
.cc-team-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    inset: 0;
}

.cc-team-modal.is-open {
    display: block;
}

.cc-team-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.68);
}

.cc-team-modal-panel {
    position: relative;
    z-index: 2;
    width: min(1040px, calc(100% - 32px));
    max-height: calc(100vh - 64px);
    overflow: auto;
    margin: 32px auto;
    background: #fff;
    color: #111;
    border-radius: 16px;
    padding: 34px;
    box-shadow: 0 18px 70px rgba(0, 0, 0, 0.28);
}

.cc-team-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    border: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    color: #111;
    opacity: 0.85;
    padding: 0 !important;
}

.cc-team-modal-close:hover,
.cc-team-modal-close:focus,
.cc-team-modal-close:active {
    background: transparent !important;
    background-color: transparent !important;
    color: #111;
    opacity: 1;
    outline: none !important;
}

.cc-team-loading {
    padding: 40px;
    text-align: center;
}

/* Modal producer header */
.cc-team-modal-header {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    align-items: start;
}

/* Popup photo - unchanged */
.cc-team-modal-photo-wrap {
    width: 320px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 18px;
    background: #f2f2f2;
}

.cc-team-modal-photo {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center center;
}

.cc-team-modal-name {
    margin: 0;
    font-size: 34px;
    line-height: 1.1;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.03em;
}

.cc-team-modal-role {
    margin-top: 8px;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    color: #666;
}

.cc-team-modal-bio {
    margin-top: 22px;
    font-size: 17px;
    line-height: 1.55;
}

.cc-team-modal-bio p {
    margin-top: 0;
}

.cc-team-modal-bio p:last-child {
    margin-bottom: 0;
}

/* Program archives */
.cc-program-archives {
    margin-top: 34px;
    padding-top: 26px;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.cc-program-archives-title {
    margin: 0 0 16px;
    font-size: 21px;
    line-height: 1.2;
    font-weight: 800;
}

.cc-program-archive-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.cc-program-archive-item {
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 14px;
    min-width: 0;
    background: #fff;
}

.cc-program-archive-title {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 700;
}

.cc-program-archive-description {
    margin-bottom: 14px;
    font-size: 15px;
    line-height: 1.45;
    color: #333;
}

.cc-program-archive-description p {
    margin-top: 0;
}

.cc-program-archive-description p:last-child {
    margin-bottom: 0;
}

.cc-program-archive-audio {
    width: 100%;
    max-width: 100%;
}

/* Pagination */
.cc-program-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.cc-program-page-button,
.cc-program-page-button:hover,
.cc-program-page-button:focus,
.cc-program-page-button:active {
    border: 1px solid rgba(0, 0, 0, 0.25) !important;
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
    color: #111 !important;
    border-radius: 7px;
    padding: 7px 12px !important;
    cursor: pointer;
    font-weight: 600;
    box-shadow: none !important;
    outline: none !important;
}

.cc-program-page-button.is-active,
.cc-program-page-button.is-active:hover,
.cc-program-page-button.is-active:focus {
    background: #111 !important;
    background-color: #111 !important;
    color: #fff !important;
}

.cc-program-empty {
    opacity: 0.75;
}

/* Prevent page scroll behind modal */
body.cc-team-modal-open {
    overflow: hidden;
}

/* Tablet */
@media (max-width: 1024px) {
    .cc-team-grid-wrap {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 36px 26px;
    }
}

/* Mobile / smaller tablet */
@media (max-width: 820px) {
    .cc-team-grid-wrap {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px 20px;
    }

    .cc-team-card-name {
        font-size: 17px;
    }

    .cc-team-card-role {
        font-size: 13px;
    }

    .cc-team-modal-header {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .cc-team-modal-photo-wrap {
        width: min(420px, 100%);
        aspect-ratio: 4 / 3;
        height: auto;
        margin: 0 auto;
    }

    .cc-team-modal-info {
        text-align: center;
    }

    .cc-program-archive-list {
        grid-template-columns: 1fr;
    }
}

/* Phone */
@media (max-width: 520px) {
    .cc-team-grid-wrap {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 26px 16px;
    }

    .cc-team-card-photo-wrap {
        aspect-ratio: 4 / 3;
        height: auto;
        border-radius: 14px;
    }

    .cc-team-card-name {
        font-size: 14px;
        line-height: 1.2;
    }

    .cc-team-card-role {
        font-size: 11px;
        line-height: 1.25;
    }

    .cc-team-modal-panel {
        width: calc(100% - 20px);
        max-height: calc(100vh - 20px);
        margin: 10px auto;
        padding: 26px 18px;
        border-radius: 12px;
    }

    .cc-team-modal-photo-wrap {
        width: 100%;
        aspect-ratio: 4 / 3;
        height: auto;
        border-radius: 14px;
    }

    .cc-team-modal-name {
        font-size: 27px;
    }

    .cc-team-modal-bio {
        font-size: 16px;
        text-align: left;
    }

    .cc-program-archives-title {
        font-size: 20px;
    }
}

/* Program Archive single page */
.cc-program-single {
    max-width: 1100px;
    margin: 0 auto;
}

.cc-program-single-layout {
    display: block;
}

.cc-program-single-main {
    min-width: 0;
    width: 100%;
}

.cc-program-single-producers {
    margin-bottom: 22px;
    font-size: 16px;
    color: #555;
}

.cc-program-single-producers a,
.cc-program-single-producers a:hover,
.cc-program-single-producers a:focus,
.cc-program-single-producers a:active {
    color: inherit;
    text-decoration: none !important;
}

.cc-program-single-audio {
    margin-bottom: 24px;
}

.cc-program-single-audio audio {
    width: 100%;
    max-width: 100%;
}

.cc-program-single-title {
    display: none;
}

.cc-program-single-description {
    font-size: 17px;
    line-height: 1.6;
}

.cc-program-single-description p:first-child {
    margin-top: 0;
}

/* Featured image: match related-post card size */
.cc-program-single-image {
    width: 340px;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 0;
    background: #f2f2f2;
    justify-self: end;
}

.cc-program-single-image img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center center;
    border-radius: 0;
}

@media (max-width: 820px) {
    .cc-program-single-layout {
        grid-template-columns: 1fr;
    }

    .cc-program-single-image {
        width: 100%;
        justify-self: stretch;
        order: -1;
    }
}

/* Team single page */
.cc-team-single {
    max-width: 1100px;
    margin: 0 auto;
}

.cc-team-single-header {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 34px;
    align-items: start;
}

.cc-team-img {
    width: 260px;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 18px;
    background: #f2f2f2;
}

.cc-team-img img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center center;
}

.cc-team-single-name {
    margin: 0;
    font-size: 38px;
    line-height: 1.1;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.03em;
}

.cc-team-single .cc-team-role {
    margin-top: 8px;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    color: #666;
}

.cc-team-single .cc-team-bio {
    margin-top: 22px;
    font-size: 17px;
    line-height: 1.6;
}

.cc-team-single-programs {
    margin-top: 42px;
    padding-top: 28px;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.cc-team-single-programs-title {
    margin: 0 0 20px;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 800;
}

.cc-program-archive-title a {
    color: inherit;
    text-decoration: none;
}

.cc-program-archive-title a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cc-program-pagination a.cc-program-page-button {
    text-decoration: none;
    display: inline-block;
}

@media (max-width: 820px) {
    .cc-team-single-header {
        grid-template-columns: 1fr;
    }

    .cc-team-img {
        width: min(300px, 100%);
        margin: 0 auto;
    }

    .cc-team-single-info {
        text-align: center;
    }

    .cc-team-single-name {
        font-size: 30px;
    }

    .cc-team-single .cc-team-bio {
        text-align: left;
    }
}

/* Single previous / next navigation */
.cc-single-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 42px;
    padding-top: 28px;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
    clear: both;
    width: 100%;
}

.cc-single-nav-link,
.cc-single-nav-link:hover,
.cc-single-nav-link:focus,
.cc-single-nav-link:active {
    display: block;
    padding: 18px 20px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 14px;
    color: inherit !important;
    text-decoration: none !important;
    background: #fff;
    box-shadow: none !important;
}

.cc-single-nav-link:hover {
    border-color: rgba(0, 0, 0, 0.28);
}

.cc-single-nav-link span {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 0.03em;
    text-decoration: none !important;
}

.cc-single-nav-link strong {
    display: block;
    font-size: 18px;
    line-height: 1.25;
    text-decoration: none !important;
}

.cc-single-nav-prev {
    text-align: left;
}

.cc-single-nav-next {
    text-align: right;
}

.cc-single-nav-empty {
    display: block;
}

/* Remove ugly underlines */
.cc-program-single-producers a,
.cc-program-single-producers a:hover,
.cc-program-single-producers a:focus,
.cc-program-single-producers a:active,
.cc-program-archive-title a,
.cc-program-archive-title a:hover,
.cc-program-archive-title a:focus,
.cc-program-archive-title a:active {
    text-decoration: none !important;
    color: inherit;
}

@media (max-width: 640px) {
    .cc-single-nav {
        grid-template-columns: 1fr;
    }

    .cc-single-nav-next {
        text-align: left;
    }

    .cc-single-nav-empty {
        display: none;
    }
}

/* MEDIA PLAYER */
.cc-program-single-audio-card {
    position: relative;
    min-height: 260px;
    margin-bottom: 24px;
    background-size: cover;
    background-position: center center;
    background-color: #0F4C75;
    overflow: hidden;
    border-top: 5px solid #0F4C75;
}

.cc-program-single-audio-overlay {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.35),
        rgba(0, 0, 0, 0.68)
    );
}

.cc-program-single-audio-info {
    display: inline-block;
    width: fit-content;
    max-width: min(100%, 560px);
    margin-bottom: 18px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 4px;
    color: #fff;
}

.cc-program-single-audio-date {
    font-size: 20px;
    line-height: 1.2;
    font-weight: 700;
    margin: 0;
}

.cc-program-single-audio-producers {
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.4;
}

.cc-program-single-audio-producers a,
.cc-program-single-audio-producers a:hover,
.cc-program-single-audio-producers a:focus,
.cc-program-single-audio-producers a:active {
    color: #fff;
    text-decoration: none !important;
}

.cc-program-single-audio-player {
    width: 100%;
    max-width: 100%;
}

/* Fake animated EQ */
.cc-program-eq {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 7px;
    width: min(420px, 100%);
    height: 54px;
    margin-bottom: 18px;
    opacity: 0.9;
}

.cc-program-eq span {
    display: block;
    width: 6px;
    height: 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    animation: ccProgramEq 1s ease-in-out infinite;
    transform-origin: bottom;
}

.cc-program-eq span:nth-child(1) { animation-delay: 0s; }
.cc-program-eq span:nth-child(2) { animation-delay: 0.08s; }
.cc-program-eq span:nth-child(3) { animation-delay: 0.16s; }
.cc-program-eq span:nth-child(4) { animation-delay: 0.24s; }
.cc-program-eq span:nth-child(5) { animation-delay: 0.32s; }
.cc-program-eq span:nth-child(6) { animation-delay: 0.12s; }
.cc-program-eq span:nth-child(7) { animation-delay: 0.2s; }
.cc-program-eq span:nth-child(8) { animation-delay: 0.28s; }
.cc-program-eq span:nth-child(9) { animation-delay: 0.04s; }
.cc-program-eq span:nth-child(10) { animation-delay: 0.36s; }
.cc-program-eq span:nth-child(11) { animation-delay: 0.1s; }
.cc-program-eq span:nth-child(12) { animation-delay: 0.22s; }
.cc-program-eq span:nth-child(13) { animation-delay: 0.34s; }
.cc-program-eq span:nth-child(14) { animation-delay: 0.06s; }
.cc-program-eq span:nth-child(15) { animation-delay: 0.18s; }
.cc-program-eq span:nth-child(16) { animation-delay: 0.3s; }
.cc-program-eq span:nth-child(17) { animation-delay: 0.14s; }
.cc-program-eq span:nth-child(18) { animation-delay: 0.26s; }
.cc-program-eq span:nth-child(19) { animation-delay: 0.38s; }
.cc-program-eq span:nth-child(20) { animation-delay: 0.02s; }

@keyframes ccProgramEq {
    0%, 100% {
        height: 14px;
    }

    50% {
        height: 54px;
    }
}

@media (max-width: 520px) {
    .cc-program-eq {
        width: 100%;
        gap: 5px;
        height: 44px;
    }

    .cc-program-eq span {
        width: 5px;
    }

    @keyframes ccProgramEq {
        0%, 100% {
            height: 12px;
        }

        50% {
            height: 44px;
        }
    }
}

/* Popup archive links */
.cc-team-modal .cc-program-archive-title a,
.cc-team-modal .cc-program-archive-popup-link {
    color: #0F4C75;
    text-decoration: none;
    font-weight: 700;
}

.cc-team-modal .cc-program-archive-title a:hover,
.cc-team-modal .cc-program-archive-popup-link:hover {
    text-decoration: underline;
}

.cc-program-archive-popup-link {
    display: inline-block;
    margin-top: 10px;
    text-align: right;
}