/* ================================================================
   wp Goal plugin — Premium Frontend Stylesheet (Light Theme)
   Fully Responsive: Mobile-first → Desktop 1024px+
   ================================================================ */

:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --primary: #0ea5e9;
    --primary-glow: rgba(14, 165, 233, 0.1);
    --accent: #ef4444;
    --success: #10b981;
    --text: #1e293b;
    --text-dim: #64748b;
    --font: 'Cairo', sans-serif;
    --radius: 16px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

/* ---- Base ---- */
.wp-goal-wrap {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text);
    direction: rtl;
    min-height: 100vh;
    padding: 24px 16px;
    box-sizing: border-box;
}
.wp-goal-wrap *, .wp-goal-wrap *::before, .wp-goal-wrap *::after { box-sizing: border-box; }
.wp-goal-wrap a { color: inherit; text-decoration: none; }

/* ---- Glass Card (Light) ---- */
.g-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s ease;
}
.g-card:hover {
    box-shadow: var(--shadow-hover);
}

/* ---- Entity Header ---- */
.ent-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}
.ent-header::after {
    content:''; position:absolute; top:-60%; left:-60%; width:220%; height:220%;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    pointer-events: none;
}
.ent-logo img { max-height: 110px; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1)); }
.ent-info h1 {
    font-size: 30px; font-weight: 900; margin: 0 0 12px;
    color: var(--text);
}
.ent-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.ent-meta span {
    background: var(--bg-secondary); padding: 6px 14px;
    border-radius: 20px; border: 1px solid var(--border);
    font-size: 13px; font-weight: 700; color: var(--text-dim);
}

/* ---- Tabs ---- */
.g-tabs { display: flex; gap: 12px; margin-bottom: 28px; overflow-x: auto; border-bottom: 2px solid var(--border); padding-bottom: 12px; scrollbar-width: none; }
.g-tabs::-webkit-scrollbar { display: none; }
.g-tab {
    background: transparent; border: none; color: var(--text-dim);
    padding: 10px 24px; font-size: 16px; font-weight: 800;
    cursor: pointer; border-radius: 10px; white-space: nowrap; transition: all .3s;
    font-family: var(--font);
}
.g-tab:hover { color: var(--text); background: var(--bg-secondary); }
.g-tab.active { color: var(--primary); background: var(--primary-glow); }
.g-tab-panel { display: none; }
.g-tab-panel.active { display: block; animation: fadeUp .4s ease; }
@keyframes fadeUp { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }

/* ---- Standings Table ---- */
.st-table { width: 100%; border-collapse: collapse; }
.st-table th, .st-table td { padding: 16px 12px; text-align: center; border-bottom: 1px solid var(--border); }
.st-table th { color: var(--text-dim); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; }
.st-table td { font-size: 14px; font-weight: 600; }
.st-table tr:hover td { background-color: var(--bg-secondary); }
.st-team { display: flex; align-items: center; gap: 12px; text-align: right !important; }
.st-team img { width: 32px; height: 32px; object-fit: contain; }
.st-team a { color: var(--text); font-weight: 800; transition: .2s; }
.st-team a:hover { color: var(--primary); }
.st-pos { font-weight: 900; width: 36px; color: var(--text-dim); }
.st-pts { font-weight: 900; color: var(--primary); font-size: 15px; }

/* ---- Match Card ---- */
.m-list { display: flex; flex-direction: column; gap: 14px; }
.m-card {
    display: grid; grid-template-columns: 1fr auto 1fr;
    align-items: center; padding: 18px 24px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); transition: all .3s;
}
.m-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }
.m-team { display: flex; align-items: center; gap: 14px; font-weight: 800; font-size: 16px; color: var(--text); }
.m-team img { width: 40px; height: 40px; object-fit: contain; }
.m-team.home { justify-content: flex-end; }
.m-team.away { justify-content: flex-start; }
.m-team a { color: inherit; transition: .2s; }
.m-team a:hover { color: var(--primary); }
.m-center { text-align: center; padding: 0 24px; }
.m-score {
    display: inline-block; padding: 8px 20px; border-radius: 10px;
    font-size: 22px; font-weight: 900; letter-spacing: 2px;
    background: var(--bg-secondary); border: 1px solid var(--border);
    color: var(--text); transition: .2s;
}
.m-score:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.m-time { font-size: 13px; color: var(--text-dim); margin-top: 8px; font-weight: 700; }
.live-badge { background: var(--accent); color: #fff; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 900; animation: pulse 2s infinite; }

/* ---- Big Score (Match Page) ---- */
.big-score { font-size: 56px; font-weight: 900; display: flex; align-items: center; gap: 28px; color: var(--text); }
.big-score .sep { font-size: 28px; color: var(--text-dim); }
.status-pill {
    display: inline-block; padding: 8px 24px; border-radius: 24px;
    font-weight: 800; font-size: 16px; color: var(--primary);
    background: var(--primary-glow); border: 1px solid rgba(14, 165, 233, 0.2);
}
.match-team-link { text-decoration: none; color: var(--text); text-align: center; transition: .2s; }
.match-team-link:hover { color: var(--primary); transform: translateY(-4px); }
.match-team-link img { max-height: 90px; display: block; margin: 0 auto; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.05)); }
.match-team-link h3 { margin-top: 14px; font-size: 20px; font-weight: 900; }

/* ---- Stats Bars ---- */
.stat-rows { display: flex; flex-direction: column; gap: 20px; }
.stat-row-info { display: flex; justify-content: space-between; font-weight: 800; font-size: 15px; margin-bottom: 6px; }
.stat-bar-wrap { display: flex; height: 12px; background: var(--bg-secondary); border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.stat-bar-h { background: var(--primary); transition: width 1s; }
.stat-bar-sep { width: 3px; background: var(--bg-card); }
.stat-bar-a { background: var(--accent); transition: width 1s; }

/* ---- Squad Grid ---- */
.sq-title { color: var(--primary); font-size: 20px; margin-bottom: 16px; border-right: 5px solid var(--primary); padding-right: 12px; font-weight: 900; }
.sq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px; margin-bottom: 32px; }
.sq-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 14px; padding: 20px 12px; text-align: center;
    transition: all .3s; display: block; color: var(--text);
    box-shadow: var(--shadow);
}
.sq-card:hover { border-color: var(--primary); transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.sq-card img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid var(--bg-secondary); margin: 0 auto 12px; display: block; }
.sq-card .name { font-weight: 800; font-size: 15px; }
.sq-card .num { font-size: 13px; color: var(--text-dim); margin-top: 6px; font-weight: 700; background: var(--bg-secondary); display: inline-block; padding: 2px 8px; border-radius: 10px; }

/* ---- Player Profile ---- */
.player-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.player-photo { text-align: center; padding: 30px 20px; }
.player-photo img {
    width: 160px; height: 160px; border-radius: 50%;
    border: 5px solid var(--primary); box-shadow: 0 10px 25px rgba(14, 165, 233, 0.2);
    margin-bottom: 20px;
}
.p-stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px; }
.p-stat { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 20px; text-align: center; box-shadow: var(--shadow); }
.p-stat .val { font-size: 30px; font-weight: 900; color: var(--primary); margin-bottom: 4px; }
.p-stat .lbl { font-size: 14px; color: var(--text-dim); font-weight: 700; }

/* ---- Timeline (Events) ---- */
.timeline { position: relative; padding-right: 28px; border-right: 3px solid var(--border); margin-right: 14px; }
.tl-item { margin-bottom: 24px; position: relative; }
.tl-dot {
    position: absolute; right: -38px; top: 0;
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--bg-card); border: 3px solid var(--primary);
    display: flex; align-items: center; justify-content: center; font-size: 11px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.tl-time { font-size: 14px; font-weight: 900; color: var(--primary); margin-bottom: 4px; }
.tl-desc { color: var(--text); font-weight: 800; font-size: 15px; }
.tl-desc .team-tag { font-size: 13px; color: var(--text-dim); font-weight: 600; }

/* ---- No Data ---- */
.no-data { text-align: center; color: var(--text-dim); padding: 40px; font-style: italic; font-weight: 600; background: var(--bg-secondary); border-radius: 12px; }

/* ================================================================
   DESKTOP LAYOUT (>= 1024px)
   Two-column layout for all pages
   ================================================================ */
@media (min-width: 1024px) {
    .wp-goal-wrap { padding: 48px 80px; max-width: 1440px; margin: 0 auto; }
    .ent-logo img { max-height: 130px; }
    .ent-info h1 { font-size: 38px; }

    .desktop-2col { display: grid; grid-template-columns: 7fr 3fr; gap: 32px; align-items: start; }
    .desktop-2col-eq { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
    .player-grid { grid-template-columns: 320px 1fr; }
    
    .st-table th, .st-table td { padding: 18px 16px; }
    .sq-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
    .m-team { font-size: 18px; }
    .m-team img { width: 48px; height: 48px; }
    .m-center { padding: 0 40px; }
    .m-score { font-size: 24px; padding: 10px 24px; }
    .match-team-link img { max-height: 110px; }
    .match-team-link h3 { font-size: 22px; }
    .big-score { font-size: 68px; }
}

/* Base Headings */
h2, h3, h4 { color: var(--text); font-weight: 900; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
h4 { font-size: 18px; }
