/*
 *  Styles for services.html (Services & Pricing page).
 *
 *  No classes are introduced here beyond the two already present in the
 *  markup (.icon, .pricing-note). Everything else is targeted by element,
 *  #id, and structural position (:nth-child, ::after) - matching the
 *  approach used elsewhere in the site (see style.css, about.css).
 *
 *  Colours come from the theme custom properties emitted by
 *  /dynamic/css/theme.css (see theme_routes.py): --theme-bg, --theme-fg,
 *  --theme-bg_accent, --theme-fg_accent, --theme-bg_muted,
 *  --theme-fg_muted, --theme-page_bg.
 */

/* ── Top-level flow ───────────────────────────────────────────────
   <main> is a flex row-wrap container (see style.css). `section`
   already forces itself to 100% width there; the intro paragraph and
   the h2 section headers need the same so they stack full-width
   instead of behaving like inline flex items.                       */

main > p:first-of-type,
main > h2 {
    width: 100%;
}

main > p:first-of-type {
    text-align: center;
    font-size: 1.1rem;
    max-width: 50ch;
    margin: 1.5rem auto;
}

/* ── Section headers (Standard plan / Pricing / Other services) ── */

main > h2 {
    text-align: center;
    font-variant: small-caps;
    font-size: 1.6rem;
    color: var(--theme-bg);
    margin: 2.5rem 0 0.25rem;
}


/* ── Card grids (feature list & "other services") ────────────────
   Any <ul> that is a direct child of a <section> becomes a card
   grid; this covers both the plan-includes list and the add-ons
   list without needing a class to tell them apart.                  */

section > ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

section > ul > li {
    background: var(--theme-bg);
    color: var(--theme-fg);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
}

section > ul > li:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    color: var(--theme-fg_accent);
    background: var(--theme-bg_accent);
}

/* Card titles: override the site-wide centred <h3> rule (style.css)
   for card headings specifically. */

section li h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: auto;
    padding: 0;
    text-align: left;
    font-variant: normal;
    font-size: 1.1rem;
    color: var(--theme-fg_accent);
    margin: 0 0 0.75rem;
}

section .icon {
    font-size: 2rem;
    line-height: 1;
}

/* Nested feature lists inside a card */

section li ul {
    list-style: disc;
    margin: 0;
    padding-left: 1.2rem;
    color: var(--theme-fg_muted);
    font-size: 0.92rem;
}

section li ul li {
    margin-bottom: 0.35rem;
}

/* ── Pricing section specifics ───────────────────────────────────── */

#pricing > p {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 2rem;
    color: var(--theme-bg);
    opacity: 0.75;
}

#pricing > ul > li {
    text-align: center;
    position: relative;
}

#pricing > ul > li > p:first-of-type {
    font-size: 2rem;
    font-weight: 700;
    color: var(--theme-fg_accent);
    margin: 0.5rem 0;
}

#pricing abbr {
    text-decoration: none;
    font-size: 1.2rem;
    color: var(--theme-fg_muted);
}

#pricing .pricing-note {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--theme-fg_muted);
}

#pricing > ul > li ul {
    text-align: left;
}

/* Middle card (Standard Plan) is the featured plan */

#pricing > ul > li:nth-child(2)::before {
    content: 'Standard Plan';
    display: block;
    position: absolute;
    top: -0.85rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--theme-fg_accent);
    color: var(--theme-bg);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 0.25rem 0.9rem;
    border-radius: 999px;
    white-space: nowrap;
}

#pricing > ul > li:nth-child(2) > p:first-of-type {
    color: var(--theme-fg);
}

/* ── Contact / CTA band ──────────────────────────────────────────── */

#contact {
    text-align: center;
    font-size: 1.1rem;
    max-width: 50ch;
    margin: 1.5rem auto;
    padding: 1rem 1rem;
}


#contact p {
    max-width: 640px;
    margin: 0 auto 0.5rem;
}

#contact a {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: 6px;
    background: var(--theme-fg_accent);
    color: var(--theme-bg);
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s;
}

#contact a:hover {
    opacity: 0.85;
}


@media (max-width: 600px) {
    #pricing > ul > li:nth-child(2) {
        transform: none;
    }
    #contact {
        padding: 2rem 1.25rem;
    }
}
