/**
 * Elessi Custom — Modern Footer + Static Info Pages
 * Namespaced hm-footer / hm-page. Self-contained tokens; theme-agnostic.
 */

/* =============================================================
 * GLOBAL LAYOUT FIX — empty white space below the footer
 * -------------------------------------------------------------
 * The header's vertical "departments" mega-menu (.vertical-menu-container)
 * is position:absolute and, when CLOSED, only opacity:0/visibility:hidden —
 * it keeps its full ~3400px box, which overflows the document and adds a tall
 * empty strip below the footer on any SHORT page (site-wide, not just ours).
 * Fix: collapse the closed menu to zero height so it stops inflating the page,
 * and restore it on hover (its native trigger) with an internal scroll cap so
 * a very tall menu never exceeds the viewport. The always-open variant
 * (.nasa-allways-show) is left untouched.
 * ============================================================= */
@media only screen and (min-width: 768px) {
    .nasa-vertical-header .vertical-menu-container:not(.nasa-allways-show) {
        max-height: 0;
        overflow: hidden;
    }
    .nasa-vertical-header:hover .vertical-menu-container:not(.nasa-allways-show) {
        max-height: 85vh;
        overflow-y: auto;
    }
}

.hm-footer {
    --hf-bg: #0f1722;
    --hf-bg-2: #16202e;
    --hf-line: rgba(255, 255, 255, 0.10);
    --hf-text: #c4ccd6;
    --hf-muted: #8b97a6;
    --hf-heading: #ffffff;
    --hf-accent: var(--elessi-primary, #1f6feb);
    --hf-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    background: var(--hf-bg);
    color: var(--hf-text);
    font-size: 15px;
    line-height: 1.6;
}
.hm-footer * { box-sizing: border-box; }
.hm-footer .container { max-width: 1280px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 40px); }
.hm-footer a { color: var(--hf-text); text-decoration: none; transition: color 0.2s var(--hf-ease); }
.hm-footer a:hover { color: #fff; }
.hm-footer a:focus-visible { outline: 2px solid var(--hf-accent); outline-offset: 3px; border-radius: 4px; }
.hm-footer .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ---- Trust strip ---- */
.hm-footer__trust { background: var(--hf-bg-2); border-bottom: 1px solid var(--hf-line); padding-block: clamp(28px, 4vw, 44px); }
.hm-footer__trust-grid {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px;
}
.hm-ftrust { display: flex; align-items: center; gap: 14px; }
.hm-ftrust__icon {
    flex: 0 0 auto; display: grid; place-items: center;
    width: 52px; height: 52px; border-radius: 14px;
    background: color-mix(in srgb, var(--hf-accent) 22%, transparent);
    color: #fff; font-size: 1.7rem;
    transition: transform 0.3s var(--hf-ease), background 0.3s var(--hf-ease);
}
.hm-ftrust:hover .hm-ftrust__icon { transform: translateY(-4px); background: var(--hf-accent); }
.hm-ftrust__title { display: block; color: var(--hf-heading); font-weight: 600; font-size: 0.95rem; }
.hm-ftrust__sub { display: block; color: var(--hf-muted); font-size: 0.82rem; }

/* ---- Newsletter ---- */
.hm-footer__news { padding-block: clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--hf-line); }
.hm-footer__news-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.hm-footer__news-title { margin: 0; color: var(--hf-heading); font-size: clamp(1.3rem, 2.2vw, 1.7rem); font-weight: 700; letter-spacing: -0.01em; }
.hm-footer__news-sub { margin: 6px 0 0; color: var(--hf-muted); max-width: 52ch; }
.hm-footer__news-form { flex: 1 1 340px; max-width: 460px; }
.hm-footer__news-fallback,
.hm-footer__news-form form { display: flex; gap: 10px; flex-wrap: wrap; }
.hm-footer__news-form input[type="email"] {
    flex: 1 1 200px; min-width: 0; padding: 13px 18px; border-radius: 999px;
    border: 1px solid var(--hf-line); background: rgba(255,255,255,0.06); color: #fff; font-size: 1rem;
}
.hm-footer__news-form input[type="email"]::placeholder { color: var(--hf-muted); }
.hm-footer__news-form input[type="email"]:focus { outline: none; border-color: var(--hf-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--hf-accent) 25%, transparent); }

/* Shared button */
.hm-footer .hm-btn,
.hm-page .hm-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 0.98rem;
    border: none; cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: transform 0.22s var(--hf-ease, cubic-bezier(0.22,0.61,0.36,1)), box-shadow 0.22s;
}
.hm-footer .hm-btn--primary,
.hm-page .hm-btn--primary { background: var(--elessi-primary, #1f6feb); color: #fff; }
.hm-footer .hm-btn--primary:hover,
.hm-page .hm-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -12px rgba(31,111,235,0.6); color: #fff; }

/* ---- Main columns ---- */
.hm-footer__main { padding-block: clamp(40px, 5vw, 64px); }
.hm-footer__cols {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr 1fr 1.2fr;
    gap: clamp(24px, 3vw, 40px);
}
.hm-footer__heading { color: var(--hf-heading); font-size: 0.95rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; margin: 0 0 16px; }
.hm-footer__links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hm-footer__links a { color: var(--hf-text); font-size: 0.95rem; }
.hm-footer__links a:hover { color: #fff; padding-left: 4px; }
.hm-footer__logo-text { color: #fff; font-size: 1.4rem; font-weight: 700; }
.hm-footer__logo img { max-height: 46px; width: auto; filter: brightness(0) invert(1); }
.hm-footer__desc { color: var(--hf-muted); margin: 14px 0 18px; max-width: 40ch; }
.hm-footer__social { display: flex; gap: 10px; }
.hm-footer__social-link {
    display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,0.08); color: var(--hf-text);
    transition: transform 0.25s var(--hf-ease), background 0.25s var(--hf-ease), color 0.25s var(--hf-ease);
}
.hm-footer__social-link:hover { background: var(--hf-accent); color: #fff; transform: translateY(-3px); }
.hm-footer__contact { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.hm-footer__contact li { display: flex; flex-direction: column; }
.hm-footer__contact-label { color: var(--hf-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.hm-footer__contact a, .hm-footer__contact span:not(.hm-footer__contact-label) { color: #fff; font-weight: 500; }

/* ---- Bottom bar ---- */
.hm-footer__bottom { border-top: 1px solid var(--hf-line); background: var(--hf-bg-2); padding-block: 22px; }
.hm-footer__bottom-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hm-footer__copy { margin: 0; color: var(--hf-muted); font-size: 0.9rem; }
.hm-footer__bottom-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.9rem; }
.hm-footer__bottom-nav span { color: var(--hf-muted); }
.hm-footer__pay { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.hm-footer__pay-chip {
    padding: 5px 10px; border: 1px solid var(--hf-line); border-radius: 6px;
    background: rgba(255,255,255,0.05); color: var(--hf-text);
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}
.hm-footer__disclaimer { margin: 16px 0 0; color: var(--hf-muted); font-size: 0.8rem; line-height: 1.6; }

/* ---- Responsive ---- */
@media (max-width: 1100px) {
    .hm-footer__cols { grid-template-columns: 1.4fr 1fr 1fr; }
    .hm-footer__col--brand { grid-column: 1 / -1; }
    .hm-footer__trust-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
    .hm-footer__cols { grid-template-columns: 1fr 1fr; }
    .hm-footer__trust-grid { grid-template-columns: repeat(2, 1fr); }
    .hm-footer__news-inner { flex-direction: column; align-items: flex-start; }
    .hm-footer__bottom-row { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 440px) {
    .hm-footer__cols { grid-template-columns: 1fr; }
    .hm-footer__trust-grid { grid-template-columns: 1fr; }
}

/* =============================================================
 * STATIC INFO PAGES (.hm-page)
 * ============================================================= */
.hm-page { --hp-ink:#161c26; --hp-body:#4a5566; --hp-muted:#8a93a3; --hp-line:rgba(22,28,38,0.1); --hp-accent: var(--elessi-primary,#1f6feb); --hp-ease: cubic-bezier(0.22,0.61,0.36,1); color: var(--hp-body); }
.hm-page .container { max-width: 900px; margin: 0 auto; padding-inline: clamp(16px,4vw,32px); }
.hm-page__hero {
    padding-block: clamp(44px, 6vw, 84px);
    background:
        radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--hp-accent) 12%, transparent), transparent 55%),
        linear-gradient(180deg, #f5f7fa, #ffffff);
    border-bottom: 1px solid var(--hp-line);
    text-align: center;
}
.hm-page__eyebrow { display: inline-block; padding: 6px 14px; border-radius: 999px; background: #eef1f6; color: var(--hp-ink); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.hm-page__title { margin: 16px 0 0; color: var(--hp-ink); font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.hm-page__lead { margin: 16px auto 0; max-width: 60ch; color: var(--hp-body); font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.65; }
.hm-page__body { padding-block: clamp(36px, 5vw, 64px); }
.hm-page__section { margin-bottom: clamp(28px, 3.5vw, 44px); }
.hm-page__h2 { color: var(--hp-ink); font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-weight: 600; letter-spacing: -0.01em; margin: 0 0 12px; }
.hm-page__section p { margin: 0 0 12px; line-height: 1.75; }
.hm-page__list { margin: 6px 0 0; padding: 0; list-style: none; }
.hm-page__list li { position: relative; padding-left: 28px; margin-bottom: 10px; line-height: 1.7; }
.hm-page__list li::before { content: ""; position: absolute; left: 4px; top: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--hp-accent); }
.hm-page__cta {
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    margin: 40px 0 8px; padding: clamp(24px, 3vw, 36px);
    border-radius: 20px; background: #0f1722; color: #fff;
}
.hm-page__cta-title { margin: 0 0 6px; color: #fff; font-size: 1.35rem; font-weight: 700; }
.hm-page__cta p { margin: 0; color: rgba(255,255,255,0.8); }
.hm-page__related { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--hp-line); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.hm-page__related-label { color: var(--hp-muted); font-weight: 600; font-size: 0.85rem; }
.hm-page__related a { color: var(--hp-accent); font-weight: 600; text-decoration: none; }
.hm-page__related a:hover { text-decoration: underline; }

/* HTML sitemap */
.hm-sitemap { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.hm-sitemap__group h2 { font-size: 1.1rem; color: var(--hp-ink); margin: 0 0 12px; }
.hm-sitemap__group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hm-sitemap__group a { color: var(--hp-accent); text-decoration: none; }
.hm-sitemap__group a:hover { text-decoration: underline; }
@media (max-width: 560px) { .hm-sitemap { grid-template-columns: 1fr; } .hm-page__cta { flex-direction: column; align-items: flex-start; } }

@media (prefers-reduced-motion: reduce) {
    .hm-footer *, .hm-page * { transition-duration: 0.001ms !important; }
}
