/**
 * CFRO Component — Hero Sections (Figma v3)
 * @package CFRO
 * @since   4.2.0
 */

/* ── Home Hero ───────────────────────────────── */
.cfro-hero {
    position: relative;
    color: var(--cfro-white, #fff);
    overflow: hidden;
    /* Override WP block gap that adds margin-block-start */
    margin-block-start: 0 !important;
}

/* Override WP cover defaults for our hero */
.cfro-hero .wp-block-cover__background {
    background: var(--cfro-forest-dark) !important;
}
.cfro-hero .wp-block-cover__image-background {
    opacity: 0.9;
}
/* Custom gradient overlay on top of the cover image */
.cfro-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        var(--cfro-forest-dark)      0%,
        rgba(26, 58, 47, 0.85)       40%,
        rgba(26, 58, 47, 0.50)       100%
    );
    pointer-events: none;
    z-index: 1;
}
.cfro-hero .wp-block-cover__inner-container {
    position: relative;
    z-index: 2 !important;
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Content wrapper */
.cfro-hero__content {
    max-width: 42rem;
}
/* Left-align all content (cover block defaults to center) */
.cfro-hero__content,
.cfro-hero__content > * {
    text-align: left;
}

/* Callsign / eyebrow */
.cfro-hero__callsign {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--cfro-amber);
    margin: 0 0 1rem;
}

/* Heading */
.cfro-hero__heading {
    font-size: clamp(2.25rem, 5vw, 3.75rem);   /* text-4xl → text-6xl */
    font-weight: 900;
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin: 0 0 1.5rem;
    color: var(--cfro-white);
}

/* Description */
.cfro-hero__desc {
    font-size: clamp(1.125rem, 2vw, 1.25rem);   /* text-lg → text-xl */
    color: rgba(255, 255, 255, 0.7);
    max-width: 32rem;                            /* max-w-lg */
    line-height: 1.6;
    margin: 0 0 2rem;
}

/* Actions row */
.cfro-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* ── Shared button base ──────────────────────── */
.cfro-btn .wp-block-button__link,
.cfro-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    font-weight: 500;
    font-size: 1rem;
    line-height: 1;
    min-height: 44px;                           /* WCAG touch target */
    border-radius: var(--cfro-radius, 0.375rem);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--cfro-transition, all 0.2s);
    text-decoration: none;
}
.cfro-btn .wp-block-button__link:focus-visible,
.cfro-btn:focus-visible {
    outline: 3px solid var(--cfro-sage);
    outline-offset: 2px;
}

/* Primary: amber listen button */
.cfro-btn--listen .wp-block-button__link,
.cfro-btn--listen {
    background: var(--cfro-amber) !important;
    color: var(--cfro-white, #fff) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    border-color: transparent !important;
}
.cfro-btn--listen .wp-block-button__link:hover,
.cfro-btn--listen:hover {
    background: color-mix(in srgb, var(--cfro-amber) 90%, black) !important;
}

/* Active / playing state */
.cfro-btn--listen.is-playing .wp-block-button__link,
.cfro-btn--listen.is-playing {
    background: var(--cfro-coral) !important;
    animation: cfro-pulse-badge 2s infinite;
}
.cfro-btn--listen.is-playing .wp-block-button__link:hover,
.cfro-btn--listen.is-playing:hover {
    background: color-mix(in srgb, var(--cfro-coral) 90%, black) !important;
}

/* Ghost: transparent outline button */
.cfro-btn--ghost .wp-block-button__link,
.cfro-btn--ghost {
    background: transparent !important;
    color: var(--cfro-white, #fff) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}
.cfro-btn--ghost .wp-block-button__link:hover,
.cfro-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--cfro-white, #fff) !important;
    text-decoration: none;
}

/* ── Responsive ──────────────────────────────── */
@media (min-width: 768px) {
    .cfro-hero {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}

@media (max-width: 768px) {
    .cfro-hero__content,
    .cfro-hero__content > * {
        text-align: center;
        max-width: none;
    }
    .cfro-hero__desc {
        margin-left: auto;
        margin-right: auto;
    }
    .cfro-hero__actions {
        justify-content: center;
    }
    .cfro-hero::after {
        background: linear-gradient(
            to bottom,
            rgba(26, 58, 47, 0.75) 0%,
            rgba(26, 58, 47, 0.90) 100%
        );
    }
}

/* ── Page Hero (reusable for inner pages) ────── */
.cfro-page-hero {
    position: relative;
    color: #fff;
    overflow: hidden;
    margin-block-start: 0 !important;
}
.cfro-page-hero .wp-block-cover__background {
    background: var(--cfro-forest-dark) !important;
}
.cfro-page-hero .wp-block-cover__image-background {
    opacity: 0.9;
}
.cfro-page-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        var(--cfro-forest-dark)      0%,
        rgba(26, 58, 47, 0.85)       40%,
        rgba(26, 58, 47, 0.50)       100%
    );
    pointer-events: none;
    z-index: 1;
}
.cfro-page-hero .wp-block-cover__inner-container {
    position: relative;
    z-index: 2 !important;
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.cfro-page-hero__title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.75rem;
}
.cfro-page-hero__subtitle {
    font-size: 1.125rem;
    color: rgba(255,255,255,0.6);
    margin: 0;
}

@media (max-width: 768px) {
    .cfro-page-hero .wp-block-cover__inner-container {
        text-align: center;
    }
    .cfro-page-hero::after {
        background: linear-gradient(
            to bottom,
            rgba(26, 58, 47, 0.75) 0%,
            rgba(26, 58, 47, 0.90) 100%
        );
    }
}
