/* ============================================================
   Islamic Platform — premium component layer
   Loads AFTER frontend-modern.css and reuses its design tokens.
   Contains: utility strip, mega-menu header, mobile nav, search
   overlay, hero, editorial cards, tools, Quran/Hadith/teacher
   components, collections, footer.
   ============================================================ */

/* ---------- Shared primitives ---------- */
/* Arabic font faces */
@font-face {
    font-family: 'Kitab';
    src: url("//cdn.alquran.cloud/public/fonts/Kitab-Regular.ttf");
}

@font-face {
    font-family: 'Kitab Bold';
    src: url("//cdn.alquran.cloud/public/fonts/Kitab-Bold.ttf");
}

@font-face {
    font-family: 'JannaBold';
    src: url("../fonts/Janna-bold.woff") format("woff");
}

@font-face {
    font-family: 'JannaRegular';
    src: url("../fonts/Janna-regular.woff") format("woff");
}

.ip-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.ip-section { padding: 4.5rem 0; }
.ip-section-tight { padding: 3rem 0; }
.ip-section-stone { background: var(--ed-gray-50); }
.ip-section-cream { background: var(--ed-primary-50); }

.ip-eyebrow {
    display: inline-block;
    font-family: var(--ed-font-family);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ed-primary);
    margin-bottom: 0.65rem;
}

.ip-section-title {
    font-family: var(--ed-font-display);
    font-size: clamp(1.6rem, 3vw, 2.15rem);
    font-weight: 600;
    color: var(--ed-gray-900);
    letter-spacing: -0.015em;
    margin: 0 0 0.5rem;
}

.ip-section-sub {
    color: var(--ed-gray-500);
    font-size: 0.98rem;
    max-width: 62ch;
    margin: 0;
}

.ip-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2.25rem;
    flex-wrap: wrap;
}

.ip-link-arrow {
    font-family: var(--ed-font-family);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ed-primary);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 1px solid transparent;
    transition: var(--ed-transition);
}
.ip-link-arrow:hover { color: var(--ed-primary-dark); border-bottom-color: currentColor; text-decoration: none; }
.ip-link-arrow i { font-size: 0.75em; margin-left: 0.35rem; }

/* Buttons */
.ip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--ed-font-family);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.8rem 1.4rem;
    border-radius: var(--ed-radius);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: var(--ed-transition);
}
.ip-btn:hover { text-decoration: none; }
.ip-btn:focus-visible { outline: 2px solid var(--ed-primary); outline-offset: 2px; }
.ip-btn-primary { background: var(--ed-primary); color: #fff; }
.ip-btn-primary:hover { background: var(--ed-primary-dark); color: #fff; }
.ip-btn-outline { background: transparent; color: var(--ed-gray-800); border-color: var(--ed-gray-300); }
.ip-btn-outline:hover { border-color: var(--ed-primary); color: var(--ed-primary); background: var(--ed-primary-50); }
.ip-btn-ghost { background: transparent; color: var(--ed-primary); }
.ip-btn-ghost:hover { background: var(--ed-primary-50); color: var(--ed-primary-dark); }
.ip-btn-light { background: #fff; color: var(--ed-primary); }
.ip-btn-light:hover { background: var(--ed-gray-100); color: var(--ed-primary-dark); }
.ip-btn-sm { padding: 0.55rem 1rem; font-size: 0.82rem; }
.ip-btn-lg { padding: 0.95rem 1.75rem; font-size: 0.96rem; }
.ip-btn-block { width: 100%; }

/* Badges / pills */
.ip-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--ed-font-family);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.28rem 0.62rem;
    border-radius: 4px;
}
.ip-badge-primary { background: var(--ed-primary-50); color: var(--ed-primary); }
.ip-badge-gold { background: rgba(176, 141, 87, 0.13); color: var(--ed-accent-text); }
.ip-badge-neutral { background: var(--ed-gray-100); color: var(--ed-gray-600); }
.ip-badge-verified { background: var(--ed-primary); color: #fff; text-transform: none; letter-spacing: 0; }

.ip-pill {
    display: inline-block;
    font-family: var(--ed-font-family);
    font-size: 0.83rem;
    font-weight: 500;
    color: var(--ed-gray-600);
    background: transparent;
    border: 1px solid var(--ed-gray-200);
    padding: 0.45rem 1rem;
    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;
    transition: var(--ed-transition);
}
.ip-pill:hover { border-color: var(--ed-primary); color: var(--ed-primary); text-decoration: none; }
.ip-pill.is-active { background: var(--ed-primary); border-color: var(--ed-primary); color: #fff; }

/* Geometric pattern accent (CSS only, no image assets) */
.ip-pattern {
    background-image:
        radial-gradient(circle at 1px 1px, rgba(19, 92, 67, 0.14) 1px, transparent 0);
    background-size: 22px 22px;
}
.ip-pattern-gold {
    background-image:
        radial-gradient(circle at 1px 1px, rgba(176, 141, 87, 0.22) 1px, transparent 0);
    background-size: 22px 22px;
}

/* ============================================================
   TOP UTILITY STRIP
   ============================================================ */
.ip-utility {
    background: var(--ed-secondary);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    font-family: var(--ed-font-family);
}
.ip-utility a { color: rgba(255, 255, 255, 0.72); text-decoration: none; }
.ip-utility a:hover { color: #fff; text-decoration: none; }
.ip-utility-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 38px;
    flex-wrap: wrap;
}
.ip-utility-dates { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.ip-utility-hijri {
    /* Lighter than --ed-accent-light: the topbar is emerald (#135C43), where
       the standard accent gold only reaches 3.77:1. */
    color: #d9c29d;
    font-weight: 600;
}
.ip-utility-links { display: flex; align-items: center; gap: 1.1rem; }
.ip-utility i { opacity: 0.85; margin-right: 0.3rem; }

@media (max-width: 767px) {
    .ip-utility-inner { justify-content: center; font-size: 0.72rem; }
    .ip-utility-links .ip-utility-hide-sm { display: none; }
}

/* ============================================================
   HEADER + MEGA MENU
   ============================================================ */
.ip-header {
    position: sticky;
    top: 0;
    z-index: 1040;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--ed-gray-200);
    transition: box-shadow 0.25s ease;
}
.ip-header.is-scrolled { box-shadow: var(--ed-shadow-md); }

.ip-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 72px;
}

/* Brand — placeholder mark, easy to swap for a real logo */
.ip-brand { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; }
.ip-brand:hover { text-decoration: none; }
.ip-brand-mark {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border-radius: 9px;
    background: var(--ed-primary);
    color: #fff;
    font-size: 1.05rem;
    flex-shrink: 0;
}
.ip-brand-text { line-height: 1.1; }
.ip-brand-name {
    display: block;
    font-family: var(--ed-font-display);
    font-size: 1.12rem;
    font-weight: 600;
    color: var(--ed-gray-900);
    letter-spacing: -0.01em;
}
.ip-brand-tag {
    display: block;
    font-family: var(--ed-font-family);
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--ed-gray-400);
}

/* Primary nav */
.ip-nav { display: flex; align-items: center; gap: 0.15rem; list-style: none; margin: 0; padding: 0; }
.ip-nav > li { position: static; }
.ip-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-family: var(--ed-font-family);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ed-gray-700);
    background: none;
    border: 0;
    padding: 0.6rem 0.85rem;
    border-radius: var(--ed-radius-sm);
    text-decoration: none;
    cursor: pointer;
    transition: var(--ed-transition);
}
.ip-nav-link:hover,
.ip-nav-link[aria-expanded="true"] { color: var(--ed-primary); background: var(--ed-primary-50); text-decoration: none; }
.ip-nav-link.is-active { color: var(--ed-primary); font-weight: 600; }
.ip-nav-link:focus-visible { outline: 2px solid var(--ed-primary); outline-offset: 2px; }
.ip-nav-caret { font-size: 0.6rem; opacity: 0.7; transition: transform 0.2s ease; }
.ip-nav-link[aria-expanded="true"] .ip-nav-caret { transform: rotate(180deg); }

/* Mega panel */
.ip-mega {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border-top: 1px solid var(--ed-gray-200);
    border-bottom: 1px solid var(--ed-gray-200);
    box-shadow: var(--ed-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    z-index: 1039;
}
.ip-mega.is-open { opacity: 1; visibility: visible; transform: translateY(0); }

.ip-mega-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) 1.15fr;
    gap: 2.5rem;
    padding: 2.25rem 0 2.5rem;
}
.ip-mega-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) 1.3fr; }
.ip-mega-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.ip-mega-col-title {
    font-family: var(--ed-font-family);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--ed-gray-400);
    margin-bottom: 0.9rem;
}
.ip-mega-list { list-style: none; margin: 0; padding: 0; }
.ip-mega-list li + li { margin-top: 0.15rem; }
.ip-mega-list a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.88rem;
    color: var(--ed-gray-700);
    padding: 0.4rem 0.55rem;
    margin-left: -0.55rem;
    border-radius: var(--ed-radius-sm);
    text-decoration: none;
    transition: var(--ed-transition);
}
.ip-mega-list a:hover { background: var(--ed-primary-50); color: var(--ed-primary); text-decoration: none; }
.ip-mega-list a:focus-visible { outline: 2px solid var(--ed-primary); outline-offset: -2px; }
.ip-mega-list i { width: 1rem; text-align: center; color: var(--ed-gray-400); font-size: 0.82rem; }
.ip-mega-list a:hover i { color: var(--ed-primary); }
.ip-mega-list .ip-mega-note { display: block; font-size: 0.75rem; color: var(--ed-gray-400); }

/* Featured panel inside a mega menu */
.ip-mega-feature {
    background: var(--ed-gray-50);
    border: 1px solid var(--ed-gray-200);
    border-radius: var(--ed-radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}
.ip-mega-feature-emerald {
    background: linear-gradient(150deg, var(--ed-primary-dark), var(--ed-primary));
    border-color: transparent;
    color: rgba(255, 255, 255, 0.82);
}
.ip-mega-feature-emerald .ip-mega-feature-title { color: #fff; }
.ip-mega-feature-title {
    font-family: var(--ed-font-display);
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--ed-gray-900);
    margin-bottom: 0.45rem;
}
.ip-mega-feature p { font-size: 0.85rem; line-height: 1.65; margin-bottom: 1.1rem; }
.ip-mega-feature .ip-btn { margin-top: auto; align-self: flex-start; }
.ip-mega-arabic {
    font-family: var(--ed-font-arabic);
    font-size: 1.5rem;
    line-height: 2;
    color: var(--ed-accent-on-dark);
    direction: rtl;
    margin-bottom: 0.75rem;
}

/* Header right cluster */
.ip-header-actions { display: flex; align-items: center; gap: 0.4rem; }
.ip-icon-btn {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border: 0; background: transparent;
    border-radius: var(--ed-radius-sm);
    color: var(--ed-gray-600);
    cursor: pointer;
    transition: var(--ed-transition);
}
.ip-icon-btn:hover { background: var(--ed-gray-100); color: var(--ed-primary); }
.ip-icon-btn:focus-visible { outline: 2px solid var(--ed-primary); outline-offset: 2px; }

.ip-header-login {
    font-family: var(--ed-font-family);
    font-size: 0.88rem; font-weight: 600;
    color: var(--ed-gray-700);
    padding: 0.55rem 0.6rem;
    text-decoration: none;
}
.ip-header-login:hover { color: var(--ed-primary); text-decoration: none; }

.ip-burger { display: none; }

@media (max-width: 1099px) {
    .ip-nav, .ip-header-desktop-only { display: none !important; }
    .ip-burger { display: grid; }
}

/* ============================================================
   MOBILE NAVIGATION (accordion drawer)
   ============================================================ */
.ip-drawer-backdrop {
    position: fixed; inset: 0;
    background: rgba(26, 24, 21, 0.45);
    opacity: 0; visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s;
    z-index: 1050;
}
.ip-drawer-backdrop.is-open { opacity: 1; visibility: visible; }

.ip-drawer {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(400px, 88vw);
    background: #fff;
    z-index: 1051;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column;
    overflow-y: auto;
}
.ip-drawer.is-open { transform: translateX(0); }
.ip-drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--ed-gray-200);
    position: sticky; top: 0; background: #fff; z-index: 2;
}
.ip-drawer-body { padding: 0.5rem 0 1.5rem; }

.ip-acc-item { border-bottom: 1px solid var(--ed-gray-100); }
.ip-acc-trigger {
    width: 100%;
    display: flex; align-items: center; justify-content: space-between;
    background: none; border: 0;
    font-family: var(--ed-font-family);
    font-size: 1rem; font-weight: 600;
    color: var(--ed-gray-800);
    padding: 1rem 1.25rem;
    text-align: left;
    cursor: pointer;
    min-height: 52px; /* thumb-friendly */
}
.ip-acc-trigger:focus-visible { outline: 2px solid var(--ed-primary); outline-offset: -2px; }
.ip-acc-trigger i { color: var(--ed-gray-400); font-size: 0.8rem; transition: transform 0.2s ease; }
.ip-acc-trigger[aria-expanded="true"] { color: var(--ed-primary); }
.ip-acc-trigger[aria-expanded="true"] i { transform: rotate(180deg); color: var(--ed-primary); }
.ip-acc-panel { display: none; padding: 0 1.25rem 1rem; }
.ip-acc-panel.is-open { display: block; }
.ip-acc-panel a {
    display: block;
    font-size: 0.92rem;
    color: var(--ed-gray-600);
    padding: 0.7rem 0.75rem;
    border-radius: var(--ed-radius-sm);
    text-decoration: none;
    min-height: 44px;
}
.ip-acc-panel a:hover { background: var(--ed-primary-50); color: var(--ed-primary); text-decoration: none; }
.ip-acc-group-label {
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--ed-gray-400); padding: 0.85rem 0.75rem 0.3rem;
}
.ip-drawer-cta { padding: 1.25rem; display: grid; gap: 0.6rem; }

/* ============================================================
   SEARCH OVERLAY
   ============================================================ */
.ip-search-overlay {
    position: fixed; inset: 0;
    background: rgba(26, 24, 21, 0.55);
    backdrop-filter: blur(3px);
    opacity: 0; visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s;
    z-index: 1060;
    padding: 8vh 1.25rem 2rem;
}
.ip-search-overlay.is-open { opacity: 1; visibility: visible; }
.ip-search-panel {
    max-width: 680px; margin: 0 auto;
    background: #fff;
    border-radius: var(--ed-radius-lg);
    box-shadow: var(--ed-shadow-xl);
    overflow: hidden;
}
.ip-search-field { padding: 1.15rem 1.35rem; border-bottom: 1px solid var(--ed-gray-100); }
.ip-search-body { padding: 1.1rem 1.35rem 1.5rem; }
.ip-search-body .ip-mega-col-title { margin-bottom: 0.6rem; }
.ip-search-suggestions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ============================================================
   HERO
   ============================================================ */
.ip-hero {
    position: relative;
    background: var(--ed-gray-50);
    border-bottom: 1px solid var(--ed-gray-200);
    overflow: hidden;
    padding: 4rem 0 4.5rem;
}
.ip-hero::before {
    content: '';
    position: absolute; inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(19, 92, 67, 0.10) 1px, transparent 0);
    background-size: 24px 24px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 80% 30%, #000 0%, transparent 70%);
    mask-image: radial-gradient(ellipse 70% 60% at 80% 30%, #000 0%, transparent 70%);
    pointer-events: none;
}
.ip-hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3.5rem;
    align-items: center;
}
.ip-hero h1 {
    font-family: var(--ed-font-display);
    font-size: clamp(2.1rem, 4.4vw, 3.15rem);
    font-weight: 600;
    line-height: 1.14;
    letter-spacing: -0.022em;
    color: var(--ed-gray-900);
    margin-bottom: 1.1rem;
}
.ip-hero h1 em { font-style: italic; color: var(--ed-primary); }
.ip-hero-lead {
    font-size: 1.04rem;
    line-height: 1.75;
    color: var(--ed-gray-600);
    max-width: 54ch;
    margin-bottom: 1.9rem;
}
.ip-hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2.25rem; }
.ip-hero-meta { display: flex; flex-wrap: wrap; gap: 1.75rem; }
.ip-hero-meta-item { display: flex; flex-direction: column; }
.ip-hero-meta-value { font-family: var(--ed-font-display); font-size: 1.35rem; font-weight: 600; color: var(--ed-primary); }
.ip-hero-meta-label { font-size: 0.76rem; color: var(--ed-gray-500); letter-spacing: 0.04em; }

/* Verse card in hero */
.ip-verse-card {
    background: #fff;
    border: 1px solid var(--ed-gray-200);
    border-radius: var(--ed-radius-lg);
    box-shadow: var(--ed-shadow-lg);
    overflow: hidden;
}
.ip-verse-card-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.9rem 1.35rem;
    border-bottom: 1px solid var(--ed-gray-100);
    background: var(--ed-gray-50);
}
.ip-verse-card-surah { font-family: var(--ed-font-family); font-size: 0.82rem; font-weight: 600; color: var(--ed-gray-700); }
.ip-verse-card-ref { font-size: 0.76rem; color: var(--ed-gray-400); }
.ip-verse-card-body { padding: 1.9rem 1.6rem; text-align: center; }
.ip-arabic {
    font-family: var(--ed-font-arabic);
    direction: rtl;
    color: var(--ed-gray-900);
    line-height: 2.15;
}
.ip-arabic-lg { font-size: 1.85rem; }
.ip-arabic-xl { font-size: 2.15rem; }
.ip-verse-translation {
    font-size: 0.94rem; line-height: 1.8; color: var(--ed-gray-600);
    margin-top: 1.15rem; padding-top: 1.15rem; border-top: 1px dashed var(--ed-gray-200);
}
.ip-verse-placeholder {
    font-size: 0.78rem; color: var(--ed-gray-400); font-style: italic;
}
.ip-verse-card-foot {
    display: flex; align-items: center; justify-content: center; gap: 0.4rem;
    padding: 0.85rem 1rem;
    border-top: 1px solid var(--ed-gray-100);
    background: var(--ed-gray-50);
}

@media (max-width: 991px) {
    .ip-hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .ip-hero { padding: 3rem 0 3.5rem; }
}

/* ============================================================
   QUICK TOOLS
   ============================================================ */
.ip-tools-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1rem;
}
.ip-tool {
    display: flex; flex-direction: column; align-items: flex-start; gap: 0.7rem;
    background: #fff;
    border: 1px solid var(--ed-gray-200);
    border-radius: var(--ed-radius-lg);
    padding: 1.35rem 1.25rem;
    text-decoration: none;
    transition: var(--ed-transition);
}
.ip-tool:hover {
    border-color: var(--ed-primary);
    box-shadow: var(--ed-shadow-md);
    transform: translateY(-2px);
    text-decoration: none;
}
.ip-tool-icon {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: var(--ed-radius);
    background: var(--ed-primary-50);
    color: var(--ed-primary);
    font-size: 1.05rem;
}
.ip-tool-name { font-family: var(--ed-font-display); font-size: 1rem; font-weight: 600; color: var(--ed-gray-900); }
.ip-tool-desc { font-size: 0.8rem; color: var(--ed-gray-500); }

@media (max-width: 1099px) { .ip-tools-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 575px)  { .ip-tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ============================================================
   QURAN EXPERIENCE BLOCK
   ============================================================ */
.ip-quran-panel {
    display: grid;
    grid-template-columns: 260px 1fr;
    background: #fff;
    border: 1px solid var(--ed-gray-200);
    border-radius: var(--ed-radius-lg);
    overflow: hidden;
    box-shadow: var(--ed-shadow-md);
}
.ip-quran-aside {
    background: var(--ed-gray-50);
    border-right: 1px solid var(--ed-gray-200);
    padding: 1.75rem 1.5rem;
}
.ip-quran-surah-no {
    width: 46px; height: 46px; display: grid; place-items: center;
    border-radius: 50%;
    background: var(--ed-primary); color: #fff;
    font-family: var(--ed-font-display); font-weight: 600;
    margin-bottom: 0.9rem;
}
.ip-quran-surah-name { font-family: var(--ed-font-display); font-size: 1.2rem; font-weight: 600; color: var(--ed-gray-900); margin-bottom: 0.15rem; }
.ip-quran-surah-arabic { font-family: var(--ed-font-arabic); font-size: 1.35rem; color: var(--ed-primary); direction: rtl; margin-bottom: 1.1rem; }
.ip-quran-facts { list-style: none; margin: 0; padding: 0; font-size: 0.83rem; }
.ip-quran-facts li { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px dashed var(--ed-gray-200); color: var(--ed-gray-500); }
.ip-quran-facts li:last-child { border-bottom: 0; }
.ip-quran-facts strong { color: var(--ed-gray-700); font-weight: 600; }
.ip-quran-main { padding: 2.25rem 2rem; display: flex; flex-direction: column; }
.ip-quran-verse { text-align: center; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.ip-quran-controls {
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding-top: 1.5rem; margin-top: 1.5rem;
    border-top: 1px solid var(--ed-gray-100);
    flex-wrap: wrap;
}
.ip-play-btn {
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--ed-primary); color: #fff; border: 0;
    display: grid; place-items: center; font-size: 1.05rem;
    cursor: pointer; transition: var(--ed-transition);
}
.ip-play-btn:hover { background: var(--ed-primary-dark); }
.ip-play-btn:focus-visible { outline: 2px solid var(--ed-primary); outline-offset: 3px; }
.ip-ctrl-btn {
    width: 42px; height: 42px; border-radius: 50%;
    background: #fff; border: 1px solid var(--ed-gray-200);
    color: var(--ed-gray-500);
    display: grid; place-items: center;
    cursor: pointer; transition: var(--ed-transition);
}
.ip-ctrl-btn:hover { border-color: var(--ed-primary); color: var(--ed-primary); }
.ip-ctrl-btn:focus-visible { outline: 2px solid var(--ed-primary); outline-offset: 2px; }

@media (max-width: 767px) {
    .ip-quran-panel { grid-template-columns: 1fr; }
    .ip-quran-aside { border-right: 0; border-bottom: 1px solid var(--ed-gray-200); }
    .ip-quran-main { padding: 1.75rem 1.25rem; }
}

/* ============================================================
   CONTINUE / PERSONAL CARDS
   ============================================================ */
.ip-continue {
    display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1.25rem;
}
.ip-mini-card {
    background: #fff; border: 1px solid var(--ed-gray-200);
    border-radius: var(--ed-radius-lg); padding: 1.5rem;
}
.ip-progress { height: 6px; background: var(--ed-gray-100); border-radius: 999px; overflow: hidden; margin: 0.9rem 0 0.6rem; }
.ip-progress-bar { height: 100%; background: var(--ed-primary); border-radius: 999px; }
.ip-stat-value { font-family: var(--ed-font-display); font-size: 1.7rem; font-weight: 600; color: var(--ed-gray-900); }
.ip-stat-label { font-size: 0.78rem; color: var(--ed-gray-500); }
@media (max-width: 767px) { .ip-continue { grid-template-columns: 1fr; } }

/* ============================================================
   HADITH CARD
   ============================================================ */
.ip-hadith {
    background: #fff;
    border: 1px solid var(--ed-gray-200);
    border-left: 3px solid var(--ed-accent);
    border-radius: var(--ed-radius-lg);
    padding: 2.25rem 2.25rem 1.75rem;
}
.ip-hadith .ip-arabic { text-align: right; font-size: 1.5rem; }
.ip-hadith-translation { font-size: 1rem; line-height: 1.9; color: var(--ed-gray-700); margin: 1.35rem 0; }
.ip-hadith-meta {
    display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem;
    padding-top: 1.15rem; border-top: 1px solid var(--ed-gray-100);
    font-size: 0.8rem; color: var(--ed-gray-500);
}
.ip-hadith-meta strong { color: var(--ed-gray-700); font-weight: 600; }
@media (max-width: 575px) { .ip-hadith { padding: 1.5rem 1.25rem; } }

/* ============================================================
   EDITORIAL CARDS
   ============================================================ */
.ip-editorial-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 1.75rem;
}
.ip-article-sub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }

.ip-article {
    display: flex; flex-direction: column;
    background: #fff;
    border: 1px solid var(--ed-gray-200);
    border-radius: var(--ed-radius-lg);
    overflow: hidden;
    text-decoration: none;
    height: 100%;
    transition: var(--ed-transition);
}
.ip-article:hover { box-shadow: var(--ed-shadow-md); transform: translateY(-2px); text-decoration: none; }
.ip-article-media { position: relative; aspect-ratio: 16 / 9; background: var(--ed-gray-100); overflow: hidden; }
.ip-article-media img { width: 100%; height: 100%; object-fit: cover; }
.ip-article-media-fallback {
    width: 100%; height: 100%;
    display: grid; place-items: center;
    background: linear-gradient(150deg, var(--ed-primary-dark), var(--ed-primary));
    color: rgba(255,255,255,0.5); font-size: 1.8rem;
}
.ip-article-cat {
    position: absolute; top: 0.85rem; left: 0.85rem;
    background: rgba(255,255,255,0.94); color: var(--ed-primary);
    font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    padding: 0.3rem 0.6rem; border-radius: 4px;
}
.ip-article-body { padding: 1.35rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.ip-article-title {
    font-family: var(--ed-font-display);
    font-size: 1.08rem; font-weight: 600; line-height: 1.35;
    color: var(--ed-gray-900); margin-bottom: 0.55rem;
}
.ip-article:hover .ip-article-title { color: var(--ed-primary); }
.ip-article-excerpt { font-size: 0.87rem; line-height: 1.7; color: var(--ed-gray-500); margin-bottom: 1rem; flex: 1; }
.ip-article-meta {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.75rem; color: var(--ed-gray-400); margin-top: auto;
}
.ip-article-meta span + span::before { content: '·'; margin-right: 0.5rem; }

.ip-article-feature .ip-article-media { aspect-ratio: 16 / 10; }
.ip-article-feature .ip-article-title { font-size: 1.6rem; }
.ip-article-feature .ip-article-excerpt { font-size: 0.95rem; }
.ip-article-feature .ip-article-body { padding: 1.75rem 1.85rem 1.9rem; }

/* compact horizontal card for trending / news lists */
.ip-list-card {
    display: flex; gap: 1rem; align-items: flex-start;
    padding: 1rem 0;
    border-bottom: 1px solid var(--ed-gray-100);
    text-decoration: none;
}
.ip-list-card:last-child { border-bottom: 0; }
.ip-list-card:hover { text-decoration: none; }
.ip-list-card:hover .ip-article-title { color: var(--ed-primary); }
.ip-list-rank {
    font-family: var(--ed-font-display); font-size: 1.35rem; font-weight: 600;
    color: var(--ed-gray-400); line-height: 1; width: 1.9rem; flex-shrink: 0;
}
.ip-list-card .ip-article-title { font-size: 0.98rem; margin-bottom: 0.3rem; }

@media (max-width: 991px) {
    .ip-editorial-grid { grid-template-columns: 1fr; }
    .ip-article-feature .ip-article-title { font-size: 1.3rem; }
}
@media (max-width: 575px) { .ip-article-sub-grid { grid-template-columns: 1fr; } }

/* ============================================================
   RECITERS
   ============================================================ */
.ip-scroller {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 1fr);
    gap: 1.25rem;
    overflow-x: auto;
    padding-bottom: 0.75rem;
    scroll-snap-type: x mandatory;
}
.ip-scroller > * { scroll-snap-align: start; }
@media (min-width: 992px) {
    .ip-scroller { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; }
}
.ip-reciter {
    background: #fff; border: 1px solid var(--ed-gray-200);
    border-radius: var(--ed-radius-lg); padding: 1.6rem 1.35rem;
    text-align: center; text-decoration: none; transition: var(--ed-transition);
}
.ip-reciter:hover { border-color: var(--ed-primary); box-shadow: var(--ed-shadow-md); text-decoration: none; }
.ip-reciter-avatar {
    width: 74px; height: 74px; margin: 0 auto 1rem;
    border-radius: 50%;
    background: linear-gradient(150deg, var(--ed-primary-50), var(--ed-gray-100));
    color: var(--ed-primary);
    display: grid; place-items: center; font-size: 1.5rem;
    overflow: hidden;
}
.ip-reciter-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ip-reciter-name { font-family: var(--ed-font-display); font-size: 1rem; font-weight: 600; color: var(--ed-gray-900); margin-bottom: 0.2rem; }
.ip-reciter-detail { font-size: 0.78rem; color: var(--ed-gray-500); margin-bottom: 1rem; }

/* ============================================================
   TEACHER CARDS
   ============================================================ */
.ip-teacher {
    display: flex; flex-direction: column;
    background: #fff; border: 1px solid var(--ed-gray-200);
    border-radius: var(--ed-radius-lg); padding: 1.6rem;
    height: 100%; transition: var(--ed-transition);
}
.ip-teacher:hover { box-shadow: var(--ed-shadow-md); border-color: var(--ed-gray-300); }
.ip-teacher-head { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.1rem; }
.ip-teacher-avatar {
    width: 62px; height: 62px; border-radius: 50%; flex-shrink: 0;
    background: var(--ed-primary-50); color: var(--ed-primary);
    display: grid; place-items: center; font-size: 1.3rem; overflow: hidden;
}
.ip-teacher-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ip-teacher-name { font-family: var(--ed-font-display); font-size: 1.05rem; font-weight: 600; color: var(--ed-gray-900); display: flex; align-items: center; gap: 0.4rem; }
.ip-teacher-name i { color: var(--ed-primary); font-size: 0.8rem; }
.ip-teacher-sub { font-size: 0.8rem; color: var(--ed-gray-500); margin-top: 0.15rem; }
.ip-teacher-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1rem; }
.ip-teacher-tag {
    font-size: 0.72rem; font-weight: 500; color: var(--ed-gray-600);
    background: var(--ed-gray-100); padding: 0.25rem 0.6rem; border-radius: 4px;
}
.ip-teacher-facts { font-size: 0.82rem; color: var(--ed-gray-500); display: grid; gap: 0.4rem; margin-bottom: 1.15rem; }
.ip-teacher-facts i { width: 1rem; color: var(--ed-gray-400); margin-right: 0.4rem; }
.ip-teacher-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
    padding-top: 1.1rem; border-top: 1px solid var(--ed-gray-100); margin-top: auto;
}
.ip-teacher-price { font-size: 0.8rem; color: var(--ed-gray-500); }
.ip-teacher-price strong { font-family: var(--ed-font-display); font-size: 1.05rem; color: var(--ed-gray-900); display: block; }
.ip-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 0.35rem; }
.ip-dot-open { background: var(--ed-success); }
.ip-dot-busy { background: var(--ed-gray-300); }

/* ============================================================
   STEPS / TIMELINE
   ============================================================ */
.ip-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; counter-reset: step; }
.ip-step { position: relative; padding-top: 2.75rem; }
.ip-step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute; top: 0; left: 0;
    width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center;
    background: #fff; border: 1px solid var(--ed-primary);
    color: var(--ed-primary);
    font-family: var(--ed-font-display); font-weight: 600;
}
.ip-step::after {
    content: ''; position: absolute; top: 20px; left: 46px; right: -1.5rem;
    height: 1px; background: var(--ed-gray-200);
}
.ip-step:last-child::after { display: none; }
.ip-step h4 { font-family: var(--ed-font-display); font-size: 1.02rem; font-weight: 600; margin-bottom: 0.35rem; color: var(--ed-gray-900); }
.ip-step p { font-size: 0.86rem; color: var(--ed-gray-500); line-height: 1.65; margin: 0; }
@media (max-width: 991px) {
    .ip-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ip-step::after { display: none; }
}
@media (max-width: 575px) { .ip-steps { grid-template-columns: 1fr; } }

/* ============================================================
   CALENDAR + QIBLA
   ============================================================ */
.ip-split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem; }
@media (max-width: 991px) { .ip-split { grid-template-columns: 1fr; } }

.ip-panel {
    background: #fff; border: 1px solid var(--ed-gray-200);
    border-radius: var(--ed-radius-lg); overflow: hidden;
    display: flex; flex-direction: column;
}
/* Stretch to fill the column only when the panel is the sole child of it.
   Applying height:100% to every panel makes stacked panels each claim the
   full column height, so together they overflow the row and run under the
   footer. :only-child keeps the equal-height look for side-by-side panels
   without breaking columns that stack several. */
.ip-panel:only-child { height: 100%; }
.ip-panel-head {
    padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--ed-gray-100);
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.ip-panel-title { font-family: var(--ed-font-display); font-size: 1.08rem; font-weight: 600; color: var(--ed-gray-900); margin: 0; }
.ip-panel-body { padding: 1.5rem; flex: 1; }
.ip-panel-foot { padding: 1rem 1.5rem; border-top: 1px solid var(--ed-gray-100); background: var(--ed-gray-50); }

.ip-hijri-display { text-align: center; padding: 0.5rem 0 1.25rem; }
.ip-hijri-arabic { font-family: var(--ed-font-arabic); font-size: 1.9rem; color: var(--ed-primary); direction: rtl; }
.ip-hijri-en { font-family: var(--ed-font-display); font-size: 1.25rem; font-weight: 600; color: var(--ed-gray-900); }
.ip-hijri-greg { font-size: 0.84rem; color: var(--ed-gray-500); }

.ip-event { display: flex; align-items: center; gap: 0.9rem; padding: 0.75rem 0; border-bottom: 1px dashed var(--ed-gray-200); }
.ip-event:last-child { border-bottom: 0; }
.ip-event-days {
    width: 52px; height: 52px; flex-shrink: 0; border-radius: var(--ed-radius);
    background: var(--ed-primary-50); color: var(--ed-primary);
    display: grid; place-items: center; text-align: center; line-height: 1.1;
}
.ip-event-days strong { font-family: var(--ed-font-display); font-size: 1.05rem; display: block; }
.ip-event-days span { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.06em; }
.ip-event-name { font-weight: 600; font-size: 0.92rem; color: var(--ed-gray-800); }
.ip-event-date { font-size: 0.8rem; color: var(--ed-gray-500); }

.ip-compass {
    position: relative; width: 200px; height: 200px; margin: 0.5rem auto 1.25rem;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 55%, var(--ed-gray-50) 100%);
    border: 2px solid var(--ed-primary);
    box-shadow: var(--ed-shadow);
}
.ip-compass::after {
    content: ''; position: absolute; inset: 14px; border-radius: 50%;
    border: 1px dashed var(--ed-gray-300);
}
.ip-compass-mark { position: absolute; font-size: 0.68rem; font-weight: 700; color: var(--ed-gray-400); }
.ip-compass-n { top: 8px; left: 50%; transform: translateX(-50%); }
.ip-compass-s { bottom: 8px; left: 50%; transform: translateX(-50%); }
.ip-compass-e { right: 10px; top: 50%; transform: translateY(-50%); }
.ip-compass-w { left: 10px; top: 50%; transform: translateY(-50%); }
.ip-needle {
    position: absolute; top: 50%; left: 50%;
    width: 3px; height: 40%;
    background: linear-gradient(180deg, var(--ed-primary), rgba(19,92,67,0.15));
    transform-origin: bottom center;
    transform: translate(-50%, -100%) rotate(0deg);
    transition: transform 0.5s ease;
}
.ip-needle i {
    position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
    color: var(--ed-primary); font-size: 1.15rem; background: #fff; border-radius: 50%; padding: 3px;
}

/* ============================================================
   COLLECTIONS
   ============================================================ */
.ip-collections { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 991px) { .ip-collections { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575px) { .ip-collections { grid-template-columns: 1fr; } }
.ip-collection {
    position: relative; overflow: hidden;
    min-height: 168px;
    border-radius: var(--ed-radius-lg);
    padding: 1.6rem;
    display: flex; flex-direction: column; justify-content: flex-end;
    text-decoration: none;
    color: #fff;
    transition: var(--ed-transition);
}
.ip-collection:hover { transform: translateY(-2px); box-shadow: var(--ed-shadow-lg); text-decoration: none; color: #fff; }
.ip-collection::after {
    content: ''; position: absolute; inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.16) 1px, transparent 0);
    background-size: 20px 20px;
    -webkit-mask-image: linear-gradient(200deg, #000, transparent 65%);
    mask-image: linear-gradient(200deg, #000, transparent 65%);
}
.ip-collection > * { position: relative; z-index: 1; }
.ip-collection-title { font-family: var(--ed-font-display); font-size: 1.15rem; font-weight: 600; margin-bottom: 0.2rem; }
.ip-collection-count { font-size: 0.78rem; opacity: 0.8; }
.ip-c-emerald { background: linear-gradient(150deg, #0d4231, #1a7a58); }
.ip-c-charcoal { background: linear-gradient(150deg, #1d211f, #3d4642); }
.ip-c-gold     { background: linear-gradient(150deg, #8f7043, #c2a172); }
.ip-c-deep     { background: linear-gradient(150deg, #123c30, #2c5f4e); }
.ip-c-stone    { background: linear-gradient(150deg, #5b554d, #8a8175); }
.ip-c-night    { background: linear-gradient(150deg, #16302a, #2a4d43); }

/* ============================================================
   ACCOUNT CTA
   ============================================================ */
.ip-cta {
    position: relative; overflow: hidden;
    background: linear-gradient(150deg, var(--ed-primary-dark), var(--ed-primary));
    border-radius: var(--ed-radius-lg);
    padding: 3.25rem 3rem;
    color: rgba(255,255,255,0.85);
}
.ip-cta::after {
    content: ''; position: absolute; inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.14) 1px, transparent 0);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(ellipse 60% 80% at 85% 50%, #000, transparent 70%);
    mask-image: radial-gradient(ellipse 60% 80% at 85% 50%, #000, transparent 70%);
}
.ip-cta > * { position: relative; z-index: 1; }
.ip-cta h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0.75rem; }
.ip-cta-list { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0.65rem 1.5rem; }
.ip-cta-list li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.9rem; }
.ip-cta-list i { color: var(--ed-accent-light); }
.ip-cta-note { font-size: 0.82rem; opacity: 0.75; margin-top: 1rem; }
@media (max-width: 767px) {
    .ip-cta { padding: 2.25rem 1.5rem; }
    .ip-cta-list { grid-template-columns: 1fr; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.ip-footer { position: relative; background: var(--ed-secondary); color: rgba(255,255,255,0.72); overflow: hidden; }
.ip-footer::before {
    content: ''; position: absolute; inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.09) 1px, transparent 0);
    background-size: 24px 24px;
    -webkit-mask-image: radial-gradient(ellipse 55% 70% at 12% 15%, #000, transparent 70%);
    mask-image: radial-gradient(ellipse 55% 70% at 12% 15%, #000, transparent 70%);
    pointer-events: none;
}
.ip-footer > * { position: relative; z-index: 1; }
.ip-footer-grid {
    display: grid; grid-template-columns: 1.7fr repeat(4, minmax(0, 1fr));
    gap: 2.5rem; padding: 4rem 0 3rem;
}
.ip-footer-brand .ip-brand-name { color: #fff; }
.ip-footer-brand .ip-brand-tag { color: rgba(255,255,255,0.62); }
.ip-footer p, .ip-utility p { color: inherit; }
.ip-footer-mission { color: rgba(255,255,255,0.72); font-size: 0.87rem; line-height: 1.8; margin: 1.25rem 0 1.5rem; max-width: 34ch; }
.ip-footer-col-title {
    font-family: var(--ed-font-family);
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase;
    color: #fff; margin-bottom: 1rem;
}
.ip-footer-links { list-style: none; padding: 0; margin: 0; }
.ip-footer-links li + li { margin-top: 0.55rem; }
.ip-footer-links a { font-size: 0.87rem; color: rgba(255,255,255,0.72); text-decoration: none; transition: var(--ed-transition); }
.ip-footer-links a:hover { color: #fff; text-decoration: none; }
.ip-social { display: flex; gap: 0.5rem; }
.ip-social a {
    width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.7);
    transition: var(--ed-transition);
}
.ip-social a:hover { background: var(--ed-primary); color: #fff; }
.ip-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 1.35rem 0;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    font-size: 0.8rem;
}
.ip-footer-bottom a { color: rgba(255,255,255,0.72); text-decoration: none; margin-left: 1.25rem; }
.ip-footer-bottom a:hover { color: #fff; }
@media (max-width: 991px) {
    .ip-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; padding: 3rem 0 2rem; }
}
@media (max-width: 575px) {
    .ip-footer-grid { grid-template-columns: 1fr; }
    .ip-footer-bottom { justify-content: center; text-align: center; }
    .ip-footer-bottom a { margin: 0 0.6rem; }
}

/* ============================================================
   STATES: skeleton, empty, error
   ============================================================ */
.ip-skeleton {
    background: linear-gradient(90deg, var(--ed-gray-100) 25%, var(--ed-gray-200) 37%, var(--ed-gray-100) 63%);
    background-size: 400% 100%;
    animation: ip-shimmer 1.4s ease infinite;
    border-radius: var(--ed-radius-sm);
}
@keyframes ip-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.ip-skeleton-line { height: 12px; margin-bottom: 0.6rem; }
.ip-skeleton-title { height: 20px; width: 60%; margin-bottom: 0.9rem; }
.ip-skeleton-media { aspect-ratio: 16/9; width: 100%; }

.ip-empty, .ip-error { text-align: center; padding: 3.5rem 1.5rem; }
.ip-empty i, .ip-error i { font-size: 2.25rem; margin-bottom: 1rem; display: block; }
.ip-empty i { color: var(--ed-gray-400); }
.ip-error i { color: var(--ed-warning); }
.ip-empty h4, .ip-error h4 { font-size: 1.1rem; margin-bottom: 0.4rem; color: var(--ed-gray-700); }
.ip-empty p, .ip-error p { font-size: 0.9rem; color: var(--ed-gray-500); margin-bottom: 1.25rem; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Visually hidden but screen-reader available */
.ip-sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============================================================
   Converted-page helpers
   Used by pages migrated from the earlier card/page-header
   markup, so they inherit the current design system.
   ============================================================ */
.ip-page-title {
    font-family: var(--ed-font-display);
    font-size: clamp(1.7rem, 3.6vw, 2.4rem);
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--ed-gray-900);
    margin-bottom: 0.4rem;
}

.ip-panel-head-legacy {
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid var(--ed-gray-100);
    font-family: var(--ed-font-family);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ed-gray-600);
    background: var(--ed-gray-50);
}


/* ============================================================
   SEARCH — Bootstrap 4 input-groups themed to the design system
   Markup: .input-group.ip-search > prepend icon + .form-control
           + optional append clear button
   ============================================================ */
.ip-search .input-group-text {
    background: #fff;
    border: 1px solid var(--ed-gray-200);
    border-right: 0;
    border-radius: var(--ed-radius) 0 0 var(--ed-radius);
    color: var(--ed-gray-400);
    font-size: 0.85rem;
    padding-left: 1rem;
    padding-right: 0.6rem;
}

.ip-search .form-control {
    border: 1px solid var(--ed-gray-200);
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    box-shadow: none;
    font-family: var(--ed-font-family);
    font-size: 0.9rem;
    color: var(--ed-gray-800);
    height: auto;
    padding: 0.62rem 0.5rem;
}
.ip-search .form-control::placeholder { color: var(--ed-gray-400); }
.ip-search .form-control:focus { box-shadow: none; border-color: var(--ed-gray-200); }

/* Move the focus ring to the whole group so it reads as one control */
.ip-search:focus-within .input-group-text,
.ip-search:focus-within .form-control,
.ip-search:focus-within .btn {
    border-color: var(--ed-primary);
}
.ip-search:focus-within {
    border-radius: var(--ed-radius);
    box-shadow: 0 0 0 3px rgba(19, 92, 67, 0.10);
}

.ip-search .ip-search-clear {
    background: #fff;
    border: 1px solid var(--ed-gray-200);
    border-left: 0;
    border-radius: 0 var(--ed-radius) var(--ed-radius) 0;
    color: var(--ed-gray-400);
    font-size: 0.78rem;
    padding: 0 0.9rem;
    transition: var(--ed-transition);
}
.ip-search .ip-search-clear:hover { color: var(--ed-danger); }
.ip-search .ip-search-clear:focus { box-shadow: none; outline: 2px solid var(--ed-primary); outline-offset: -2px; }

/* The clear button only appears once there is something to clear.
   A class on the group drives this, so no :has() support is required. */
.ip-search .input-group-append { display: none; }
.ip-search.has-value .input-group-append { display: flex; }

.ip-search .form-control {
    border-right: 1px solid var(--ed-gray-200);
    border-radius: 0 var(--ed-radius) var(--ed-radius) 0;
}
.ip-search.has-value .form-control { border-right: 0; border-radius: 0; }

/* The overlay's Search button is always shown */
.ip-search-overlay-field .input-group-append { display: flex; }
.ip-search-overlay-field .form-control { border-right: 0; border-radius: 0; }

/* Larger variant used in the search overlay */
.ip-search-overlay-field .form-control { font-size: 1.02rem; padding: 0.85rem 0.6rem; }
.ip-search-overlay-field .input-group-text { font-size: 1rem; }
.ip-search-overlay-field .btn { border-radius: 0 var(--ed-radius) var(--ed-radius) 0; padding-left: 1.4rem; padding-right: 1.4rem; }

/* ============================================================
   DONATE  (the only red in the palette - see --ed-donate)
   ============================================================ */
.ip-btn-donate {
    background: var(--ed-donate); color: #fff; border: 1px solid var(--ed-donate);
}
.ip-btn-donate:hover, .ip-btn-donate:focus {
    background: var(--ed-donate-dark); border-color: var(--ed-donate-dark);
    color: #fff; text-decoration: none;
}
.ip-btn-donate:focus-visible { outline: 2px solid var(--ed-donate-dark); outline-offset: 2px; }

.ip-btn-donate-outline {
    background: transparent; color: var(--ed-donate); border: 1px solid var(--ed-donate);
}
.ip-btn-donate-outline:hover, .ip-btn-donate-outline:focus {
    background: var(--ed-donate); color: #fff; text-decoration: none;
}

/* Header CTA - the heart pulses once on load, then rests. */
.ip-header-donate i { margin-right: 0.35rem; }
@media (prefers-reduced-motion: no-preference) {
    .ip-header-donate i { animation: ip-donate-beat 1.4s ease-in-out 2; }
}
@keyframes ip-donate-beat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.18); }
}

/* The off-canvas drawer sits translated past the right edge, which inflated
   the document width by ~21px on phones and clipped the header. `clip` (not
   `hidden`) stops the stray sideways scroll without turning <html> into a
   scroll container, so the sticky header keeps working. */
html { overflow-x: clip; }

/* Compact donate CTA on phones - the label would otherwise push the burger
   off the row. The accessible name comes from aria-label on the link. */
@media (max-width: 575px) {
    .ip-header-donate { padding: 0.5rem 0.7rem; }
    .ip-header-donate .ip-header-donate-label { display: none; }
    .ip-header-donate i { margin-right: 0; }
}

/* ============================================================
   SERMONS  (shared between the listing and the detail page)
   ============================================================ */
.ip-lang-chip {
    display: inline-block;
    font-size: 0.68rem; font-weight: 600; letter-spacing: 0.04em;
    color: var(--ed-gray-600); background: var(--ed-gray-100);
    padding: 0.16rem 0.5rem; border-radius: 4px; margin-right: 0.25rem;
}
.ip-sermon-credit {
    display: flex; gap: 0.9rem; align-items: flex-start;
    font-size: 0.84rem; line-height: 1.75; color: var(--ed-gray-600);
}
.ip-sermon-credit > i { color: var(--ed-accent); font-size: 1.05rem; margin-top: 0.15rem; }
.ip-sermon-credit a { color: var(--ed-primary); font-weight: 600; }

.ip-footer-owner {
    font-size: 0.8rem; line-height: 1.7;
    color: rgba(255, 255, 255, 0.72);
    margin: -0.75rem 0 1.25rem;
}

.ip-footer-contact { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.ip-footer-contact li {
    display: flex; align-items: flex-start; gap: 0.6rem;
    font-size: 0.84rem; line-height: 1.7; margin-bottom: 0.4rem;
}
.ip-footer-contact li:last-child { margin-bottom: 0; }
.ip-footer-contact i { color: var(--ed-accent); font-size: 0.8rem; margin-top: 0.35rem; width: 14px; flex-shrink: 0; }
.ip-footer-contact a { color: rgba(255, 255, 255, 0.62); text-decoration: none; word-break: break-word; }
.ip-footer-contact a:hover { color: #fff; text-decoration: none; }
.ip-footer-contact-sep { color: rgba(255, 255, 255, 0.5); margin: 0 0.25rem; }

/* Topbar contact - sits between the dates and the quick links, and is the
   first thing to go when the strip runs out of room on small screens. */
.ip-utility-contact { display: flex; align-items: center; gap: 1.1rem; }
@media (max-width: 1199px) { .ip-utility-contact { display: none; } }

/* ============================================================
   QURAN STUDY TOOLS  (word-by-word + tafsir share the picker)
   ============================================================ */
.ip-verse-picker {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 1.25rem; flex-wrap: wrap;
    padding-bottom: 1.5rem; margin-bottom: 1.75rem;
    border-bottom: 1px solid var(--ed-gray-200);
}
.ip-picker-form { display: flex; align-items: flex-end; gap: 0.75rem; flex-wrap: wrap; }
.ip-picker-field { min-width: 0; }
.ip-picker-field-sm { width: 7rem; }
.ip-picker-of { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--ed-gray-400); }
.ip-picker-go { white-space: nowrap; }
.ip-picker-nav { display: flex; gap: 0.4rem; }
.ip-picker-nav .is-disabled { opacity: 0.4; cursor: default; pointer-events: none; }

/* The filter label/control pair is reused by the sermons page too. */
.ip-filter-label {
    display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--ed-gray-500); margin-bottom: 0.4rem;
}
.ip-filter-control {
    border: 1px solid var(--ed-gray-200); border-radius: var(--ed-radius-sm);
    font-size: 0.88rem; padding: 0.5rem 0.8rem; height: auto; min-width: 8rem;
    color: var(--ed-gray-900); background: #fff; box-shadow: none;
}
.ip-filter-control:focus {
    border-color: var(--ed-primary); box-shadow: 0 0 0 3px var(--ed-primary-50); outline: none;
}

/* Donate link in the footer, styled as a badge. Bootstrap's badge-danger
   red with the footer's translucent white measured 2.99:1. */
.ip-footer-links a.badge {
    background: var(--ed-donate) !important;
    color: #fff !important;
    padding: 0.32rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
}
.ip-footer-links a.badge:hover { background: var(--ed-donate-dark) !important; color: #fff !important; }

/* ============================================================
   TEXT ON DARK SURFACES

   frontend-modern.css styles bare elements: `p { color: … }`,
   `a { color: … }` and `h1–h6 { color: … !important }`. An element
   selector outranks a colour merely inherited from an ancestor, so a
   paragraph or heading placed on a dark panel renders dark-on-dark —
   the surface has to restate the colour for the text inside it. The
   heading rule carries !important, so these must too.
   ============================================================ */
.ip-on-dark p, .ip-on-dark li, .ip-on-dark span, .ip-on-dark dd, .ip-on-dark dt,
.ip-auth-aside p, .ip-auth-aside li, .ip-auth-aside span,
.ip-mega-feature-emerald p, .ip-mega-feature-emerald li, .ip-mega-feature-emerald span,
.ip-cta p, .ip-cta li, .ip-cta span,
.ip-footer p, .ip-footer li, .ip-footer span {
    color: inherit;
}
.ip-auth-aside h1, .ip-auth-aside h2, .ip-auth-aside h3,
.ip-auth-aside h4, .ip-auth-aside h5, .ip-auth-aside h6,
.ip-on-dark h1, .ip-on-dark h2, .ip-on-dark h3,
.ip-on-dark h4, .ip-on-dark h5, .ip-on-dark h6,
.ip-mega-feature-emerald h1, .ip-mega-feature-emerald h2, .ip-mega-feature-emerald h3,
.ip-mega-feature-emerald h4, .ip-mega-feature-emerald h5, .ip-mega-feature-emerald h6,
.ip-cta h1, .ip-cta h2, .ip-cta h3, .ip-cta h4, .ip-cta h5, .ip-cta h6,
.ip-footer h1, .ip-footer h2, .ip-footer h3,
.ip-footer h4, .ip-footer h5, .ip-footer h6 {
    color: #fff !important;
}
/* Links on a dark ground need the light accent, not the emerald brand colour. */
.ip-auth-aside a:not(.ip-btn),
.ip-on-dark a:not(.ip-btn),
.ip-mega-feature-emerald a:not(.ip-btn),
.ip-cta a:not(.ip-btn) {
    color: var(--ed-accent-light);
}
.ip-auth-aside a:not(.ip-btn):hover,
.ip-on-dark a:not(.ip-btn):hover,
.ip-mega-feature-emerald a:not(.ip-btn):hover,
.ip-cta a:not(.ip-btn):hover {
    color: #fff;
}
