/* Sponsors frontend layout */

.sponsors-wrap,
.sponsors-wrap * {
    box-sizing: border-box;
}

.sponsors-wrap {
    width: 100%;
    margin: 0 auto;
    clear: both;
}

.sponsors-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 34px;
    align-items: start;
}

.sponsors-column {
    min-width: 0;
}

.sponsors-heading {
    line-height: 1.2;
    margin: 0 0 18px;
    padding: 0;
    font-weight: 700;
    color: inherit;
    text-align: center;
}

.sponsors-heading-president {
    font-size: var(--sponsors-president-label-size, 28px);
}

.sponsors-heading-patron {
    font-size: var(--sponsors-patron-label-size, 22px);
}

.sponsors-carousel-frame {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.sponsors-carousel {
    display: flex;
    align-items: center;
    width: 100%;
    transition: transform 300ms ease;
    will-change: transform;
}

.sponsors-card {
    flex: 0 0 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sponsors-patron-carousel .sponsors-card {
    flex-basis: 33.3333%;
}

.sponsors-logo-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 0 auto;
    overflow: hidden;
}

.sponsors-card-president .sponsors-logo-box {
    width: var(--sponsors-president-logo-width, 360px);
    height: var(--sponsors-president-logo-height, 180px);
    max-width: 100%;
}

.sponsors-card-patron .sponsors-logo-box {
    width: var(--sponsors-patron-logo-width, 180px);
    height: var(--sponsors-patron-logo-height, 95px);
    max-width: 100%;
}

.sponsors-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.sponsors-logo-img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: auto;
}

.sponsors-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    padding: 12px;
    font-weight: 700;
    color: #444;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.sponsors-hover-panel {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    opacity: 0;
    pointer-events: none;
    background: rgba(255,255,255,0.94);
    color: #222;
    padding: 16px;
    line-height: 1.35;
    transition: opacity 180ms ease;
}

.sponsors-card-president .sponsors-logo-box:hover .sponsors-hover-panel,
.sponsors-card-president .sponsors-logo-box:focus-within .sponsors-hover-panel {
    opacity: 1;
    pointer-events: auto;
}

.sponsors-hover-panel strong {
    display: block;
    font-size: 16px;
}

.sponsors-hover-panel span {
    display: block;
    font-size: 13px;
}

.sponsors-hover-panel a,
.sponsors-more-info-hover {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    padding: 6px 13px;
    border-radius: 999px;
    background: #1d5f99;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

.sponsors-card-patron .sponsors-logo-box {
    overflow: visible;
}

.sponsors-card-patron .sponsors-logo-box:hover .sponsors-more-info-hover,
.sponsors-card-patron .sponsors-logo-box:focus-within .sponsors-more-info-hover {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
}

.sponsors-more-info-hover {
    position: absolute;
    left: 50%;
    bottom: -34px;
    opacity: 0;
    transform: translate(-50%, 6px);
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 160ms ease, transform 160ms ease;
    z-index: 4;
}

.sponsors-card-patron {
    padding-bottom: 36px;
}

.sponsors-arrow {
    position: absolute;
    top: 50%;
    z-index: 6;
    transform: translateY(-50%);
    opacity: 0;
    border: 0;
    border-radius: 999px;
    width: 34px;
    height: 34px;
    background: rgba(0,0,0,0.45);
    color: #fff;
    cursor: pointer;
    font-size: 26px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 160ms ease, background 160ms ease;
}

.sponsors-arrow:hover,
.sponsors-arrow:focus {
    background: rgba(0,0,0,0.65);
}

.sponsors-carousel-frame:hover .sponsors-arrow,
.sponsors-carousel-frame:focus-within .sponsors-arrow {
    opacity: 1;
}

.sponsors-arrow-prev {
    left: 3px;
}

.sponsors-arrow-next {
    right: 3px;
}

.sponsors-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 16px;
    margin-top: 4px;
}

.sponsors-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    border: 0;
    padding: 0;
    background: #c4c4c4;
    cursor: pointer;
}

.sponsors-dot.is-active {
    background: #555;
}

.sponsors-tapered-line {
    width: 92%;
    height: 1px;
    margin: 12px auto 14px;
    background: linear-gradient(to right, rgba(180,180,180,0), rgba(180,180,180,.9), rgba(180,180,180,0));
}

.sponsors-editor-content {
    text-align: center;
    font-size: 15px;
    line-height: 1.5;
}

.sponsors-editor-content p {
    margin: 0 0 10px;
}

.sponsors-empty {
    margin: 0;
    color: #666;
}

/* Mobile and portrait tablet: arrows are removed by JS, and hidden here as a second guard. */
@media (max-width: 768px),
       (max-width: 1024px) and (orientation: portrait) {
    .sponsors-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .sponsors-arrow {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        min-width: 0 !important;
        min-height: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
        opacity: 0 !important;
    }

    .sponsors-patron-carousel .sponsors-card {
        flex-basis: 50%;
    }

    .sponsors-heading {
        text-align: center;
    }
}

@media (max-width: 640px) {
    .sponsors-patron-carousel .sponsors-card {
        flex-basis: 100%;
    }
}
