/**
 * Commercial League Matches Showcase Styles
 * Modern, responsive slider and grid for SportsPress completed matches.
 */

:root {
    --cl-primary: #00aaff;
    --cl-primary-hover: #0088cc;
    --cl-dark-bg: #0b111e;
    --cl-card-bg: #141c2e;
    --cl-card-border: #1e293b;
    --cl-text-light: #f8fafc;
    --cl-text-muted: #94a3b8;
    --cl-accent: #38bdf8;
    --cl-score-bg: #1e293b;
}

/* ==========================================================================
   1. MATCHES SLIDER
   ========================================================================== */
.cl-matches-slider-wrapper {
    position: relative;
    width: 100%;
    min-height: 520px;
    background-color: var(--cl-dark-bg);
    overflow: hidden;
    user-select: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.cl-matches-slider-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 520px;
}

.cl-match-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.cl-match-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.cl-slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    transform: scale(1.02);
    transition: transform 6s ease-out;
}

.cl-match-slide.active .cl-slide-bg {
    transform: scale(1);
}

.cl-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(11, 17, 30, 0.5) 0%,
        rgba(11, 17, 30, 0.82) 65%,
        rgba(11, 17, 30, 0.95) 100%
    );
    z-index: 2;
}

.cl-slide-content {
    position: relative;
    z-index: 3;
    max-width: 960px;
    width: 90%;
    margin: 0 auto;
    text-align: center;
    padding: 40px 20px;
    box-sizing: border-box;
}

.cl-slide-badge {
    display: inline-block;
    background: var(--cl-primary);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 14px;
    box-shadow: 0 4px 12px rgba(0, 170, 255, 0.35);
}

.cl-slide-meta {
    font-size: 15px;
    color: var(--cl-text-muted);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cl-slide-sep {
    color: var(--cl-primary);
}

/* Scoreboard */
.cl-slide-matchup {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin: 10px 0 32px 0;
}

.cl-team-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
}

.cl-team-home {
    justify-content: flex-end;
    text-align: right;
}

.cl-team-away {
    justify-content: flex-start;
    text-align: left;
}

.cl-team-name {
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.cl-team-logo {
    width: 68px;
    height: 68px;
    object-fit: contain;
    background: #ffffff;
    padding: 6px;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
}

.cl-score-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.85);
    border: 2px solid var(--cl-primary);
    border-radius: 12px;
    padding: 8px 22px;
    box-shadow: 0 8px 24px rgba(0, 170, 255, 0.25);
    backdrop-filter: blur(8px);
}

.cl-score-num {
    font-size: 42px;
    font-weight: 900;
    color: #ffffff;
    line-height: 1;
    min-width: 32px;
    text-align: center;
}

.cl-score-divider {
    font-size: 32px;
    font-weight: 700;
    color: var(--cl-primary);
    line-height: 1;
}

/* Call to Action Button */
.cl-slide-action {
    margin-top: 10px;
}

.cl-btn-match-report {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--cl-primary) 0%, var(--cl-primary-hover) 100%);
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 15px;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 8px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(0, 170, 255, 0.4);
}

.cl-btn-match-report:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 170, 255, 0.55);
    background: var(--cl-primary-hover);
}

.cl-icon-arrow {
    transition: transform 0.2s ease;
}

.cl-btn-match-report:hover .cl-icon-arrow {
    transform: translateX(4px);
}

/* Slider Arrows */
.cl-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    backdrop-filter: blur(6px);
}

.cl-slider-prev {
    left: 24px;
}

.cl-slider-next {
    right: 24px;
}

.cl-slider-arrow:hover {
    background: var(--cl-primary);
    border-color: var(--cl-primary);
    transform: translateY(-50%) scale(1.08);
}

/* Slider Dots */
.cl-slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.cl-slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.25s ease;
}

.cl-slider-dot.active {
    background: var(--cl-primary);
    width: 32px;
    border-radius: 6px;
}

/* ==========================================================================
   2. MATCHES GRID (BELOW SLIDER)
   ========================================================================== */
.cl-matches-grid-wrapper {
    max-width: 1240px;
    width: 92%;
    margin: 40px auto 50px auto;
}

.cl-matches-grid-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--cl-card-border);
    padding-bottom: 12px;
}

.cl-matches-grid-title {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cl-matches-grid-count {
    font-size: 14px;
    color: var(--cl-text-muted);
    font-weight: 600;
}

.cl-matches-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.cl-match-card {
    background: var(--cl-card-bg);
    border: 1px solid var(--cl-card-border);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.cl-match-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    border-color: var(--cl-primary);
}

.cl-card-image-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: var(--cl-dark-bg);
}

.cl-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.cl-match-card:hover .cl-card-img {
    transform: scale(1.05);
}

.cl-card-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 17, 30, 0) 40%, rgba(11, 17, 30, 0.8) 100%);
}

.cl-card-badge-date {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
}

.cl-card-body {
    padding: 16px 18px 14px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.cl-card-teams {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.cl-card-team-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cl-card-team-info {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.cl-card-logo {
    width: 26px;
    height: 26px;
    object-fit: contain;
    background: #ffffff;
    border-radius: 4px;
    padding: 2px;
    flex-shrink: 0;
}

.cl-card-team-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--cl-text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cl-card-score {
    font-size: 18px;
    font-weight: 800;
    color: var(--cl-text-muted);
    min-width: 24px;
    text-align: right;
}

.cl-card-score.winner {
    color: var(--cl-accent);
}

.cl-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 10px;
    font-size: 12px;
}

.cl-card-venue {
    color: var(--cl-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 65%;
}

.cl-card-action {
    color: var(--cl-primary);
    font-weight: 700;
    transition: color 0.2s ease;
}

.cl-match-card:hover .cl-card-action {
    color: #ffffff;
}

/* ==========================================================================
   3. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
    .cl-matches-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .cl-team-name {
        font-size: 22px;
    }
    .cl-team-logo {
        width: 54px;
        height: 54px;
    }
    .cl-score-num {
        font-size: 34px;
    }
}

@media (max-width: 768px) {
    .cl-matches-slider-wrapper,
    .cl-matches-slider-container {
        min-height: 480px;
    }

    .cl-slide-matchup {
        flex-direction: column;
        gap: 14px;
    }

    .cl-team-home,
    .cl-team-away {
        justify-content: center;
        text-align: center;
    }

    .cl-team-name {
        font-size: 19px;
    }

    .cl-team-logo {
        width: 44px;
        height: 44px;
    }

    .cl-score-box {
        padding: 4px 18px;
    }

    .cl-score-num {
        font-size: 28px;
    }

    .cl-slider-arrow {
        width: 38px;
        height: 38px;
    }

    .cl-slider-prev {
        left: 10px;
    }

    .cl-slider-next {
        right: 10px;
    }

    .cl-matches-grid-container {
        grid-template-columns: 1fr;
    }
}
