
/* =========================================================
   IQRANIX — HOME PAGE
   Midnight Navy + Champagne Gold
   Mobile-first responsive design
========================================================= */

:root {
    --navy: #050f20;
    --navy-deep: #020916;
    --navy-card: #0a1b32;
    --navy-light: #102744;
    --gold: #e8c77d;
    --gold-light: #ffe7a8;
    --gold-dark: #a9823e;
    --white: #f7f5ef;
    --muted: #b8c2d0;
    --border: rgba(232, 199, 125, 0.35);
    --shadow: 0 8px 28px rgba(0, 0, 0, 0.32);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background: var(--navy-deep);
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% 15%, rgba(24, 53, 86, 0.25), transparent 38%),
        var(--navy);
    color: var(--white);
    font-family: "DM Sans", sans-serif;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
}

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

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 4px;
}

/* =========================================================
   HEADER
========================================================= */

.topbar {
    position: relative;
    z-index: 30;
    width: 100%;
    min-height: 82px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(3, 12, 26, 0.96);
    border-bottom: 1px solid var(--border);
}

.header-icon {
    width: 43px;
    height: 43px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border: 1px solid rgba(232, 199, 125, 0.48);
    border-radius: 50%;
    background: rgba(13, 30, 52, 0.8);
    color: var(--gold-light);
    font-size: 17px;
    cursor: pointer;
    transition: 0.25s ease;
}

.header-icon:active {
    transform: scale(0.94);
    background: rgba(232, 199, 125, 0.15);
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 0;
    flex: 1;
}

.brand-mark {
    color: var(--gold);
    font-size: 30px;
    display: grid;
    place-items: center;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-copy strong {
    color: var(--gold-light);
    font-family: "Playfair Display", serif;
    font-size: clamp(18px, 5vw, 25px);
    letter-spacing: 1.5px;
    white-space: nowrap;
}

.brand-copy small {
    color: var(--muted);
    font-size: 10px;
    margin-top: 4px;
    white-space: nowrap;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.notification-link {
    position: relative;
}

.notification-dot {
    position: absolute;
    top: 7px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #e34e55;
    border: 1px solid var(--navy);
    border-radius: 50%;
}

/* =========================================================
   SIDE MENU
========================================================= */

.side-menu {
    position: fixed;
    z-index: 60;
    top: 0;
    left: 0;
    width: min(310px, 84vw);
    height: 100dvh;
    padding: 24px 18px;
    background: #07162a;
    border-right: 1px solid var(--border);
    box-shadow: 15px 0 45px rgba(0, 0, 0, 0.4);
    transform: translateX(-105%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.side-menu.open {
    transform: translateX(0);
}

.menu-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 25px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.menu-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gold-light);
    font-family: "Playfair Display", serif;
    font-size: 22px;
}

.menu-brand i {
    font-size: 25px;
}

.menu-close {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: transparent;
    color: var(--gold-light);
    cursor: pointer;
}

.side-menu > a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 12px;
    margin: 5px 0;
    border-radius: 10px;
    color: var(--white);
    font-size: 14px;
    transition: 0.2s ease;
}

.side-menu > a i {
    width: 20px;
    color: var(--gold);
    text-align: center;
}

.side-menu > a:active,
.side-menu > a:hover {
    background: rgba(232, 199, 125, 0.1);
}

.menu-backdrop {
    position: fixed;
    z-index: 50;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
}

.menu-backdrop.show {
    opacity: 1;
    visibility: visible;
}

/* =========================================================
   MAIN PAGE
========================================================= */

.home-page {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 105px;
}

/* =========================================================
   HERO SECTION
========================================================= */

.hero-section {
    position: relative;
    isolation: isolate;
    min-height: 390px;
    padding: 28px 20px 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    background:
        linear-gradient(115deg, rgba(3, 12, 27, 0.97) 0%, rgba(5, 20, 39, 0.87) 48%, rgba(4, 15, 30, 0.45) 100%),
        url("home-hero.jpg") center 43% / cover no-repeat,
        #07172b;
    border-bottom: 1px solid rgba(232, 199, 125, 0.18);
}

.hero-background {
    position: absolute;
    z-index: -2;
    inset: 0;
    background:
        url("home-hero.jpg") center 43% / cover no-repeat,
        radial-gradient(circle at 75% 45%, #17385a, #061326 65%);
}

.hero-shade {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(3, 12, 26, 0.94) 0%,
        rgba(3, 12, 26, 0.72) 48%,
        rgba(3, 12, 26, 0.36) 100%
    );
}

.hero-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    align-items: center;
    gap: 8px;
    min-height: 225px;
}

.welcome-copy {
    min-width: 0;
    position: relative;
    z-index: 2;
}

.greeting {
    color: var(--gold-light);
    font-family: "Playfair Display", serif;
    font-size: 14px;
    letter-spacing: 0.5px;
    margin-bottom: 13px;
}

.welcome-copy h1 {
    color: var(--white);
    font-family: "Playfair Display", serif;
    font-size: clamp(27px, 7vw, 39px);
    line-height: 1.2;
    margin-bottom: 7px;
}

.welcome-copy h2 {
    color: var(--gold);
    font-family: "Playfair Display", serif;
    font-size: clamp(23px, 6vw, 32px);
    font-style: italic;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.welcome-message {
    max-width: 260px;
    margin-top: 13px;
    color: #e0e5ed;
    font-size: 13px;
    line-height: 1.65;
}

/* Prayer countdown circle */

.prayer-widget {
    position: relative;
    width: min(190px, 100%);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    justify-self: end;
    filter: drop-shadow(0 0 13px rgba(232, 199, 125, 0.16));
}

.prayer-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    transform: rotate(-90deg);
}

.ring-track,
.ring-progress {
    fill: none;
    stroke-width: 4;
}

.ring-track {
    stroke: rgba(232, 199, 125, 0.22);
}

.ring-progress {
    stroke: var(--gold);
    stroke-linecap: round;
    stroke-dasharray: 634;
    stroke-dashoffset: 634;
    transition: stroke-dashoffset 0.8s linear;
    filter: drop-shadow(0 0 5px rgba(255, 220, 145, 0.7));
}

.prayer-widget-content {
    width: 88%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 5px;
}

.prayer-mosque {
    color: var(--gold-light);
    font-size: 23px;
    margin-bottom: 2px;
}

.prayer-label {
    color: var(--muted);
    font-size: 12px;
}

.next-prayer-name {
    color: var(--gold-light);
    font-family: "Playfair Display", serif;
    font-size: 22px;
    line-height: 1.3;
}

.prayer-countdown {
    color: var(--white);
    font-size: clamp(21px, 6vw, 28px);
    font-weight: 600;
    letter-spacing: 0.5px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.next-prayer-time {
    color: var(--muted);
    font-size: 11px;
}

/* Hero date and button */

.hero-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 22px;
}

.date-pill {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(4, 17, 34, 0.82);
    backdrop-filter: blur(8px);
}

.date-pill > i {
    color: var(--gold);
    font-size: 23px;
    flex-shrink: 0;
}

.date-pill div {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.date-pill strong {
    color: var(--white);
    font-size: 11px;
    font-weight: 600;
}

.date-pill span {
    color: var(--muted);
    font-size: 10px;
}

.gold-button {
    min-height: 43px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-shrink: 0;
    border-radius: 30px;
    background: linear-gradient(120deg, #ffe9ae, #d8ad55);
    color: #17120a;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 4px 18px rgba(220, 174, 83, 0.2);
    transition: 0.2s ease;
}

.gold-button:active {
    transform: scale(0.97);
}

.location-status {
    margin-top: 14px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.location-status::before {
    content: "\f3c5";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--gold);
    margin-right: 7px;
}

/* =========================================================
   SHARED SECTION STYLES
========================================================= */

.content-section {
    padding: 22px 17px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
}

.section-heading h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gold-light);
    font-family: "Playfair Display", serif;
    font-size: 23px;
    line-height: 1.25;
}

.section-heading h2 i {
    color: var(--gold);
    font-size: 19px;
}

.section-heading > a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}

.section-heading > a i {
    color: var(--gold);
    font-size: 11px;
}

/* =========================================================
   WORSHIP CARDS
========================================================= */

.worship-section {
    margin: 17px 14px 20px;
    padding: 18px 14px 17px;
    border: 1px solid rgba(232, 199, 125, 0.48);
    border-radius: 23px;
    background: linear-gradient(145deg, #0c2038, #071629 75%);
    box-shadow: var(--shadow), inset 0 0 20px rgba(232, 199, 125, 0.035);
}

.worship-section .section-heading {
    margin-bottom: 15px;
}

.worship-section .section-heading h2 {
    font-size: 22px;
}

.worship-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
}

.worship-card {
    min-width: 0;
    min-height: 112px;
    padding: 13px 5px 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-align: center;
    border: 1px solid rgba(232, 199, 125, 0.36);
    border-radius: 17px;
    background: linear-gradient(150deg, #142d4b, #08182d);
    box-shadow: inset 0 1px 12px rgba(255, 255, 255, 0.025);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.worship-card:active {
    transform: scale(0.96);
    border-color: var(--gold);
}

.worship-icon {
    font-size: 27px;
    line-height: 1.2;
}

.worship-card strong {
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
}

.worship-card small {
    color: var(--muted);
    font-size: 10px;
}

/* =========================================================
   CONTINUE QURAN BANNER
========================================================= */

.feature-banner {
    position: relative;
    min-height: 135px;
    margin: 0 17px 15px;
    padding: 20px 17px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--gold-dark);
    border-radius: 19px;
    background: #091a30;
    box-shadow: var(--shadow);
}

.banner-image {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-position: center;
    background-size: cover;
    opacity: 0.55;
}

.quran-image {
    background-image: url("quran-banner.jpg");
}

.feature-banner::after {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(3, 12, 25, 0.22),
        rgba(3, 12, 25, 0.88) 42%,
        rgba(3, 12, 25, 0.94)
    );
}

.banner-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-left: 35%;
}

.banner-content h2 {
    color: var(--gold-light);
    font-family: "Playfair Display", serif;
    font-size: 20px;
    line-height: 1.3;
}

.banner-content p {
    margin-top: 5px;
    color: var(--white);
    font-size: 12px;
}

.banner-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 11px;
    padding: 9px 13px;
    border-radius: 25px;
    background: linear-gradient(120deg, #ffe9ae, #d8ad55);
    color: #17120a;
    font-size: 11px;
    font-weight: 700;
}

/* =========================================================
   DAILY INSPIRATION
========================================================= */

.inspiration-banner {
    position: relative;
    min-height: 105px;
    margin: 0 17px 20px;
    padding: 15px 15px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--gold-dark);
    border-radius: 17px;
    background: #0b1b30;
    box-shadow: var(--shadow);
}

.inspiration-image {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(3, 12, 25, 0.2), rgba(3, 12, 25, 0.92) 65%),
        url("inspiration-banner.jpg") center / cover no-repeat;
    opacity: 0.7;
}

.inspiration-content {
    position: relative;
    z-index: 2;
    flex: 1;
    min-width: 0;
}

.eyebrow {
    color: var(--gold);
    font-size: 8px;
    letter-spacing: 1.5px;
}

.inspiration-content h2 {
    margin: 4px 0;
    color: var(--gold-light);
    font-family: "Playfair Display", serif;
    font-size: 18px;
}

.inspiration-content p {
    color: var(--white);
    font-family: "Playfair Display", serif;
    font-size: 12px;
    font-style: italic;
}

.inspiration-content small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.inspiration-link {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: 25px;
    color: var(--white);
    font-size: 10px;
    white-space: nowrap;
}

.inspiration-link i {
    color: var(--gold);
    margin-left: 4px;
}

/* =========================================================
   COMMUNITY CARDS
========================================================= */

.community-section {
    padding-top: 3px;
    padding-bottom: 20px;
}

.community-section .section-heading {
    margin-bottom: 12px;
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
}

.community-card {
    position: relative;
    min-width: 0;
    height: 83px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 8px 4px;
    overflow: hidden;
    border: 1px solid rgba(232, 199, 125, 0.65);
    border-radius: 13px;
    background-color: #102744;
    background-position: center;
    background-size: cover;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.community-card:active {
    transform: scale(0.96);
}

.community-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(2, 9, 20, 0.05) 10%,
        rgba(2, 9, 20, 0.82) 100%
    );
}

.community-card span {
    position: relative;
    z-index: 1;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

.ummah-card {
    background-image: url("community-ummah.jpg");
}

.circles-card {
    background-image: url("community-quran-circles.jpg");
}

.stories-card {
    background-image: url("community-stories.jpg");
}

.messages-card {
    background-image: url("community-messages.jpg");
}

/* =========================================================
   BOTTOM NAVIGATION
========================================================= */

.bottom-nav {
    position: fixed;
    z-index: 40;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100%;
    max-width: 900px;
    min-height: 76px;
    padding: 9px 8px calc(9px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    background: rgba(3, 13, 28, 0.97);
    border: 1px solid rgba(232, 199, 125, 0.45);
    border-bottom: none;
    border-radius: 23px 23px 0 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(16px);
}

.nav-item {
    min-width: 0;
    min-height: 57px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #b8c2d0;
    font-size: 10px;
    transition: color 0.2s ease;
}

.nav-item i {
    font-size: 22px;
}

.nav-item.active {
    color: var(--gold-light);
}

.nav-item.active i {
    filter: drop-shadow(0 0 7px rgba(255, 218, 139, 0.6));
}

.nav-item:active {
    transform: scale(0.94);
}

/* =========================================================
   RESPONSIVE: SMALL PHONES
========================================================= */

@media (max-width: 380px) {
    .topbar {
        padding: 10px 11px;
        gap: 7px;
    }

    .header-icon {
        width: 37px;
        height: 37px;
        font-size: 15px;
    }

    .header-actions {
        gap: 5px;
    }

    .brand {
        gap: 6px;
    }

    .brand-mark {
        font-size: 24px;
    }

    .brand-copy strong {
        font-size: 17px;
    }

    .brand-copy small {
        font-size: 9px;
    }

    .hero-section {
        padding: 23px 13px 18px;
        min-height: 365px;
    }

    .hero-top {
        grid-template-columns: minmax(0, 1fr) 155px;
        min-height: 190px;
    }

    .prayer-widget {
        width: 155px;
    }

    .next-prayer-name {
        font-size: 18px;
    }

    .prayer-countdown {
        font-size: 21px;
    }

    .welcome-copy h1 {
        font-size: 25px;
    }

    .welcome-copy h2 {
        font-size: 21px;
    }

    .welcome-message {
        font-size: 11px;
    }

    .date-pill {
        padding: 8px;
        gap: 7px;
    }

    .date-pill strong {
        font-size: 9px;
    }

    .date-pill span {
        font-size: 8px;
    }

    .gold-button {
        padding: 0 11px;
        font-size: 10px;
    }

    .worship-grid {
        gap: 6px;
    }

    .worship-card {
        min-height: 103px;
        padding-left: 3px;
        padding-right: 3px;
    }

    .worship-card strong {
        font-size: 10px;
    }

    .worship-card small {
        font-size: 9px;
    }

    .community-grid {
        gap: 6px;
    }

    .community-card {
        height: 75px;
    }

    .community-card span {
        font-size: 9px;
    }

    .section-heading h2 {
        font-size: 20px;
    }

    .banner-content {
        padding-left: 30%;
    }

    .banner-content h2 {
        font-size: 17px;
    }

    .inspiration-link {
        padding: 8px;
        font-size: 9px;
    }
}

/* =========================================================
   RESPONSIVE: TABLETS AND DESKTOP
========================================================= */

@media (min-width: 650px) {
    .topbar {
        padding: 15px 30px;
    }

    .hero-section {
        min-height: 470px;
        padding: 42px 38px 28px;
    }

    .hero-top {
        grid-template-columns: minmax(0, 1fr) 240px;
        min-height: 275px;
    }

    .prayer-widget {
        width: 230px;
    }

    .welcome-copy h1 {
        font-size: 43px;
    }

    .welcome-copy h2 {
        font-size: 36px;
    }

    .welcome-message {
        font-size: 15px;
    }

    .greeting {
        font-size: 17px;
    }

    .prayer-countdown {
        font-size: 31px;
    }

    .next-prayer-name {
        font-size: 27px;
    }

    .content-section {
        padding-left: 30px;
        padding-right: 30px;
    }

    .worship-section {
        margin: 22px 25px;
        padding: 23px;
    }

    .worship-card {
        min-height: 145px;
    }

    .worship-icon {
        font-size: 35px;
    }

    .worship-card strong {
        font-size: 15px;
    }

    .worship-card small {
        font-size: 12px;
    }

    .feature-banner,
    .inspiration-banner {
        margin-left: 30px;
        margin-right: 30px;
    }

    .community-card {
        height: 125px;
    }

    .community-card span {
        font-size: 14px;
    }

    .bottom-nav {
        border-radius: 24px 24px 0 0;
    }

    .nav-item {
        font-size: 12px;
    }

    .nav-item i {
        font-size: 25px;
    }
}

/* =========================================================
   ACCESSIBILITY AND MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
