/* STYLES for the public website. Same cream + gold look as the TV display.
   Phone first; wider screens get two columns. */

:root {
    --bg: #efe8de;
    --card: #fbf8f2;
    --gold: #b8892e;
    --gold-soft: #f4e8cf;
    --ink: #1d1d1b;
    --muted: #7a756c;
    --line: #e7dfd1;
    --dark: #1f201e;
    --hero: #16251d;      /* deep green-black, like a masjid at night */
    --gold-light: #d4a64a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Outfit', Arial, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.4; }
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.ar { font-family: 'Amiri', serif; font-weight: 400; color: var(--muted); font-size: .85em; }
.time { font-variant-numeric: tabular-nums; white-space: nowrap; }
.time small { font-size: .55em; font-weight: 500; margin-left: 3px; }
.eyebrow { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 600; }

/* ---------- Header (dark, flows into the hero) ---------- */
/* The header has no colour of its own: it sits on the hero's background (.top in the layout) */
.top { background: var(--hero); }
.site-header { position: relative; z-index: 2; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 104px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; font-weight: 600; font-size: 22px; color: #f6efe2; }
.brand img { height: 84px; width: auto; }
.site-header nav { display: flex; gap: 24px; font-size: 15px; }
.site-header nav a { text-decoration: none; color: rgba(246, 239, 226, .7); }
.site-header nav a:hover, .site-header nav a.on { color: var(--gold-light); }

/* ---------- Hero: the big banner at the top ---------- */
.hero { position: relative; overflow: hidden; color: #f6efe2; padding: 0 0 120px;
    background:
        radial-gradient(ellipse 700px 420px at 85% 20%, rgba(212, 166, 74, .28), transparent 70%),
        radial-gradient(ellipse 600px 400px at 0% 100%, rgba(212, 166, 74, .14), transparent 70%),
        var(--hero); }
/* faint Islamic 8-point star pattern */
.hero::before { content: ''; position: absolute; inset: 0; opacity: .09; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23d4a64a' stroke-width='1.2'%3E%3Crect x='22' y='22' width='36' height='36'/%3E%3Crect x='22' y='22' width='36' height='36' transform='rotate(45 40 40)'/%3E%3Ccircle cx='40' cy='40' r='8'/%3E%3C/g%3E%3C/svg%3E");
    -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent);
            mask-image: linear-gradient(to bottom, #000 30%, transparent); }
/* the large logo as a soft silhouette in the background */
.hero::after { content: ''; position: absolute; right: -40px; bottom: -60px; width: 420px; height: 560px; opacity: .07;
    background: url('/images/logo-mark.png') no-repeat center / contain; pointer-events: none; }
.hero-inner { padding-top: 56px; position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 36px; }
.hero-text { flex: 1 1 420px; }
.hero-salaam { color: var(--gold-light); font-size: 15px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; }
.hero h1 { font-size: 64px; line-height: 1.02; font-weight: 700; margin: 10px 0 12px; letter-spacing: -.01em; }
.hero-address { color: rgba(246, 239, 226, .7); font-size: 17px; }
.hero-dates { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-dates span { border: 1px solid rgba(246, 239, 226, .2); border-radius: 40px; padding: 7px 16px; font-size: 15px; }
.hero-dates .gold { color: var(--gold-light); border-color: rgba(212, 166, 74, .45); }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Next jamaat card inside the hero */
.next { flex: 0 1 360px; text-align: center; border-radius: 26px; padding: 26px 30px 24px;
    background: linear-gradient(160deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03));
    border: 1px solid rgba(212, 166, 74, .45); box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.next-label { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-light); font-weight: 600; }
.next-name { font-size: 34px; font-weight: 600; margin-top: 6px; }
.next-name .ar { color: var(--gold-light); font-size: 26px; }
.next-in { font-size: 64px; font-weight: 600; line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: -.01em; margin: 6px 0 4px; }
.next-at { color: rgba(246, 239, 226, .7); font-size: 16px; }

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: -72px; margin-bottom: 48px; position: relative; z-index: 1; }
.col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.card { background: var(--card); border-radius: 20px; padding: 22px 24px; box-shadow: 0 8px 24px rgba(120, 100, 60, .07); }
.card h2 { font-size: 20px; font-weight: 600; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--gold-soft); }
.note { font-size: 13px; color: var(--muted); margin-top: 12px; }

/* Salaah times table */
.times { width: 100%; border-collapse: collapse; }
.times thead th { font-size: 13px; font-weight: 500; color: var(--muted); text-align: right; padding: 0 10px 8px; }
.times thead th:first-child { text-align: left; }
.times tbody th { text-align: left; font-size: 20px; font-weight: 600; padding: 10px; }
.times td { text-align: right; padding: 10px; font-size: 20px; }
.times td.adhan { color: var(--muted); font-weight: 300; }
.times td.salah { font-weight: 600; }
.times tbody tr + tr th, .times tbody tr + tr td { border-top: 1px solid var(--line); }
.times tr.is-next th, .times tr.is-next td { background: var(--gold-soft); color: var(--gold); }
.times tr.is-next th { border-radius: 12px 0 0 12px; }
.times tr.is-next td:last-child { border-radius: 0 12px 12px 0; }

/* Start times + Jumu'ah lists */
.starts, .jumuah { list-style: none; display: grid; gap: 10px; }
.starts { grid-template-columns: repeat(2, 1fr); }
.jumuah { grid-template-columns: repeat(3, 1fr); }
.starts li, .jumuah li { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; }
.starts li span:first-child, .jumuah li span:first-child { display: block; font-size: 13px; color: var(--muted); }
.starts .time, .jumuah .time { font-size: 22px; font-weight: 600; }
.bayaan { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.bayaan span { display: block; font-size: 13px; color: var(--muted); }
.bayaan b { font-size: 20px; font-weight: 600; color: var(--gold); }

/* Upcoming changes */
.changes { list-style: none; display: grid; gap: 10px; }
.changes li { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fff;
    border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.changes b { display: block; font-size: 18px; }
.changes span { font-size: 14px; color: var(--muted); }
.changes .t { text-align: right; }
.changes .t > .time { display: block; font-size: 22px; font-weight: 600; }

/* Live + map */
.live p, .address { color: var(--muted); margin-bottom: 14px; }
.map { width: 100%; height: 260px; border: 0; border-radius: 14px; display: block; margin-bottom: 14px; background: var(--line); }
.button { display: inline-block; background: var(--gold); color: #fff; text-decoration: none; font-weight: 600;
    padding: 12px 22px; border-radius: 40px; }
.button:hover { background: #a37928; }
.button.ghost { background: transparent; border: 1px solid rgba(246, 239, 226, .4); color: #f6efe2; }
.button.ghost:hover { border-color: var(--gold-light); color: var(--gold-light); background: transparent; }
.card .button.ghost { color: var(--gold); border-color: var(--gold); }

/* ---------- Bayaans page (/bayaans) ---------- */
.page-hero { position: relative; overflow: hidden; color: #f6efe2; padding: 0 0 110px;
    background: radial-gradient(ellipse 700px 380px at 85% 10%, rgba(212, 166, 74, .26), transparent 70%), var(--hero); }
.page-hero::before { content: ''; position: absolute; inset: 0; opacity: .09; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23d4a64a' stroke-width='1.2'%3E%3Crect x='22' y='22' width='36' height='36'/%3E%3Crect x='22' y='22' width='36' height='36' transform='rotate(45 40 40)'/%3E%3Ccircle cx='40' cy='40' r='8'/%3E%3C/g%3E%3C/svg%3E");
    -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent); mask-image: linear-gradient(to bottom, #000 30%, transparent); }
.page-hero .wrap { position: relative; }
.page-hero-inner { padding-top: 40px; }
.page-hero .eyebrow { color: var(--gold-light); }
.page-hero h1 { font-size: 52px; line-height: 1.05; font-weight: 700; margin: 8px 0 10px; }
.page-hero h1 .ar { color: var(--gold-light); font-size: 34px; }
.page-hero .lead { color: rgba(246, 239, 226, .72); font-size: 17px; max-width: 560px; }

.search { position: relative; margin-top: 24px; max-width: 620px; }
.search svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); }
.search input { width: 100%; font: inherit; font-size: 17px; padding: 16px 20px 16px 50px; border-radius: 40px; border: 0;
    background: var(--card); color: var(--ink); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.search input:focus { outline: 3px solid var(--gold-light); }

.library { position: relative; z-index: 1; margin-top: -64px; margin-bottom: 56px; }
.filters { display: grid; gap: 14px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; }
.select { font: inherit; font-size: 15px; padding: 10px 36px 10px 14px; border-radius: 12px; border: 1px solid var(--line); color: var(--ink);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%237a756c' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center;
    -webkit-appearance: none; appearance: none; flex: 0 1 240px; min-width: 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chip { font: inherit; font-size: 14px; white-space: nowrap; padding: 8px 16px; border-radius: 40px; border: 1px solid var(--line);
    background: #fff; color: var(--ink); cursor: pointer; }
.chip.on { background: var(--gold); border-color: var(--gold); color: #fff; }
.result-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 22px 4px 10px; font-size: 14px; color: var(--muted); }
.result-bar button { font: inherit; background: none; border: 0; color: var(--gold); cursor: pointer; font-weight: 500; }
.sort { font: inherit; font-size: 14px; color: var(--ink); background: none; border: 0; cursor: pointer; }

.month { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin: 26px 4px 10px; }
.list { list-style: none; display: grid; gap: 10px; }
.item { display: flex; align-items: center; gap: 16px; background: var(--card); border-radius: 18px; padding: 14px 18px;
    box-shadow: 0 6px 18px rgba(120, 100, 60, .06); border: 1px solid transparent; scroll-margin-top: 20px; }
.item.playing, .item.flash { border-color: var(--gold); background: #fff; }
.play { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer; background: var(--gold-soft); color: var(--gold);
    display: grid; place-items: center; }
.play:hover, .item.playing .play { background: var(--gold); color: #fff; }
.play svg { width: 20px; height: 20px; }
.info { flex: 1; min-width: 0; }
.info h3 { font-size: 18px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 14px; color: var(--muted); margin-top: 4px; }
.meta .speaker { color: var(--ink); font-weight: 500; }
.tag { font-size: 12px; color: var(--gold); background: var(--gold-soft); padding: 2px 10px; border-radius: 20px; }
.actions { display: flex; gap: 8px; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--muted);
    display: grid; place-items: center; cursor: pointer; text-decoration: none; }
.icon-btn:hover { color: var(--gold); border-color: var(--gold); }
.icon-btn svg { width: 18px; height: 18px; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty button { font: inherit; background: none; border: 0; color: var(--gold); font-weight: 600; cursor: pointer; }
.more { display: block; margin: 20px auto 0; font: inherit; }
.more.button { border: 0; cursor: pointer; }

/* the player bar fixed at the bottom of the screen */
.player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--hero); color: #f6efe2;
    border-top: 3px solid var(--gold); box-shadow: 0 -10px 30px rgba(0, 0, 0, .25); transform: translateY(110%); transition: transform .3s; }
.player.show { transform: none; }
.player .wrap { display: flex; align-items: center; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.player .now { flex: 1 1 220px; min-width: 0; }
.player .now b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .now span { font-size: 13px; color: rgba(246, 239, 226, .65); }
.p-controls { display: flex; align-items: center; gap: 10px; }
.p-btn { background: none; border: 0; color: #f6efe2; cursor: pointer; display: grid; place-items: center; font: inherit; font-size: 12px; }
.p-btn svg { width: 26px; height: 26px; }
.p-main { width: 48px; height: 48px; border-radius: 50%; background: var(--gold); }
.p-main svg { width: 20px; height: 20px; }
.p-speed { border: 1px solid rgba(246, 239, 226, .35); border-radius: 20px; padding: 4px 10px; font-size: 13px; min-width: 50px; }
.p-bar { flex: 2 1 260px; display: flex; align-items: center; gap: 10px; font-size: 13px; font-variant-numeric: tabular-nums; color: rgba(246, 239, 226, .7); }
.p-track { flex: 1; height: 6px; border-radius: 6px; background: rgba(246, 239, 226, .18); position: relative; cursor: pointer; }
.p-track::before { content: ''; position: absolute; left: 0; right: 0; top: -10px; bottom: -10px; } /* bigger tap area */
.p-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: var(--gold-light); width: 0; }
.p-close { color: rgba(246, 239, 226, .55); }
body.has-player { padding-bottom: 90px; }

.toast { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); background: var(--ink); color: #fff; z-index: 11;
    padding: 10px 18px; border-radius: 30px; font-size: 14px; opacity: 0; transition: opacity .25s; pointer-events: none; }
.toast.show { opacity: 1; }

@media (max-width: 640px) {
    .page-hero h1 { font-size: 40px; }
    .select { flex: 1 1 100%; padding-left: 12px; font-size: 14px; }
    .item { padding: 14px; gap: 12px; align-items: flex-start; }
    .play { flex-basis: 46px; width: 46px; height: 46px; }
    .info h3 { font-size: 17px; }
    .actions { flex-direction: column; }
    .icon-btn { width: 38px; height: 38px; }
    .player .wrap { flex-wrap: wrap; gap: 8px 12px; }
    .player .now { order: 1; flex-basis: calc(100% - 50px); }
    .p-close { order: 2; }
    .p-bar { order: 3; flex-basis: 100%; }
    .p-controls { order: 4; width: 100%; justify-content: center; gap: 18px; }
    body.has-player { padding-bottom: 150px; }
}

/* ---------- Footer ---------- */
.site-footer { position: relative; background: var(--hero); color: rgba(246, 239, 226, .72); font-size: 15px;
    border-top: 3px solid var(--gold); }
/* the same faint star pattern as the hero */
.site-footer::before { content: ''; position: absolute; inset: 0; opacity: .05; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23d4a64a' stroke-width='1.2'%3E%3Crect x='22' y='22' width='36' height='36'/%3E%3Crect x='22' y='22' width='36' height='36' transform='rotate(45 40 40)'/%3E%3Ccircle cx='40' cy='40' r='8'/%3E%3C/g%3E%3C/svg%3E"); }
.footer-grid { position: relative; display: grid; grid-template-columns: 1fr; gap: 32px; padding-top: 48px; padding-bottom: 36px; }
.footer-brand img { height: 120px; width: auto; display: block; margin-bottom: 14px; }
.footer-brand p { max-width: 280px; }
.site-footer h3 { color: var(--gold-light); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; margin-bottom: 14px; }
.site-footer ul { list-style: none; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; color: #f6efe2; }
.site-footer a:hover { color: var(--gold-light); }
.footer-link { display: inline-block; margin-top: 10px; color: var(--gold-light) !important; font-weight: 500; }
.footer-bottom { position: relative; text-align: center; border-top: 1px solid rgba(246, 239, 226, .12);
    padding-top: 18px; padding-bottom: 28px; font-size: 13px; }
/* the "Created with ❤ by" badge: dark, centred in a light rounded box */
.credit-bar { margin-top: 18px; padding: 22px 20px; border-radius: 10px; background: #f1edea; }
.credit-bar img { height: 34px; width: auto; max-width: 100%; display: block; margin: 0 auto; }
@media (min-width: 760px) {
    .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

/* ---------- Wider screens: two columns ---------- */
@media (min-width: 860px) {
    .grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
    .starts { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Small phones ---------- */
@media (max-width: 480px) {
    .site-header nav { width: 100%; justify-content: space-between; gap: 10px; font-size: 13px; white-space: nowrap; }
    .times tbody th, .times td { font-size: 17px; padding: 9px 6px; }
    .next { flex-basis: 100%; }
    .hero h1 { font-size: 44px; }
    .hero-inner { padding-top: 36px; }
    .jumuah { gap: 8px; }
    .jumuah li { padding: 9px 10px; }
    .jumuah .time { font-size: 18px; }
    .brand { width: 100%; justify-content: center; }  /* logo centred above the menu on phones */
    .brand img { height: 88px; }
    .next-in { font-size: 52px; }
}

/* ---------- Masjid screen link: computers only ---------- */
/* The TV page (/display) is made for a big screen and looks wrong on phones and tablets,
   so its links in the header and footer only show on computers (wider than 1024 px). */
@media (max-width: 1024px) {
    .pc-only { display: none !important; }
}
