/* Explain: Global styles for common UI components like cards, buttons, and modals. */
.eyebrow {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-color);
}

.card-vibrant {
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    background: var(--white-color);
    box-shadow: var(--shadow-card);
    transition: transform 300ms ease, box-shadow 300ms ease;
}

.card-vibrant:hover {
    transform: translateY(-0.3rem);
    box-shadow: var(--shadow-soft);
}

/* Learning module cards — interactive premium tint */
.module-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    cursor: pointer;
    transition: transform 300ms ease, box-shadow 300ms ease, border-color 300ms ease, background-color 300ms ease;
}

.module-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 82, 204, 0.12);
    border-color: var(--primary-color);
}

.module-card-btn {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 10%, #ffffff);
    color: var(--primary-color);
    padding: 0.65rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: background-color 300ms ease, color 300ms ease;
}

.module-card:hover .module-card-btn {
    background: var(--primary-color);
    color: var(--white-color);
}

.form-status.success {
    display: block;
    border: 1px solid color-mix(in srgb, #10b981 30%, transparent);
    background: #d1fae5;
    color: #065f46;
}

.form-status.error {
    display: block;
    border: 1px solid color-mix(in srgb, #ef4444 30%, transparent);
    background: #fee2e2;
    color: #991b1b;
}

/* Bulletproof modal close controls */
dialog.modal form[method="dialog"]:not(.modal-backdrop) > button,
dialog.modal .modal-close {
    position: relative;
    z-index: 9999 !important;
    cursor: pointer;
}

dialog.modal .modal-close,
dialog.modal form[method="dialog"]:not(.modal-backdrop) > button {
    -webkit-tap-highlight-color: transparent;
}

/* Interactive high-value case cards */
.case-card {
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: transform 300ms ease, box-shadow 300ms ease, border-color 300ms ease;
}

.case-card:hover,
.case-card:focus-visible {
    transform: translateY(-5px);
    border-color: var(--yellow-color);
    box-shadow: 0 16px 32px color-mix(in srgb, var(--primary-color) 16%, transparent), 0 8px 18px color-mix(in srgb, var(--yellow-color) 22%, transparent);
}

.case-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--primary-color);
    transition: color 300ms ease;
}

.case-card:hover .case-card-badge,
.case-card:focus-visible .case-card-badge {
    color: var(--yellow-color);
}

/* Global floating HLV widget — slide-in drawer */
.hlv-drawer {
    visibility: hidden;
    opacity: 0;
    transition: opacity 300ms ease, visibility 300ms ease;
}

.hlv-drawer.is-open {
    visibility: visible;
    opacity: 1;
}

.hlv-drawer-panel {
    transform: translateX(100%);
    transition: transform 350ms ease;
}

.hlv-drawer.is-open .hlv-drawer-panel {
    transform: translateX(0);
}

@media (max-width: 640px) {
    .hlv-drawer-panel {
        max-width: 100%;
    }
}

/* Hide the floating "Calculate Human Life Value" widget on the Training Hub page only */
.page-training #hlvFlap {
    display: none;
}

/* Hero headline — scales with its column so it always fits strictly within two lines */
.hero-headline-wrap {
    container-type: inline-size;
}

.hero-headline {
    margin: 0;
    font-size: 1.4rem;
    font-size: clamp(0.95rem, 4.6cqw, 2rem);
    line-height: 1.16;
    letter-spacing: -0.01em;
}

/* Training Hub hero — enforced CTA button symmetry */
.hero-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    min-width: 210px;
    padding: 12px 28px;
    font-size: 15px;
    box-sizing: border-box;
    line-height: 1;
    text-align: center;
}

/* Video Hub — subtle gradient hero */
.vh-hero-bg {
    background:
        radial-gradient(circle at 12% 18%, color-mix(in srgb, var(--accent-color) 22%, transparent), transparent 55%),
        linear-gradient(140deg, var(--navy-color) 0%, color-mix(in srgb, var(--navy-color) 88%, var(--accent-color)) 100%);
}

/* Video Hub — strict uniform 16:9 landscape media frame */
.vh-frame {
    position: relative;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
}

.vh-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.vh-play-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0;
    border: 0;
    cursor: pointer;
    background: linear-gradient(180deg, color-mix(in srgb, var(--navy-color) 22%, transparent), color-mix(in srgb, var(--navy-color) 52%, transparent));
    transition: opacity 260ms ease, visibility 260ms ease;
}

.vh-play-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.vh-play-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 9999px;
    background: var(--yellow-color);
    color: var(--navy-color);
    font-size: 1.15rem;
    box-shadow: 0 14px 32px color-mix(in srgb, var(--navy-color) 45%, transparent);
    transition: transform 260ms ease;
}

.vh-card:hover .vh-play-badge {
    transform: scale(1.1);
}

/* Homepage hero — centered CareerNext showcase */
.career-next-hero-wrapper {
    background: var(--white-color);
    padding: 2.5rem 1.25rem 3rem;
    text-align: center;
}

.hero-container {
    max-width: 1100px;
    margin: 0 auto;
}

.hero-topbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
    text-align: left;
}

.hero-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hero-brand-icon {
    display: inline-flex;
    height: 2.75rem;
    width: 2.75rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: var(--primary-color);
    color: var(--white-color);
    font-size: 1.1rem;
}

.hero-brand-name {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1;
    color: var(--navy-color);
}

.hero-brand-tagline {
    margin: 0.375rem 0 0;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 9999px;
    background: var(--light-blue-color);
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
}

.hero-tag-pill {
    display: inline-block;
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    border-radius: 9999px;
    background: var(--light-blue-color);
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--navy-color);
}

.hero-main-title {
    max-width: 100%;
    margin: 0 auto;
    font-family: var(--font-heading);
    font-size: clamp(1.35rem, 3vw, 2.4rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--navy-color);
    white-space: nowrap;
}

.hero-sub-title {
    max-width: 100%;
    margin: 0.75rem auto 2.5rem;
    font-size: clamp(0.85rem, 1.4vw, 1.06rem);
    color: var(--text-muted);
    white-space: nowrap;
}

.hero-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.hero-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #D9E8F5;
    border-radius: 0.75rem;
    background: var(--white-color);
    padding: 1.5rem 1.25rem;
    text-align: center;
    transition: transform 300ms ease, box-shadow 300ms ease;
}

.hero-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
}

.hero-card.life-card,
.hero-card.health-card {
    background: var(--white-color);
    border-color: #D9E8F5;
}

.hero-card.product-card {
    background: var(--white-color);
    border-color: #D9E8F5;
}

.card-icon-wrapper {
    display: flex;
    height: 3.75rem;
    width: 100%;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    margin: 0 0 1rem;
    font-size: 1.75rem;
}

.blue-icon {
    background: var(--light-blue-color);
    color: var(--primary-color);
}

.orange-icon {
    background: #FFEED9;
    color: var(--yellow-color);
}

.hero-card h3 {
    margin: 0 0 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--navy-color);
}

.hero-card p {
    margin: 0 0 1rem;
    flex-grow: 1;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.card-link {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.card-link:hover {
    text-decoration: underline;
}

.hero-cta-section {
    margin-top: 1.875rem;
}

.primary-cta-btn {
    display: inline-block;
    border-radius: 0.5rem;
    background: var(--navy-color);
    color: var(--white-color);
    padding: 0.875rem 2.25rem;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--navy-color) 20%, transparent);
    transition: background-color 300ms ease, transform 300ms ease;
}

.primary-cta-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.cta-footer-info {
    margin-top: 0.875rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
}

.down-arrow {
    display: inline-flex;
    margin-top: 0.5rem;
    font-size: 1rem;
    color: var(--yellow-color);
    transition: transform 300ms ease;
}

.down-arrow:hover {
    transform: translateY(4px);
}

@media (min-width: 640px) {
    .hero-topbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

@media (max-width: 900px) {
    .hero-main-title,
    .hero-sub-title {
        white-space: normal;
    }

    .hero-cards-grid {
        grid-template-columns: 1fr;
    }
}