/*
Theme Name: View
Theme URI: https://presscommtech.com
Author: PressComm Tech s.r.l.
Author URI: https://www.presscommtech.com/
Description: Un tema custom, leggero e pronto per il multilingua, progettato per connettere culture diverse.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cultural-bridge
Domain Path: /languages
*/

/* ==========================================================================
   0. VARIABILI CSS E CONFIGURAZIONI GLOBALI
   ========================================================================== */
    :root{
        --red: #DF0B1A;
        --white: #fff;
        --borgogna: #691227;
        --borgogna-light: #78293C;
        --black: #1d1d1b;
        --gray: #333;

        --green: #1c8fa5;
        --ivory: #efe8e0;
        --dark-ivory: #f7f4f0;
    }

/* ==========================================================================
   1. CARICAMENTO DEI FONT LOCALI
   ========================================================================== */

/* Font Regular / Bold (essendo un Variable Font gestisce tutti i pesi) */
@font-face {
    font-family: 'Inter';
    src: url('font/inter/Inter.ttf') format('truetype-variations'),
         url('font/inter/Inter.ttf') format('truetype');
    font-weight: 100 900; /* Supporta i pesi da Thin a Black grazie al Variable Font */
    font-style: normal;
    font-display: swap;
}

/* Font Italic */
@font-face {
    font-family: 'Inter';
    src: url('font/inter/Inter-Italic.ttf') format('truetype-variations'),
         url('font/inter/Inter-Italic.ttf') format('truetype');
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

/* Font Regular / Bold (essendo un Variable Font gestisce tutti i pesi) */
@font-face {
    font-family: 'Source';
    src: url('font/source-code/SourceCodePro-VariableFont_wght.ttf') format('truetype-variations'),
         url('font/source-code/SourceCodePro-VariableFont_wght.ttf') format('truetype');
    font-weight: 200 900; /* Supporta i pesi da Thin a Black grazie al Variable Font */
    font-style: normal;
    font-display: swap;
}

/* Font Italic */
@font-face {
    font-family: 'Source';
    src: url('font/source-code/SourceCodePro-Italic-VariableFont_wght.ttf') format('truetype-variations'),
         url('font/source-code/SourceCodePro-Italic-VariableFont_wght.ttf') format('truetype');
    font-weight: 200 900;
    font-style: italic;
    font-display: swap;
}

/* ==========================================================================
   2. STILI BASE E APPLICAZIONE DEL FONT
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

/* Opzionale: se hai un header fisso (sticky), evita che copra l'inizio della sezione */
:target {
    scroll-margin-top: 80px; /* Regola i pixel in base all'altezza del tuo header */
}

html, body {
    font-family: 'Inter', Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--dark-ivory);
}

/* Forziamo il font su tutti gli elementi di testo principali, intestazioni e moduli */
h1, h2, h3, h4, h5, h6, 
p, input, button, select, textarea, a {
    font-family: 'Inter', Arial, sans-serif;
}

p{
    font-size: 20px;
}

.site-header{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
}

header .container{
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    padding: 5px;
    justify-content: space-between;
    /* border-bottom: 1px solid #ccc3; */
    padding-left: 200px;
    padding-right: 200px;
    max-width: calc(100% - 400px);
}

header .container .custom-logo-link img{
    height: 50px;
    padding-top: 20px;
    padding-bottom: 20px;
}

#primary-menu{
    display: flex;
    flex-direction: row;
    gap: 30px;
    color: var(--white);
    list-style: none;
    padding: 0;
}

#primary-menu a{
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-weight: 700;
}

#primary-menu a:hover{
    color: var(--borgogna);
}


/* ==========================================================================
   3. HERO SECTION
   ========================================================================== */
.hero{
    padding: 70px 120px;
}


.heroContent{  
    width: fit-content;
}

.heroContent h2{
    font-weight: 500;
    font-size: 25px;
    color: var(--red);
    margin-top: 0;
}

.heroContent h3{
    margin-top: 40px;
    border-bottom: 2px solid var(--white);
}

.heroContent .rowDetails{
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
}

.heroContent h3{
    font-size: 18.7px;
}

/* ==========================================================================
   4. GENERAL STYLES
   ========================================================================== */
.effetto-vetro {
    /* Sfondo bianco molto trasparente per dare l'effetto della superficie del vetro */
    background: rgba(255, 255, 255, 0.08);
    
    /* Il cuore dell'effetto: sfoca lo sfondo retrostante (regola i pixel per più o meno sfocatura) */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); /* Supporto per Safari */
    
    /* Un bordo sottile e semi-transparente per simulare il riflesso sul taglio del vetro */
    border: 1px solid rgba(255, 255, 255, 0.15);

    /* Un'ombra leggera e morbida per dare profondità e staccare il div dallo sfondo */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    
    /* Assicurati che il testo all'interno sia leggibile (es. bianco se lo sfondo generale è scuro) */
    color: #ffffff;
}

/* Ombra interna posizionata sul bordo SUPERIORE */
.ombra-interna-top {
    box-shadow: inset 0 15px 20px -10px rgba(0, 0, 0, 0.7);
}

/* Ombra interna posizionata sul bordo INFERIORE */
.ombra-interna-bottom {
    box-shadow: inset 0 -15px 20px -10px rgba(0, 0, 0, 0.7);
}

/* Opzionale: Se vuoi combinare entrambe le ombre sullo stesso elemento */
.ombra-interna-top-bottom {
    box-shadow: 
        inset 0 15px 20px -10px rgba(0, 0, 0, 0.7),
        inset 0 -15px 20px -10px rgba(0, 0, 0, 0.7);
}

.borgognaSection {
    /* padding: 70px 120px; */
    background: var(--borgogna);
    color: var(--white);
    position: relative;
    overflow: hidden;
    min-height: 80vh;
}

.blackSection {
    /* padding: 70px 120px; */
    background: var(--black);
    color: var(--white);
    position: relative;
    overflow: hidden;
    min-height: 80vh;
}

/* Aggiornamento degli elementi ::before per supportare il movimento tramite variabili CSS */
.borgognaSection::before, 
.blackSection::before {
    content: '';
    position: absolute;
    top: -10%; /* Estendiamo leggermente lo sfondo per evitare bordi bianchi quando si muove */
    left: -10%;
    width: 120%;
    height: 120%;
    background: url('img/glifoBck.png') center/cover no-repeat;
    opacity: .1;
    
    /* Valori di default puri (senza px) */
    --mouse-x: 0;
    --mouse-y: 0;
    
    /* Usiamo translate normale moltiplicando direttamente i valori numerici */
    transform: scale(1.2) translate(calc(var(--mouse-x) * 1px), calc(var(--mouse-y) * 1px));
    
    /* Rimuoviamo temporaneamente la transition per escludere che il browser la blocchi */
    transition: none; 
    
    will-change: transform;
    pointer-events: none;
    z-index: 0;
}

.borgognaSection .wp-block-image, .blackSection .wp-block-image{
    z-index: 1;
}

.bullets h4{
    position: relative;
    display: flex;
    flex-direction: row;
    gap: 10px;
    font-size: 24px;
}

.bullets h4:before{
    content: '';
    position: absolute;
    top: -15px;
    left: -31px;
    width: 60px;
    height: 25px;
    background: url(img/bullet.png) no-repeat;
    background-size: cover;
    transform: rotate(347deg);
}

.bullets{
    max-width: 1200px;
    margin: 0 auto;
    gap: 50px;
}

.standardContent{
    max-width: 1200px;
    margin: 0 auto;
}

.standardContent h2{
    font-size: 50px;;
}

h3{
    font-size: 35px;
}

/* ==========================================================================
   5. FOOTER
   ========================================================================== */
    footer{
        background: var(--black);
        color: var(--white);
        padding: 50px 120px;    
        border-top: 1px solid rgba(255, 255, 255, .3);
    }


/* ==========================================================================
   7. Image slider
   ========================================================================== */
/* Contenitore principale: forziamo l'allineamento a sinistra e resettiamo WordPress */
.wp-block-group.imageSlider {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    /* overflow: hidden !important; */
    width: 100% !important;
    /* max-width: 1200px; */
    /* margin: 0 auto !important; */
    /* padding: 20px 0 !important; */
    position: relative !important;
    /* Definiamo un gap fisso per controllare lo spazio tra le slide */
    gap: 20px !important; 
    left: 0 !important;
    margin-top: 70px;
    margin-bottom: 50px; 
}

/* Ogni singola slide (blocco immagine WP) */
.wp-block-group.imageSlider .wp-block-image {
    flex: 0 0 25% !important; /* Larghezza fissa della foto */
    width: 25% !important;
    max-width: 25% !important;
    margin: 0 !important;
    padding: 0 !important; /* Resettiamo i padding per non sballare i calcoli */
    box-sizing: border-box !important;
}

/* Controllo estetico delle immagini */
.wp-block-group.imageSlider .wp-block-image img {
    width: 100% !important;
    max-width: 100% !important;
    /* height: 525px !important; */
    aspect-ratio: 1 !important;
    object-fit: cover !important;
    display: block !important;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 50%;
    border-top-left-radius: 50%;
}

.wp-block-image.imageRightSide img{
    max-width: 200%;   
}

.txtImg{
    gap: 70px;
    margin-bottom: 70px;
}

.doubleImgContainer{
    position: relative;
}

#sezione2 p:last-child{
    margin-bottom: 70px;
    margin-top: 70px;
}

#sezione2 .standardContent:first-child{
    margin-top: 70px;
}

#sezione3 .wp-block-image img{
    box-sizing: border-box;
    height: auto;
    max-width: 300%;
    vertical-align: bottom;
    left: -90%;
    position: relative; 
}

#sezione3 .intestazione{
    right: -10%;
    position: relative;
}

#sezione3 h3{
    margin-top: 70px;
    margin-bottom: 70px;
}

#sezione3 .wp-block-media-text{
    margin-bottom: 70px;
}

#sezione3 .victoriaHarbour{
    padding-bottom: 50px;
}

#sezione4 .rowDetails{
    margin-top: 70px;
    margin-bottom: 70px;
    gap: 50px;
}

#sezione4 .rowDetails *{
    flex: 1;
}

#sezione4 .campagna{
    border-radius: 50%;
    overflow: hidden;
    z-index: 2;
}

#sezione4 .campagnaContainer{
    position: relative;
}






/* Wrapper geometrico ingrandito del 30% (320px * 1.3 = 416px) */
.bordo-dinamico-wrapper {
    position: relative !important;
    /* width: 416px !important;  */
    /* height: 416px !important; */
    margin: 0 auto !important;
    display: inline-block !important;
}

/* Mantiene la foto perfettamente tonda all'interno del nuovo spazio */
.bordo-dinamico-wrapper figure.campagna,
.bordo-dinamico-wrapper figure.campagna img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Sovrapposizione dell'orologio SVG */
.bordo-dinamico-wrapper svg {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 99 !important;
    pointer-events: none !important;
    /* Specchia e imposta la partenza a ore 12 in senso ANTIORARIO */
    transform: scaleX(-1) rotate(-90deg) !important;
}

/* Il tracciato rosso modificato per essere molto più sottile (2px) */
.bordo-dinamico-wrapper .progress-circle {
    fill: none !important;
    stroke: var(--red) !important;
    stroke-width: 1 !important; /* Molto più sottile e raffinato */
    stroke-linecap: none !important;
    /* Nuova circonferenza matematica basata sul raggio 49 = 307.87 */
    stroke-dasharray: 307.87 !important;
    stroke-dashoffset: 307.87; 
    transition: stroke-dashoffset 0.05s linear !important;
}

/* Binario di controllo grigio scuro opaco ancora più discreto */
.bordo-dinamico-wrapper .bg-circle {
    fill: none !important;
    stroke: rgba(255, 255, 255, 0.05) !important;
    stroke-width: 1.5 !important;
}



/* Contenitore delle due immagini: ingrandito del 20% e isolato dai testi sottostanti */
.wp-block-group.doubleImgContainer {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    max-width: 720px; /* Incrementato del 20% (da 600px a 720px) */
    height: 575px !important; /* Incrementato del 20% (da 480px a 575px) per contenere le nuove proporzioni */
    margin: 0 auto 60px auto !important; /* Margine inferiore aumentato per massima sicurezza con i tre Ponti */
    overflow: visible !important;
}

/* Blocchi figura di WordPress */
.wp-block-group.doubleImgContainer .wp-block-image {
    position: absolute !important;
    margin: 0 !important;
    padding: 0 !important;
    will-change: transform;
    z-index: 1;
}

/* PRIMA IMMAGINE (A sinistra - borghi liguri) -> Proporzioni 16:9 */
.wp-block-group.doubleImgContainer .wp-block-image:nth-child(1) {
    width: 70% !important; /* Leggermente più larga per assecondare il 16:9 */
    top: 0px !important;
    left: 0px !important;
}

/* Forza lo stile specifico in 16:9 per la prima immagine */
.wp-block-group.doubleImgContainer .wp-block-image:nth-child(1) img {
    width: 100% !important;
    height: auto !important; /* Lascia calcolare l'altezza in automatico basandosi sul 16:9 */
    object-fit: cover !important;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* SECONDA IMMAGINE (A destra - chiesa russa) -> Ingrandita del 20% */
.wp-block-group.doubleImgContainer .wp-block-image:nth-child(2) {
    width: 46% !important;
    top: 130px !important; /* Sfalsamento iniziale ricalibrato sulle nuove altezze */
    right: -50px !important;
}

/* Mantiene il taglio verticale slanciato per la seconda immagine, ma scalato del +20% */
.wp-block-group.doubleImgContainer .wp-block-image:nth-child(2) img {
    width: 100% !important;
    height: 410px !important; /* Incrementato del 20% (da 340px a 410px) */
    object-fit: cover !important;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .wp-block-group.doubleImgContainer {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        gap: 20px !important;
        margin-bottom: 30px !important;
    }
    .wp-block-group.doubleImgContainer .wp-block-image {
        position: relative !important;
        width: 100% !important;
        left: 0 !important;
        top: 0 !important;
        transform: none !important;
    }
    .wp-block-group.doubleImgContainer .wp-block-image:nth-child(1) img {
        aspect-ratio: auto !important; /* Resetta su mobile per non schiacciarle troppo */
        height: 220px !important;
    }
    .wp-block-group.doubleImgContainer .wp-block-image:nth-child(2) img {
        height: 280px !important;
    }
}

/* ==========================================================================
   6. PRELOAD
   ========================================================================== */
/* Sfondo nero a tutto schermo */
#custom-preload-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000000;
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

/* Contenitore del logo */
.preload-logo-container {
    position: relative;
    width: 300px;  
    height: 300px; 
}

/* Sovrapposizione assoluta delle linee */
.preload-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0; 
}

/* --- DURATA IMPOSTATA A 4.5 SECONDI --- */
.line-1 { animation: anim-linea-1 4.5s infinite ease-in-out; }
.line-2 { animation: anim-linea-2 4.5s infinite ease-in-out; }
.line-3 { animation: anim-linea-3 4.5s infinite ease-in-out; }
.line-4 { animation: anim-linea-4 4.5s infinite ease-in-out; }

/* --- NUOVI FOTOGRAMMI CHIAVE (Garantiscono 0.5s di logo completo) --- */

@keyframes anim-linea-1 {
    0%, 15% { opacity: 0; }
    20%, 93% { opacity: 1; } /* Resta visibile fino al 93% */
    98%, 100% { opacity: 0; }
}

@keyframes anim-linea-2 {
    0%, 35% { opacity: 0; }
    40%, 93% { opacity: 1; } /* Resta visibile fino al 93% */
    98%, 100% { opacity: 0; }
}

@keyframes anim-linea-3 {
    0%, 55% { opacity: 0; }
    60%, 93% { opacity: 1; } /* Resta visibile fino al 93% */
    98%, 100% { opacity: 0; }
}

@keyframes anim-linea-4 {
    0%, 75% { opacity: 0; }
    /* Dal giorno in cui compare (80%) fino al 93% passano esattamente 0.5 secondi fisse */
    80%, 93% { opacity: 1; } 
    98%, 100% { opacity: 0; }
}

/* Classe di chiusura */
#custom-preload-screen.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
/* ==========================================================================
   7. MEDIA QUERIES PER RESPONSIVE DESIGN
   ========================================================================== */

   .headerCover{
        background: var(--ivory);
   }

   .headerCover h2{
        font-family: 'Source';
        font-weight: 400;
   }

   .headerCover .logoHome img{
    height: 140px;
   }

   .hero-txt{
    padding: 60px;
    background: var(--dark-ivory);
   }

   .hero-txt .colNumbers{
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
   }
   
   .hero-txt .colNumbers .wp-block-column{
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: "Source";
   }

   .hero-txt #aziende, 
   .hero-txt #professionisti{
        font-size: 50px;
        font-weight: 400;
        color: var(--green);
    } 

   .hero-txt .colNumbers p{
    font-family: "Source";
    font-weight: 900;
    margin: 0;
   }

   #Chi-siamo{
    background: var(--black);
    color: var(--white);
   }

   .block{
    padding: 60px 190px;
   }

   .block h2{
    margin: 0;
    font-size: 18px;
    width: fit-content;
   }

   .block h3{
    font-family: "Source";
    font-weight: 400;
   }

   .block h3 strong{
    color: var(--green);
	   white-space: nowrap;
   }

   .split-strong strong .letter {
        display: inline-block;
        opacity: 0;
        transform: translateY(0.3em);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }

    .split-strong strong .letter.visible {
        opacity: 1;
        transform: translateY(0);
    }

    /* evita che gli spazi vengano collassati o spariscano visivamente */
    .split-strong strong .letter.space {
        width: 0.3em;
    }


    #Chi-siamo p, #Mission-e-vision p{
        max-width: 600px;
    }

   /* Border effect */

.glow-card {
    position: relative;
    border-radius: 40px;
    padding: 7px;
    width: fit-content;
    height: fit-content;

    --spread: 90; /* ridotto da 40: arco più stretto, meno colori mischiati */
    --start: 0;
    --active: 0;
    --glow-border-width: 1px;
    --repeating-conic-gradient-times: 6;

    --gradient: repeating-conic-gradient(
        from 0deg at 50% 50%,
        #ba3b3b 0%,
        #ba3b3b calc(100% / var(--repeating-conic-gradient-times) - 2%),
        #234e70 calc(100% / var(--repeating-conic-gradient-times)),
        #234e70 calc(200% / var(--repeating-conic-gradient-times) - 2%),
        #5e8c61 calc(200% / var(--repeating-conic-gradient-times)),
        #5e8c61 calc(300% / var(--repeating-conic-gradient-times) - 2%),
        #c6922a calc(300% / var(--repeating-conic-gradient-times)),
        #c6922a calc(400% / var(--repeating-conic-gradient-times) - 2%),
        #c96a4a calc(400% / var(--repeating-conic-gradient-times)),
        #c96a4a calc(500% / var(--repeating-conic-gradient-times) - 2%),
        #7a5c90 calc(500% / var(--repeating-conic-gradient-times)),
        #7a5c90 calc(600% / var(--repeating-conic-gradient-times) - 2%),
        #ba3b3b calc(600% / var(--repeating-conic-gradient-times))
    );

}

.glow-content {
    position: relative;
    border-radius: inherit;
    padding: 3px;
    color: inherit;
}

.glow-border {
    pointer-events: none;
    position: absolute;
    inset: 0;
    border-radius: inherit;
    z-index: 1;
}

.glow-border::after {
    content: "";
    position: absolute;
    inset: calc(-1 * var(--glow-border-width));
    border-radius: inherit;
    border: var(--glow-border-width) solid transparent;

    background: var(--gradient);
    /* background-attachment: fixed;  <-- RIMOSSA */

    opacity: var(--active);
    transition: opacity 0.5s ease;

    -webkit-mask-image:
        linear-gradient(#0000, #0000),
        conic-gradient(
            from calc((var(--start) - var(--spread)) * 1deg),
            #00000000 0deg,
            #fff,
            #00000000 calc(var(--spread) * 2deg)
        );
    -webkit-mask-clip: padding-box, border-box;
    -webkit-mask-composite: source-in;

    mask-image:
        linear-gradient(#0000, #0000),
        conic-gradient(
            from calc((var(--start) - var(--spread)) * 1deg),
            #00000000 0deg,
            #fff,
            #00000000 calc(var(--spread) * 2deg)
        );
    mask-clip: padding-box, border-box;
    mask-composite: intersect;
}

/**
*   Mission
**/
#Mission-e-vision{
    flex-direction: row-reverse;
    background-color: var(--dark-ivory);
}

#Mission-e-vision .headerBlock{
    text-align: right;
}

#Mission-e-vision .headerBlock .wp-block-group__inner-container{
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/**
*   Points of view
**/
#Points-of-view{
    background-color: var(--dark-ivory);
}

#logoChanger{
    position: relative;
    width: 325px;
    height: 100px;
    margin-left: auto;
    margin-right: auto;
}

.logo-layer {
    background: url('img/logos/view.svg') no-repeat;
    position: absolute;
    inset: 0;
    background-size: contain;
    background-position: center;
    opacity: 0;
    transition: opacity 0.3s ease; /* durata del crossfade */
}

.logo-layer.active {
    opacity: 1;
}

.companyRow{
    background: var(--dark-ivory);
}

.companyRowContent{
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    gap: 70px;
    padding: 60px 100px;
    position: relative;
}

.companyRowContent .wp-block-group{
    max-width: 360px;
}

.companyRowContent .companyLogo{
    max-width: 250px;
}

.companyRow .bullet{
    width: 50px;
    height: 50px;
    /* position: absolute; */
    /* left: -20px; */
}

#contatti{
    background: var(--black);
    color:#fff;
}

#contatti .mailtoButton{
    margin-top: 65px;
}

#contatti .mailtoButton a{
    text-decoration: none;
    border: solid 2px var(--dark-ivory);
    color: var(--dark-ivory);
    width: fit-content;
    padding: 15px;
    border-radius: 40px;
    font-family: 'Source';
    margin-top: 20px;
}


/*Card azienda*/
.aziendaCard {
    perspective: 1000px;
    width: 360px;  /* adatta alle tue dimensioni */
    height: 360px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.aziendaCard:hover .card-inner {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow: hidden;
}

.card-front figure{
    width: fit-content;
    display: flex;
    align-content: center;
    justify-content: center;
}

.card-front img {
    max-width: 70%;
    height: auto;
}

.card-back { /* sfondo faccia contenuto */
    transform: rotateY(180deg); /* pre-ruotata, così appare dritta a flip completato */

    text-align: center;
}

.card-back img {
    width: 50px;
    height: auto;
    margin-bottom: 1rem;
}

.card-back p {
    font-size: 0.95rem;
    line-height: 1.4;
}

.card-face{
    background: white;
    border-radius: 16px;
}

.aziendaCard:nth-child(even) .card-face{
    background: var(--black);
}

.aziendaCard .card-face.card-back{
    background: white;
}

.fakeMenu{
    position: fixed;
    bottom: 60px;
    right: 60px;
    width: 140px;
    aspect-ratio: 1;
}

header .container .custom-logo-link img{
    display: none;
}

.socialContainer {
    padding-top: 60px;
    gap: 30px;
}

.socialContainer img{
    width: 40px;
}

.site-branding{
    width: 140px;
    position: fixed;
    bottom: 75px;
    right: 60px;
    aspect-ratio: 1;
}

.site-branding svg{
    cursor: pointer;
    position: absolute;
    z-index: 1;
}

  /* la scritta perimetrale ruota di continuo, velocità costante, nessun effetto hover */
  #menu-testo{
    transform-origin: 50% 50%; /* centro del viewBox, default per SVG inline */
    animation: ruota 18s linear infinite;
  }
  /* il logo resta fermo: nessuna trasformazione su #imperia-logo-centrale */

  @keyframes ruota{
    from{ transform: rotate(0deg); }
    to{ transform: rotate(360deg); }
  }
  @media (prefers-reduced-motion: reduce){
    #menu-testo{ animation: none; }
  }


  #primary-menu {
        display: flex;
        flex-direction: column;
        gap: 30px;
        color: var(--green);
        list-style: none;
        padding: 0;
        position: fixed;
        right: 56px;
        bottom: 230px;
        align-items: center;
        max-height: 0;
        transition: max-height .5s ease-in-out;
        overflow: hidden;
    }

    #primary-menu.active{
        max-height: 500px !important;
    }

    #primary-menu a{
        color: var(--green);
        font-family: 'Source';
    }

    
    #primary-menu a:hover{
        color: var(--green);
    }

    #primary-menu a {
    display: inline;
    position: relative;
    overflow: hidden;
    }
    #primary-menu a:after {
    content: "";
    position: absolute;
    z-index: -1;
    left: 0;
    right: 100%;
    bottom: -5px;
    background: var(--green);
    height: 1px;
    transition-property: left right;
    transition-duration: 0.3s;
    transition-timing-function: ease-out;
    }
    #primary-menu a:hover:after,
    #primary-menu a:focus:after,
    #primary-menu a:active:after {
    right: 0;
    }

    .site-branding::before{
        content: "";
        width: 150px;
        height: 150px;
        background: #fff;
        display: flex;
        position: absolute;
        top: -6px;
        left: -6px;
        z-index: -1;
        border-radius: 150px;
    }

    .gridRete{
        background: var(--dark-ivory);
        padding-left: 200px;
        padding-right: 200px;

        width: fit-content;
        margin-left: auto;
        margin-right: auto;
        margin-top: 60px;
        margin-bottom: 180px;
    }



   @media only screen and (max-width: 768px) {

        .hero-txt{
            padding-left: 15px;
            padding-right: 15px;
        }

        .block{
            padding: 60px  15px;
            flex-direction: column !important;
            align-items: flex-start;
        }

        .block h3{
            font-size: 29px;
        }

        #Chi-siamo{
            align-items: flex-start;
        }

        #Points-of-view{
            align-items: center;
        }

        .gridRete{
            background: var(--dark-ivory);
            padding-left: 15px;
            padding-right: 15px;

            width: fit-content;
            margin-left: auto;
            margin-right: auto;
            margin-top: 0;
            margin-bottom: 60px;

            display: flex !important;
            flex-direction: column;
            gap: 20px;
        }

        footer{
            padding-left: 15px;
            padding-right: 15px;
        }

        #contatti .mailtoButton{
            text-align: center;
        }

        .socialContainer{
            justify-content: center;
        }

        .site-branding{
            width: 100px;
            bottom: 30px;
            right: 25px;
        }

        .site-branding::before{
            content: "";
            width: 100px;
            height: 100px;
            background: #fff;
            display: flex;
            position: absolute;
            top: 0;
            left: 0;
            z-index: -1;
            border-radius: 100px;

            -webkit-box-shadow: 0px 0px 15px 6px rgba(0, 0, 0, .2);
            box-shadow: 0px 0px 15px 6px rgba(0, 0, 0, .2);
        }

        #primary-menu{
            bottom: 130px;
            right: 9px;
            width: 140px;
            gap: 0px;
            background: #fff;
            border-radius: 5px;
        }

        #primary-menu.active{
            -webkit-box-shadow: 0px 0px 15px 6px rgba(0, 0, 0, .2);
            box-shadow: 0px 0px 15px 6px rgba(0, 0, 0, .2);
        }

        #primary-menu a{
            font-size: 20px;
            display: flex;
            padding: 10px;
            text-align: center;
        }
	   
	   .aziendaCard{
		   width: calc(100vw - 30px);
		   height: calc(100vw - 30px);
	   }
	   

    }