/**
 * TCE Promo — Theme Override (FORCE EDGE-TO-EDGE)
 *
 * CRITIC: paginile cu shortcode TCE TREBUIE să fie 100% edge-to-edge.
 * NICIUN padding/margin de la temă, Elementor, sau WP block layout.
 *
 * Verificat live: .elementor-shortcode adaugă 10px stânga + 10px dreapta.
 * #page wrapper adaugă padding-uri. Le neutralizăm pe TOATE.
 *
 * @package CannyAgency\TCEPromo
 * @version 2.4.2
 */

/* ============================================================
   0. FORCE EDGE-TO-EDGE — toate wrapper-ele temă/Elementor
   ============================================================ */

body.tce-fullwidth,
body:has(.tce-landing),
body:has(.tce-form-page),
body:has(.tce-status-page),
body:has(.tce-results-page),
body:has(.tce-audit-page),
body:has(.tce-notar-page),
body:has(.tce-regulament-page),
body:has(.tce-privacy-page),
body:has(.tce-winner-accept-page) {
    overflow-x: hidden !important;
}

body.tce-fullwidth #page,
body.tce-fullwidth .site,
body.tce-fullwidth .site-content,
body.tce-fullwidth #content,
body.tce-fullwidth #primary,
body.tce-fullwidth article,
body.tce-fullwidth .post,
body.tce-fullwidth .page,
body.tce-fullwidth main,
body.tce-fullwidth .wp-site-blocks,
body.tce-fullwidth .entry-content,
body.tce-fullwidth .wp-block-post-content,
body.tce-fullwidth .wp-block-group,
body.tce-fullwidth .has-global-padding,
body.tce-fullwidth .is-layout-constrained,
body.tce-fullwidth .elementor,
body.tce-fullwidth .elementor-section,
body.tce-fullwidth .elementor-container,
body.tce-fullwidth .elementor-shortcode,
body.tce-fullwidth .elementor-widget,
body.tce-fullwidth .elementor-widget-container,
body.tce-fullwidth .elementor-widget-shortcode,
body.tce-fullwidth .elementor-element,
body.tce-fullwidth .e-con,
body.tce-fullwidth .e-con-full,
body.tce-fullwidth .e-flex,
body.tce-fullwidth .e-parent,
body.tce-fullwidth [class*="elementor-element-"],
body:has(.tce-landing) .elementor-element,
body:has(.tce-form-page) .elementor-element,
body:has(.tce-status-page) .elementor-element,
body:has(.tce-results-page) .elementor-element,
body:has(.tce-audit-page) .elementor-element,
body:has(.tce-notar-page) .elementor-element,
body:has(.tce-regulament-page) .elementor-element,
body:has(.tce-privacy-page) .elementor-element,
body:has(.tce-winner-accept-page) .elementor-element,
body:has(.tce-landing) .e-con,
body:has(.tce-form-page) .e-con,
body:has(.tce-status-page) .e-con,
body:has(.tce-results-page) .e-con,
body:has(.tce-audit-page) .e-con,
body:has(.tce-notar-page) .e-con,
body:has(.tce-regulament-page) .e-con,
body:has(.tce-privacy-page) .e-con,
body:has(.tce-winner-accept-page) .e-con {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Override variabilele globale Elementor pe paginile TCE */
body.tce-fullwidth {
    --e-con-grid-template-columns: none !important;
    --e-con-padding-block-start: 0 !important;
    --e-con-padding-block-end: 0 !important;
    --e-con-padding-inline-start: 0 !important;
    --e-con-padding-inline-end: 0 !important;
    --wp--style--root--padding-left: 0 !important;
    --wp--style--root--padding-right: 0 !important;
}

/* RESTAURARE — pluginul TCE folosește multe wrapper-classes cu centring
   intentional (margin-inline: auto + max-width). Restaurăm explicit pe
   TOATE clasele .tce-*__content / .tce-*__inner / .tce-container care
   trebuie centred pe ecrane mari. */
body.tce-fullwidth .tce-container,
body.tce-fullwidth .tce-container--narrow,
body.tce-fullwidth .tce-header__inner,
body.tce-fullwidth .tce-footer__inner,
body.tce-fullwidth .tce-hero__content,
body.tce-fullwidth .tce-form-page__header,
body.tce-fullwidth .tce-form-hero,
body.tce-fullwidth .tce-form-hero__inner,
body.tce-fullwidth .tce-status-page__hero,
body.tce-fullwidth .tce-status-page__hero-inner,
body.tce-fullwidth .tce-results-hero,
body.tce-fullwidth .tce-results-hero__inner,
body.tce-fullwidth .tce-audit-hero,
body.tce-fullwidth .tce-audit-hero__inner,
body.tce-fullwidth .tce-notar-hero,
body.tce-fullwidth .tce-cta-final__inner,
body.tce-fullwidth .tce-section__header,
body.tce-fullwidth .tce-section__title,
body.tce-fullwidth .tce-prizes__layout {
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: var(--tce-container-px, 1.5rem) !important;
    padding-right: var(--tce-container-px, 1.5rem) !important;
}

/* Header & Footer inner — width: 100% e necesar ca flex container
   să se întindă până la max-width și margin auto să distribuie
   spațiul rămas (altfel rămâne lipit stânga). */
body.tce-fullwidth .tce-header__inner,
body.tce-fullwidth .tce-footer__inner {
    width: 100% !important;
    max-width: var(--tce-container-max, 1200px) !important;
}

/* Section lead — paragraful sub titlu trebuie centrat orizontal
   (max-width 56ch + margin auto). Override-urile globale de la
   wp-block-post-content il forteaza la margin: 0. */
body.tce-fullwidth .tce-section__lead,
body:has(.tce-landing) .tce-section__lead,
body:has(.tce-form-page) .tce-section__lead {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Reset OL bullet-uri default — pluginul folosește .tce-steps__list cu
   numere custom în .tce-steps__number. Tema TT5/Elementor adaugă
   padding-inline-start: 40px și ::marker care suprapun cardurile. */
body.tce-fullwidth .tce-steps__list,
body.tce-fullwidth ol.tce-steps__list,
body:has(.tce-landing) .tce-steps__list {
    list-style: none !important;
    padding-inline-start: 0 !important;
    padding-left: 0 !important;
    margin-block: 0 !important;
}

body.tce-fullwidth .tce-steps__list > li,
body:has(.tce-landing) .tce-steps__list > li {
    list-style: none !important;
    padding-inline-start: 0 !important;
}

body.tce-fullwidth .tce-steps__list > li::marker,
body:has(.tce-landing) .tce-steps__list > li::marker {
    content: "" !important;
    color: transparent !important;
    font-size: 0 !important;
}

body.tce-fullwidth .tce-container--narrow {
    max-width: var(--tce-container-narrow, 720px) !important;
}

body.tce-fullwidth .tce-container:not(.tce-container--narrow) {
    max-width: var(--tce-container-max, 1200px) !important;
}

/* Pe ecrane wide+ container intern se mărește pentru a folosi spațiul */
@media (min-width: 1440px) {
    body.tce-fullwidth .tce-container:not(.tce-container--narrow),
    body.tce-fullwidth .tce-hero__content,
    body.tce-fullwidth .tce-form-page__header,
    body.tce-fullwidth .tce-results-hero,
    body.tce-fullwidth .tce-audit-hero,
    body.tce-fullwidth .tce-notar-hero,
    body.tce-fullwidth .tce-cta-final__inner {
        max-width: 1320px !important;
    }
}

@media (min-width: 1920px) {
    body.tce-fullwidth .tce-container:not(.tce-container--narrow),
    body.tce-fullwidth .tce-hero__content,
    body.tce-fullwidth .tce-form-page__header,
    body.tce-fullwidth .tce-results-hero,
    body.tce-fullwidth .tce-audit-hero,
    body.tce-fullwidth .tce-notar-hero,
    body.tce-fullwidth .tce-cta-final__inner {
        max-width: 1480px !important;
    }
}

/* Pe 4K+ (>=2560px) container 1600px max */
@media (min-width: 2560px) {
    body.tce-fullwidth .tce-container:not(.tce-container--narrow),
    body.tce-fullwidth .tce-hero__content,
    body.tce-fullwidth .tce-form-page__header,
    body.tce-fullwidth .tce-results-hero,
    body.tce-fullwidth .tce-audit-hero,
    body.tce-fullwidth .tce-notar-hero {
        max-width: 1800px !important;
    }
}

/* Cards interior tce-* — padding generos + min-spacing pe orizontală */
body.tce-fullwidth .tce-audit-section,
body.tce-fullwidth .tce-prizes__layout,
body.tce-fullwidth .tce-form,
body.tce-fullwidth .tce-form-success,
body.tce-fullwidth .tce-results-page > section > .tce-container > * + *,
body.tce-fullwidth .tce-audit-page dl,
body.tce-fullwidth .tce-audit-page table,
body.tce-fullwidth .tce-notar-page dl,
body.tce-fullwidth .tce-notar-page table {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Hero-uri TCE — text wrapper-classes centred cu padding generos */
body.tce-fullwidth .tce-hero__content,
body.tce-fullwidth .tce-form-page__header,
body.tce-fullwidth .tce-form-hero__inner,
body.tce-fullwidth .tce-results-hero,
body.tce-fullwidth .tce-audit-hero,
body.tce-fullwidth .tce-notar-hero,
body.tce-fullwidth .tce-cta-final__inner {
    max-width: var(--tce-container-max, 1200px) !important;
    width: 100% !important;
}

/* Pe ecrane EXTRA mari (>1440px), padding lateral mai mare ca textul să
   nu lipească de margini când container e edge-to-edge */
@media (min-width: 1440px) {
    body.tce-fullwidth .tce-hero__content,
    body.tce-fullwidth .tce-form-page__header,
    body.tce-fullwidth .tce-results-hero,
    body.tce-fullwidth .tce-audit-hero,
    body.tce-fullwidth .tce-notar-hero,
    body.tce-fullwidth .tce-section,
    body.tce-fullwidth .tce-cta-final {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
}

@media (min-width: 1920px) {
    body.tce-fullwidth .tce-hero__content,
    body.tce-fullwidth .tce-form-page__header,
    body.tce-fullwidth .tce-results-hero,
    body.tce-fullwidth .tce-audit-hero,
    body.tce-fullwidth .tce-notar-hero {
        padding-left: 3rem !important;
        padding-right: 3rem !important;
    }
}

/* ============================================================
   1. RESET CONTAINER WP — full-width pe paginile noastre
   ============================================================ */

body.tce-promo-page,
body.page-template-tce-promo,
body:has(.tce-landing),
body:has(.tce-form-page),
body:has(.tce-status-page),
body:has(.tce-results-page),
body:has(.tce-audit-page),
body:has(.tce-notar-page),
body:has(.tce-regulament-page),
body:has(.tce-privacy-page),
body:has(.tce-winner-accept-page) {
    /* Reset constraints tema Twenty Twenty-Five */
    --wp--style--global--content-size: 100% !important;
    --wp--style--global--wide-size: 100% !important;
}

body:has(.tce-landing) .wp-block-post-content,
body:has(.tce-form-page) .wp-block-post-content,
body:has(.tce-status-page) .wp-block-post-content,
body:has(.tce-results-page) .wp-block-post-content,
body:has(.tce-audit-page) .wp-block-post-content,
body:has(.tce-notar-page) .wp-block-post-content,
body:has(.tce-regulament-page) .wp-block-post-content,
body:has(.tce-privacy-page) .wp-block-post-content,
body:has(.tce-winner-accept-page) .wp-block-post-content,
body:has(.tce-landing) .entry-content,
body:has(.tce-form-page) .entry-content,
body:has(.tce-status-page) .entry-content,
body:has(.tce-results-page) .entry-content,
body:has(.tce-audit-page) .entry-content,
body:has(.tce-notar-page) .entry-content,
body:has(.tce-regulament-page) .entry-content,
body:has(.tce-privacy-page) .entry-content,
body:has(.tce-winner-accept-page) .entry-content,
body:has(.tce-landing) main,
body:has(.tce-form-page) main,
body:has(.tce-status-page) main,
body:has(.tce-results-page) main,
body:has(.tce-audit-page) main,
body:has(.tce-notar-page) main,
body:has(.tce-regulament-page) main,
body:has(.tce-privacy-page) main,
body:has(.tce-winner-accept-page) main {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Hide tema's page title — afișăm propriul nostru hero */
body:has(.tce-landing) .wp-block-post-title,
body:has(.tce-form-page) .wp-block-post-title,
body:has(.tce-status-page) .wp-block-post-title,
body:has(.tce-results-page) .wp-block-post-title,
body:has(.tce-audit-page) .wp-block-post-title,
body:has(.tce-notar-page) .wp-block-post-title,
body:has(.tce-regulament-page) .wp-block-post-title,
body:has(.tce-privacy-page) .wp-block-post-title,
body:has(.tce-winner-accept-page) .wp-block-post-title,
body:has(.tce-landing) header.entry-header,
body:has(.tce-form-page) header.entry-header,
body:has(.tce-status-page) header.entry-header,
body:has(.tce-results-page) header.entry-header,
body:has(.tce-audit-page) header.entry-header,
body:has(.tce-notar-page) header.entry-header,
body:has(.tce-regulament-page) header.entry-header,
body:has(.tce-privacy-page) header.entry-header,
body:has(.tce-winner-accept-page) header.entry-header {
    display: none !important;
}

/* Wrapper-ul TCE primește spațiu corect */
.tce-landing,
.tce-form-page,
.tce-status-page,
.tce-results-page,
.tce-audit-page,
.tce-notar-page,
.tce-regulament-page,
.tce-privacy-page,
.tce-winner-accept-page {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Hide header tematic — pluginul TCE are propriul header în landing.php */
body:has(.tce-landing) header.tce-site-header,
body:has(.tce-landing) .tce-header-separator,
body:has(.tce-form-page) header.tce-site-header,
body:has(.tce-form-page) .tce-header-separator,
body:has(.tce-status-page) header.tce-site-header,
body:has(.tce-status-page) .tce-header-separator,
body:has(.tce-results-page) header.tce-site-header,
body:has(.tce-results-page) .tce-header-separator,
body:has(.tce-audit-page) header.tce-site-header,
body:has(.tce-audit-page) .tce-header-separator,
body:has(.tce-notar-page) header.tce-site-header,
body:has(.tce-notar-page) .tce-header-separator,
body:has(.tce-regulament-page) header.tce-site-header,
body:has(.tce-regulament-page) .tce-header-separator,
body:has(.tce-privacy-page) header.tce-site-header,
body:has(.tce-privacy-page) .tce-header-separator,
body:has(.tce-winner-accept-page) header.tce-site-header,
body:has(.tce-winner-accept-page) .tce-header-separator {
    display: none !important;
}

/* Fallback fără :has() — body class */
body.tce-fullwidth header.tce-site-header,
body.tce-fullwidth .tce-header-separator,
body.tce-fullwidth .wp-block-template-part header.tce-site-header {
    display: none !important;
}

/* Hide skip-link tematic (avem propriul în template-uri) */
body.tce-fullwidth a.skip-link,
body:has(.tce-landing) a.skip-link[href="#wp--skip-link--target"],
body:has(.tce-form-page) a.skip-link[href="#wp--skip-link--target"],
body:has(.tce-regulament-page) a.skip-link[href="#wp--skip-link--target"],
body:has(.tce-privacy-page) a.skip-link[href="#wp--skip-link--target"] {
    display: none !important;
}

/* Hide TOATE template-parts header default WP pe paginile TCE */
body.tce-fullwidth .wp-block-template-part:first-of-type:has(.wp-block-site-title),
body.tce-fullwidth header:not(.tce-header):not(.tce-results-hero):not(.tce-audit-hero):not(.tce-notar-hero) {
    display: none !important;
}

body.tce-fullwidth .wp-block-site-title,
body:has(.tce-landing) .wp-block-site-title,
body:has(.tce-form-page) .wp-block-site-title,
body:has(.tce-status-page) .wp-block-site-title,
body:has(.tce-results-page) .wp-block-site-title,
body:has(.tce-audit-page) .wp-block-site-title,
body:has(.tce-notar-page) .wp-block-site-title,
body:has(.tce-regulament-page) .wp-block-site-title,
body:has(.tce-privacy-page) .wp-block-site-title,
body:has(.tce-winner-accept-page) .wp-block-site-title {
    display: none !important;
}

/* Hide separator gold de la tema când avem propriul header */
body.tce-fullwidth hr.tce-header-separator,
body.tce-fullwidth .tce-header-separator {
    display: none !important;
}

/* Hide skip-link gold "Sari la conținutul principal" — overlay top-left vizibil.
 *
 * AUDIT 2026-05-18: regula originală ascundea atât `a.skip-link` (default WP) cât și
 * `.tce-skip-link` (al plugin-ului), INCLUSIV pe `:focus` — făcând skip-link-ul
 * plugin-ului inaccesibil pentru utilizatorii de tastatură (WCAG 2.4.1 fail).
 *
 * FIX: Ascundem doar `a.skip-link` (skip-link-ul implicit al WP/temei) și forțăm
 * `.tce-skip-link` (al plugin-ului) ascuns DOAR când NU e focus — așa rămâne
 * accesibil cu Tab. Stilurile :focus din pages.css §2 controlează poziția on-screen.
 */
body.tce-fullwidth a.skip-link,
body:has(.tce-landing) a.skip-link,
body:has(.tce-form-page) a.skip-link,
body:has(.tce-status-page) a.skip-link,
body:has(.tce-results-page) a.skip-link,
body:has(.tce-audit-page) a.skip-link,
body:has(.tce-regulament-page) a.skip-link,
body:has(.tce-privacy-page) a.skip-link,
body:has(.tce-winner-accept-page) a.skip-link {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
}
body.tce-fullwidth .tce-skip-link:not(:focus) {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
}

/* Hide header classic Elementor / Twenty-anything (id="header" + id="headerimg") */
body.tce-fullwidth #header,
body.tce-fullwidth #headerimg,
body.tce-fullwidth #content > #header,
body.tce-fullwidth div[role="banner"]:not(.tce-header):not(.tce-results-hero):not(.tce-audit-hero):not(.tce-notar-hero),
body:has(.tce-landing) #header,
body:has(.tce-form-page) #header,
body:has(.tce-status-page) #header,
body:has(.tce-results-page) #header,
body:has(.tce-audit-page) #header,
body:has(.tce-notar-page) #header,
body:has(.tce-regulament-page) #header,
body:has(.tce-privacy-page) #header,
body:has(.tce-winner-accept-page) #header,
body:has(.tce-landing) #headerimg,
body:has(.tce-form-page) #headerimg,
body:has(.tce-status-page) #headerimg,
body:has(.tce-results-page) #headerimg,
body:has(.tce-audit-page) #headerimg,
body:has(.tce-notar-page) #headerimg,
body:has(.tce-regulament-page) #headerimg,
body:has(.tce-privacy-page) #headerimg,
body:has(.tce-winner-accept-page) #headerimg {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* ============================================================
   HIDE FOOTER TEMATIC — pluginul TCE are propriul footer
   ============================================================ */

/* Hide footer block-uri din tema (template-part footer.html) */
body.tce-fullwidth > footer,
body.tce-fullwidth footer.wp-block-template-part,
body.tce-fullwidth .wp-block-template-part[data-type="footer"],
body.tce-fullwidth footer:not(.tce-footer):not(.tce-landing-footer):not(.tce-cas__footer):not(.tce-form__submit-wrap):not(.tce-results-footer),
body:has(.tce-landing) > footer,
body:has(.tce-form-page) > footer,
body:has(.tce-status-page) > footer,
body:has(.tce-results-page) > footer,
body:has(.tce-audit-page) > footer,
body:has(.tce-notar-page) > footer,
body:has(.tce-regulament-page) > footer,
body:has(.tce-privacy-page) > footer,
body:has(.tce-winner-accept-page) > footer,
body:has(.tce-landing) footer.wp-block-template-part,
body:has(.tce-form-page) footer.wp-block-template-part,
body:has(.tce-status-page) footer.wp-block-template-part,
body:has(.tce-results-page) footer.wp-block-template-part,
body:has(.tce-audit-page) footer.wp-block-template-part,
body:has(.tce-notar-page) footer.wp-block-template-part,
body:has(.tce-regulament-page) footer.wp-block-template-part,
body:has(.tce-privacy-page) footer.wp-block-template-part,
body:has(.tce-winner-accept-page) footer.wp-block-template-part {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Hide also Elementor classic site-footer (id="footer", id="content_box") */
body.tce-fullwidth #footer,
body.tce-fullwidth #site-footer,
body.tce-fullwidth #colophon,
body:has(.tce-landing) #footer,
body:has(.tce-form-page) #footer,
body:has(.tce-status-page) #footer,
body:has(.tce-results-page) #footer,
body:has(.tce-audit-page) #footer,
body:has(.tce-notar-page) #footer,
body:has(.tce-regulament-page) #footer,
body:has(.tce-privacy-page) #footer,
body:has(.tce-winner-accept-page) #footer,
body:has(.tce-landing) #colophon,
body:has(.tce-form-page) #colophon,
body:has(.tce-status-page) #colophon,
body:has(.tce-results-page) #colophon,
body:has(.tce-audit-page) #colophon,
body:has(.tce-notar-page) #colophon,
body:has(.tce-regulament-page) #colophon,
body:has(.tce-privacy-page) #colophon,
body:has(.tce-winner-accept-page) #colophon {
    display: none !important;
}

/* ============================================================
   2. HEADER WP — branding TCE consistent
   ============================================================ */

body:has(.tce-landing) > header.wp-block-template-part,
body:has(.tce-form-page) > header.wp-block-template-part,
body:has(.tce-status-page) > header.wp-block-template-part,
body:has(.tce-results-page) > header.wp-block-template-part,
body:has(.tce-audit-page) > header.wp-block-template-part,
body:has(.tce-notar-page) > header.wp-block-template-part,
body:has(.tce-regulament-page) > header.wp-block-template-part,
body:has(.tce-privacy-page) > header.wp-block-template-part,
body:has(.tce-winner-accept-page) > header.wp-block-template-part,
body:has(.tce-landing) .wp-block-template-part[data-type="header"],
body:has(.tce-form-page) .wp-block-template-part[data-type="header"],
body:has(.tce-status-page) .wp-block-template-part[data-type="header"],
body:has(.tce-results-page) .wp-block-template-part[data-type="header"],
body:has(.tce-audit-page) .wp-block-template-part[data-type="header"],
body:has(.tce-notar-page) .wp-block-template-part[data-type="header"],
body:has(.tce-regulament-page) .wp-block-template-part[data-type="header"],
body:has(.tce-privacy-page) .wp-block-template-part[data-type="header"],
body:has(.tce-winner-accept-page) .wp-block-template-part[data-type="header"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
}

body:has(.tce-landing) .wp-block-site-title a,
body:has(.tce-form-page) .wp-block-site-title a,
body:has(.tce-status-page) .wp-block-site-title a,
body:has(.tce-results-page) .wp-block-site-title a,
body:has(.tce-audit-page) .wp-block-site-title a,
body:has(.tce-notar-page) .wp-block-site-title a {
    color: #e6a817 !important;
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
}

body:has(.tce-landing) nav a,
body:has(.tce-form-page) nav a,
body:has(.tce-status-page) nav a,
body:has(.tce-results-page) nav a,
body:has(.tce-audit-page) nav a,
body:has(.tce-notar-page) nav a {
    color: #ffffff !important;
}

body:has(.tce-landing) nav a:hover,
body:has(.tce-form-page) nav a:hover,
body:has(.tce-status-page) nav a:hover,
body:has(.tce-results-page) nav a:hover,
body:has(.tce-audit-page) nav a:hover,
body:has(.tce-notar-page) nav a:hover {
    color: #e6a817 !important;
}

/* ============================================================
   3. FOOTER WP — branding TCE
   ============================================================ */

body:has(.tce-landing) > footer.wp-block-template-part,
body:has(.tce-form-page) > footer.wp-block-template-part,
body:has(.tce-status-page) > footer.wp-block-template-part,
body:has(.tce-results-page) > footer.wp-block-template-part,
body:has(.tce-audit-page) > footer.wp-block-template-part,
body:has(.tce-notar-page) > footer.wp-block-template-part,
body:has(.tce-regulament-page) > footer.wp-block-template-part,
body:has(.tce-privacy-page) > footer.wp-block-template-part,
body:has(.tce-winner-accept-page) > footer.wp-block-template-part,
body:has(.tce-landing) .wp-block-template-part[data-type="footer"],
body:has(.tce-form-page) .wp-block-template-part[data-type="footer"],
body:has(.tce-status-page) .wp-block-template-part[data-type="footer"],
body:has(.tce-results-page) .wp-block-template-part[data-type="footer"],
body:has(.tce-audit-page) .wp-block-template-part[data-type="footer"],
body:has(.tce-notar-page) .wp-block-template-part[data-type="footer"],
body:has(.tce-regulament-page) .wp-block-template-part[data-type="footer"],
body:has(.tce-privacy-page) .wp-block-template-part[data-type="footer"],
body:has(.tce-winner-accept-page) .wp-block-template-part[data-type="footer"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ============================================================
   4. BODY — fundal subtle + reset margin
   ============================================================ */

body:has(.tce-landing),
body:has(.tce-form-page),
body:has(.tce-status-page),
body:has(.tce-results-page),
body:has(.tce-audit-page),
body:has(.tce-notar-page),
body:has(.tce-regulament-page),
body:has(.tce-privacy-page),
body:has(.tce-winner-accept-page) {
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff;
}

/* Admin bar — WordPress aplică deja margin-top:32 pe HTML
   pentru utilizatori logged-in. NU adăugăm peste, doar resetăm
   eventuale duplicate. */
body.admin-bar:has(.tce-landing),
body.admin-bar:has(.tce-form-page),
body.admin-bar:has(.tce-status-page),
body.admin-bar:has(.tce-results-page),
body.admin-bar:has(.tce-audit-page),
body.admin-bar:has(.tce-notar-page),
body.admin-bar:has(.tce-regulament-page),
body.admin-bar:has(.tce-privacy-page),
body.admin-bar:has(.tce-winner-accept-page) {
    margin-top: 0 !important;
}

/* ============================================================
   5. RESPONSIVE — mobile margin admin bar
   ============================================================ */

@media (max-width: 782px) {
    body.admin-bar:has(.tce-landing),
    body.admin-bar:has(.tce-form-page),
    body.admin-bar:has(.tce-status-page),
    body.admin-bar:has(.tce-results-page),
    body.admin-bar:has(.tce-audit-page),
    body.admin-bar:has(.tce-notar-page),
    body.admin-bar:has(.tce-regulament-page),
    body.admin-bar:has(.tce-privacy-page),
    body.admin-bar:has(.tce-winner-accept-page) {
        margin-top: 0 !important;
    }
}

/* ============================================================
   6. FALLBACK pentru browsere care nu suportă :has()
   (Firefox <121, Safari <15.4 — protecție extra prin clasa body)
   ============================================================ */

body.tce-fullwidth main,
body.tce-fullwidth .wp-block-post-content,
body.tce-fullwidth .entry-content {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.tce-fullwidth .wp-block-post-title,
body.tce-fullwidth header.entry-header {
    display: none !important;
}

/* ============================================================
   7. FINAL OVERRIDE — selectori descendant simpli
   Tema randa: body > .wp-site-blocks > header.wp-block-template-part
   Selectorii anteriori cu > direct NU prind (header e nepoata, nu copil).
   ============================================================ */

body.tce-promo-page header.wp-block-template-part,
body.tce-promo-page footer.wp-block-template-part,
body.tce-promo-page .wp-site-blocks > header,
body.tce-promo-page .wp-site-blocks > footer,
body.tce-promo-page .wp-block-template-part:has(.wp-block-site-title),
body.tce-promo-page .wp-block-template-part:has(.wp-block-site-tagline),
body.tce-promo-page .wp-block-template-part:has(.wp-block-navigation) {
    display: none !important;
}

body.tce-promo-page .wp-site-blocks {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
}

/* ============================================================
   8. FIX GAP TOP — block theme post-content adauga margin-top 24px
   pe primul element (.tce-header). Pe homepage e in Elementor (no margin).
   ============================================================ */

body.tce-promo-page .entry-content,
body.tce-promo-page .wp-block-post-content,
body.tce-promo-page main.wp-block-group {
    padding: 0 !important;
    margin: 0 !important;
}

body.tce-promo-page .entry-content > *:first-child,
body.tce-promo-page .wp-block-post-content > *:first-child,
body.tce-promo-page main > *:first-child,
body.tce-promo-page header.tce-header,
body.tce-promo-page .tce-skip-link + header,
body.tce-promo-page .tce-landing,
body.tce-promo-page .tce-form-page,
body.tce-promo-page .tce-results-page,
body.tce-promo-page .tce-audit-page,
body.tce-promo-page .tce-notar-page {
    margin-top: 0 !important;
}

/* ============================================================
   CENTRARE TCE-CONTAINER (fix override Elementor margin-left:0)
   theme-override Elementor seta margin-left:0!important pe orice element
   din .e-con-full — asta sparse `margin-inline:auto` din .tce-container,
   făcând conținutul să curgă spre stânga. Restaurăm centrarea explicit.
   ============================================================ */
body.tce-promo-page .tce-container,
body.tce-promo-page .tce-container--narrow,
body.tce-fullwidth .tce-container,
body.tce-fullwidth .tce-container--narrow {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Castigatori + extragere-live: 2026-05-20 schimbat la FULL-WIDTH (era 1200px).
   Containerul intern (.tce-pg-container) face centrarea conținutului la 1480px,
   iar wrapper-ul .tce-castigatori / .tce-extragere-live se întinde pe tot ecranul
   ca pe landing (pentru fundaluri full-width pe secțiuni). */
body.tce-promo-page .tce-castigatori,
body.tce-promo-page .tce-extragere-live,
body.tce-promo-page .tce-pg,
body.tce-fullwidth .tce-castigatori,
body.tce-fullwidth .tce-extragere-live,
body.tce-fullwidth .tce-pg {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    /* CRITICAL: bg transparent — fără asta apare dunga albă sus/jos */
    background: transparent !important;
}

/* Elimină gap-ul gol între main și footer (era ~96px), DAR păstrează spațiu sus
   sub header pentru ca primul element să nu fie lipit de nav. */
body.tce-fullwidth main.tce-pg-winner__main,
body.tce-fullwidth main.tce-pg-cas__main,
body.tce-fullwidth main.tce-pg-status__main,
body.tce-fullwidth main.tce-pg-legal__main {
    padding-top: 48px !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}
@media (max-width: 768px) {
    body.tce-fullwidth main.tce-pg-winner__main,
    body.tce-fullwidth main.tce-pg-cas__main,
    body.tce-fullwidth main.tce-pg-status__main,
    body.tce-fullwidth main.tce-pg-legal__main {
        padding-top: 28px !important;
    }
}

/* ============================================================
   FIX CENTRARE INNER GRIDS / WRAP-uri (override tema parent)
   tema parent tce-theme/style.css are regula:
     .wp-block-post-content [class^="tce-"] { margin-left: 0px }
   cu specificity 0,2,0,0 care bate `.tce-benefits__grid { margin: 0 auto }`.
   Restaurăm centrarea explicit cu !important.
   ============================================================ */
body.tce-promo-page .tce-benefits__grid,
body.tce-promo-page .tce-benefits__header,
body.tce-promo-page .tce-bonus-section__lead,
body.tce-promo-page .tce-bonus-section__praguri,
body.tce-promo-page .tce-bonus-section__bonusuri,
body.tce-promo-page .tce-thresholds-table,
body.tce-promo-page .tce-examples__grid,
body.tce-promo-page .tce-examples__list,
body.tce-promo-page .tce-steps-v2__list,
body.tce-promo-page .tce-steps-v2__cta,
body.tce-promo-page .tce-form-section__form-wrap,
body.tce-promo-page .tce-form-section__intro,
body.tce-promo-page .tce-products-section__inner,
body.tce-promo-page .tce-seo-section__inner,
body.tce-promo-page .tce-faq-v2__list,
body.tce-promo-page .tce-success-overlay__card,
body.tce-promo-page .tce-cas__panel,
body.tce-promo-page .tce-cas__drawings-bar,
body.tce-promo-page .tce-cas__meta,
body.tce-promo-page .tce-live-countdown,
body.tce-promo-page .tce-live-countdown__units,
body.tce-promo-page .tce-live__state {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Lead/note/intro/subtitle paragraphs cu max-width — center as block */
body.tce-promo-page [class*="__note"],
body.tce-promo-page [class*="__lead"],
body.tce-promo-page [class*="__intro"],
body.tce-promo-page [class*="__subtitle"],
body.tce-promo-page [class*="__title"],
body.tce-promo-page [class*="__header"],
body.tce-promo-page [class*="__count"],
body.tce-promo-page [class*="__texts"] {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Fix centrare blocuri specifice landing care au max-width dar nu centrate */
body.tce-promo-page .tce-steps-v2__info-box,
body.tce-promo-page .steps__info-box,
body.tce-promo-page .tce-form-section__partner-note,
body.tce-promo-page .tce-bonus-list,
body.tce-promo-page .tce-bonus-section__bonusuri,
body.tce-promo-page [class*="bonus-list"] {
    margin-left: auto !important;
    margin-right: auto !important;
}
