/* assets/css/style-custom.css */

/* --- TIPOGRAFIA --- */
:root {
    --font-display: 'Old Standard TT', serif;
    --font-menu: 'Roboto Slab', serif;
    --font-body: 'Raleway', sans-serif;
}

/* --- RIFINITURE ESTETICHE HEADER (Font & Spazi) --- */
.site-title {
    font-family: var(--font-display) !important;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.header-menu nav > ul > li > a {
    font-family: var(--font-menu) !important;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 12px;
}

/* --- CONTROLLO SPAZIATURE UI --- */
.home .entry-header {
    display: none; /* Nasconde il titolo "Home" per pulizia */
}

/* 1. MASTER RESET PER FULL-WIDTH IN HOME */
html, body.home {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    min-width: 100% !important;
    overflow-x: hidden !important;
    background-color: #ffffff !important;
}

/* Forza il contenuto principale a partire da Y=0 per l'header trasparente */
body.home #main-container,
body.home main#main,
body.home .site-main,
body.home article,
body.home .entry-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* 2. TRASPARENZA HEADER (HOME) */
body.home .ct-header {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 10000 !important;
    background: transparent !important;
    background-color: transparent !important;
    --header-background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Rendi le righe trasparenti senza rompere il layout interno */
body.home .ct-header [data-row],
body.home .ct-header .ct-header-row-background {
    background: transparent !important;
    background-color: transparent !important;
    --header-row-background: transparent !important;
    --header-row-background-color: transparent !important;
    border: none !important;
}

/* 3. TESTO HEADER (BIANCO) */
body.home .ct-header .ct-menu > li > a,
body.home .ct-header .site-title,
body.home .ct-header .ct-icon,
body.home .ct-header .ct-header-content {
    color: #ffffff !important;
    fill: #ffffff !important;
}

/* 4. HEADER PER ALTRE PAGINE (NERO FORZATO) */
body:not(.home) .ct-header {
    background-color: #101417 !important;
    --header-background-color: #101417 !important;
    position: relative !important;
}

body:not(.home) .ct-header .ct-menu > li > a,
body:not(.home) .ct-header .site-title,
body:not(.home) .ct-header .ct-icon,
body:not(.home) .ct-header .ct-header-content {
    color: #ffffff !important;
    fill: #ffffff !important;
}

/* Inverti logo su pagine nere se necessario */
body:not(.home) .ct-header .site-logo img {
    filter: brightness(0) invert(1) !important;
}

/* Forza l'immagine nello slider a coprire tutto */
.hero-slide {
    background-size: cover !important;
    background-position: center !important;
}

body.home .ct-header:not(.has-scroll) .site-logo img {
    filter: brightness(0) invert(1) !important;
}

/* 4. RIPRISTINO STILE AL SCROLL (Header Scuro) */
body.home .ct-header.has-scroll {
    position: fixed !important;
    background: #ffffff !important;
    z-index: 10001 !important;
}

body.home .ct-header.has-scroll .site-logo img {
    filter: none !important;
}

/* Rimuovi placeholder che spingono giù la pagina in Home */
body.home .ct-header-placeholder,
body.home .header-placeholder {
    display: none !important;
    height: 0 !important;
}

/* 5. GESTIONE HERO CAROUSEL & PROTEZIONE CONTENUTO */
.hero-wrapper {
    display: block !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    position: relative !important;
    left: 50% !important;
    margin-left: -50vw !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #000000 !important;
    z-index: 10 !important;
}

#hero-carousel {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1 !important;
    background: #000000 !important;
    overflow: hidden !important;
}

/* Centratura garantita anche se il CSS esterno fallisce */
.hero-content {
    position: absolute !important;
    inset: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    z-index: 10 !important;
    padding: 2rem !important;
}

#hero-carousel .hero-slide {
    position: absolute !important;
    inset: 0 !important;
    background-size: cover !important;
    background-position: center !important;
    opacity: 0 !important;
    transition: opacity 1s ease-in-out !important;
    width: 100% !important;
    height: 100% !important;
}

#hero-carousel .hero-slide.active {
    opacity: 1 !important;
}

.hero-wrapper,
.entry-content .hero-wrapper {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* --- RIFINITURE FOOTER --- */
.ct-footer {
    background: #101417 !important;
}
