/* =========================================================
   MAC Centre Islamique de Verdun — Mawaqit style
   Responsive : desktop & mobile
   ========================================================= */

:root {
    --bg: #0b1f17;
    --bg-2: #0f3d2e;
    --bg-3: #134d3a;
    --primary: #1f6f4a;
    --primary-2: #2a8d5f;
    --gold: #d4af37;
    --gold-soft: #f1c75c;
    --text: #f5f1e6;
    --text-soft: #d6cfba;
    --text-mute: #9aa395;
    --card: rgba(255, 255, 255, 0.06);
    --card-border: rgba(255, 255, 255, 0.12);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.25s ease;
    --container: 1080px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: auto;
}

body {
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
}

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =========================
   HERO
   ========================= */
.hero {
    position: relative;
    padding: 28px 20px 60px;
    color: var(--text);
    overflow: hidden;
    isolation: isolate;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 10%, rgba(212, 175, 55, 0.18), transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(42, 141, 95, 0.35), transparent 55%),
        linear-gradient(160deg, #0a2e22 0%, #134d3a 40%, #1a6a4d 100%);
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.02) 0 2px, transparent 2px 14px);
    z-index: -1;
}

.hero::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--bg));
    z-index: -1;
}

.hero-top {
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
}

.mosque-logo {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: var(--gold);
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    justify-self: center;
    order: 2;
}

.hero-title {
    order: 1;
    text-align: left;
}

.hero-date {
    order: 3;
}

.mosque-name {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-align: left;
}

.mosque-sub {
    margin: 2px 0 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-soft);
    opacity: 0.9;
    font-family: 'Amiri', serif;
    text-align: left;
}

.hero-date {
    text-align: right;
    font-size: 0.85rem;
    line-height: 1.35;
    color: var(--text-soft);
}

.date-hijri {
    color: var(--gold-soft);
    font-weight: 500;
}

.date-hijri-ar {
    font-family: 'Amiri', serif;
    color: var(--text-soft);
    font-size: 0.85rem;
    margin-top: 2px;
}

.hero-center {
    max-width: var(--container);
    margin: 36px auto 0;
    display: grid;
    place-items: center;
}

.next-prayer {
    text-align: center;
    padding: 22px 32px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    min-width: 260px;
    box-shadow: var(--shadow);
    transition: opacity 0.3s ease;
}

.next-prayer-loading {
    opacity: 0.4;
}

.next-prayer-label {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.7rem;
    color: var(--gold-soft);
    margin-bottom: 6px;
}

.next-prayer-name {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text);
}

.next-prayer-name-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    margin-top: 4px;
}

.next-prayer-name-ar {
    font-family: 'Amiri', serif;
    font-size: 1.4rem;
    color: var(--gold-soft);
}

.next-prayer-label-ar {
    font-family: 'Amiri', serif;
    color: var(--gold-soft);
    margin-left: 6px;
}

.next-prayer-time {
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--gold);
    margin: 4px 0 6px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
}

.next-prayer-countdown {
    font-size: 0.95rem;
    color: var(--text-soft);
    font-variant-numeric: tabular-nums;
}

/* =========================
   CONTENT
   ========================= */
.content {
    max-width: var(--container);
    width: 100%;
    margin: -10px auto 0;
    padding: 0 20px 40px;
    display: grid;
    gap: 18px;
}

/* =========================
   CARDS
   ========================= */
.dua-card,
.prayer-times-card,
.hadith-card,
.info-card,
.services-card,
.mosque-info {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Dua */
.dua-card {
    text-align: center;
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.08), rgba(255, 255, 255, 0.04));
    border-color: rgba(212, 175, 55, 0.25);
    padding: 10px;
}

.dua-arabic {
    font-family: 'Amiri', 'Traditional Arabic', serif;
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--gold-soft);
    direction: rtl;
    margin-bottom: 6px;
}

.dua-translation {
    font-size: 0.68rem;
    color: var(--text-soft);
    font-style: italic;
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.4;
}

/* Prayer times */
.prayer-times-card {
    padding: 8px;
}

.prayer-times-secondary {
    padding: 8px;
    margin-top: -6px;
}

.prayer-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.prayer-list-grid {
    grid-template-columns: repeat(2, 1fr);
}

.prayer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.prayer-item:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-1px);
}

.prayer-item.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.18), rgba(42, 141, 95, 0.18));
    border-color: var(--gold);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.18);
}

.prayer-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.prayer-icon {
    color: var(--gold-soft);
    display: grid;
    place-items: center;
}

.prayer-item.active .prayer-icon {
    color: var(--gold);
}

.prayer-name {
    font-weight: 500;
    color: var(--text);
    font-size: 0.8rem;
}

.prayer-arabic {
    font-family: 'Amiri', serif;
    font-size: 0.8rem;
    color: var(--text-soft);
    direction: rtl;
}

.prayer-time {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
}

.prayer-item.active .prayer-time {
    color: var(--gold);
}

/* Hadith */
.hadith-card {
    background: linear-gradient(180deg, rgba(31, 111, 74, 0.18), rgba(255, 255, 255, 0.04));
    border-color: rgba(42, 141, 95, 0.35);
    text-align: center;
    padding: 10px;
}

.hadith-label {
    font-family: 'Amiri', serif;
    color: var(--gold-soft);
    font-size: 0.8rem;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.hadith-arabic {
    font-family: 'Amiri', serif;
    direction: rtl;
    font-size: 0.78rem;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 6px;
}

.hadith-translation {
    font-size: 0.68rem;
    color: var(--text-soft);
    font-style: italic;
    max-width: 760px;
    margin: 0 auto;
    line-height: 1.4;
}

/* Info / Annonces */
.info-title,
.services-title {
    margin: 0 0 14px;
    font-size: 1.1rem;
    color: var(--gold-soft);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.announcements {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.announcement {
    margin: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--card-border);
    background: rgba(0, 0, 0, 0.25);
}

.announcement img {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform var(--transition);
}

.announcement:hover img {
    transform: scale(1.04);
}

.announcement figcaption {
    padding: 8px 10px;
    font-size: 0.85rem;
    color: var(--text-soft);
    text-align: center;
}

/* Services */
.services-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    color: var(--text-soft);
}

.service-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
}

/* Mosque info / CTA */
.mosque-info {
    text-align: center;
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.1), rgba(0, 0, 0, 0.15));
    border-color: rgba(212, 175, 55, 0.3);
}

.mosque-info h2 {
    margin: 0 0 8px;
    font-size: 1.2rem;
    color: var(--text);
}

.cta-link {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--gold-soft);
    text-decoration: none;
    font-weight: 500;
}

.cta-link:hover {
    text-decoration: underline;
}

.cta-button {
    display: inline-block;
    padding: 10px 26px;
    background: linear-gradient(135deg, var(--gold), var(--gold-soft));
    color: #1a2e1f;
    text-decoration: none;
    border-radius: 999px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(212, 175, 55, 0.4);
}

/* Footer */
.footer {
    margin-top: auto;
    text-align: center;
    padding: 20px;
    color: var(--text-mute);
    font-size: 0.8rem;
    border-top: 1px solid var(--card-border);
}

/* =========================
   RESPONSIVE — Mobile first refinements
   ========================= */
@media (max-width: 768px) {
    .hero {
        padding: 12px 16px 20px;
    }

    .hero-top {
        grid-template-columns: 1fr auto 1fr;
        grid-template-rows: auto;
        gap: 10px;
    }

    .mosque-logo {
        width: 36px;
        height: 36px;
    }

    .mosque-logo svg {
        width: 24px;
        height: 24px;
    }

    .mosque-name {
        font-size: 0.95rem;
    }

    .mosque-sub {
        font-size: 0.95rem;
    }

    .hero-date {
        text-align: right;
        font-size: 0.7rem;
        line-height: 1.3;
    }

    .date-hijri-ar {
        font-size: 0.75rem;
    }

    .hero-center {
        margin-top: 14px;
    }

    .next-prayer {
        padding: 10px 16px;
        min-width: 0;
        width: 100%;
    }

    .next-prayer-time {
        font-size: 1.7rem;
    }

    .next-prayer-name {
        font-size: 1.3rem;
    }

    .next-prayer-name-ar {
        font-size: 1.1rem;
    }

    .next-prayer-label {
        font-size: 0.65rem;
    }

    .next-prayer-countdown {
        font-size: 0.8rem;
    }

    .content {
        padding: 0 12px 20px;
        gap: 10px;
    }

    .dua-card,
    .prayer-times-card,
    .hadith-card,
    .info-card,
    .services-card,
    .mosque-info {
        padding: 8px;
    }

    .dua-arabic {
        font-size: 0.78rem;
        line-height: 1.55;
        margin-bottom: 4px;
    }

    .dua-translation {
        font-size: 0.62rem;
        line-height: 1.3;
    }

    .dua-translation {
        font-size: 0.78rem;
        line-height: 1.4;
    }

    .prayer-list {
        grid-template-columns: 1fr;
    }

    .prayer-list-grid {
        grid-template-columns: 1fr;
    }

    .prayer-item {
        padding: 8px 10px;
    }

    .prayer-time {
        font-size: 0.95rem;
    }

    .prayer-arabic {
        font-size: 0.8rem;
    }

    .prayer-name {
        font-size: 0.78rem;
    }

    .hadith-arabic {
        font-size: 0.7rem;
        line-height: 1.4;
        margin-bottom: 4px;
    }

    .hadith-translation {
        font-size: 0.62rem;
        line-height: 1.35;
    }

    .hadith-card {
        padding: 7px;
    }

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

    .announcement img {
        height: 160px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-item {
        font-size: 0.85rem;
        padding: 9px 10px;
    }
}

@media (max-width: 380px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .next-prayer-time {
        font-size: 1.9rem;
    }

    .next-prayer-name {
        font-size: 1.35rem;
    }
}

/* =========================
   Larger screens
   ========================= */
@media (min-width: 1024px) {
    .hero {
        padding: 40px 24px 80px;
    }

    .mosque-name {
        font-size: 1.5rem;
    }

    .mosque-sub {
        font-size: 1.5rem;
    }

    .hero-date {
        font-size: 0.95rem;
    }

    .next-prayer {
        padding: 30px 50px;
    }

    .next-prayer-time {
        font-size: 3.2rem;
    }

    .prayer-list {
        gap: 12px;
    }

    .announcements {
        gap: 16px;
    }

    .announcement img {
        height: 220px;
    }
}
