/* ========== RESET ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden;
    font-family: "Tajawal", sans-serif;
    background: #f5f5f5;
    color: #222;
}

/* ================= TITLE ================= */
.title-center {
    text-align: center;
    margin: 20px 0;
    font-size: 22px;
    font-weight: bold;
    color: #111;
}

/* ================= GRID LEAGUES ================= */
.grid-leagues {
    display: flex;
    flex-direction: column; /* كل بطاقة تحت الأخرى */
    gap: 15px; /* مسافة بين البطاقات */
    width: 100%;
}

/* ================= LEAGUE CARD ================= */
.league-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    text-align: center;
    padding: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%; /* عرض كامل الشاشة */
}

.league-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

.league-card img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 10px;
}

.league-card span {
    font-weight: bold;
    color: #111;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ================= MATCH LIST ================= */
.match-list {
    margin-top: 10px;
    text-align: right;
    border-top: 1px solid #eee;
    padding-top: 10px;
    width: 100%;
}

.match-item {
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px dashed #ddd;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.match-item:last-child {
    border-bottom: none;
}

.match-item span,
.match-item img {
    margin: 0 4px;
}

/* ================= MATCH TIME ================= */
.match-time {
    font-weight: bold;
    color: #0d6efd;
}

/* ================= TEAMS BOX ================= */
.teams-box {
    display: flex;
    flex-direction: row; /* الفرق تبقى أفقية داخل البطاقة */
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
    padding: 10px 0;
}

.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    max-width: 45%;
    min-width: 0;
    text-align: center;
}

.team img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    display: block;
}

.team h3 {
    margin: 6px 0 0 0;
    font-size: 14px;
    font-weight: bold;
    white-space: normal; /* السماح بكسر الاسم على عدة أسطر */
    overflow: visible;
    text-overflow: clip;
    line-height: 1.2;
}

/* ================= VS ================= */
.vs {
    flex: 0 0 auto;
    width: auto;
    min-width: 80px;
    text-align: center;
    background: #e30613;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    padding: 10px 14px;
    border-radius: 8px;
    margin: 0;
}

/* ================= TABS ================= */
.tabs {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    justify-content: center;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.tab-btn.active {
    background: #111;
    color: #fff;
}

/* ================= MEDIA QUERIES ================= */
@media screen and (max-width: 768px) {
    .league-card {
        padding: 12px;
    }

    .team img {
        width: 60px;
        height: 60px;
    }

    .team h3 {
        font-size: 12px;
    }

    .vs {
        font-size: 16px;
        padding: 8px 12px;
    }
}