/*
 * GTExD Home Builder 1.1.2
 * Replica strutturale della Home Elementor esistente.
 * GTExD UI Core resta proprietario di token, font e componenti condivisi.
 */

/*
 * La Home deve unirsi senza stacchi al tema: azzeriamo soltanto sulla pagina
 * che contiene [gtexd_home] i wrapper verticali normalmente usati da WordPress.
 */
body.gtexd-home-builder-page,
body.gtexd-home-builder-page #page,
body.gtexd-home-builder-page #content,
body.gtexd-home-builder-page .site-content,
body.gtexd-home-builder-page .content-area,
body.gtexd-home-builder-page .site-main,
body.gtexd-home-builder-page main.site-main,
body.gtexd-home-builder-page article.page,
body.gtexd-home-builder-page .entry-content,
body.gtexd-home-builder-page .page-content {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    background-color: #1b1e24 !important;
}

body.gtexd-home-builder-page #content,
body.gtexd-home-builder-page .site-content,
body.gtexd-home-builder-page .content-area,
body.gtexd-home-builder-page .site-main,
body.gtexd-home-builder-page article.page,
body.gtexd-home-builder-page .entry-content {
    row-gap: 0 !important;
    gap: 0 !important;
}

body.gtexd-home-builder-page .entry-content {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
    padding-inline: 0 !important;
}

/* Wrapper aggiuntivi usati da Elementor/tema quando lo shortcode è in una pagina. */
body.gtexd-home-builder-page #primary,
body.gtexd-home-builder-page [data-elementor-type="wp-page"],
body.gtexd-home-builder-page [data-elementor-type="wp-page"] > .elementor-element,
body.gtexd-home-builder-page [data-elementor-type="wp-page"] .e-con,
body.gtexd-home-builder-page [data-elementor-type="wp-page"] .elementor-section,
body.gtexd-home-builder-page [data-elementor-type="wp-page"] .elementor-container,
body.gtexd-home-builder-page [data-elementor-type="wp-page"] .elementor-column,
body.gtexd-home-builder-page [data-elementor-type="wp-page"] .elementor-widget-wrap,
body.gtexd-home-builder-page [data-elementor-type="wp-page"] .elementor-widget-shortcode,
body.gtexd-home-builder-page [data-elementor-type="wp-page"] .elementor-widget-shortcode > .elementor-widget-container {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    row-gap: 0 !important;
}

body.gtexd-home-builder-page #primary,
body.gtexd-home-builder-page [data-elementor-type="wp-page"] {
    background: #1b1e24 !important;
}

/* Alcuni temi applicano il separatore direttamente a header/footer. */
body.gtexd-home-builder-page .site-header,
body.gtexd-home-builder-page header.site-header {
    margin-bottom: 0 !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
}

body.gtexd-home-builder-page .site-footer,
body.gtexd-home-builder-page footer.site-footer {
    margin-top: 0 !important;
    border-top: 0 !important;
    box-shadow: none !important;
}

.gtexd-home {
    position: relative;
    left: 50%;
    width: 100vw;
    max-width: none !important;
    margin: 0 0 0 -50vw !important;
    overflow: hidden;
    background: #1b1e24;
    color: #f4f5f7;
}

.gtexd-home,
.gtexd-home * {
    box-sizing: border-box;
}

.gtexd-home-content {
    width: min(100% - 48px, 1200px);
    margin-inline: auto;
}

.gtexd-home-rule {
    display: block;
    width: 102px;
    height: 4px;
    margin-top: 22px;
    background: var(--gtexd-color-accent, #c42026);
}

.gtexd-home-rule--center {
    margin-inline: auto;
}

/*
 * Nessuna variante grafica locale: i CTA della Home usano il componente
 * .gtexd-btn del Core, identico al Market Hub. Qui teniamo solo il nowrap.
 */
.gtexd-home-btn {
    white-space: nowrap;
}

.gtexd-home-btn--disabled {
    opacity: .55;
    cursor: default;
    pointer-events: none;
}

/* HERO ------------------------------------------------------------------- */
.gtexd-home-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    min-height: 665px;
    align-items: stretch;
    overflow: hidden;
    background-color: #171a20;
    background-image:
        linear-gradient(90deg, rgba(11, 13, 16, .91) 0%, rgba(11, 13, 16, .72) 28%, rgba(11, 13, 16, .28) 57%, rgba(11, 13, 16, .07) 100%),
        linear-gradient(0deg, rgba(8, 10, 12, .38) 0%, rgba(8, 10, 12, 0) 38%);
    background-position: center center;
    background-size: cover;
}

.gtexd-home-hero.has-image {
    background-image:
        linear-gradient(90deg, rgba(11, 13, 16, .91) 0%, rgba(11, 13, 16, .72) 28%, rgba(11, 13, 16, .28) 57%, rgba(11, 13, 16, .07) 100%),
        linear-gradient(0deg, rgba(8, 10, 12, .38) 0%, rgba(8, 10, 12, 0) 38%),
        var(--gtexd-home-hero-image);
}

.gtexd-home-hero__shade {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, .18), transparent 52%);
    pointer-events: none;
}

.gtexd-home-hero__inner {
    display: flex;
    width: 100%;
    align-items: center;
    padding: 74px 48px 64px;
}

.gtexd-home-hero__content {
    width: min(100%, 570px);
}

.gtexd-home-hero__eyebrow {
    margin: 0 0 18px;
    color: var(--gtexd-color-accent, #c42026);
    font-family: var(--gtexd-font-display, "Barlow Condensed", "Arial Narrow", sans-serif);
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.gtexd-home-hero__title {
    margin: 0;
    color: #fff;
    font-family: var(--gtexd-font-display, "Barlow Condensed", "Arial Narrow", sans-serif);
    font-size: clamp(43px, 3.15vw, 54px);
    font-weight: 700;
    line-height: .98;
    letter-spacing: -.015em;
    text-transform: none;
}

.gtexd-home-hero__intro {
    max-width: 550px;
    margin: 25px 0 0;
    color: #d0d3d8;
    font-family: var(--gtexd-font-body, Inter, Arial, sans-serif);
    font-size: 17px;
    line-height: 1.45;
}

.gtexd-home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 31px;
}

/* STORIA / 20TH ----------------------------------------------------------- */
.gtexd-home-story,
.gtexd-home-explore {
    background: #1b1e24;
}

.gtexd-home-story {
    padding: 66px 0 26px;
    text-align: center;
}

.gtexd-home-story__inner {
    max-width: 980px;
}

.gtexd-home-story__logo {
    display: block;
    width: 205px;
    height: auto;
    margin: 0 auto 36px;
}

.gtexd-home-story__title,
.gtexd-home-explore__heading h2,
.gtexd-home-section-heading h2 {
    margin: 0;
    color: #fff;
    font-family: var(--gtexd-font-display, "Barlow Condensed", "Arial Narrow", sans-serif);
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.gtexd-home-story__title {
    font-size: clamp(31px, 2.25vw, 38px);
}

.gtexd-home-story__text {
    max-width: 820px;
    margin: 33px auto 0;
    color: #c7cbd2;
    font-family: var(--gtexd-font-body, Inter, Arial, sans-serif);
    font-size: 16px;
    line-height: 1.48;
}

/* ESPLORA ---------------------------------------------------------------- */
.gtexd-home-explore {
    padding: 34px 0 86px;
}

.gtexd-home-explore__heading {
    margin-bottom: 36px;
    text-align: center;
}

.gtexd-home-explore__heading h2 {
    font-size: clamp(31px, 2.15vw, 36px);
}

.gtexd-home-explore__heading p {
    margin: 37px 0 0;
    color: #c7cbd2;
    font-family: var(--gtexd-font-body, Inter, Arial, sans-serif);
    font-size: 16px;
    line-height: 1.45;
}

.gtexd-home-explore__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}

.gtexd-home-explore-card {
    display: flex;
    min-width: 0;
    min-height: 343px;
    flex-direction: column;
    padding: 34px 34px 33px;
    border: 1px solid #343a43;
    border-radius: 4px;
    background: #1b1e24;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.gtexd-home-explore-card:hover,
.gtexd-home-explore-card:focus-within {
    border-color: #4d5663;
    background: #1d2027;
}

.gtexd-home-explore-card__eyebrow {
    margin: 0 0 22px;
    color: var(--gtexd-color-accent, #c42026);
    font-family: var(--gtexd-font-display, "Barlow Condensed", "Arial Narrow", sans-serif);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.gtexd-home-explore-card__title {
    margin: 0;
    color: #fff;
    font-family: var(--gtexd-font-display, "Barlow Condensed", "Arial Narrow", sans-serif);
    font-size: clamp(27px, 2vw, 34px);
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.gtexd-home-explore-card .gtexd-home-rule {
    width: 64px;
    height: 4px;
    margin-top: 20px;
}

.gtexd-home-explore-card__text {
    margin: 43px 0 0;
    color: #c7cbd2;
    font-family: var(--gtexd-font-body, Inter, Arial, sans-serif);
    font-size: 15px;
    line-height: 1.45;
}

.gtexd-home-explore-card__footer {
    margin-top: auto;
    padding-top: 38px;
}

/* PROSSIMO EVENTO: opzionale, non fa parte della replica Elementor -------- */
.gtexd-home-next-event {
    margin-top: 58px;
    padding-top: 42px;
    border-top: 1px solid #343a43;
}

.gtexd-home-section-heading {
    margin-bottom: 22px;
    text-align: left;
}

.gtexd-home-section-heading h2 {
    font-size: 31px;
}

.gtexd-home-section-heading .gtexd-home-rule {
    width: 64px;
    margin-top: 15px;
}

.gtexd-home-event {
    display: grid;
    grid-template-columns: minmax(340px, .95fr) minmax(0, 1.45fr);
    overflow: hidden;
}

.gtexd-home-event__visual {
    position: relative;
    min-height: 300px;
    overflow: hidden;
    border-right: 1px solid var(--gtexd-color-line, #303945);
    background: #10151b;
}

.gtexd-home-event__visual > img {
    width: 100%;
    height: 100%;
    min-height: 300px;
    object-fit: cover;
}

.gtexd-home-event__fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, .72);
    font-family: var(--gtexd-font-display, "Barlow Condensed", sans-serif);
    font-size: 32px;
    font-weight: 700;
}

.gtexd-home-event__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px 30px;
}

.gtexd-home-event__title {
    margin: 0 0 16px;
    color: #fff;
    font-family: var(--gtexd-font-display, "Barlow Condensed", sans-serif);
    font-size: 31px;
    font-weight: 700;
    line-height: 1.05;
}

.gtexd-home-event__actions {
    margin-top: 20px;
}

.gtexd-home-event__track-badge,
.gtexd-home-event__brand {
    position: absolute;
    z-index: 2;
    top: 12px;
    display: grid;
    place-items: center;
    min-height: 38px;
    padding: 6px 9px;
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(6, 8, 10, .78);
}

.gtexd-home-event__track-badge { left: 12px; }
.gtexd-home-event__brand { right: 12px; }

.gtexd-home-event__track-badge img {
    display: block;
    width: auto;
    max-width: 110px;
    height: 26px;
    object-fit: contain;
}

.gtexd-home-event__brand img {
    display: block;
    width: auto;
    max-width: 92px;
    height: 26px;
    object-fit: contain;
}

.gtexd-home-event__brand-text {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    background: rgba(6, 8, 10, .78);
}

/* RESPONSIVE -------------------------------------------------------------- */
@media (max-width: 1100px) {
    .gtexd-home-explore__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gtexd-home-explore-card:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .gtexd-home-hero {
        min-height: 610px;
        background-position: 62% center;
    }

    .gtexd-home-hero__inner {
        padding-inline: 30px;
    }

    .gtexd-home-event {
        grid-template-columns: 1fr;
    }

    .gtexd-home-event__visual {
        min-height: 0;
        aspect-ratio: 16 / 9;
        border-right: 0;
        border-bottom: 1px solid var(--gtexd-color-line, #303945);
    }

    .gtexd-home-event__visual > img {
        min-height: 0;
    }
}

@media (max-width: 700px) {
    .gtexd-home-content {
        width: min(100% - 36px, 1200px);
    }

    .gtexd-home-hero {
        min-height: 610px;
        background-position: 68% center;
    }

    .gtexd-home-hero::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        background: rgba(8, 10, 12, .24);
    }

    .gtexd-home-hero__inner {
        align-items: flex-end;
        padding: 54px 20px 56px;
    }

    .gtexd-home-hero__content {
        width: 100%;
    }

    .gtexd-home-hero__eyebrow {
        font-size: 20px;
    }

    .gtexd-home-hero__title {
        max-width: 520px;
        font-size: clamp(38px, 11vw, 48px);
    }

    .gtexd-home-hero__intro {
        font-size: 15px;
    }

    .gtexd-home-hero__actions {
        gap: 10px;
    }

    .gtexd-home-story {
        padding-top: 52px;
    }

    .gtexd-home-story__logo {
        width: 180px;
        margin-bottom: 31px;
    }

    .gtexd-home-story__text,
    .gtexd-home-explore__heading p {
        font-size: 15px;
    }

    .gtexd-home-explore {
        padding-bottom: 58px;
    }

    .gtexd-home-explore__grid {
        grid-template-columns: 1fr;
    }

    .gtexd-home-explore-card:last-child {
        grid-column: auto;
    }

    .gtexd-home-explore-card {
        min-height: 0;
        padding: 28px 24px;
    }

    .gtexd-home-explore-card__text {
        margin-top: 34px;
    }

    .gtexd-home-explore-card__footer {
        padding-top: 31px;
    }

    .gtexd-home-event__body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .gtexd-home-hero__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .gtexd-home-hero__actions .gtexd-home-btn {
        width: 100%;
    }
}
