/*
 * home.css — [cits_wpel_home] marketing home page (v1.8.36.21).
 *
 * Composed layout: hero band + 4 curated sections (courses / exams /
 * plans / instructors) + closing CTA (anon only). All colour is
 * driven by `--cits-wpel-primary-color` from the Customizer / theme.
 * No hardcoded brand hexes.
 *
 * Sections have consistent vertical rhythm, breathe wider than the
 * theme content column via a max-width: 1200px cap so featured grids
 * don't feel cramped on wide screens.
 */

.cwl-home {
    display: flex;
    flex-direction: column;
    gap: 56px;
    padding-bottom: 48px;
}

/* v1.8.36.22+24 — Beef up the shared HeroBand when it lives inside a
   home layout: taller (min-height), more breathing room, softer
   geometric pattern overlay for depth, larger typography. Scoped to
   `.cwl-home .cwl-hero` so my-account / instructor portal heroes stay
   compact.
   v1.8.36.24 — Reverted the v1.8.36.23 full-bleed (`width: 100vw` +
   negative margin) trick. On Blocksy sites with a transparent header,
   the full-bleed orange gradient extended behind the transparent
   header → nav items rendered orange-on-orange, unreadable. Themes
   own their header layout; shortcode content should respect the
   theme's content container width. Operators who want a true full-
   bleed can drop `[cits_wpel_home]` into an Elementor Section with
   `stretch section` enabled, or wrap it in a `.alignfull` block. */
.cwl-home .cwl-hero {
    min-height: 340px;
    padding: 56px clamp(20px, 5vw, 64px);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 12px;
    /* Same gradient direction as the primary token but with a subtle
       radial glow anchored top-right for depth. */
    background:
        radial-gradient(circle at 85% 15%, color-mix(in srgb, #ffffff 22%, transparent), transparent 55%),
        linear-gradient(135deg, var(--cits-wpel-primary-color, #3a6b35) 0%, color-mix(in srgb, var(--cits-wpel-primary-color, #3a6b35) 55%, #000) 100%);
    box-shadow: 0 12px 30px -14px color-mix(in srgb, var(--cits-wpel-primary-color, #3a6b35) 40%, transparent);
}

/* Soft geometric SVG pattern overlay for depth. Pure CSS so no extra
   asset. Encoded once, scoped inside the hero. */
.cwl-home .cwl-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 12% 88%, color-mix(in srgb, #ffffff 8%, transparent) 0, transparent 25%),
        radial-gradient(circle at 92% 42%, color-mix(in srgb, #ffffff 6%, transparent) 0, transparent 20%);
    pointer-events: none;
    z-index: 0;
}

.cwl-home .cwl-hero > * { position: relative; z-index: 1; }

.cwl-home .cwl-hero__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 12px;
    font-weight: 700;
    opacity: 0.85;
    margin: 0 0 12px;
}

.cwl-home .cwl-hero__title {
    font-size: clamp(28px, 4.6vw, 48px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.01em;
    max-width: 780px;
    margin: 0 0 14px;
}

.cwl-home .cwl-hero__subtitle {
    font-size: clamp(15px, 1.8vw, 18px);
    line-height: 1.55;
    max-width: 620px;
    margin: 0 0 24px;
    opacity: 0.9;
}

.cwl-home .cwl-hero__cta-row .cwl-btn--primary {
    background: #fff;
    color: var(--cits-wpel-primary-color, #3a6b35);
    border-color: #fff;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.35);
}

.cwl-home .cwl-hero__cta-row .cwl-btn--primary:hover,
.cwl-home .cwl-hero__cta-row .cwl-btn--primary:focus {
    background: color-mix(in srgb, #fff 92%, transparent);
    transform: translateY(-1px);
}

.cwl-home__section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    width: 100%;
    box-sizing: border-box;
}

/* v1.8.36.22 — Bare section wrapper for shortcodes that self-title.
   No section-head; the shortcode's own H2 becomes the section header. */
.cwl-home__section--bare .cwl-home__section-body {
    /* Featured Courses / Featured Exams shortcodes wrap their content in
       `.cwl-featured-courses` / `.cwl-featured-exams` which already own
       the H2 + card grid styling. This wrapper is layout-only. */
}

.cwl-home__section-head {
    text-align: center;
    margin-bottom: 24px;
}

.cwl-home__section-title {
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 6px;
    color: inherit;
}

.cwl-home__section-subtitle {
    font-size: 15px;
    line-height: 1.5;
    color: color-mix(in srgb, currentColor 65%, transparent);
    margin: 0;
    max-width: 620px;
    margin-inline: auto;
}

.cwl-home__section-body {
    /* Featured shortcodes bring their own grids. This wrapper is
       just a scoping hook so we can nudge spacing without touching
       the shared catalog CSS. */
}

/* Closing CTA card — anon only. Reads the same primary token as the
   hero band so it visually closes the loop. */
.cwl-home__cta {
    max-width: 1200px;
    margin: 24px auto 0;
    padding: 0 16px;
    width: 100%;
    box-sizing: border-box;
}

.cwl-home__cta-inner {
    background: linear-gradient(
        135deg,
        var(--cits-wpel-primary-color, #3a6b35) 0%,
        color-mix(in srgb, var(--cits-wpel-primary-color, #3a6b35) 70%, #000) 100%
    );
    color: #fff;
    border-radius: 16px;
    padding: 44px 28px;
    text-align: center;
    box-shadow: 0 12px 30px -12px color-mix(in srgb, var(--cits-wpel-primary-color, #3a6b35) 45%, transparent);
}

.cwl-home__cta-title {
    font-size: clamp(24px, 3.4vw, 32px);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 8px;
    color: #fff;
}

.cwl-home__cta-subtitle {
    font-size: 15px;
    line-height: 1.55;
    margin: 0 0 24px;
    color: color-mix(in srgb, #fff 82%, transparent);
}

.cwl-home__cta-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
}

.cwl-home__cta-row .cwl-btn--primary {
    background: #fff;
    color: var(--cits-wpel-primary-color, #3a6b35);
    border-color: #fff;
}

.cwl-home__cta-row .cwl-btn--primary:hover,
.cwl-home__cta-row .cwl-btn--primary:focus {
    background: color-mix(in srgb, #fff 92%, transparent);
}

.cwl-home__cta-row .cwl-btn--ghost {
    background: transparent;
    color: #fff;
    border-color: color-mix(in srgb, #fff 55%, transparent);
}

.cwl-home__cta-row .cwl-btn--ghost:hover,
.cwl-home__cta-row .cwl-btn--ghost:focus {
    border-color: #fff;
    background: color-mix(in srgb, #fff 10%, transparent);
}

/* Container queries — narrow content columns from Blocksy sidebar /
   Astra content-width themes need the same tighter treatment as
   mobile viewports. Additive to viewport media queries per the
   feedback_container_queries_narrow_themes rule. */
@container (max-width: 720px) {
    .cwl-home { gap: 40px; }
    .cwl-home__cta-inner { padding: 32px 20px; }
}

@media (max-width: 720px) {
    .cwl-home { gap: 40px; padding-bottom: 32px; }
    .cwl-home__section-head { margin-bottom: 16px; }
    .cwl-home__cta-inner { padding: 32px 20px; }
    .cwl-home__cta-title { font-size: 22px; }
    .cwl-home__cta-row .cwl-btn { width: 100%; max-width: 320px; }
}
