/* ═══════════════════════════════════════════
   HOMEPAGE — PrayerTime Dashboard
   Premium card-based layout with theme integration
   Uses shared --t-* variables from theme.css
   ═══════════════════════════════════════════ */

/* ─── Homepage body ─── */
body.home-page {
    background: var(--t-bg);
    color: var(--t-text);
    font-family: 'Inter', sans-serif;
    transition: background 0.35s, color 0.35s;
    margin: 0;
    padding: 0;
    min-height: 100dvh;
}

/* ─── Hero uses dynamic sky background — no per-theme gradients needed ─── */

/* ─── Main container ─── */
.home-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 80px 24px 48px;
    box-sizing: border-box;
}

/* ─── Grid layout ─── */
.home-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Span helpers */
.h-span-2 { grid-column: span 2; }
.h-span-1 { grid-column: span 1; }

/* ─── Base card ─── */
.h-card {
    border-radius: 24px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: background 0.35s, border-color 0.35s, box-shadow 0.3s, transform 0.3s;
    display: flex;
    flex-direction: column;
}

.h-card-light {
    background: var(--t-card);
    border: 1px solid var(--t-border);
}
.h-card-light:hover {
    box-shadow: var(--t-shadow);
    transform: translateY(-2px);
}

/* ─── Section labels ─── */
.h-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--t-text-dim);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}
.h-label svg {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

/* ═══════════════════════════════════════════
   CARD 1: HERO — Prayer Countdown
   ═══════════════════════════════════════════ */
.h-hero {
    color: #fff;
    padding: 40px 48px;
    min-height: 320px;
    justify-content: space-between;
    border: none;
    background: #020205; /* fallback before sky layers load */
}

/* Dynamic sky background container */
.h-hero-bg {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    overflow: hidden;
    z-index: 0;
}

/* Individual sky layers */
.h-hero-layer {
    position: absolute;
    inset: 0;
    opacity: 0;
    will-change: opacity;
    pointer-events: none;
    transition: opacity 1.5s ease;
}

#h-bg-night { background: linear-gradient(to bottom, #020205 0%, #0d0d26 100%); }
#h-bg-stars { z-index: 1; }
#h-starsCanvas { width: 100%; height: 100%; display: block; }
#h-bg-dawn  { background: linear-gradient(to bottom, #0d1236 0%, #3d204a 50%, #d46b57 100%); }
#h-bg-day   { background: linear-gradient(to bottom, #0b2e59 0%, #2e74b5 100%); }
#h-bg-dusk  { background: linear-gradient(to bottom, #0f1533 0%, #3a1a3b 40%, #b34233 80%, #e68a45 100%); }

.h-hero-ring {
    position: absolute;
    right: -80px;
    top: -120px;
    width: 360px;
    height: 360px;
    border: 40px solid rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

/* Three-zone flex layout for hero card content */
.h-hero-body {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
}

.h-hero-top-row {
    flex: 0 0 auto;
}

.h-hero-meta {
    flex: 0 0 auto;
    margin-top: auto;
}

.h-hero-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.55);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    font-size: 15px;
}

.h-hero-location {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 5px 10px 5px 8px;
    backdrop-filter: blur(4px);
    white-space: nowrap;
    transition: color 0.3s, background 0.2s;
    cursor: pointer;
    user-select: none;
}
.h-hero-location:hover {
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.85);
}
.h-hero-location svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    color: #10b981;
    transition: color 0.3s;
}
.h-hero-location.locating #h-hero-loc-icon {
    animation: spin 1s linear infinite;
    color: rgba(255,255,255,0.5);
}
.h-hero-label svg {
    width: 18px;
    height: 18px;
    color: #ffcc00;
}

.h-hero-countdown {
    display: flex;
    align-items: center;   /* vertically centres the inner row */
    justify-content: flex-start;
    flex: 1 1 auto;
    margin: 2rem 0;
}

.h-hero-countdown-inner {
    display: flex;
    align-items: flex-end; /* units sit at the bottom of the numbers */
    gap: 4px;
    flex-wrap: wrap;
}
.h-hero-num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(88px, 14vw, 148px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -4px;
    background: linear-gradient(180deg, #fff 30%, rgba(255, 255, 255, 0.45));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.h-hero-unit {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(44px, 6vw, 68px);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.45);
    margin-right: 24px;
}

/* Minutes + seconds group */
.h-hero-min-sec {
    position: relative;
    display: inline-flex;
    align-items: baseline;
}
.h-hero-min-sec .h-hero-unit {
    margin-right: 0;
}
.h-hero-sec {
    position: absolute;
    top: 0;
    right: 0;
    transform: translateY(-190%);
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(16px, 2.2vw, 24px);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.h-hero-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
}

.h-hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.82);
}

.h-hero-icon .h-icon-mask {
    width: 42px;
    height: 42px;
}

.h-hero-meta-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.h-hero-meta-time {
    text-align: left;
}

.h-hero-meta-sep {
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, 0.3);
    opacity: 0.55;
    flex-shrink: 0;
}

.h-hero-meta-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

.h-hero-meta-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #fff;
}

.h-hero-meta.h-hero-prayer-fajr .h-hero-icon,
.h-hero-meta.h-hero-prayer-isha .h-hero-icon {
    color: #b59af6;
}

.h-hero-meta.h-hero-prayer-dhuhr .h-hero-icon,
.h-hero-meta.h-hero-prayer-asr .h-hero-icon {
    color: #f4c542;
}

.h-hero-meta.h-hero-prayer-sunrise .h-hero-icon,
.h-hero-meta.h-hero-prayer-maghrib .h-hero-icon {
    color: #f28b30;
}

.h-hero-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s;
}
.h-hero-link:hover { color: #fff; }
.h-hero-link svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s;
}
.h-hero-link:hover svg { transform: translateX(3px); }


/* ═══════════════════════════════════════════
   LEFT COLUMN WRAPPER: hero + prayer bar
   ═══════════════════════════════════════════ */
.h-hero-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
    min-height: 0;
}

.h-hero-col .h-hero {
    flex: 1 1 auto;
    min-height: 0;
}

/* ═══════════════════════════════════════════
   PRAYER BAR — full-width horizontal strip
   (below hero + calendar row)
   ═══════════════════════════════════════════ */
.h-prayer-bar {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(120px, 1fr);
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--t-scroll, rgba(0,0,0,0.15)) transparent;
    padding-bottom: 4px;
}

.h-prayer-bar::-webkit-scrollbar { height: 4px; }
.h-prayer-bar::-webkit-scrollbar-track { background: transparent; }
.h-prayer-bar::-webkit-scrollbar-thumb {
    background: var(--t-scroll, rgba(0,0,0,0.15));
    border-radius: 999px;
}

/* Individual prayer card inside the bar */
.h-pcard {
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    row-gap: 8px;
    align-content: stretch;
    min-height: 120px;
    padding: 14px 14px 12px;
    border-radius: 20px;
    background: none;
    border: 1px solid transparent;
    transition: transform 0.2s, box-shadow 0.2s;
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
}

.h-pcard:hover {
    transform: translateY(-2px);
    box-shadow: var(--t-shadow);
}

.h-pcard-name {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--t-text-dim);
}

.h-pcard-icon {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    align-self: stretch;
}

.h-pcard-icon svg {
    width: 24px;
    height: 24px;
    color: var(--t-text-dim);
    opacity: 0.5;
}

.h-pcard-icon .h-icon-mask {
    width: 24px;
    height: 24px;
}

.h-icon-mask {
    display: inline-block;
    flex-shrink: 0;
    background-color: currentColor;
    color: inherit;
    opacity: inherit;
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
}

.h-icon-mask-maghrib {
    -webkit-mask-image: url('../assets/icon/sunset.svg');
    mask-image: url('../assets/icon/sunset.svg');
}

.h-icon-mask-isha {
    -webkit-mask-image: url('../assets/icon/isha.svg');
    mask-image: url('../assets/icon/isha.svg');
}

.h-icon-mask-fajr {
    -webkit-mask-image: url('../assets/icon/fajr.svg');
    mask-image: url('../assets/icon/fajr.svg');
}

.h-icon-mask-sunrise {
    -webkit-mask-image: url('../assets/icon/sunrise-alt.svg');
    mask-image: url('../assets/icon/sunrise-alt.svg');
}

.h-icon-mask-dhuhr {
    -webkit-mask-image: url('../assets/icon/dhuhr.svg');
    mask-image: url('../assets/icon/dhuhr.svg');
}

.h-icon-mask-asr {
    -webkit-mask-image: url('../assets/icon/asr.svg');
    mask-image: url('../assets/icon/asr.svg');
}

.h-pcard.active .h-pcard-icon svg,
.h-pcard.active .h-pcard-icon .h-icon-mask,
.h-pcard.next .h-pcard-icon svg,
.h-pcard.next .h-pcard-icon .h-icon-mask {
    opacity: 0.75;
}

.h-pcard.active.h-prayer-dhuhr .h-pcard-icon svg,
.h-pcard.active.h-prayer-dhuhr .h-pcard-icon .h-icon-mask,
.h-pcard.next.h-prayer-dhuhr .h-pcard-icon svg,
.h-pcard.next.h-prayer-dhuhr .h-pcard-icon .h-icon-mask,
.h-pcard.active.h-prayer-asr .h-pcard-icon svg,
.h-pcard.active.h-prayer-asr .h-pcard-icon .h-icon-mask,
.h-pcard.next.h-prayer-asr .h-pcard-icon svg,
.h-pcard.next.h-prayer-asr .h-pcard-icon .h-icon-mask {
    color: #f4c542;
    opacity: 0.9;
}

.h-pcard.active.h-prayer-sunrise .h-pcard-icon svg,
.h-pcard.active.h-prayer-sunrise .h-pcard-icon .h-icon-mask,
.h-pcard.next.h-prayer-sunrise .h-pcard-icon svg,
.h-pcard.next.h-prayer-sunrise .h-pcard-icon .h-icon-mask,
.h-pcard.active.h-prayer-maghrib .h-pcard-icon svg,
.h-pcard.active.h-prayer-maghrib .h-pcard-icon .h-icon-mask,
.h-pcard.next.h-prayer-maghrib .h-pcard-icon svg,
.h-pcard.next.h-prayer-maghrib .h-pcard-icon .h-icon-mask {
    color: #f28b30;
    opacity: 0.9;
}

.h-pcard.active.h-prayer-fajr .h-pcard-icon svg,
.h-pcard.active.h-prayer-fajr .h-pcard-icon .h-icon-mask,
.h-pcard.next.h-prayer-fajr .h-pcard-icon svg,
.h-pcard.next.h-prayer-fajr .h-pcard-icon .h-icon-mask,
.h-pcard.active.h-prayer-isha .h-pcard-icon svg,
.h-pcard.active.h-prayer-isha .h-pcard-icon .h-icon-mask,
.h-pcard.next.h-prayer-isha .h-pcard-icon svg,
.h-pcard.next.h-prayer-isha .h-pcard-icon .h-icon-mask {
    color: #8d6adf;
    opacity: 0.9;
}

.h-pcard-time {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(16px, 1.6vw, 24px);
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--t-text);
    align-self: end;
    display: flex;
    align-items: baseline;
    gap: 3px;
    white-space: nowrap;
}

.h-pcard-ampm {
    font-size: 0.42em;
    font-weight: 700;
    letter-spacing: 0.5px;
    opacity: 0.65;
    text-transform: uppercase;
    line-height: 1;
}

.h-pcard-rel {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--t-text-dim);
    align-self: end;
}

/* Active (current) prayer */
.h-pcard.active {
    background: linear-gradient(135deg, var(--t-card), rgba(var(--t-accent-rgb), 0.08));
    border-color: transparent;
}
.h-pcard.active .h-pcard-name,
.h-pcard.active .h-pcard-time {
    color: var(--t-accent);
}

/* Next (upcoming) prayer */
.h-pcard.next {
    background: linear-gradient(135deg, var(--t-card), rgba(var(--t-accent-rgb), 0.12));
    border-color: transparent;
}
.h-pcard.next .h-pcard-name,
.h-pcard.next .h-pcard-time {
    color: var(--t-accent);
}

/* Past prayers */
.h-pcard.past {
    opacity: 0.55;
}

/* Active dot */
.h-pcard-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--t-accent);
    margin-right: 5px;
    vertical-align: middle;
    animation: h-pcard-pulse 1.6s infinite;
}
@keyframes h-pcard-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(var(--t-accent-rgb), 0.5); }
    70%  { box-shadow: 0 0 0 5px rgba(var(--t-accent-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--t-accent-rgb), 0); }
}

/* ═══════════════════════════════════════════
   CARD 2: TODAY'S PRAYERS (old vertical — kept for reference)
.h-prayers {
    justify-content: space-between;
    padding: 28px;
    cursor: pointer;
}

.h-prayer-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.h-prayer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-radius: 16px;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.h-prayer-row:hover { background: var(--t-hover); }

.h-prayer-row.passed { opacity: 0.35; }

.h-prayer-row.current {
    background: var(--t-accent);
    color: #fff;
    box-shadow: 0 6px 24px rgba(var(--t-accent-rgb), 0.3);
    transform: scaleX(1.02);
    transform-origin: left;
}
/* Override text colors inside the active row */
.h-prayer-row.current .h-prayer-name,
.h-prayer-row.current .h-prayer-time,
.h-prayer-row.current .h-prayer-rel {
    color: #fff;
}
.h-prayer-row.current .h-prayer-rel {
    opacity: 0.7;
}

/* Prayer row for upcoming (next) */
.h-prayer-row.upcoming .h-prayer-name,
.h-prayer-row.upcoming .h-prayer-time {
    color: var(--t-accent);
}

.h-prayer-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.h-prayer-name {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--t-text);
}
.h-prayer-rel {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--t-text-dim);
}

.h-prayer-time-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}
.h-prayer-time {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--t-text);
}

/* Current prayer status indicator */
.h-prayer-status {
    display: flex;
    align-items: center;
    gap: 6px;
}
.h-prayer-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.h-prayer-status-text {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.85;
}

/* Phase: Just Started — green pulse */
.h-phase-started .h-prayer-dot {
    background: #34d399;
    animation: h-pulse-green 1.5s infinite;
}
.h-phase-started .h-prayer-status-text { color: #a7f3d0; }
@keyframes h-pulse-green {
    0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); }
    70%  { box-shadow: 0 0 0 4px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* Phase: Active — white steady glow */
.h-phase-active .h-prayer-dot {
    background: #fff;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
}
.h-phase-active .h-prayer-status-text { color: rgba(255, 255, 255, 0.8); }

/* Phase: Ending Soon — orange pulse */
.h-phase-ending .h-prayer-dot {
    background: #fb923c;
    animation: h-pulse-orange 1.2s infinite;
}
.h-phase-ending .h-prayer-status-text { color: #fed7aa; }
@keyframes h-pulse-orange {
    0%   { box-shadow: 0 0 0 0 rgba(251, 146, 60, 0.6); }
    70%  { box-shadow: 0 0 0 4px rgba(251, 146, 60, 0); }
    100% { box-shadow: 0 0 0 0 rgba(251, 146, 60, 0); }
}

/* Phase: Final Call — red fast pulse */
.h-phase-final .h-prayer-dot {
    background: #f87171;
    animation: h-pulse-red 0.8s infinite;
}
.h-phase-final .h-prayer-status-text { color: #fecaca; }
@keyframes h-pulse-red {
    0%   { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.7); }
    70%  { box-shadow: 0 0 0 5px rgba(248, 113, 113, 0); }
    100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0); }
}

/* Countdown relative text — color matches phase */
.h-prayer-countdown-rel.h-phase-ending { color: #fed7aa !important; opacity: 1; font-weight: 700; }
.h-prayer-countdown-rel.h-phase-final  { color: #fecaca !important; opacity: 1; font-weight: 700; }


/* ═══════════════════════════════════════════
   CARD 3: QUR'AN INDEX
   ═══════════════════════════════════════════ */
.h-quran-index {
    justify-content: space-between;
}

.h-quran-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--t-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--t-accent);
    margin-bottom: 20px;
    transition: transform 0.3s;
}
.h-card:hover .h-quran-icon { transform: scale(1.05); }
.h-quran-icon svg { width: 28px; height: 28px; }

.h-quran-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--t-text);
    margin: 0 0 8px;
    line-height: 1.3;
}
.h-quran-desc {
    font-size: 13px;
    color: var(--t-text-secondary);
    line-height: 1.6;
    margin: 0;
}

.h-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 14px;
    border-radius: 16px;
    border: none;
    background: var(--t-bg);
    color: var(--t-text);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 24px;
    text-decoration: none;
}
.h-btn:hover { background: var(--t-hover); }
.h-btn svg { width: 16px; height: 16px; opacity: 0.5; }


/* ═══════════════════════════════════════════
   CARD: DOWNLOAD ADD-ON
   ═══════════════════════════════════════════ */
.h-download-addon {
    margin: 34px 0 2px;
    padding: 0;
    border: 0;
    background: transparent;
}

.h-download-addon-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    width: 100%;
    min-height: 100%;
}

.h-download-addon-copy {
    flex: 1;
    min-width: 0;
}

.h-download-addon-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.15;
    letter-spacing: -0.4px;
    color: var(--t-text);
    margin: 0 0 10px;
}

.h-download-addon-desc {
    font-size: 14px;
    line-height: 1.7;
    color: var(--t-text-secondary);
    margin: 0;
    max-width: 580px;
}

.h-download-addon-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    align-items: stretch;
    width: 100%;
    gap: 10px;
    margin-top: 22px;
}

.h-download-addon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    margin-top: 0;
    padding: 12px 18px;
    border: 1px solid var(--t-border);
    box-sizing: border-box;
    white-space: normal;
    line-height: 1.3;
}

.h-download-addon-btn.is-disabled {
    border-radius: 14px;
    border: 1px dashed var(--t-border);
    background: rgba(var(--t-accent-rgb), 0.04);
    color: var(--t-text-dim);
    justify-content: flex-start;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.88;
}

.h-download-addon-btn.is-disabled:hover {
    background: rgba(var(--t-accent-rgb), 0.04);
}

.h-download-addon-btn svg,
.h-download-addon-btn .h-browser-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.h-browser-icon {
    width: 18px;
    height: 18px;
    display: block;
    object-fit: contain;
}

.h-download-addon-media {
    width: min(240px, 42%);
    flex-shrink: 0;
}

.h-download-addon-media img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 20px;
    border: 0;
    background: transparent;
}


/* ═══════════════════════════════════════════
   CARD 4: CONTINUE LISTENING
   ═══════════════════════════════════════════ */
.h-continue {
    padding: 36px 40px;
}

.h-continue-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex: 1;
    gap: 32px;
}

.h-continue-info { flex: 1; }

.h-continue-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--t-accent);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.h-continue-label svg { width: 14px; height: 14px; }

.h-continue-surah {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    color: var(--t-text);
    margin: 0 0 6px;
    line-height: 1.15;
}
.h-continue-meta {
    font-size: 14px;
    color: var(--t-text-secondary);
    margin: 0;
}

/* Stats badges */
.h-continue-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}
.h-stat-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 12px;
    background: var(--t-bg);
    border: 1px solid var(--t-border);
    font-size: 13px;
    font-weight: 700;
    color: var(--t-text);
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}
.h-stat-badge:hover {
    background: var(--t-card-hover, var(--t-border));
    border-color: var(--t-accent);
}
.h-stat-badge svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.h-stat-badge .h-stat-label {
    font-weight: 500;
    color: var(--t-text-secondary);
    margin-left: 2px;
}

/* Play button with progress ring */
.h-play-wrap {
    position: relative;
    width: 96px;
    height: 96px;
    flex-shrink: 0;
    cursor: pointer;
}

.h-play-glow {
    position: absolute;
    inset: 12px;
    background: var(--t-accent);
    border-radius: 50%;
    filter: blur(20px);
    opacity: 0.15;
    transition: opacity 0.3s;
}
.h-play-wrap:hover .h-play-glow { opacity: 0.3; }

.h-play-ring {
    position: absolute;
    inset: 0;
    transform: rotate(-90deg);
}

.h-play-btn {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: var(--t-accent);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(var(--t-accent-rgb), 0.3);
    transition: transform 0.3s;
}
.h-play-wrap:hover .h-play-btn { transform: scale(1.05); }
.h-play-btn svg { width: 28px; height: 28px; margin-left: 3px; }

/* Progress tooltip */
.h-play-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.88);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 8px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
    text-align: center;
    line-height: 1.5;
}
.h-play-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.88);
}
.h-play-wrap:hover .h-play-tooltip { opacity: 1; }


/* ═══════════════════════════════════════════
   CARD 5: ISLAMIC CALENDAR
   ═══════════════════════════════════════════ */
.h-calendar {
    justify-content: space-between;
}

.h-cal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: auto;
}

.h-cal-date {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    margin-bottom: 6px;
}
.h-cal-day {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(56px, 6vw, 80px);
    font-weight: 800;
    color: var(--t-accent);
    line-height: 1;
}
.h-cal-hijri {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(14px, 1.5vw, 18px);
    font-weight: 700;
    color: var(--t-text);
    line-height: 1.2;
}
.h-cal-gregorian {
    font-size: 14px;
    color: var(--t-text-secondary);
    margin: 0;
}

.h-cal-event {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    gap: 3px;
    padding: 0;
    border-radius: 0;
    border: none;
    background: transparent;
    color: #ea580c;
}
.h-cal-event-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: .65;
}
.h-cal-event-name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}
.h-cal-event-date {
    font-size: 11px;
    font-weight: 500;
    opacity: .6;
}
/* Dark theme override for event badge */
[data-theme="midnight"] .h-cal-event,
[data-theme="slate"] .h-cal-event {
    color: #fb923c;
}


/* ═══════════════════════════════════════════
   CARD 6: QIBLA FINDER
   ═══════════════════════════════════════════ */
.h-qibla {
    justify-content: space-between;
    text-align: center;
    padding: 48px 24px 28px;
}

.h-qibla .h-label {
    position: absolute;
    top: 28px;
    left: 28px;
}

.h-qibla-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.h-qibla-compass {
    position: relative;
    width: 170px;
    height: 170px;
    margin-bottom: 14px;
    flex-shrink: 0;
}

.h-qibla-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    color: var(--t-text);
}

/* Needle */
.h-qibla-needle {
    position: absolute;
    inset: 0;
    transition: transform 1.15s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
    pointer-events: none;
}
.h-qibla-needle-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 146px;
    width: 26px;
}
.h-qibla-needle-head {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.14);
    border: 1.5px solid rgba(245, 158, 11, 0.55);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
    flex-shrink: 0;
    z-index: 2;
}
.h-qibla-needle-shaft {
    flex: 1;
    width: 2px;
    background: linear-gradient(
        to bottom,
        rgba(245, 158, 11, 0.75) 0%,
        rgba(245, 158, 11, 0.25) 65%,
        transparent 100%
    );
    border-radius: 1px;
}
.h-qibla-needle-tail {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    flex-shrink: 0;
}

/* Light themes: softer tail */
[data-theme="sepia"] .h-qibla-needle-tail,
[data-theme="silver"] .h-qibla-needle-tail {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.1);
}

/* Center pivot */
.h-qibla-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--t-text);
    opacity: 0.4;
    border: 1.5px solid var(--t-bg);
    z-index: 5;
}

/* Label */
.h-qibla-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: var(--t-text-secondary);
    margin: 0 0 14px;
}

/* Info row (bearing + distance) */
.h-qibla-info {
    display: flex;
    align-items: stretch;
    width: 100%;
    padding: 0 8px;
    gap: 0;
}
.h-qibla-info-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: center;
    text-align: center;
}
.h-qibla-info-divider {
    width: 1px;
    background: var(--t-border);
    margin: 0 6px;
    align-self: stretch;
}
.h-qibla-info-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--t-text-dim);
}
.h-qibla-info-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--t-text);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
    line-height: 1.1;
}


.h-qibla-coords {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.8px;
    color: var(--t-text-dim);
    text-align: center;
    margin: 8px 0 0;
    opacity: 0.6;
    font-variant-numeric: tabular-nums;
}

/* ── Method info bar ── */
.h-method-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--t-text-dim);
    padding: 2px 4px;
}

.h-method-bar strong {
    color: var(--t-text);
    font-weight: 600;
}

.h-method-sep {
    opacity: 0.4;
}

.h-method-change {
    color: var(--t-accent);
    font-weight: 600;
    text-decoration: none;
    font-size: 12px;
    opacity: 0.8;
    transition: opacity 0.15s;
}

.h-method-change:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ── Section headings ── */
.h-section-heading {
    margin: 32px 0 0;
    padding: 32px 0 0;
}

.h-section-heading-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.h-section-heading-top svg {
    width: 28px;
    height: 28px;
    color: var(--t-accent);
    flex-shrink: 0;
}

.h-section-heading-rule {
    display: block;
    width: 48px;
    height: 3px;
    border-radius: 2px;
    background: var(--t-accent);
}

.h-section-heading-main {
    display: flex;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(26px, 2.6vw, 38px);
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--t-text);
}

.h-section-heading-sub {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--t-text-dim);
    max-width: 680px;
    line-height: 1.55;
}

.h-qibla-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: auto;
    padding: 10px 0 0;
    color: var(--t-accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
    transition: opacity 0.2s;
}

.h-qibla-cta svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.h-qibla:hover .h-qibla-cta {
    opacity: 0.75;
}

/* ═══════════════════════════════════════════
   CARD 7: ABOUT
   ═══════════════════════════════════════════ */
.h-about {
    padding: 36px 40px;
}

.h-about-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.h-about-socials {
    display: flex;
    gap: 8px;
}
.h-about-socials a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--t-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--t-text-dim);
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s;
}
.h-about-socials a:hover {
    color: var(--t-accent);
    border-color: var(--t-accent);
}
.h-about-socials a svg { width: 14px; height: 14px; }

.h-about-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.h-about-text { flex: 1; }

.h-about-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--t-text);
    margin: 0 0 8px;
}
.h-about-desc {
    font-size: 14px;
    color: var(--t-text-secondary);
    line-height: 1.7;
    margin: 0 0 16px;
    max-width: 380px;
}

.h-about-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--t-accent);
    text-decoration: none;
    transition: color 0.2s;
}
.h-about-link:hover { opacity: 0.8; }
.h-about-link svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s;
}
.h-about-link:hover svg { transform: translateX(3px); }

/* Stats panel in About */
.h-about-stats {
    display: flex;
    gap: 0;
    padding: 0;
    border-radius: 16px;
    background: var(--t-bg);
    border: 1px solid var(--t-border);
    flex-shrink: 0;
    width: 100%;
}
.h-about-stat {
    display: flex;
    flex-direction: column;
    flex: 1;
    align-items: center;
    padding: 16px 8px;
}
.h-about-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--t-accent-soft, rgba(var(--t-accent-rgb, 99,102,241), 0.12));
    margin-bottom: 6px;
}
.h-about-stat-icon svg {
    width: 14px;
    height: 14px;
    stroke: var(--t-accent);
}
.h-about-stat-val {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: var(--t-accent);
    font-variant-numeric: tabular-nums;
}
.h-about-stat-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--t-text-dim);
    margin-top: 2px;
}
.h-about-stats-divider {
    width: 1px;
    background: var(--t-border);
    border-radius: 1px;
    align-self: stretch;
}


/* ═══════════════════════════════════════════
   CARD 8: SUPPORT
   ═══════════════════════════════════════════ */
.h-support {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.h-support-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--t-bg);
    color: var(--t-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: transform 0.3s;
    cursor: pointer;
}
.h-support-icon:hover { transform: scale(1.1); }
.h-support-icon svg { width: 24px; height: 24px; }

.h-support-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--t-text);
    margin: 0 0 8px;
}
.h-support-desc {
    font-size: 13px;
    color: var(--t-text-secondary);
    line-height: 1.7;
    margin: 0 0 24px;
    max-width: 280px;
}

.h-support-feedback {
    display: inline-block;
    margin-top: 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--t-text-dim);
    text-decoration: none;
    transition: color 0.2s;
}
.h-support-feedback:hover {
    color: var(--t-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}


/* ═══════════════════════════════════════════
   THEME CONTROLS (top-right)
   ═══════════════════════════════════════════ */
.home-topbar-right {
    position: absolute;
    top: 0;
    right: 20px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s;
}


/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */
@keyframes h-fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes h-slideUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.home-grid .h-card {
    animation: h-slideUp 0.6s ease both;
}
.home-grid .h-card:nth-child(1) { animation-delay: 0.05s; }
.home-grid .h-card:nth-child(2) { animation-delay: 0.10s; }
.home-grid .h-card:nth-child(3) { animation-delay: 0.15s; }
.home-grid .h-card:nth-child(4) { animation-delay: 0.20s; }
.home-grid .h-card:nth-child(5) { animation-delay: 0.25s; }
.home-grid .h-card:nth-child(6) { animation-delay: 0.30s; }
.home-grid .h-card:nth-child(7) { animation-delay: 0.35s; }
.home-grid .h-card:nth-child(8) { animation-delay: 0.40s; }
.home-grid .h-card:nth-child(9) { animation-delay: 0.45s; }
.home-grid .h-card:nth-child(10) { animation-delay: 0.50s; }


/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 1024px) {
    .home-main { padding: 80px 20px 40px; }
    .h-hero { padding: 32px 32px; min-height: 280px; }
    .h-continue { padding: 28px 32px; }
    .h-about { padding: 28px 32px; }
}

@media (max-width: 768px) {
    .home-grid {
        grid-template-columns: 1fr;
    }
    .h-span-2 { grid-column: span 1; }

    .home-topbar-right { right: 20px; }

    .h-hero { padding: 28px 24px; min-height: 260px; }
    .h-hero-num { letter-spacing: -2px; }
    .h-hero-sec { transform: translateY(-100%); }

    .h-download-addon-body {
        flex-direction: column;
        align-items: flex-start;
    }
    .h-download-addon-media {
        width: min(260px, 100%);
        align-self: center;
    }
    .h-download-addon-btn {
        width: 100%;
    }
    .h-download-addon-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .h-download-addon-btn.is-disabled {
        width: 100%;
        justify-content: flex-start;
    }

    .h-continue-body { flex-direction: column; align-items: flex-start; }
    .h-play-wrap { align-self: flex-end; }

    .h-cal-body { flex-direction: column; }
    .h-about-body { flex-direction: column; }
    .h-about-stats { width: 100%; }
}

@media (max-width: 480px) {
    .home-main { padding: 72px 14px 32px; }
    .home-grid { gap: 14px; }
    .h-card { padding: 24px; border-radius: 20px; }
    .h-hero { padding: 24px 20px; }
    .h-download-addon-title { font-size: 26px; }
    .h-download-addon-actions {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════
   HOME — Location Search Strip
   ═══════════════════════════════════════════ */
:root {
    --h-loc-gps-size: 44px;
}

.h-location-strip {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: center;
    margin-bottom: 4px;
    position: relative;
    z-index: 40;
}

.h-location-search-card {
    position: relative;
    overflow: visible;
    z-index: 60;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.h-location-city-row {
    display: none;
}

.h-location-current-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 3px;
    padding: 0;
}

.h-location-date-card {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: flex-end;
}

.h-loc-date-day {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(36px, 3.5vw, 52px);
    font-weight: 800;
    color: var(--t-accent);
    line-height: 1;
}

.h-loc-date-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding-top: 4px;
}

.h-loc-date-hijri {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(13px, 1.3vw, 16px);
    font-weight: 700;
    color: var(--t-text);
    line-height: 1.2;
}

.h-loc-date-greg {
    font-size: 12px;
    color: var(--t-text-dim);
}

.h-location-form {
    display: flex;
    align-items: center;
}

.h-location-input-wrap {
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px 0 16px;
    min-height: 54px;
    border-radius: 18px;
    background: rgba(var(--t-accent-rgb), 0.06);
    border: 1px solid rgba(var(--t-accent-rgb), 0.14);
    transition: border-color 0.2s, background 0.2s;
}

.h-location-input-wrap:focus-within {
    border-color: rgba(var(--t-accent-rgb), 0.32);
    background: rgba(var(--t-accent-rgb), 0.09);
}

.h-location-input-wrap > svg {
    width: 18px;
    height: 18px;
    color: var(--t-accent);
    flex-shrink: 0;
    opacity: 0.75;
}

.h-location-input-wrap input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    padding-right: calc(var(--h-loc-gps-size) + 14px);
    color: var(--t-text);
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
}

.h-location-input-wrap input::placeholder {
    color: var(--t-text-dim);
}

.h-location-inline-status {
    position: absolute;
    right: calc(var(--h-loc-gps-size) + 12px);
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: 600;
    color: var(--t-text-dim);
    letter-spacing: 0.2px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease;
    white-space: nowrap;
}

.h-location-input-wrap.is-searching .h-location-inline-status {
    opacity: 1;
}

.h-location-input-wrap.is-searching input {
    padding-right: calc(var(--h-loc-gps-size) + 120px);
}

.h-location-gps {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: var(--h-loc-gps-size);
    height: var(--h-loc-gps-size);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: transparent;
    border: 0;
    outline: 0;
    cursor: pointer;
    color: var(--t-accent);
    transition: background 0.2s;
}

.h-location-gps svg {
    width: 18px;
    height: 18px;
}

.h-location-gps:hover {
    background: rgba(var(--t-accent-rgb), 0.12);
}

.h-location-gps.is-locating svg {
    animation: h-loc-gps-spin 1s linear infinite;
    transform-origin: 50% 50%;
}

@keyframes h-loc-gps-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.h-location-search-status,
.h-location-search-status:not(:empty),
.h-location-search-status[data-state="error"] {
    display: none !important;
}

.h-location-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: grid;
    gap: 0;
    padding: 8px 16px;
    border-radius: 18px;
    background: var(--t-card);
    border: 1px solid rgba(var(--t-accent-rgb), 0.14);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    max-height: min(300px, 50vh);
    overflow-y: auto;
    z-index: 25;
}

.h-location-results[hidden] {
    display: none;
}

.h-location-result {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 11px 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(var(--t-accent-rgb), 0.09);
    color: var(--t-text);
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s;
}

.h-location-result:last-child {
    border-bottom: 0;
}

.h-location-result:hover {
    opacity: 0.7;
}

.h-location-result-main {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.h-location-result-primary {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--t-text);
}

.h-location-result-secondary {
    font-size: 12px;
    color: var(--t-text-secondary, var(--t-text-dim));
}

.h-location-result-coords {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--t-accent);
    white-space: nowrap;
}

.h-location-current-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(15px, 1.4vw, 25px);
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--t-text);
    line-height: 1.1;
    text-align: right;
}

.h-location-current-meta {
    font-size: 12px;
    color: var(--t-text-dim);
    text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
    .h-location-strip {
        grid-template-columns: 40% 1fr;
        grid-template-areas:
            "search search"
            "date   city";
        gap: 12px;
    }
    .h-location-search-card {
        grid-area: search;
    }
    .h-location-date-card {
        grid-area: date;
        justify-content: flex-start;
    }
    .h-location-current-card {
        grid-area: city;
        align-items: flex-end;
    }
    .h-location-current-name {
        font-size: clamp(14px, 4vw, 20px);
        text-align: right;
    }
    .h-location-current-meta {
        text-align: right;
        display: block;
    }
}

@media (max-width: 480px) {
    .h-location-input-wrap {
        min-height: 48px;
        border-radius: 14px;
    }
}

/* ═══════════════════════════════════════════
   ISLAMIC EVENTS MODULE
   ═══════════════════════════════════════════ */

/* ─── Module wrapper ─── */
.h-events-module {
    display: flex;
    gap: 16px;
    align-items: stretch;
    min-height: 220px;
    min-width: 0;
    max-width: 100%;
    margin-top: 0.5rem;
    border-top: 1px solid var(--t-border);
    padding-top: 2rem;
}

/* ─── Featured hero event card ─── */
.h-event-hero {
    flex: 0 0 38%;
    min-width: 0;
    max-width: 100%;
    border-right: 1px solid var(--t-border);
    padding-right: 24px;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 12px;
    overflow: hidden;
    position: relative;
    transition: opacity 0.2s;
}

.h-event-hero:hover {
    opacity: 0.88;
}

/* Left content */
.h-event-hero-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    z-index: 1;
    flex: 1;
    min-width: 0;
}

.h-event-hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--t-accent);
    margin-bottom: 8px;
}
.h-event-hero-eyebrow svg { flex-shrink: 0; }

.h-event-hero-name {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: clamp(20px, 2.2vw, 28px);
    font-weight: 800;
    color: var(--t-text);
    margin: 0 0 5px;
    letter-spacing: -0.5px;
    line-height: 1.1;
    white-space: nowrap;
}

.h-event-hero-also {
    font-size: 11px;
    color: var(--t-text-secondary);
    margin: 0 0 16px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* Countdown inside hero */
.h-event-hero-cd {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
}

.h-ehcd-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.h-ehcd-num {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: clamp(22px, 2.5vw, 32px);
    font-weight: 800;
    color: var(--t-text);
    line-height: 1;
    letter-spacing: -0.5px;
    min-width: 42px;
    text-align: center;
    background: rgba(var(--t-accent-rgb), 0.08);
    border-radius: 8px;
    padding: 6px 8px;
}

.h-ehcd-lbl {
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--t-text-secondary);
}

.h-ehcd-sep {
    font-size: 20px;
    font-weight: 700;
    color: var(--t-accent);
    opacity: 0.5;
    align-self: flex-start;
    padding-top: 4px;
    line-height: 1;
}

/* Date/Hijri meta */
.h-event-hero-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--t-text-secondary);
    font-weight: 500;
    margin-bottom: 14px;
}
.h-event-hero-sep { opacity: 0.4; }

/* CTA link line */
.h-event-hero-cta {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    font-size: 12px;
    font-weight: 700;
    color: var(--t-accent);
    margin-top: auto;
    transition: gap 0.2s;
}
.h-event-hero:hover .h-event-hero-cta { gap: 8px; }
.h-event-hero-cta svg { flex-shrink: 0; }

/* Decorative Arabic text on right */
.h-event-hero-deco {
    flex-shrink: 0;
    font-family: 'Traditional Arabic', 'Amiri', 'Arial', serif;
    font-size: clamp(34px, 4.5vw, 54px);
    font-weight: 700;
    color: var(--t-accent);
    opacity: 0.13;
    line-height: 1.2;
    text-align: right;
    direction: rtl;
    align-self: center;
    user-select: none;
    pointer-events: none;
    white-space: nowrap;
    z-index: 0;
}

/* ─── Slider side ─── */
.h-events-slider-wrap {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.h-events-slider-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2px 10px;
}

.h-events-slider-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--t-text-secondary);
}
.h-events-slider-title svg { opacity: 0.6; }

.h-events-nav {
    display: flex;
    gap: 6px;
}

.h-eslider-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--t-border);
    background: var(--t-card);
    color: var(--t-text-secondary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    flex-shrink: 0;
}
.h-eslider-btn:hover {
    background: var(--t-hover);
    color: var(--t-text);
    border-color: var(--t-accent);
}

/* Scrollable slider track */
.h-events-slider {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    flex: 1;
    /* hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.h-events-slider::-webkit-scrollbar { display: none; }

/* Individual event card */
.h-ecard {
    flex: 0 0 168px;
    scroll-snap-align: start;
    background: var(--t-card);
    border-radius: 14px;
    padding: 14px 14px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.15s;
    cursor: default;
    position: relative;
    overflow: hidden;
}
a.h-ecard { cursor: pointer; }
a.h-ecard:hover {
    opacity: 0.75;
}

.h-ecard-icon {
    display: none;
}

.h-ecard-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--t-text);
    line-height: 1.3;
}

.h-ecard-hijri {
    font-size: 10.5px;
    color: var(--t-text-secondary);
    line-height: 1.4;
}

.h-ecard-date {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--t-text-secondary);
    margin-top: auto;
}

/* Days badge */
.h-ecard-badge {
    display: inline-flex;
    align-items: center;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.5px;
    width: fit-content;
    margin-top: auto;
    padding: 0;
    background: none;
    border: none;
}
.h-ecard-badge-soon {
    color: var(--t-accent);
}
.h-ecard-badge-future {
    color: var(--t-text-secondary);
}
.h-ecard-badge-today {
    color: #16a34a;
}

/* Featured card highlight (Eid al-Adha) */
.h-ecard-featured .h-ecard-name {
    color: var(--t-accent);
}

/* Disclaimer line */
.h-events-approx {
    font-size: 10.5px;
    color: var(--t-text-dimmer, var(--t-text-dim));
    margin: 8px 0 0 2px;
    line-height: 1.4;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .h-events-module {
        flex-direction: column;
    }
    .h-event-hero {
        flex: none;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--t-border);
        padding-right: 0;
        padding-bottom: 20px;
    }
    .h-event-hero-deco {
        font-size: 44px;
        opacity: 0.10;
    }
    .h-ecard { flex: 0 0 150px; }
}

@media (max-width: 600px) {
    .h-event-hero-name { white-space: normal; }
    .h-event-hero-deco { display: none; }
    .h-ecard { flex: 0 0 140px; }
}

