/* --- VARIABLES FALLBACK --- */

:root {
  --logo-position: right -325vw bottom -20vh;
  --bg-page: #0e0e0e;
  --logo-bg-color: linear-gradient(135deg, #dae6e4 0%, #ffffff 100%);
   --logo-bg-color: linear-gradient(135deg, var(--c-brand-amber) 0%, var(--c-brand-cyan) 100%);
  /* Opzionale: se questa pagina ha un fondo diverso */
  --logo-opacity: 1;
}

/* --- RESET & LAYOUT GENERALE --- */
* {
    box-sizing: border-box;
}

.container {
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

.container-txt {
    width: 100%;
    max-width: 1200px;
    text-align: center;
    margin: 0 auto;
    padding: 35px 0;
}

.container-txt-immagine {
    width: 100%;
    background-attachment: fixed;
    background-color: rgb(22, 46, 77);
}

.container-txt-immagine-txt {
    width: 100%;
    max-width: 800px;
    text-align: left;
    margin: 0 auto;
    padding: 100px 0;
}

.container-txt h2{
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    text-transform: uppercase;
}

.container-bianco {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background-color: white;
    color: #121213;
}

/* --- HERO SECTION --- */
.hero-stage-home {
    position: relative;
    height: 100vh;
    min-height: 550px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #ffffff;
    text-align: center;
}

/* LEVEL 0: Video Iframe Sfondo */
.hero-video-container {
    transition: background-color 0.4s ease;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.hero-video-iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw; /* Ratio 16:9 */
    min-height: 100vh;
    min-width: 177.77vh;
    transform: translate(-50%, -50%);
    border: none;
}

/* LEVEL 1: Overlay Scuro (rende i testi perfettamente leggibili) */
.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.35) 0%, rgba(15, 23, 42, 0.7) 100%);
    z-index: 1;
    pointer-events: none;
}

/* LEVEL 2: Contenuti visibili sopra al video */
.hero-overlay-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Micro Badge */
.hero-badge-wrapper {
    margin-bottom: 15px;
}

.micro-badge-hero {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 25px;
    /* background: rgba(255, 255, 255, 0.12); */
    /* backdrop-filter: blur(8px); */
    border: 2px solid var(--c-text-cyan-dark);
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-transform: uppercase;
  color: var(--c-text-cyan);
  /* background: var(--c-text-cyan-dark); */

  margin: 25px 0px;
}

/* SVG Logo & Titolo */
.hero-title-svg {
    margin-bottom: 1.5rem;
}

.hero-logo-svg {
    display: block;
    width: 100%;
    max-width: 400px;
    height: auto;
    margin: 0 auto;
}

/* Forza il colore bianco sui tracciati del tuo SVG */
.hero-logo-svg path,
.hero-logo-svg g {
    fill: #ffffff !important;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    margin-top: 0;
    margin-bottom: 2rem;
    color: #e2e8f0;
    line-height: 1.5;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.fa-solid{
    font-size: 25px;
    margin-bottom: 15px;
    color: var(--c-brand-cyan-dark);
}

/* CTA Navigation Button */
.back-navigation-wrapper {
    margin-top: auto;
        display: flex;
    justify-content: center;
}

.btn-back-link {
    display: inline-block;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 8px;
    background-color: var(--c-brand-cyan-dark);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    margin: auto;
}

.btn-back-link:hover {
    transform: translateY(-2px);
    background-color: var(--c-brand-cyan);
    box-shadow: 0 5px 10px var(--c-brand-cyan-dark);
}

/* Classi utilità */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


.why-intro {
    background: var(--c-brand-navy);
    padding: 80px 20px;
}

.features{
    background: var(--c-brand-navy);
}

/* --- SEZIONE REASON WHY / PILASTRI --- */
.features{
        margin: auto auto;
    padding: 80px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dark-content-section,
.main-content-wrapper {
    max-width: 1200px;
    margin: auto auto;
    padding: 80px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* margin-top: auto; */
}


.hero-manifesto {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px auto;
}

.hero-manifesto p {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px auto;
}

.section-title-clean,
.section-title-clean2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--text-main);
    margin-top: 15px;
    line-height: 1.2;
}

/* Grid per Glassmorphism Cards */
.design-grid-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.design-card-glass {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border-card);
    transition: var(--transition);
}

.design-card-glass2 {
    background: var(--text-main);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border-card);
    transition: var(--transition);
}

.design-card-glass:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.design-tag {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--c-brand-cyan-dark);
    display: block;
    margin-bottom: 12px;
}

.design-tag-big {
    font-size: 2rem;
    margin-bottom: 15px;
}

.design-card-glass h3 {
    font-size: 1.3rem;
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 12px;
}

.design-card-glass2 h3 {
    color: var(--c-brand-navy);
}

.design-card-glass p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.design-card-glass2 p {
    color: var(--c-brand-navy);
}

/* --- CAROSELLO CLIENTI (MARQUEE) --- */
.clients {
    overflow: hidden;
    background: #ffffff;
    padding: 30px 0;
    width: 100%;
}

.clients-track {
    display: flex;
    width: max-content;
    animation: scroll 25s linear infinite;
}

.client {
    flex: 0 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
}

.client img {
    height: clamp(40px, 5vw, 60px);
    width: auto;
    display: block;
    opacity: 0.7;
    filter: grayscale(100%);
    transition: var(--transition);
}

.client img:hover {
    opacity: 1;
    filter: grayscale(0%);
}

.lastsection {
    /* background: var(--c-brand-navy-dark); */
    padding: 5vw;
}
/* --- SEZIONE IN VERTICALE: FORM & ARCHIVIO --- */
.contact-archive-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    max-width: 850px; /* Limita la larghezza massima per una migliore leggibilità */
    margin: 0 auto 50px auto; /* Centra la sezione */
}

.contact-card-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
}

/* Stile specifico per la card dell'archivio (più bassa e con sfondo) */
.archive-card-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 30px; /* Altezza ridotta rispetto al form */
    min-height: auto;
    background-image: url('/assets/images/website/earth-day4.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 12px;
}

/* Assicura che il testo sopra l'immagine di sfondo sia ben visibile */
.archive-card-wrapper * {
    position: relative;
    z-index: 2;
}

/* Stile dei campi del form in coordinato col tema glass */
.custom-contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.form-group {
    width: 100%;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08); /* Sfondo leggermente più chiaro e leggibile */
    border: 1px solid var(--border-card);
    color: var(--text-main); /* Assicurati che questa variabile sia scura, oppure forza un colore visibile come #ffffff o #111111 */
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
}

/* Forza il colore del testo mentre l'utente sta scrivendo */
.form-input:focus,
.form-input:not(:placeholder-shown) {
    color: #1d1d1d; /* Scegli il colore del testo digitato (es. bianco o un grigio scuro a seconda del tuo tema) */
    background: rgba(255, 255, 255, 0.12);
}

.form-input::placeholder {
    color: var(--text-muted);
    opacity: 1; /* Necessario per alcuni browser */
}

textarea.form-input {
    resize: vertical;
    min-height: 110px;
}

.btn-submit-form {
    width: 100%;
    border: none;
    cursor: pointer;
    text-align: center;
    margin-top: 5px;
}

.archive-link-container {
    margin-top: 15px;
}

.archive-btn {
    width: 100%;
    text-align: center;
}

/* --- RESPONSIVE DESIGN --- */
@keyframes scroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .clients-track {
        animation: none;
    }
}

@media (max-width: 768px) {
    .hero-stage-home {
        height: 85vh;
    }

    .dark-content-section,
    .main-content-wrapper {
        padding: 50px 20px;
    }

    .design-grid-hero {
        grid-template-columns: 1fr;
    }
}