/* ============================================================
   KK Krapina — Seniori Plugin CSS
   Verzija: 1.0
   Identičan stil kao Predkadeti — konzistentnost dizajna.
   ============================================================ */

/* === WIDGET WRAPPER === */
.krapina-seniori-widget,
.krapina-widget {
    font-family: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 900px;
    margin: 0 auto 30px;
    color: #333;
}

.krapina-widget-title {
    font-size: 20px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #111;
    border-left: 4px solid #e8611a;
    padding-left: 12px;
    margin-bottom: 16px;
    line-height: 1.2;
}

.krapina-error {
    color: #c0392b;
    font-style: italic;
}

.krapina-source {
    font-size: 11px;
    color: #999;
    text-align: right;
    margin-top: 10px;
}

.krapina-source a {
    color: #e8611a;
    text-decoration: none;
}

.krapina-source a:hover {
    text-decoration: underline;
}

/* === STANDINGS TABLE === */
.krapina-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.krapina-standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 18px !important;
}

.krapina-standings-table thead tr {
    background: #111;
    color: #fff;
}

.krapina-standings-table thead th {
    font-size: 13px !important;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 14px 10px !important;
    text-align: center;
    white-space: nowrap;
}

.krapina-standings-table thead th:nth-child(3) {
    text-align: left;
}

.krapina-standings-table tbody tr {
    border-bottom: 1px solid #e8e8e8;
    transition: background 0.15s;
}

.krapina-standings-table tbody tr:hover {
    background: #fdf3ec;
}

.krapina-standings-table tbody tr.krapina-row {
    background: #fff5ef;
}

.krapina-standings-table td {
    padding: 12px 10px !important;
    text-align: center;
    vertical-align: middle;
    font-size: 18px !important;
}

.krapina-standings-table td.rank {
    font-weight: 700;
    color: #999;
    font-size: 15px !important;
    width: 36px;
}

.krapina-standings-table td.logo-cell {
    width: 64px !important;
    padding: 6px 8px !important;
}

.krapina-standings-table td.team-cell {
    text-align: left;
    font-weight: 600;
    padding-left: 8px !important;
    min-width: 150px;
    font-size: 18px !important;
}

.krapina-standings-table td.team-cell.krapina-name {
    color: #e8611a;
    font-weight: 700;
}

.krapina-standings-table td.points {
    font-weight: 700;
    color: #111;
    font-size: 18px !important;
}

.krapina-standings-table .diff-pos { color: #2e8b57; font-weight: 600; }
.krapina-standings-table .diff-neg { color: #c0392b; font-weight: 600; }

/* Logo u tablici */
.standings-logo {
    width: 52px !important;
    height: 52px !important;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* KSZ source link s logom */
.krapina-source {
    font-size: 11px;
    color: #999;
    text-align: right;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.krapina-source img.ksz-logo {
    height: 24px;
    width: auto;
    object-fit: contain;
    opacity: 0.8;
    vertical-align: middle;
}

.krapina-source a {
    color: #e8611a;
    text-decoration: none;
}

.krapina-source a:hover { text-decoration: underline; }

/* === SCHEDULE / RASPORED === */
.krapina-round-label {
    font-size: 15px !important;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #fff;
    background: #111;
    padding: 12px 18px !important;
    display: block;
    margin-bottom: 1px;
    margin-top: 12px;
}

.krapina-match-row {
    display: grid;
    grid-template-columns: 200px 1fr 110px 1fr;
    align-items: center;
    padding: 14px 18px !important;
    border-bottom: 1px solid #e8e8e8;
    gap: 12px;
    font-size: 18px !important;
    transition: background 0.15s;
}

.krapina-match-row:hover {
    background: #fafafa;
}

.krapina-match-row.krapina-match {
    background: #fff5ef;
    border-left: 4px solid #e8611a;
}

.krapina-match-row.krapina-match:hover {
    background: #fdeee3;
}

.krapina-match-date {
    font-size: 14px !important;
    color: #999;
    font-weight: 500;
    line-height: 1.5;
}

.krapina-tag {
    display: block;
    font-size: 11px !important;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #e8611a;
}

.krapina-team-home {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    font-weight: 600;
    font-size: 18px !important;
    text-align: right;
}

.krapina-team-home .match-logo {
    order: 2;
}

.krapina-team-home span:not(.match-logo) {
    order: 1;
}

.krapina-team-away {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 18px !important;
}

.krapina-team-home.winner span,
.krapina-team-away.winner span {
    color: #e8611a;
}

.krapina-score {
    text-align: center;
    font-weight: 800;
    font-size: 20px !important;
    color: #111;
    background: #f5f5f5;
    padding: 6px 10px !important;
    border-radius: 2px;
    white-space: nowrap;
    display: block;
}

.krapina-score.upcoming {
    font-size: 16px !important;
    color: #bbb;
    font-weight: 600;
    background: none;
    letter-spacing: 2px;
}

/* Logo u rasporedu */
.match-logo {
    width: 48px !important;
    height: 48px !important;
    object-fit: contain;
    flex-shrink: 0;
}

/* === NO GAMES WIDGET === */
.krapina-no-games {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.krapina-no-games .team-logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
    margin-bottom: 16px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.no-games-text {
    font-size: 16px;
    color: #888;
    line-height: 1.6;
}

/* ============================================================
   EVENTS SECTION (za "Sljedeća utakmica" widget)
   Zadržavamo vaš originalni CSS, samo scoped na .events-section
   ============================================================ */

.events-section {
    padding: 40px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.events-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.events-section .section-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.events-section .section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #e74c3c;
    margin: 20px auto 0;
    border-radius: 2px;
}

.event-card {
    background: #fff;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-left: 5px solid #e74c3c;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 12px;
}

.event-date {
    background: #e74c3c;
    color: #fff;
    padding: 15px 20px;
    border-radius: 10px;
    text-align: center;
    min-width: 120px;
}

.event-day {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    display: block;
}

.event-time {
    font-size: 22px;
    font-weight: 700;
    color: #e74c3c;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Kada vrijeme nije poznato — manji, sivi tekst */
.event-time.event-time-unknown {
    font-size: 13px;
    font-weight: 500;
    color: #999;
    font-style: italic;
}

.league-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.league-badge:hover {
    opacity: 0.85;
    color: #fff;
    text-decoration: none;
}
.match-info {
    display: flex;
    flex-direction: row !important;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: nowrap;
}

.match-info .team {
    flex: 1 1 0;
    text-align: center;
    max-width: 250px;
    min-width: 0;
}

.match-info .team-logo {
    width: 160px;
    height: 160px;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
}

.match-info .team-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.match-info .team-name {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-top: 12px;
    display: block;
}

.vs-separator {
    font-size: 28px;
    font-weight: 700;
    color: #e74c3c;
    padding: 0 15px;
}

.event-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.event-location {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    gap: 6px;
}

.event-cta {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.event-cta:hover {
    background: #c0392b;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(231,76,60,0.3);
    color: #fff;
    text-decoration: none;
}

.league-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === RESPONSIVE === */
/* ============================================================
   RESPONSIVE — TABLET (max 768px)
   ============================================================ */
@media (max-width: 768px) {

    /* --- RASPORED --- */
    .krapina-match-row {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 12px 14px !important;
    }

    .krapina-match-date {
        font-size: 12px !important;
        color: #aaa;
    }

    .krapina-team-home,
    .krapina-team-away {
        justify-content: flex-start;
        font-size: 15px !important;
    }

    .krapina-score {
        text-align: left;
        background: none;
        padding: 0 !important;
        font-size: 15px !important;
        color: #333;
    }

    .match-logo {
        width: 36px !important;
        height: 36px !important;
    }

    /* --- TABLICA --- */
    .krapina-standings-table {
        font-size: 14px !important;
    }

    .krapina-standings-table td,
    .krapina-standings-table th {
        padding: 10px 6px !important;
        font-size: 14px !important;
    }

    .standings-logo {
        width: 34px !important;
        height: 34px !important;
    }

    .krapina-standings-table td.team-cell {
        font-size: 14px !important;
        min-width: 120px;
    }

    /* --- EVENT CARD --- */
    .match-info {
        gap: 10px;
    }

    .match-info .team-logo {
        width: 90px;
        height: 90px;
    }

    .match-info .team-name {
        font-size: 14px;
    }

    .vs-separator {
        font-size: 20px;
        padding: 0 4px;
    }

    .event-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================================
   RESPONSIVE — MOBITEL (max 480px)
   ============================================================ */
@media (max-width: 480px) {

    /* --- SLIDER: 1 kartica cijela širina --- */
    .krapina-match-card {
        flex: 0 0 100% !important;
        padding: 20px 16px 16px !important;
        gap: 14px !important;
    }

    .kmc-logo {
        width: 64px !important;
        height: 64px !important;
    }

    .kmc-name {
        font-size: 14px !important;
    }

    .kmc-result {
        font-size: 26px !important;
    }

    .kmc-vs {
        font-size: 22px !important;
    }

    .kmc-score {
        flex: 0 0 80px !important;
    }

    .krapina-arrow {
        width: 48px !important;
        height: 48px !important;
        font-size: 28px !important;
    }

    /* --- TABLICA — sakrij po klasi (pouzdano, neovisno o colspan) --- */
    .col-hide-mobile {
        display: none !important;
    }

    .krapina-standings-table td,
    .krapina-standings-table th {
        padding: 8px 5px !important;
        font-size: 13px !important;
    }

    .standings-logo {
        width: 28px !important;
        height: 28px !important;
    }

    .krapina-standings-table td.team-cell {
        font-size: 13px !important;
        min-width: 90px;
    }

    /* --- RASPORED --- */
    .krapina-round-label {
        font-size: 12px !important;
        padding: 10px 14px !important;
        letter-spacing: 1px;
    }

    .krapina-match-row {
        padding: 10px 12px !important;
        gap: 6px;
    }

    .krapina-team-home,
    .krapina-team-away {
        font-size: 13px !important;
    }

    .match-logo {
        width: 28px !important;
        height: 28px !important;
    }

    /* --- EVENT CARD --- */
    .event-card {
        padding: 16px;
    }

    .match-info .team-logo {
        width: 70px;
        height: 70px;
    }

    .match-info .team-name {
        font-size: 12px;
    }

    .vs-separator {
        font-size: 18px;
        padding: 0 2px;
    }
}