:root {
    --green: #0a4a1b;
    --green-dark: #073614;
    --green-mid: #0f5527;
    --green-soft: #edf5ef;
    --gold: #b9913f;
    --gold-soft: #f7f0df;
    --bg: #f5f7f5;
    --surface: #ffffff;
    --text: #1d2f1e;
    --muted: #5c675e;
    --border: #e0e7e1;
    --shadow: 0 8px 28px rgba(5, 50, 20, .09);
    --shadow-strong: 0 14px 38px rgba(5, 50, 20, .16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Tahoma, "Segoe UI", Arial, sans-serif;
    line-height: 1.85;
    text-rendering: optimizeLegibility;
}

button,
a,
summary,
audio {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

button {
    font: inherit;
}

.page-shell {
    min-height: 100vh;
    padding: 18px 0 34px;
}

.container {
    width: min(900px, calc(100% - 28px));
    margin: 0 auto;
}

.top-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.top-controls .brand-chip {
    margin: 0;
}

.theme-toggle {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(10, 74, 27, .15);
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    color: var(--green-dark);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .05);
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
}

.theme-toggle:active {
    transform: scale(.96);
}

.theme-toggle:focus-visible {
    outline: 3px solid rgba(185, 145, 63, .42);
    outline-offset: 3px;
}

.theme-toggle svg {
    width: 22px;
    height: 22px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.brand-chip {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 14px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 12px;
    border: 1px solid rgba(10, 74, 27, .14);
    border-radius: 999px;
    background: rgba(255, 255, 255, .82);
    color: var(--green-dark);
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .04);
}

.brand-chip img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.breadcrumbs {
    margin: 0 2px 12px;
    color: #667169;
    font-size: 13px;
    text-align: center;
}

.breadcrumbs a {
    text-decoration: none;
}

.breadcrumbs a:hover,
.breadcrumbs a:focus-visible {
    text-decoration: underline;
}

.hero {
    text-align: center;
    padding: 4px 0 2px;
}

.hero h1 {
    max-width: 820px;
    margin: 0 auto 5px;
    color: #093716;
    font-size: clamp(25px, 5vw, 36px);
    line-height: 1.48;
    font-weight: 900;
}

.hero .subtitle {
    margin: 0;
    color: var(--green-mid);
    font-size: clamp(15px, 3.4vw, 18px);
}

.player-box,
.content-box,
.links-box,
.faq-box,
.share-card,
.hub-card {
    background: var(--surface);
    border: 1px solid rgba(10, 74, 27, .08);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.player-box {
    position: relative;
    overflow: hidden;
    margin-top: 19px;
    padding: 27px 22px 24px;
    text-align: center;
}

.player-box::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--green-dark), var(--gold), var(--green));
}

.live-badge {
    width: fit-content;
    margin: 0 auto 5px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #f4f8f5;
    color: var(--green-dark);
    font-size: 13px;
    font-weight: 800;
}

.live-badge span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #b42318;
    box-shadow: 0 0 0 4px rgba(180, 35, 24, .09);
}

.section-title {
    margin: 4px 0 1px;
    color: var(--green-mid);
    font-size: 22px;
}

.radio-visual {
    position: relative;
    width: 190px;
    height: 92px;
    margin: 2px auto 1px;
    display: grid;
    place-items: center;
}

.radio-ring {
    position: absolute;
    border: 1px solid rgba(10, 74, 27, .13);
    border-radius: 50%;
}

.radio-ring-one {
    width: 126px;
    height: 76px;
}

.radio-ring-two {
    width: 174px;
    height: 92px;
    border-color: rgba(185, 145, 63, .16);
}

.radio-waves {
    position: relative;
    z-index: 2;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.radio-waves span {
    width: 6px;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--gold), var(--green));
    transform-origin: center;
}

.radio-waves.playing span {
    animation: wave 1s ease-in-out infinite;
}

.radio-waves.playing span:nth-child(1),
.radio-waves.playing span:nth-child(7) { animation-delay: 0s; }
.radio-waves.playing span:nth-child(2),
.radio-waves.playing span:nth-child(6) { animation-delay: .10s; }
.radio-waves.playing span:nth-child(3),
.radio-waves.playing span:nth-child(5) { animation-delay: .20s; }
.radio-waves.playing span:nth-child(4) { animation-delay: .30s; }

@keyframes wave {
    0%, 100% { height: 14px; opacity: .76; }
    50% { height: 52px; opacity: 1; }
}

.big-play-btn {
    position: relative;
    width: 108px;
    height: 108px;
    margin: 5px auto 12px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(145deg, #0c5a22, var(--green-dark));
    color: #fff;
    cursor: pointer;
    box-shadow: 0 13px 30px rgba(7, 54, 20, .26), inset 0 1px 0 rgba(255, 255, 255, .18);
    transition: transform .18s ease, box-shadow .18s ease;
}

.big-play-btn::before {
    content: "";
    position: absolute;
    inset: -8px;
    border: 1px solid rgba(10, 74, 27, .14);
    border-radius: 50%;
}

.big-play-btn:hover {
    transform: translateY(-2px) scale(1.025);
    box-shadow: 0 16px 34px rgba(7, 54, 20, .32);
}

.big-play-btn:active {
    transform: scale(.98);
}

.big-play-btn:focus-visible,
.action-btn:focus-visible,
.hub-cta:focus-visible,
.links-grid a:focus-visible,
.brand-chip:focus-visible {
    outline: 3px solid rgba(185, 145, 63, .42);
    outline-offset: 3px;
}

.player-icon {
    position: relative;
    width: 0;
    height: 0;
    margin-left: -6px;
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    border-left: 27px solid #fff;
}

.big-play-btn.is-playing .player-icon {
    width: 28px;
    height: 34px;
    margin-right: 0;
    border: 0;
}

.big-play-btn.is-playing .player-icon::before,
.big-play-btn.is-playing .player-icon::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 9px;
    border-radius: 2px;
    background: #fff;
}

.big-play-btn.is-playing .player-icon::before {
    right: 0;
}

.big-play-btn.is-playing .player-icon::after {
    left: 0;
}

.player-status {
    margin: 1px 0 8px;
    color: var(--green-dark);
    font-size: 14px;
    font-weight: 800;
}

audio {
    width: min(100%, 720px);
    height: 56px;
    margin: 0 auto;
    display: block;
}

.live-note {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.share-card {
    margin-top: 18px;
    padding: 18px 20px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 16px;
}

.share-card h2 {
    margin: 0 0 3px;
    color: var(--green-dark);
    font-size: 19px;
}

.share-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.action-btn,
.hub-cta {
    border: 0;
    border-radius: 11px;
    padding: 11px 14px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
}

.action-btn-primary {
    background: var(--green);
    color: #fff;
}

.action-btn-secondary {
    background: var(--green-soft);
    color: var(--green-dark);
    border: 1px solid rgba(10, 74, 27, .14);
}

.share-status {
    grid-column: 1 / -1;
    min-height: 1.4em;
    color: var(--green-mid) !important;
    font-weight: 800;
    text-align: center;
}

.content-box,
.links-box,
.faq-box,
.hub-card {
    margin-top: 22px;
    padding: 22px 20px;
}

.content-box,
.links-box,
.faq-box {
    content-visibility: auto;
    contain-intrinsic-size: 480px;
}

.content-box h2,
.links-box h2,
.faq-box h2,
.hub-card h2 {
    margin: 0 0 11px;
    color: var(--green-mid);
    font-size: 22px;
}

.content-box h3 {
    margin: 18px 0 6px;
    color: #174d26;
    font-size: 18px;
}

.content-box p,
.hub-card p {
    margin: 0 0 10px;
    color: #354138;
    font-size: 16px;
}

.content-box a,
.faq-box a {
    color: var(--green-mid);
    font-weight: 800;
}

.info-list {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.info-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.info-list li:last-child {
    border-bottom: 0;
}

.info-label {
    color: var(--green-mid);
    font-weight: 800;
}

.hub-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
    background: linear-gradient(135deg, #fffdf7, var(--gold-soft));
    border-color: rgba(185, 145, 63, .26);
}

.eyebrow {
    display: inline-block;
    margin-bottom: 4px;
    color: #755a21;
    font-size: 12px;
    font-weight: 900;
}

.hub-card h2 {
    color: #493813;
}

.hub-cta {
    background: #6d521b;
    color: #fff;
    white-space: nowrap;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
}

.links-grid a {
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #fbfcfb;
    color: var(--green-dark);
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.links-grid a:hover {
    transform: translateY(-2px);
    border-color: rgba(10, 74, 27, .25);
    background: var(--green-soft);
}

.links-grid a strong {
    font-size: 16px;
}

.links-grid a span {
    color: var(--muted);
    font-size: 13px;
}

.links-grid .featured-link {
    background: linear-gradient(135deg, #0b4d1e, #0f632b);
    border-color: transparent;
    color: #fff;
}

.links-grid .featured-link span {
    color: rgba(255, 255, 255, .82);
}

.section-logo {
    display: block;
    margin: 8px auto 15px;
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: 0;
}

.faq-item summary {
    padding: 13px 0;
    color: #183c20;
    cursor: pointer;
    font-weight: 800;
}

.faq-item p {
    margin: 0 0 13px;
    color: #424c44;
    font-size: 15px;
}

.bottom-nav {
    margin: 24px 0 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    color: #5c675e;
    font-size: 13px;
}

.bottom-nav a {
    color: var(--green-mid);
    font-weight: 800;
    text-decoration: none;
}

.bottom-nav a:hover,
.bottom-nav a:focus-visible {
    text-decoration: underline;
}

/* الوضع الداكن التلقائي: يعمل فقط ما لم يختَر الزائر الوضع النهاري يدويًا */
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) {
        --bg: #0d1510;
        --surface: #151f18;
        --text: #eef5ef;
        --muted: #bdc8bf;
        --border: #2b382e;
        --green-soft: #1a2b20;
        --gold-soft: #292313;
        --shadow: 0 8px 26px rgba(0, 0, 0, .28);
    }

    html:not([data-theme="light"]) .brand-chip,
    html:not([data-theme="light"]) .theme-toggle {
        background: rgba(21, 31, 24, .94);
        color: #ecf4ed;
        border-color: #2e3f32;
    }

    html:not([data-theme="light"]) .hero h1,
    html:not([data-theme="light"]) .section-title,
    html:not([data-theme="light"]) .content-box h2,
    html:not([data-theme="light"]) .links-box h2,
    html:not([data-theme="light"]) .faq-box h2,
    html:not([data-theme="light"]) .share-card h2,
    html:not([data-theme="light"]) .content-box h3,
    html:not([data-theme="light"]) .faq-item summary,
    html:not([data-theme="light"]) .player-status {
        color: #dff0e2;
    }

    html:not([data-theme="light"]) .hero .subtitle,
    html:not([data-theme="light"]) .content-box a,
    html:not([data-theme="light"]) .faq-box a,
    html:not([data-theme="light"]) .info-label,
    html:not([data-theme="light"]) .bottom-nav a {
        color: #8fd09e;
    }

    html:not([data-theme="light"]) .live-badge,
    html:not([data-theme="light"]) .links-grid a {
        background: #18231b;
        color: #eef5ef;
    }

    html:not([data-theme="light"]) .content-box p,
    html:not([data-theme="light"]) .hub-card p,
    html:not([data-theme="light"]) .faq-item p,
    html:not([data-theme="light"]) .links-grid a span {
        color: #c8d2ca;
    }

    html:not([data-theme="light"]) .hub-card {
        background: linear-gradient(135deg, #201c12, #292313);
        border-color: rgba(185, 145, 63, .3);
    }

    html:not([data-theme="light"]) .hub-card h2,
    html:not([data-theme="light"]) .eyebrow {
        color: #e6cf91;
    }

    html:not([data-theme="light"]) .action-btn-secondary {
        color: #e2eee4;
        border-color: #314437;
    }
}

/* الوضع الداكن اليدوي */
html[data-theme="dark"] {
    --bg: #0d1510;
    --surface: #151f18;
    --text: #eef5ef;
    --muted: #bdc8bf;
    --border: #2b382e;
    --green-soft: #1a2b20;
    --gold-soft: #292313;
    --shadow: 0 8px 26px rgba(0, 0, 0, .28);
}

html[data-theme="dark"] .brand-chip,
html[data-theme="dark"] .theme-toggle {
    background: rgba(21, 31, 24, .94);
    color: #ecf4ed;
    border-color: #2e3f32;
}

html[data-theme="dark"] .hero h1,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .content-box h2,
html[data-theme="dark"] .links-box h2,
html[data-theme="dark"] .faq-box h2,
html[data-theme="dark"] .share-card h2,
html[data-theme="dark"] .content-box h3,
html[data-theme="dark"] .faq-item summary,
html[data-theme="dark"] .player-status {
    color: #dff0e2;
}

html[data-theme="dark"] .hero .subtitle,
html[data-theme="dark"] .content-box a,
html[data-theme="dark"] .faq-box a,
html[data-theme="dark"] .info-label,
html[data-theme="dark"] .bottom-nav a {
    color: #8fd09e;
}

html[data-theme="dark"] .live-badge,
html[data-theme="dark"] .links-grid a {
    background: #18231b;
    color: #eef5ef;
}

html[data-theme="dark"] .content-box p,
html[data-theme="dark"] .hub-card p,
html[data-theme="dark"] .faq-item p,
html[data-theme="dark"] .links-grid a span {
    color: #c8d2ca;
}

html[data-theme="dark"] .hub-card {
    background: linear-gradient(135deg, #201c12, #292313);
    border-color: rgba(185, 145, 63, .3);
}

html[data-theme="dark"] .hub-card h2,
html[data-theme="dark"] .eyebrow {
    color: #e6cf91;
}

html[data-theme="dark"] .action-btn-secondary {
    color: #e2eee4;
    border-color: #314437;
}

@media (max-width: 700px) {
    .page-shell {
        padding-top: 12px;
    }

    .top-controls {
        gap: 8px;
        margin-bottom: 11px;
    }

    .theme-toggle {
        width: 42px;
        height: 42px;
    }

    .container {
        width: min(100% - 20px, 900px);
    }

    .player-box,
    .content-box,
    .links-box,
    .faq-box,
    .share-card,
    .hub-card {
        border-radius: 15px;
    }

    .player-box {
        padding: 23px 14px 19px;
    }

    .big-play-btn {
        width: 98px;
        height: 98px;
    }

    .share-card,
    .hub-card {
        grid-template-columns: 1fr;
    }

    .share-actions {
        justify-content: stretch;
    }

    .action-btn,
    .hub-cta {
        flex: 1 1 160px;
        text-align: center;
    }

    .links-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 380px) {
    .container {
        width: min(100% - 14px, 900px);
    }

    .hero h1 {
        font-size: 23px;
    }

    .content-box,
    .links-box,
    .faq-box,
    .share-card,
    .hub-card {
        padding: 18px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
