/* =========================================================
   Teams Archive
   ========================================================= */

.lwf-teams-page {
    padding: 45px 0 70px;
}

.lwf-teams-container {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
}

/* ---------- Header ---------- */

.lwf-teams-header {
    text-align: right;
    margin-bottom: 35px;
}

.lwf-teams-header h1 {
    margin: 0 0 8px;
    font-size: 34px;
    font-weight: 800;
    color: #142033;
}

.lwf-teams-header p {
    margin: 0;
    font-size: 16px;
    color: #687386;
}

/* ---------- Grid ---------- */

.lwf-teams-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 24px;
    align-items: stretch;
    width: 100%;
}

/*
 * إجبار كل بطاقة على البقاء داخل عمودها
 * ومنع أي CSS آخر من جعلها تمتد على كامل الصف
 */
.lwf-teams-grid > .lwf-team-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    grid-column: auto !important;
    grid-row: auto !important;
    margin: 0 !important;
}

/* ---------- Card ---------- */

.lwf-team-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;

background: var(--team-primary, #08783c);
border: none;
border-radius: 8px;

box-shadow: none;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.lwf-team-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(20, 32, 51, 0.12);
}

/* ---------- Main Row ---------- */

.lwf-team-card-main {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
   min-height: 120px;
padding: 14px 16px;
    background: var(--team-primary, #08783c);
}

.lwf-team-card-main {
    position: relative;
    overflow: hidden;
}

.lwf-team-card-main::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.02) 0%,
        rgba(0, 0, 0, 0.08) 55%,
        rgba(0, 0, 0, 0.22) 100%
    );
    pointer-events: none;
    z-index: 1;
}

.lwf-team-card-logo,
.lwf-team-card-content {
    position: relative;
    z-index: 2;
}

/* ---------- Logo ---------- */

.lwf-team-card-logo {
    width: 88px;
    height: 88px;
    flex: 0 0 88px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    background: transparent;
}

.lwf-team-card-logo img {
    display: block;
    width: 78px;
    height: 78px;
    object-fit: contain;

    transition: transform 0.25s ease;
}

.lwf-team-card:hover .lwf-team-card-logo img {
    transform: scale(1.05);
}

.lwf-team-card-logo-empty {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 78px;
    height: 78px;
    border-radius: 50%;

    background: #eaf5ef;
    color: #08783c;
    font-size: 34px;
}

/* ---------- Content ---------- */

.lwf-team-card-content {
    flex: 1;
    min-width: 0;
    padding: 0 18px 0 0;

    text-align: right;
    background: transparent;
}

.lwf-team-card-title {
    margin: 0 0 12px;

    font-size: 21px;
    line-height: 1.4;
    font-weight: 800;

    color: #fff;
}

/* ---------- Info ---------- */

.lwf-team-card-info {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;

    margin-bottom: 6px;

    color: rgba(255, 255, 255, 0.92);
    font-size: 13px;
    line-height: 1.5;
}

.lwf-team-card-info:last-child {
    margin-bottom: 0;
}

.lwf-team-card-info i {
    width: 18px;
    flex: 0 0 18px;

    color: #fff;
    text-align: center;
}

/* ---------- Button ---------- */

.lwf-team-card-button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 44px;
    padding: 10px 18px;

    border-radius: 0;

    background: #202833;
    color: #ffffff;

    font-size: 14px;
    font-weight: 700;
    text-decoration: none;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.lwf-team-card-button:hover {
    background: #05632f;
    color: #fff;
}

/* ---------- Empty ---------- */

.lwf-teams-empty {
    grid-column: 1 / -1;

    padding: 50px 20px;

    text-align: center;

    color: #687386;
    background: #fff;

    border: 1px solid #e3e7ec;
    border-radius: 16px;
}

/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 900px) {

    .lwf-teams-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 600px) {

    .lwf-teams-page {
        padding: 30px 0 50px;
    }

    .lwf-teams-container {
        width: min(100% - 24px, 500px);
    }

    .lwf-teams-header {
        margin-bottom: 25px;
    }

    .lwf-teams-header h1 {
        font-size: 28px;
    }

.lwf-teams-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px;
}
    .lwf-team-card-main {
        min-height: auto;
        padding: 18px 14px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        text-align: center;
        gap: 10px;
    }

    /* الشعار أولاً */
    .lwf-team-card-logo {
        width: 76px;
        height: 76px;
        flex: 0 0 76px;
        margin: 0 auto;
    }

    .lwf-team-card-logo img {
        width: 68px;
        height: 68px;
    }

    .lwf-team-card-logo-empty {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }

    /* المحتوى تحت الشعار */
    .lwf-team-card-content {
        width: 100%;
        padding: 0;
        text-align: center;
    }

    /* اسم الفريق */
    .lwf-team-card-title {
        margin: 0 0 12px;
        font-size: 19px;
        line-height: 1.35;
        text-align: center;
    }

    /* الملعب ثم المدينة */
    .lwf-team-card-info {
        justify-content: center;
        gap: 6px;
        margin-bottom: 7px;
        font-size: 12px;
        line-height: 1.45;
        text-align: center;
    }

    .lwf-team-card-info:last-child {
        margin-bottom: 0;
    }

    .lwf-team-card-info i {
        width: 18px;
        flex: 0 0 18px;
    }

    /* زر عن الفريق */
    .lwf-team-card-button {
        min-height: 44px;
        padding: 10px 14px;
        font-size: 14px;
    }

}

/* توحيد ارتفاع بطاقات الفرق ووضع زر "عن الفريق" في الأسفل */
.lwf-team-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.lwf-team-card-main {
    flex: 1;
}

.lwf-team-card-button {
    margin-top: auto;
    flex-shrink: 0;
}

@media (max-width: 600px) {

    .lwf-team-card {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .lwf-team-card-main {
        flex: 1;
        min-height: 0;
    }

    .lwf-team-card-button {
        margin-top: auto;
        flex-shrink: 0;
    }

}

/* =========================================================
   French / LTR
   ========================================================= */

.lwf-teams-page--fr {
    direction: ltr;
}

.lwf-teams-page--fr .lwf-teams-container {
    direction: ltr;
}

.lwf-teams-page--fr .lwf-teams-header {
    text-align: left;
}

.lwf-teams-page--fr .lwf-team-card {
    direction: ltr;
}

.lwf-teams-page--fr .lwf-team-card-content {
    padding: 0 0 0 18px;
    text-align: left;
}

.lwf-teams-page--fr .lwf-team-card-info {
    direction: ltr;
    justify-content: flex-start;
    text-align: left;
}