/* ============================
   GymPower Pro — Camp (Ultra)
   Author: you ✨
   ============================ */

/* ---------- CSS Vars ---------- */
:root {
    /* brand */
    --brand: #ff7a1a;
    --brand-2: #ffa055;
    --brand-3: #ff6100;

    /* dark palette */
    --bg: #0d0f14;
    --bg-2: #11131a;
    --card: #161a22;
    --card-2: #1b2030;
    --line: #242a38;

    /* text */
    --ink: #eef1f6;
    --ink-dim: #a9b0c2;
    --ink-mute: #7f8699;

    /* effects */
    --radius: 14px;
    --radius-lg: 20px;
    --shadow: 0 10px 35px rgba(0,0,0,.45);
    --glass: rgba(255,255,255,.06);
    --glass-2: rgba(255,255,255,.08);
    --blur: blur(10px);

    /* sizes */
    --container: 1200px;
    --gap: 18px;
}

/* Light theme */
[data-theme="light"] {
    --bg: #f7f8fb;
    --bg-2: #ffffff;
    --card: #ffffff;
    --card-2: #f2f4f8;
    --line: #e7ebf3;
    --ink: #0e1117;
    --ink-dim: #3b4453;
    --ink-mute: #6e7683;
    --glass: rgba(0,0,0,.04);
    --glass-2: rgba(0,0,0,.06);
    --shadow: 0 10px 28px rgba(8,12,20,.08);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    font-family: "Tajawal", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Apple Color Emoji","Segoe UI Emoji";
    background: radial-gradient(1200px 800px at 80% -10%, rgba(255,122,26,.08), transparent 60%),
    radial-gradient(900px 700px at 10% 10%, rgba(255,122,26,.06), transparent 60%),
    var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

.container { width: min(100% - 24px, var(--container)); margin-inline: auto; }
.no-scroll { overflow: hidden; }

/* ---------- Header ---------- */
.header {
    position: sticky; top: 0; z-index: 40;
    background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.0)),
    var(--bg-2);
    border-bottom: 1px solid var(--line);
    backdrop-filter: saturate(140%) blur(8px);
}
.header__wrap {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--gap);
    padding: 12px 0;
}

.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .2px; }
.logo__icon { font-size: 22px; }
.logo__text { color: var(--ink); }
.logo:hover .logo__text { color: var(--brand); }

.nav { justify-self: center; }
.nav__list { display: flex; gap: 14px; list-style: none; margin: 0; padding: 0; }
.nav__link {
    padding: 8px 12px; border-radius: 10px; color: var(--ink-dim);
    transition: .2s ease;
}
.nav__link:hover { color: var(--ink); background: var(--glass); }

.actions {
    justify-self: end;
    display: inline-flex; align-items: center; gap: 10px;
}

/* Icon + Chip + Button */
.icon-btn{
    width: 38px; height: 38px; border-radius: 10px;
    border: 1px solid var(--line); background: var(--glass);
    display: grid; place-items: center; color: var(--ink);
    transition: .2s ease; backdrop-filter: blur(8px);
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }

.chip{
    border: 1px solid var(--line); background: var(--card);
    padding: 8px 12px; border-radius: 999px; color: var(--ink);
    font-weight: 700; transition: .2s ease;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }

.btn{
    background: linear-gradient(180deg, var(--brand), var(--brand-3));
    color: #111; font-weight: 800; border: 0;
    padding: 10px 14px; border-radius: 12px; box-shadow: 0 8px 26px rgba(255,122,26,.35);
    display: inline-flex; align-items: center; gap: 8px;
    transition: transform .15s ease, box-shadow .2s ease;
}
.btn:hover{ transform: translateY(-2px); box-shadow: 0 12px 30px rgba(255,122,26,.45); }
.btn.ghost{
    background: transparent; color: var(--brand);
    border: 1px dashed var(--brand); box-shadow: none;
}
.btn.ghost:hover{ background: rgba(255,122,26,.08); }

.mobile-menu{ display: none; }

/* Profile in header */
.profile{
    display:inline-flex; align-items:center; gap:8px;
    background: var(--glass); border: 1px solid var(--line);
    padding: 4px 10px; border-radius: 999px; backdrop-filter: var(--blur);
}
.profile img{ width:28px; height:28px; border-radius:50%; object-fit:cover; }
.profile span{ font-weight:700; color: var(--ink); max-width: 140px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ---------- Drawer (Mobile) ---------- */
.drawer{
    position: fixed; inset: 0 0 0 auto; width: 84%; max-width: 360px;
    background: var(--card); border-left: 1px solid var(--line);
    transform: translateX(100%); transition: .25s ease; z-index: 60;
    display: grid; grid-template-rows: auto 1fr auto;
}
.drawer[aria-hidden="false"]{ transform: translateX(0); }
.drawer__head{ display:flex; align-items:center; justify-content:space-between; padding:12px 16px; border-bottom:1px solid var(--line); }
.drawer__nav{ display:grid; padding:12px 16px; gap: 8px; }
.drawer__link{
    padding: 12px; border-radius: 12px; border:1px solid var(--line); background: var(--bg-2);
    transition:.2s; color: var(--ink-dim);
}
.drawer__link:hover{ color:var(--ink); border-color: var(--brand); }
.drawer__tools{
    display:flex; gap:10px; padding:12px 16px; border-top:1px solid var(--line);
}

/* ---------- Hero ---------- */
.hero{
    position: relative; isolation: isolate; overflow: clip;
    min-height: clamp(360px, 48vw, 600px);
    display: grid; align-items: end;
}
.hero__bg{ position: absolute; inset: 0; z-index: -2; }
.hero__bg-img{
    width: 100%; height: 100%; object-fit: cover; filter: saturate(1.12) contrast(1.05);
    transform: scale(1.02);
}
.hero__overlay{
    position:absolute; inset:0;
    background:
            linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.25) 40%, rgba(0,0,0,.65)),
            radial-gradient(700px 300px at 20% 20%, rgba(255,122,26,.25), transparent 60%);
    mix-blend-mode: multiply;
}

.hero__content{ padding: 70px 0; }
.hero__title{
    font-size: clamp(28px, 4.4vw, 52px);
    line-height: 1.1; margin: 0 0 10px; letter-spacing:.3px;
    text-shadow: 0 8px 30px rgba(0,0,0,.6);
}
.hero__subtitle{
    color: var(--ink-dim);
    font-size: clamp(15px, 2.6vw, 18px);
    margin: 0 0 16px;
}
.hero__features{
    list-style: none; padding: 0; margin: 12px 0 0;
    display: flex; flex-wrap: wrap; gap: 10px;
}
.hero__features li{
    display: inline-flex; gap: 8px; align-items: center;
    background: var(--glass); border: 1px solid var(--line);
    padding: 8px 12px; border-radius: 999px; color: var(--ink);
    backdrop-filter: var(--blur);
}

/* ---------- Stats ---------- */
.stats { padding: 22px 0; }
.stats-grid{
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: var(--gap);
}
.stat{
    background: linear-gradient(180deg, var(--card), var(--card-2));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    box-shadow: var(--shadow);
}
.stat .num{ font-size: 28px; font-weight: 900; color: var(--brand); }
.stat .lbl{ display: block; margin-top: 6px; color: var(--ink-dim); }

/* ---------- Main / Events ---------- */
.main { padding: 28px 0 18px; }

.empty{
    display: grid; place-items: center; text-align: center;
    background: var(--card); border: 1px dashed var(--line);
    border-radius: var(--radius); color: var(--ink-mute);
    padding: 24px; margin-bottom: 16px;
}

.grid__body{
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--gap);
}

/* Skeletons */
.skel{
    grid-column: span 6;
    background: var(--card); border:1px solid var(--line); border-radius: var(--radius);
    overflow: hidden;
}
.skel .thumb{ height: 180px; background: linear-gradient(90deg, #222834, #242c3b, #222834); animation: shimmer 1.3s infinite; }
.skel .body { padding: 12px; }
.skel .line { height: 12px; background: #242b39; border-radius: 8px; margin: 8px 0; }
.w60{ width:60%; } .w40{ width:40%; } .w80{ width:80%; }

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Card */
.card{
    grid-column: span 6;
    background: linear-gradient(180deg, var(--card), var(--card-2));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden; display: grid; grid-template-rows: auto 1fr;
    transition: transform .18s ease, box-shadow .22s ease, border-color .18s ease;
}
.card:hover{ transform: translateY(-3px); border-color: rgba(255,122,26,.35); box-shadow: 0 16px 38px rgba(255,122,26,.18); }

.card-thumb{
    width: 100%; height: clamp(180px, 22vw, 220px);
    object-fit: cover; image-rendering: auto;
    filter: saturate(1.08) contrast(1.04);
}

.card .body { padding: 14px; display: grid; gap: 10px; }
.card-title{ margin: 0; font-size: 18px; line-height: 1.3; color: var(--ink); }
.card-desc{ margin: 0; color: var(--ink-mute); min-height: 38px; }

.meta{ display: flex; flex-wrap: wrap; gap: 10px; color: var(--ink-dim); font-size: 14px; }
.meta span{ display:inline-flex; gap: 6px; align-items: center; border:1px solid var(--line); background: var(--bg-2); border-radius: 999px; padding: 6px 10px; }

.actions{ display:flex; gap: 10px; }

/* ---------- Gallery ---------- */
.gallery { padding: 24px 0 34px; }
.gallery__wrap{
    display: grid; gap: var(--gap);
    grid-template-columns: repeat(12, 1fr);
}
.g-item{
    grid-column: span 6;
    background: var(--card); border:1px solid var(--line);
    border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow);
}
.g-item img{
    width:100%; height: clamp(220px, 28vw, 340px);
    object-fit: cover; filter: saturate(1.1) contrast(1.1);
    transition: .25s ease;
}
.g-item:hover img{ transform: scale(1.03); }
.g-item figcaption{
    padding: 10px 12px; color: var(--ink-dim);
    border-top: 1px solid var(--line); background: var(--bg-2);
}

/* ---------- Modal ---------- */
.modal{
    position: fixed; inset: 0; z-index: 90;
    display: grid; place-items: center; padding: 16px;
    background: rgba(0,0,0,.45);
    transform: translateY(6px); opacity: 0; pointer-events: none;
    transition: .2s ease;
}
.modal[aria-hidden="false"]{ transform: none; opacity: 1; pointer-events: auto; }
.modal__dialog{
    width: min(100%, 980px);
    background: linear-gradient(180deg, var(--card), var(--card-2));
    border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
    overflow: hidden; display: grid; grid-template-columns: 1fr 1.1fr;
}
.modal__thumb{ width:100%; height: 100%; object-fit: cover; min-height: 340px; }
.modal__body{ padding: 16px; display: grid; gap: 12px; }
.modal__title{ margin: 0; font-size: 22px; }
.modal__desc{ color: var(--ink-mute); margin: 6px 0 0; }

.modal__close{
    position:absolute; inset-inline-end: 14px; top: 14px;
    width: 40px; height: 40px; border-radius: 10px; border:1px solid var(--line);
    background: var(--glass); color: var(--ink);
}
.modal__actions{ display:flex; gap:10px; }
.map{
    width: 100%; height: 260px; border: 0;
    border-radius: 12px; overflow: hidden;
}

.chips{ display:flex; flex-wrap: wrap; gap: 8px; }
.chip{
    display:inline-flex; align-items:center; gap:8px;
    border:1px solid var(--line); background: var(--bg-2);
    border-radius: 999px; padding: 6px 10px; color: var(--ink-dim);
}

/* ---------- FAQ ---------- */
.faq{ padding: 16px 0 28px; }
.sec-title{ margin: 0 0 12px; font-size: 22px; }
.qa{
    border:1px solid var(--line); background: var(--card);
    border-radius: var(--radius); padding: 12px 14px; margin: 8px 0;
}
.qa summary{ cursor: pointer; font-weight: 700; color: var(--ink); }
.qa p{ color: var(--ink-mute); margin: 8px 0 0; }

/* ---------- Footer ---------- */
.footer{
    margin-top: 18px; padding: 22px 0; border-top: 1px solid var(--line);
    background: linear-gradient(180deg, var(--bg-2), var(--card));
}
.footer__grid{
    display: grid; gap: var(--gap);
    grid-template-columns: 2fr 1fr 1fr;
}
.footer .links{ list-style:none; padding:0; margin:0; }
.footer .links li a{
    display:inline-block; padding:6px 0; color: var(--ink-dim);
}
.footer .links li a:hover{ color: var(--ink); }
.addr{ color: var(--ink-dim); display:flex; flex-direction:column; gap:6px; }
.footer__bottom{ display:flex; justify-content:space-between; align-items:center; margin-top: 12px; color: var(--ink-mute); }

/* ---------- Toast ---------- */
.toast{
    position: fixed; inset-inline: 0; bottom: 22px; margin-inline: auto;
    background: linear-gradient(180deg, var(--brand), var(--brand-3)); color:#111;
    padding: 10px 16px; border-radius: 999px; box-shadow: 0 10px 28px rgba(255,122,26,.35);
    width: fit-content; opacity: 0; transform: translateY(10px); transition:.22s ease;
    z-index: 100;
}
.toast.show{ opacity: 1; transform: translateY(0); }

/* ---------- Utilities ---------- */
[hidden]{ display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px){
    .container { width: min(100% - 20px, 980px); }
    .modal__dialog{ grid-template-columns: 1fr; }
    .modal__thumb{ min-height: 220px; }
}
@media (max-width: 900px){
    .nav { display: none; }
    .mobile-menu{ display: inline-flex; background: var(--glass); border: 1px solid var(--line); width: 38px; height: 38px; border-radius: 10px; color: var(--ink); align-items:center; justify-content:center; }
    .stats-grid{ grid-template-columns: 1fr; }
    .grid__body{ grid-template-columns: repeat(6, 1fr); }
    .card, .skel{ grid-column: span 6; }
    .gallery__wrap{ grid-template-columns: repeat(6, 1fr); }
    .g-item{ grid-column: span 6; }
    .footer__grid{ grid-template-columns: 1fr; }
}
@media (max-width: 560px){
    .actions .btn{ display:none; } /* زر الإضافة يختفي على الشاشات الصغيرة (اختياري) */
    .chip{ padding: 7px 10px; }
    .card-thumb{ height: 180px; }
}

/* ---------- Nice micro-interactions ---------- */
.card:hover .card-thumb{ filter: saturate(1.15) contrast(1.08); }
.btn i, .icon-btn i{ transform: translateY(0); transition: transform .15s ease; }
.btn:hover i, .icon-btn:hover i{ transform: translateY(-1px); }
