/* ============================================
   Calendar / Schedule Page
   ForcaBarca.sk - Full-width fixtures list
   Inspired by fcbarcelona.com schedule + membership.css tokens
   ============================================ */

:root {
    --cal-garnet: #a50044;
    --cal-garnet-dark: #6b1535;
    --cal-blue: #004d98;
    --cal-blue-dark: #003b73;
    --cal-gold: #ffd700;
    --cal-text: #1a1a2e;
    --cal-text-light: #6b7280;
    --cal-line: #e6e8ec;
    --cal-bg: #f4f5f7;
    --cal-white: #fff;
    --cal-radius: 12px;
    --cal-shadow: 0 4px 20px rgba(0,0,0,0.06);
    --cal-shadow-hover: 0 8px 28px rgba(0,0,0,0.12);
}

/* --- Page-width layout (no sidebar), NOT full window width --- */
.block-content.cal-page {
    overflow: visible;
}

/* Panel spans the page content width (inside .container), not the viewport */
.cal-wrap {
    width: 100%;
    background: var(--cal-bg);
    border-radius: var(--cal-radius);
    padding: 0 0 40px;
    overflow: hidden;
    box-shadow: var(--cal-shadow);
}

/* --- Hero image strip --- */
.cal-hero {
    width: 100%;
    line-height: 0;
    background: linear-gradient(135deg, var(--cal-garnet-dark), var(--cal-blue-dark));
}

.cal-hero img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* --- Inner content fills the page width --- */
.cal-inner {
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Header: title + season selector --- */
.cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin: 34px 0 24px;
}

.cal-title {
    font-size: 2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--cal-text);
    margin: 0;
    line-height: 1.15;
}

.cal-title::after {
    content: "";
    display: block;
    width: 64px;
    height: 4px;
    margin-top: 10px;
    background: var(--cal-garnet);
    border-radius: 2px;
}

.cal-season {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cal-season-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--cal-text-light);
    margin: 0;
}

.cal-season-select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--cal-white) url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2012'%3E%3Cpath%20fill%3D'%23a50044'%20d%3D'M2%204l4%204%204-4z'%2F%3E%3C%2Fsvg%3E") no-repeat right 12px center;
    background-size: 12px;
    border: 2px solid var(--cal-line);
    border-radius: 50px;
    padding: 9px 34px 9px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--cal-text);
    cursor: pointer;
    transition: border-color 0.2s;
}

.cal-season-select:hover,
.cal-season-select:focus {
    border-color: var(--cal-garnet);
    outline: none;
}

/* --- Month divider --- */
.cal-month {
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--cal-garnet);
    margin: 30px 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--cal-line);
}

/* --- Match card --- */
.cal-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cal-match {
    display: flex;
    align-items: center;
    background: var(--cal-white);
    border-radius: var(--cal-radius);
    box-shadow: var(--cal-shadow);
    padding: 16px 20px;
    gap: 16px;
    border-left: 4px solid transparent;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.cal-match:hover {
    box-shadow: var(--cal-shadow-hover);
    transform: translateY(-2px);
}

.cal-match.is-upcoming {
    border-left-color: var(--cal-garnet);
}

/* Competition column (logo + name) */
.cal-match-comp {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 210px;
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
}

.cal-match-comp:hover { text-decoration: none; color: inherit; }

.cal-comp-logo {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    object-fit: contain;
    background: var(--cal-white);
}

.cal-comp-name {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--cal-blue);
    line-height: 1.25;
}

/* Date column (date + time) */
.cal-match-date {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    width: 150px;
    flex-shrink: 0;
    padding-left: 16px;
    border-left: 1px solid var(--cal-line);
    text-decoration: none;
    color: inherit;
}

.cal-match-date:hover { text-decoration: none; color: inherit; }

.cal-date {
    font-size: 0.82rem;
    color: var(--cal-text-light);
    text-transform: capitalize;
}

.cal-time {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--cal-text);
}

/* Teams column */
.cal-match-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.cal-match-teams:hover { text-decoration: none; color: inherit; }

.cal-team {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.cal-team-home { justify-content: flex-end; text-align: right; }
.cal-team-away { justify-content: flex-start; text-align: left; }

.cal-team-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--cal-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-team-crest {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cal-team-crest img {
    max-width: 42px;
    max-height: 42px;
    object-fit: contain;
}

.cal-score {
    flex-shrink: 0;
    min-width: 74px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--cal-text);
    letter-spacing: 1px;
}

.cal-score-sep {
    margin: 0 4px;
    color: var(--cal-garnet);
}

.cal-score-empty { color: var(--cal-text-light); }

.cal-vs {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--cal-text-light);
}

/* Actions column */
.cal-match-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 130px;
    flex-shrink: 0;
    align-items: stretch;
}

.cal-btn {
    display: inline-block;
    text-align: center;
    padding: 9px 14px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.cal-btn-tickets {
    background: var(--cal-garnet);
    color: var(--cal-white);
    border: 2px solid var(--cal-garnet);
}

.cal-btn-tickets:hover {
    background: var(--cal-garnet-dark);
    border-color: var(--cal-garnet-dark);
    color: var(--cal-white);
    text-decoration: none;
}

.cal-btn-bet {
    background: var(--cal-blue);
    color: var(--cal-white);
    border: 2px solid var(--cal-blue);
}

.cal-btn-bet:hover {
    background: var(--cal-blue-dark);
    border-color: var(--cal-blue-dark);
    color: var(--cal-white);
    text-decoration: none;
}

.cal-btn-result {
    background: transparent;
    color: var(--cal-blue);
    border: 2px solid var(--cal-blue);
}

.cal-btn-result:hover {
    background: var(--cal-blue);
    color: var(--cal-white);
    text-decoration: none;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .cal-title { font-size: 1.5rem; }

    .cal-inner { padding: 0 12px; }

    .cal-head {
        flex-direction: column;
        align-items: stretch;
    }

    .cal-match {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px 12px;
    }

    .cal-match-comp {
        width: auto;
        gap: 8px;
        padding-bottom: 10px;
        border-bottom: 1px solid var(--cal-line);
    }

    .cal-match-date {
        width: auto;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        padding-left: 0;
        border-left: none;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--cal-line);
    }

    .cal-comp-logo { width: 30px; height: 30px; }

    /* Teams stay in one row; long club names wrap onto multiple lines instead of being cut off */
    .cal-match-teams { gap: 8px; }

    .cal-team { gap: 8px; }

    .cal-team-name {
        font-size: 0.9rem;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        word-break: break-word;
        line-height: 1.2;
    }

    .cal-team-crest,
    .cal-team-crest img { width: 32px; height: 32px; max-width: 32px; max-height: 32px; }

    .cal-score {
        font-size: 1.25rem;
        min-width: 46px;
    }

    .cal-match-actions {
        flex-direction: row;
        width: auto;
    }

    .cal-btn { flex: 1; }
}

@media (max-width: 480px) {
    .cal-inner { padding: 0 8px; }
    .cal-match { padding: 12px 10px; }
    .cal-team-name { font-size: 0.95rem; }
}
