/* What We Offer (16 Oct 2026). Three groups beside an index (sticky on desktop).
   Each group opens with an emerald plate; each item is one card in the same order: icon and name,
   an "At a glance" strip (facts, then the next step), then the approved description.
   Icons come from images/icons/offer-icons.svg (gold line art; --icon-knock matches the tile behind). */

/* ---------- Layout ---------- */

.offer-layout {
    padding: clamp(2rem, 4vw, 3.25rem) 0 clamp(3rem, 6vw, 5rem);
    background: var(--cream-warm);
}

.offer-layout-inner {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: clamp(2rem, 4vw, 3.5rem);
    align-items: start;
}

.offer-main {
    min-width: 0;
}

/* ---------- Index: sticky beside the content on desktop ---------- */

.offer-index {
    position: sticky;
    top: calc(var(--header-height) + 1.75rem);
    padding-top: 0.25rem;
}

.offer-index-title {
    margin: 0 0 1.1rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gold-muted);
}

.offer-index-title::before {
    content: '';
    display: block;
    width: 32px;
    height: 2px;
    margin-bottom: 0.8rem;
    background: var(--gold);
}

.offer-index-groups {
    display: grid;
    gap: 1.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.offer-index-label {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--slate);
    transition: color var(--duration-fast) ease;
}

.offer-index-num {
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: 0;
    color: var(--gold-muted);
}

.offer-index-group ul {
    margin: 0.55rem 0 0;
    padding: 0;
    list-style: none;
    border-left: 1px solid rgba(196, 169, 98, 0.45);
}

.offer-index-group ul a {
    display: block;
    margin-left: -1px;
    padding: 0.3rem 0 0.3rem 1rem;
    border-left: 2px solid transparent;
    font-family: var(--font-display);
    font-size: 1.05rem;
    line-height: 1.3;
    text-decoration: none;
    color: var(--slate);
    transition: color var(--duration-fast) ease, border-color var(--duration-fast) ease;
}

.offer-index-label:hover,
.offer-index-group ul a:hover {
    color: var(--emerald-deep);
}

/* Set by js/offer-index.js: the item being read, and its group. */
.offer-index-group ul a[aria-current="location"] {
    border-left-color: var(--gold);
    background: linear-gradient(90deg, rgba(196, 169, 98, 0.16), transparent);
    color: var(--emerald-deep);
}

.offer-index-group.is-current > .offer-index-label {
    color: var(--emerald-deep);
}

.offer-index a:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

/* ---------- Group plates ---------- */

.offer-group + .offer-group {
    margin-top: clamp(3rem, 6vw, 4.5rem);
}

.offer-group,
.offer,
#quran-circle {
    scroll-margin-top: calc(var(--header-height) + 1.25rem);
}

.offer-group-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: clamp(1.1rem, 2.5vw, 1.75rem);
    margin-bottom: clamp(1.25rem, 2.5vw, 1.75rem);
    padding: clamp(1.4rem, 3vw, 2rem) clamp(1.4rem, 3.5vw, 2.4rem);
    border-top: 3px solid var(--gold);
    background: var(--emerald-deep);
    color: var(--ivory);
}

.offer-group-num {
    padding-right: clamp(1.1rem, 2.5vw, 1.75rem);
    border-right: 1px solid rgba(196, 169, 98, 0.5);
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 5vw, 3.75rem);
    line-height: 1;
    color: var(--gold);
}

.offer-group-head h2 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 400;
    line-height: 1.1;
    color: var(--ivory);
}

.offer-group-head p {
    margin: 0;
    font-size: 1.02rem;
    color: rgba(255, 254, 249, 0.78);
}

/* ---------- Item cards ---------- */

.offer {
    --offer-pad: clamp(1.25rem, 3vw, 2.25rem);
    position: relative;
    padding: var(--offer-pad);
    border-top: 2px solid var(--gold);
    background: var(--ivory);
    box-shadow: var(--shadow-soft);
}

.offer + .offer {
    margin-top: clamp(1.25rem, 2.5vw, 1.75rem);
}

.offer:focus {
    outline: none;
}

.offer:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 4px;
}

.offer-head {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2.5vw, 1.5rem);
}

/* The icon tile: deep emerald with an inset gold keyline. */
.offer-icon {
    --icon-knock: var(--emerald-deep);
    --icon-stroke: 2.2;
    display: grid;
    flex: none;
    place-items: center;
    width: 92px;
    height: 92px;
    background: var(--emerald-deep);
    box-shadow: inset 0 0 0 5px var(--emerald-deep), inset 0 0 0 6px rgba(196, 169, 98, 0.55);
    color: var(--gold);
}

.offer-icon svg {
    width: 60px;
    height: 60px;
}

.offer-kicker {
    margin: 0 0 0.35rem;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold-muted);
}

.offer-head h3 {
    margin: 0;
    font-size: clamp(1.6rem, 2.6vw, 2.1rem);
    font-weight: 400;
    line-height: 1.12;
    color: var(--emerald-deep);
}

/* A one-line summary under the name, where the whole description is one sentence. */
.offer-summary {
    margin: 0.45rem 0 0;
    font-size: 1.05rem;
    color: var(--slate);
}

/* ---------- Janazah: urgent call at the top ---------- */

.offer-urgent {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    margin-top: 1.4rem;
    padding: 1rem 1rem 1rem 1.25rem;
    border-left: 4px solid var(--gold);
    background: var(--emerald-deep);
    color: var(--ivory);
}

.offer-urgent p {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.offer-urgent-call {
    border-color: var(--gold);
    background: var(--gold);
    color: var(--emerald-deep);
}

.offer-urgent-call:hover {
    border-color: var(--gold-bright);
    background: var(--gold-bright);
    color: var(--emerald-deep);
}

.offer-urgent-call svg {
    width: 18px;
    height: 18px;
}

/* ---------- At a glance ---------- */

.offer-glance {
    margin-top: 1.5rem;
    overflow: hidden; /* clips the outer edges of the cell dividers */
    border: 1px solid rgba(196, 169, 98, 0.45);
    background: var(--cream);
}

.offer-glance .offer-glance-title {
    margin: 0;
    padding: 0.65rem 1.25rem;
    border-bottom: 1px solid rgba(196, 169, 98, 0.45);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gold-muted);
}

.offer-glance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    margin: 0;
}

/* Dividers on the left and top of every cell; the frame's overflow hides those on the outer edge,
   so the lines stay correct however the cells wrap. */
.offer-glance-grid > * {
    padding: 1rem 1.25rem 1.2rem;
    box-shadow: -1px 0 0 rgba(196, 169, 98, 0.45), 0 -1px 0 rgba(196, 169, 98, 0.45);
}

.offer-glance dt,
.offer-glance-label {
    margin: 0 0 0.5rem;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    line-height: 1.4;
    text-transform: uppercase;
    color: var(--gold-muted);
}

.offer-glance dd {
    margin: 0;
}

.offer-glance dd,
.offer-glance p {
    max-width: none;
    font-size: 0.98rem;
    line-height: 1.55;
    color: var(--charcoal);
}

.offer-glance-grid section p {
    margin: 0 0 0.5rem;
}

.offer-glance-grid section p:last-child {
    margin-bottom: 0;
}

.offer-glance strong {
    font-weight: 600;
}

.offer-glance .location-note {
    display: block;
    font-size: 0.9rem;
    color: var(--slate);
}

.offer-glance .location-note a {
    color: var(--emerald);
}

/* Times read as the headline of a cell. */
.offer-glance .offer-time {
    display: block;
    font-family: var(--font-display);
    font-size: 1.3rem;
    line-height: 1.25;
    color: var(--emerald-deep);
}

.offer-session {
    display: block;
}

.offer-session + .offer-session {
    margin-top: 0.6rem;
}

.offer-session-name {
    display: block;
    font-size: 0.92rem;
    color: var(--slate);
}

/* On its own line under the address. */
.offer-directions {
    display: block;
    width: fit-content;
    margin-top: 0.45rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--emerald);
    text-decoration: none;
    border-bottom: 1px solid var(--gold);
}

.offer-directions:hover {
    color: var(--emerald-deep);
}

.offer-glance-next dd {
    display: grid;
    gap: 0.6rem;
}

.offer-glance-next .btn {
    width: 100%;
    padding: 0.85rem 1.25rem;
    font-size: 0.78rem;
    text-align: center;
}

/* ---------- Description ---------- */

.offer-detail {
    margin-top: 1.5rem;
    max-width: 70ch;
}

.offer-detail p {
    margin: 0 0 1rem;
    max-width: none;
    line-height: 1.7;
    color: var(--slate);
}

.offer-detail > :last-child {
    margin-bottom: 0;
}

.offer-list {
    display: grid;
    gap: 0.5rem 2rem;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.offer-list li {
    position: relative;
    padding-left: 1.35rem;
    line-height: 1.55;
    color: var(--charcoal);
}

/* Small gold diamond as the bullet. */
.offer-list li::before {
    content: '';
    position: absolute;
    top: 0.62em;
    left: 0.15rem;
    width: 6px;
    height: 6px;
    background: var(--gold);
    transform: rotate(45deg);
}

/* Gyarwee sponsorship */
.offer-callout {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    margin-top: 1.25rem;
    padding: 1rem 1rem 1rem 1.25rem;
    border: 1px solid var(--gold);
    background: rgba(196, 169, 98, 0.1);
}

.offer-detail .offer-callout p {
    flex: 1 1 18rem;
    margin: 0;
    color: var(--charcoal);
}

.offer-callout .btn {
    padding: 0.85rem 1.5rem;
    font-size: 0.78rem;
}

/* ---------- Milad-un-Nabi photograph ---------- */

.offer-photo {
    position: relative;
    margin: calc(var(--offer-pad) * -1) calc(var(--offer-pad) * -1) clamp(1.25rem, 2.5vw, 1.75rem);
}

.offer-photo img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 7;
    object-fit: cover;
    object-position: 50% 18%;
}

.offer-photo figcaption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 2.5rem 1.25rem 0.85rem;
    background: linear-gradient(transparent, rgba(8, 61, 51, 0.82));
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ivory);
}

/* ---------- Closing call to action ---------- */

.offer-help {
    margin-top: clamp(3rem, 6vw, 4.5rem);
}

/* ---------- Wide desktop: lists in two columns ---------- */

@media (min-width: 900px) {
    .offer-list--two {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---------- Tablet: the index moves above the content ---------- */

@media (max-width: 1099px) {
    .offer-layout-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 2rem;
    }

    .offer-index {
        position: static;
        padding: 1.25rem 1.4rem 1.4rem;
        border-top: 2px solid var(--gold);
        background: var(--ivory);
        box-shadow: var(--shadow-soft);
    }

    .offer-index-groups {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.25rem 2rem;
    }
}

/* ---------- Phone ---------- */

@media (max-width: 700px) {
    .offer-index-groups {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

    /* Index links wrap on one line per group instead of a tall list. */
    .offer-index-group ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem 1.1rem;
        margin-top: 0.4rem;
        border-left: 0;
    }

    .offer-index-group ul a {
        margin-left: 0;
        padding: 0.15rem 0;
        border-left: 0;
        border-bottom: 1px solid rgba(196, 169, 98, 0.6);
        font-size: 1.05rem;
    }

    .offer-group-head {
        gap: 1rem;
        padding: 1.25rem;
    }

    .offer-icon {
        width: 68px;
        height: 68px;
        box-shadow: inset 0 0 0 4px var(--emerald-deep), inset 0 0 0 5px rgba(196, 169, 98, 0.55);
    }

    .offer-icon svg {
        width: 46px;
        height: 46px;
    }

    .offer-urgent .btn,
    .offer-callout .btn {
        width: 100%;
    }

    .offer-photo img {
        aspect-ratio: 4 / 3;
    }
}
