/* Al Horreya TV — public site.
   Uses logical properties (margin-inline-start, inset-inline-end…) so one stylesheet
   serves Arabic (rtl) and English (ltr). Brand colours come from the logo. */

:root {
    --navy-900: #071a33;
    --navy-800: #0b2545;
    --navy-700: #13315c;
    --blue-600: #1f5fae;
    --blue-500: #2f74c9;
    --blue-50: #eef4fc;
    --gold-500: #f5a524;
    --gold-600: #e08a0b;
    --gold-50: #fff7e8;
    --red-500: #e5383b;
    --ink: #0f172a;
    --ink-soft: #475569;
    --line: #e2e8f0;
    --bg: #ffffff;
    --bg-alt: #f6f8fb;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgb(15 23 42 / .06), 0 1px 3px rgb(15 23 42 / .08);
    --shadow: 0 10px 30px -12px rgb(11 37 69 / .25);
    --container: 1200px;
    --header-h: 76px;
    --font: "Cairo", "Segoe UI", Tahoma, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
img, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--blue-500); }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; color: var(--navy-800); font-weight: 800; }
h1 { font-size: clamp(1.9rem, 3.5vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; border-radius: 4px; }

.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }
.container.narrow { max-width: 860px; }
.center { text-align: center; }
.muted { color: var(--ink-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; inset-inline-start: 1rem; top: -100px; background: var(--navy-800); color: #fff; padding: .5rem 1rem; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 1rem; color: #fff; }
.stack { display: grid; gap: 1.25rem; align-content: start; }

/* Icons */
.icon { width: 1.25em; height: 1.25em; flex: none; }
.icon-xl { width: 2.5rem; height: 2.5rem; }
[dir="rtl"] .icon-flip { transform: scaleX(-1); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .65rem 1.25rem; border-radius: 999px; border: 2px solid transparent;
    font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2;
    cursor: pointer; transition: transform .15s ease, background-color .15s, color .15s, box-shadow .15s;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-lg { padding: .85rem 1.6rem; font-size: 1.075rem; }
.btn-sm { padding: .4rem .9rem; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--blue-600); color: #fff; }
.btn-primary:hover { background: var(--blue-500); color: #fff; box-shadow: var(--shadow); }
.btn-gold { background: var(--gold-500); color: var(--navy-900); }
.btn-gold:hover { background: #ffb53d; color: var(--navy-900); box-shadow: 0 10px 24px -10px rgb(245 165 36 / .7); }
.btn-outline { border-color: var(--blue-600); color: var(--blue-600); background: transparent; }
.btn-outline:hover { background: var(--blue-600); color: #fff; }
.btn-ghost { background: var(--blue-50); color: var(--blue-600); }
.btn-ghost:hover { background: #dce9f9; }
.btn-live { background: var(--red-500); color: #fff; padding: .45rem 1rem; font-size: .9rem; letter-spacing: .04em; }
.btn-live:hover { background: #d62828; color: #fff; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

.live-dot {
    display: inline-block; width: .6rem; height: .6rem; border-radius: 50%;
    background: currentColor; position: relative; flex: none;
}
.btn-live .live-dot { background: #fff; }
.section-head .live-dot, .live-page .live-dot { background: var(--red-500); margin-inline-end: .6rem; vertical-align: middle; }
.live-dot::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%;
    background: inherit; animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse { from { transform: scale(1); opacity: .8; } to { transform: scale(2.6); opacity: 0; } }

/* Announcement */
.announcement { background: var(--gold-500); color: var(--navy-900); text-align: center; font-weight: 700; padding: .5rem 1rem; }

/* Header */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgb(255 255 255 / .92);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-h); }
.brand img { height: 56px; width: auto; }
.main-nav { margin-inline-start: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.main-nav a {
    display: block; padding: .5rem .85rem; border-radius: 999px;
    color: var(--navy-800); font-weight: 600; transition: background-color .15s, color .15s;
}
.main-nav a:hover { background: var(--blue-50); color: var(--blue-600); }
.main-nav a.active { color: var(--blue-600); background: var(--blue-50); }
.header-actions { display: flex; align-items: center; gap: .75rem; }
.lang-switch {
    display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; color: var(--navy-800);
    padding: .4rem .7rem; border-radius: 999px; border: 1px solid var(--line);
}
.lang-switch:hover { border-color: var(--blue-500); }
.menu-toggle {
    display: none; background: none; border: 1px solid var(--line); border-radius: 10px;
    width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--navy-800); cursor: pointer;
}
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: inline-flex; }

@media (max-width: 1000px) {
    .menu-toggle { display: inline-flex; }
    .main-nav {
        position: fixed; inset: var(--header-h) 0 auto 0; margin: 0;
        background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
        transform: translateY(-8px); opacity: 0; visibility: hidden; transition: all .2s ease;
    }
    .main-nav.is-open { transform: none; opacity: 1; visibility: visible; }
    .main-nav ul { flex-direction: column; padding: .75rem 1rem 1.25rem; }
    .main-nav a { padding: .8rem 1rem; border-radius: 10px; font-size: 1.1rem; }
}
@media (max-width: 520px) {
    .brand img { height: 46px; }
    .lang-switch span { display: none; }
    .header-inner { gap: .75rem; }
}

/* Hero slider */
.hero { position: relative; height: clamp(300px, 52vw, 620px); overflow: hidden; background: var(--navy-900); }
.hero-slide {
    position: absolute; inset: 0; background-size: cover; background-position: center;
    opacity: 0; transition: opacity 1s ease, transform 7s ease; transform: scale(1.04);
    display: flex; align-items: flex-end;
}
.hero-slide.is-active { opacity: 1; transform: scale(1); }
.hero-slide::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(to top, rgb(7 26 51 / .85) 0%, rgb(7 26 51 / .25) 45%, transparent 70%);
}
.hero-slide-plain { background: radial-gradient(circle at 30% 20%, var(--blue-600), var(--navy-900) 70%); align-items: center; }
.hero-slide-plain::before { display: none; }
.hero-caption { position: relative; color: #fff; padding-block: 3rem 4rem; max-width: 760px; margin-inline: auto; }
.container.hero-caption { width: min(100% - 2rem, var(--container)); max-width: var(--container); }
.hero-caption h1, .hero-caption h2 { color: #fff; font-size: clamp(1.6rem, 4vw, 3rem); text-shadow: 0 2px 20px rgb(0 0 0 / .4); max-width: 720px; }
.hero-caption p { font-size: clamp(1rem, 1.6vw, 1.25rem); max-width: 620px; opacity: .92; }
.hero-controls { position: absolute; inset-inline: 0; bottom: 1.25rem; display: flex; justify-content: center; align-items: center; gap: 1rem; z-index: 2; }
.hero-dots { display: flex; gap: .5rem; }
.hero-dots button {
    width: 10px; height: 10px; border-radius: 999px; border: 0; padding: 0; cursor: pointer;
    background: rgb(255 255 255 / .5); transition: width .3s, background-color .3s;
}
.hero-dots button.is-active { width: 28px; background: var(--gold-500); }
.hero-pause {
    width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgb(0 0 0 / .35); color: #fff; transition: background-color .2s;
}
.hero-pause:hover { background: rgb(0 0 0 / .6); }
/* Pause icon (two bars); becomes a play triangle while paused. */
.hero-pause .icon-pause { width: 10px; height: 12px; border-inline: 3px solid currentColor; }
.hero-pause.is-paused .icon-pause {
    width: 0; height: 0; border-inline: 0; margin-inline-start: 3px;
    border-block: 6px solid transparent; border-left: 10px solid currentColor;
}
@media (prefers-reduced-motion: reduce) {
    .hero-slide { transition: none; transform: none; }
    .live-dot::after { animation: none; }
    html { scroll-behavior: auto; }
}

/* Sections */
.section { padding-block: clamp(3rem, 6vw, 5rem); }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.section-head h1, .section-head h2 { margin: 0; display: flex; align-items: center; }
.section-head p { margin: 0; flex-basis: 100%; }
.section-title { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.5rem; }
.section-title .icon { color: var(--gold-600); }
.link-arrow { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; }

.page-hero {
    background: radial-gradient(circle at 85% -20%, var(--blue-600), transparent 55%), linear-gradient(135deg, var(--navy-900), var(--navy-700));
    color: #fff; padding-block: clamp(2.5rem, 6vw, 4.5rem);
}
.page-hero h1 { color: #fff; margin: 0; max-width: 900px; }

/* Live */
.live-section { background: linear-gradient(180deg, var(--bg-alt), #fff); }
.live-grid { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(260px, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .live-grid { grid-template-columns: 1fr; } }
.player, .video {
    position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
    background: #000; box-shadow: var(--shadow);
}
.player iframe, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video { margin-top: 1.5rem; }
.live-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.25rem; display: grid; gap: 1rem; box-shadow: var(--shadow-sm);
}
.live-card-row { display: flex; gap: .85rem; align-items: center; }
.live-card-row > .icon { width: 2.6rem; height: 2.6rem; padding: .6rem; border-radius: 12px; background: var(--blue-50); color: var(--blue-600); }
.live-card-row small { display: block; color: var(--ink-soft); font-size: .85rem; }
.live-card-row strong { font-size: 1.15rem; color: var(--navy-800); }
.card-title { display: flex; align-items: center; gap: .5rem; font-size: 1.15rem; margin: 0; }
.card-title .icon { color: var(--gold-600); }
.live-card .muted { margin: 0; }

/* Features */
.features { padding-top: 0; }
.live-section + .features { padding-top: clamp(1rem, 3vw, 2rem); }
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 1000px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }
.feature {
    display: block; background: #fff; color: var(--ink); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 1.5rem; transition: transform .2s, box-shadow .2s, border-color .2s;
}
a.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; color: var(--ink); }
.feature h3 { margin: .9rem 0 .35rem; }
.feature p { color: var(--ink-soft); margin: 0; font-size: .98rem; }
.feature-icon {
    display: inline-flex; width: 3rem; height: 3rem; border-radius: 14px; align-items: center; justify-content: center;
    background: var(--blue-50); color: var(--blue-600);
}
.feature-icon .icon { width: 1.5rem; height: 1.5rem; }
.feature-gold { background: linear-gradient(160deg, var(--gold-50), #fff); border-color: #fde6bd; }
.feature-gold .feature-icon { background: var(--gold-500); color: var(--navy-900); }
.feature .social-links { margin-top: 1rem; }

/* Vision / prose */
.vision { background: var(--navy-800); color: #dbe6f5; }
.vision h2 { color: #fff; }
.vision .btn-outline { border-color: var(--gold-500); color: var(--gold-500); }
.vision .btn-outline:hover { background: var(--gold-500); color: var(--navy-900); }
.vision-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.vision-grid .video { margin: 0; }
@media (max-width: 900px) { .vision-grid { grid-template-columns: 1fr; } }
.prose p { text-wrap: pretty; }
.prose-lg { font-size: 1.125rem; line-height: 1.95; }
.prose-lg p:first-child { font-size: 1.3rem; font-weight: 700; color: var(--navy-800); line-height: 1.7; }

/* CTA band */
.cta-band { background: linear-gradient(120deg, var(--gold-500), #ffc45a); padding-block: 2.5rem; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 .25rem; color: var(--navy-900); }
.cta-band p { margin: 0; color: var(--navy-800); max-width: 680px; }
.cta-band .btn-gold { background: var(--navy-800); color: #fff; }
.cta-band .btn-gold:hover { background: var(--navy-900); color: #fff; }

/* Partner */
.partner-intro { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 900px) { .partner-intro { grid-template-columns: 1fr; } }
.give-card {
    position: sticky; top: calc(var(--header-h) + 1rem);
    background: linear-gradient(160deg, var(--navy-800), var(--navy-700)); color: #dbe6f5;
    border-radius: var(--radius); padding: 2rem; text-align: center; box-shadow: var(--shadow);
}
.give-card img { margin: 0 auto 1rem; width: 120px; }
.give-card p { font-weight: 600; }
.donate-buttons { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.live-card .donate-buttons { justify-content: flex-start; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.25rem; }
.info-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.4rem;
    box-shadow: var(--shadow-sm);
}
.info-card header { display: flex; align-items: center; gap: .65rem; margin-bottom: .75rem; }
.info-card header h3 { margin: 0; font-size: 1.1rem; }
.info-card header img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.info-card header .icon { color: var(--gold-600); }
.info-card .details { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .92rem; line-height: 1.8; color: var(--ink-soft); text-align: start; }
[dir="rtl"] .info-card .details { text-align: left; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

.phone-list { list-style: none; margin: 0; padding: 0; }
.phone-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px dashed var(--line); }
.phone-list li:last-child { border-bottom: 0; }
.phone-list span { color: var(--ink-soft); display: inline-flex; align-items: center; gap: .4rem; }
.phone-list a { font-weight: 700; unicode-bidi: isolate; }
.phone-list .icon { color: #25d366; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 2rem; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem); box-shadow: var(--shadow-sm); }
.contact-form { display: grid; gap: 1rem; margin-top: 1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: .35rem; }
.field > span { font-weight: 700; font-size: .95rem; color: var(--navy-800); }
.field input, .field select, .field textarea {
    font: inherit; font-size: 1rem; width: 100%; padding: .7rem .9rem; color: var(--ink);
    border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 4px rgb(47 116 201 / .15); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--red-500); }
.hp { position: absolute !important; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.5rem; font-weight: 600; }
.form-status.is-error { color: var(--red-500); }
.form-status.is-success {
    color: #166534; background: #dcfce7; border-radius: var(--radius-sm); padding: .9rem 1rem;
}
.contact-form .btn { justify-self: start; }
.whatsapp-card {
    display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; border-radius: var(--radius);
    background: #e9fbf0; color: #128c4b; border: 1px solid #c6f0d6;
}
.whatsapp-card:hover { background: #dcf8e7; color: #0e7a40; }
.whatsapp-card small { display: block; color: #3d7a57; }
.whatsapp-card strong { font-size: 1.2rem; }

/* Social */
.social-links { list-style: none; margin: 0; padding: 0; display: flex; gap: .5rem; flex-wrap: wrap; }
.social-links a {
    display: inline-flex; width: 42px; height: 42px; border-radius: 12px; align-items: center; justify-content: center;
    background: var(--blue-50); color: var(--blue-600); transition: background-color .15s, color .15s, transform .15s;
}
.social-links a:hover { background: var(--blue-600); color: #fff; transform: translateY(-2px); }

/* Footer */
.site-footer { background: var(--navy-900); color: #a9bad3; margin-top: 0; }
.site-footer a { color: #e2ebf7; }
.site-footer a:hover { color: var(--gold-500); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2.5rem; padding-block: 3.5rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; align-content: start; }
.footer-brand strong { color: #fff; font-size: 1.35rem; }
.footer-brand p { margin: 0; }
.footer-brand .social-links { grid-column: 1 / -1; margin-top: .5rem; }
.site-footer .social-links a { background: rgb(255 255 255 / .08); color: #fff; }
.site-footer .social-links a:hover { background: var(--gold-500); color: var(--navy-900); }
.footer-title { color: #fff; font-size: 1.1rem; margin-bottom: 1rem; }
.phone-list.compact li { padding: .3rem 0; border-color: rgb(255 255 255 / .08); }
.site-footer .phone-list span { color: #8ea3c2; }
.footer-bottom { border-top: 1px solid rgb(255 255 255 / .08); padding-block: 1.25rem; font-size: .92rem; }
.footer-bottom-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* Status pages */
.status-page img { margin: 0 auto 1rem; width: 140px; }
.status-code { font-size: 4rem; font-weight: 800; color: var(--gold-500); margin: 0; line-height: 1; }
