/* Shared Islamic Reads header: keep its flow and opaque panels while scrolling. */
.irhp-site-header,
.irhp-site-header__glass,
.irhp-site-header__mobile,
.irhp-site-header__menu .sub-menu {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}
.irhp-site-header.irhp-sticky-active:not(.irhp-site-header--overlay) {
    position: sticky !important;
    top: var(--irhp-header-top, 0px) !important;
    inset-inline: auto !important;
    width: 100% !important;
    margin-block: 0 !important;
    transform: none !important;
}
.admin-bar .irhp-site-header.irhp-sticky-active:not(.irhp-site-header--overlay) { top: 32px !important; }
.irhp-site-header .irhp-site-header__glass,
.irhp-site-header.is-scrolled .irhp-site-header__glass {
    background: var(--irhp-header-light-panel, #f4f0e4) !important;
    margin-block-start: var(--irhp-header-panel-gap, 12px) !important;
    transition: background-color .18s ease, box-shadow .18s ease !important;
}
.irhp-site-header__mobile,
.irhp-site-header__menu .sub-menu { background: var(--irhp-header-light-panel, #f4f0e4) !important; }
html[data-irhp-theme="dark"] .irhp-site-header .irhp-site-header__glass,
html[data-irhp-theme="dark"] .irhp-site-header__mobile,
html[data-irhp-theme="dark"] .irhp-site-header__menu .sub-menu { background: var(--irhp-header-dark-panel, #050505) !important; }
.irhp-site-header::before,
.irhp-site-header::after { background: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
/* The date-strip plugin also changes these margins on scroll. Keep both states
   identical so the sticky header retains the same space in document flow. */
html body .irhp-site-header.irhp-sticky-active.irph-has-top-strip:not(.irhp-site-header--overlay) > .irph-header-strip-slot {
    margin-block-start: 7px !important;
    margin-top: 7px !important;
}
html body .irhp-site-header.irhp-sticky-active.irph-has-top-strip:not(.irhp-site-header--overlay) > .irhp-site-header__glass {
    margin-block-start: 12px !important;
    margin-top: 12px !important;
}

/* The Quran children use the existing primary menu and its mobile toggle. */
.irhp-site-header__menu li:has(> .sub-menu > .irqc-navigation-section) > a { display: inline-flex; align-items: center; gap: 8px; }
.irhp-site-header__menu .sub-menu:has(> .irqc-navigation-section) {
    box-sizing: border-box; min-width: 260px; max-width: min(330px, calc(100vw - 32px));
    padding: 8px !important; border-radius: 18px !important; direction: ltr; text-align: left;
}
.irhp-site-header__menu .irqc-navigation-section > a {
    display: flex !important; align-items: center; gap: 12px;
    min-height: 48px; padding: 10px 12px !important; border-radius: 12px;
    white-space: normal !important; line-height: 1.45; overflow-wrap: anywhere;
}
.irhp-site-header__menu .irqc-navigation-section > a::before {
    content: ''; flex: 0 0 20px; width: 20px; height: 20px; background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 4h8v7H3zm10 0h8v7h-8zM3 13h8v7H3zm10 0h8v7h-8z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.irhp-site-header__menu .irqc-navigation-section:nth-child(2) > a::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 4c4-1 7 0 10 2 3-2 6-3 10-2v16c-4-1-7 0-10 2-3-2-6-3-10-2z'/%3E%3C/svg%3E");
}
.irhp-site-header__menu .irqc-navigation-section:nth-child(3) > a::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2A10 10 0 0 0 2 12v8h6v-9H4a8 8 0 0 1 16 0h-4v9h6v-8A10 10 0 0 0 12 2z'/%3E%3C/svg%3E");
}
@media (max-width: 850px) {
    .irhp-site-header .irhp-site-header__glass,
    .irhp-site-header.is-scrolled .irhp-site-header__glass { margin-block-start: var(--irhp-header-mobile-panel-gap, 8px) !important; }
    .admin-bar .irhp-site-header.irhp-sticky-active:not(.irhp-site-header--overlay) { top: 46px !important; }
    .irhp-site-header__mobile .sub-menu:has(> .irqc-navigation-section) { min-width: 0; max-width: 100%; width: 100%; }
}

/* Shared icons, green hover and collapsed nested mobile navigation. */
.irhp-site-header__menu a{display:flex!important;align-items:center;gap:9px}
.irqc-menu-icon{flex:0 0 18px;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.irhp-site-header__menu .irqc-navigation-section>a::before{display:none!important}
.irqc-menu-arrow{display:grid;place-items:center;margin-inline-start:auto;width:28px;height:28px;border-radius:50%;color:#236d4f;background:#e0eee5;transition:transform .2s}
.irhp-site-header__menu li.irqc-menu-open>a>.irqc-menu-arrow{transform:rotate(180deg)}
.irhp-site-header__menu .sub-menu a:hover,.irhp-site-header__menu .sub-menu a:focus-visible{color:#145e3f!important;background:#dfefe4!important}
.irhp-site-header__menu li{position:relative}
.irhp-site-header__menu:not(.irhp-site-header__menu--mobile) .sub-menu .sub-menu{top:0!important;inset-inline-start:100%!important;inset-inline-end:auto!important;margin-inline:5px!important}
.irhp-site-header__menu:not(.irhp-site-header__menu--mobile) .sub-menu .irqc-menu-flip>.sub-menu{inset-inline-start:auto!important;inset-inline-end:100%!important}
.irhp-site-header__menu--mobile li>.sub-menu{display:none!important;min-width:0!important;width:auto!important;margin:4px 8px 8px 16px!important;padding:4px!important;border-inline-start:2px solid #c2dfcc!important}
.irhp-site-header__menu--mobile li.irqc-menu-open>.sub-menu{display:grid!important}
.irhp-site-header__menu--mobile li>a{width:100%;padding:12px!important;white-space:normal}
html[data-irhp-theme=dark] .irhp-site-header__menu .sub-menu a:hover{background:#173d29!important;color:#c5f1d5!important}
html[data-irhp-theme=dark] .irqc-menu-arrow{color:#b5e6ca;background:#193c2b}
/* Preserve any cover aspect ratio inside the unchanged, aligned book-media box. */
html body .irhp-book-card .irhp-book-card__media img,
html body .irhp-book-card:hover .irhp-book-card__media img{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:center!important;transform:none!important}
