/*
 * Marketing Master Ticino - Global Stylesheet
 *
 * Questo file CSS fornisce uno stile coerente e responsivo per tutte le pagine del sito.
 * Utilizza variabili CSS per facilitare la personalizzazione e la manutenibilità.
 */

/* -------------------------------------------------------------------------- */
/*                                 1. Variabili CSS                           */
/* -------------------------------------------------------------------------- */
:root {
    /* Colori Primari */
    --primary-color: #de4ada; /* Fucsia: RGB(222, 74, 218) */
    --primary-color-dark: #c743c3; /* Versione più scura per hover */
    --secondary-color: #6c757d; /* Grigio per testo secondario e bordi */
    --accent-color: #de4ada; /* Il fucsia è anche il colore d'accento */

    /* Colori del Testo */
    --text-color: #212529; /* Grigio scuro per il corpo del testo */
    --light-text-color: #f8f9fa; /* Grigio chiaro per testo su sfondi scuri */

    /* Colori di Sfondo */
    --background-light: #fdfdfd; /* Sfondo leggermente grigio per sezioni alternate */
    --background-dark: #343a40; /* Sfondo scuro per footer e elementi contrastanti */
    --white: #ffffff;
    --black: #000000;

    /* Bordi e Ombre */
    --border-color: #dee2e6; /* Colore standard per i bordi */
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.15);

    /* Font */
    --font-family-poppins: 'Poppins', sans-serif;
    --font-family-gothic: 'MedievalSharp', cursive;
    --font-size-base: 16px;

    /* Spaziatura */
    --spacing-xs: 8px;
    --spacing-sm: 15px;
    --spacing-md: 25px;
    --spacing-lg: 40px;
    --spacing-xl: 80px;
}

/* -------------------------------------------------------------------------- */
/*                                 2. Reset & Base                            */
/* -------------------------------------------------------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-poppins);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* -------------------------------------------------------------------------- */
/*                                 3. Tipografia                              */
/* -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--black);
}

h1 { font-size: 2.8em; }
h2 { font-size: 2.2em; }
h3 { font-size: 1.8em; }
h4 { font-size: 1.4em; }

p { margin-bottom: var(--spacing-md); }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color-dark);
    text-decoration: underline;
}

.section-intro {
    font-size: 1.15em;
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--spacing-xl);
    color: var(--secondary-color);
}

/* -------------------------------------------------------------------------- */
/*                                 4. Header                                  */
/* -------------------------------------------------------------------------- */
header {
    background-color: var(--white);
    padding: var(--spacing-md) 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.logo {
    width: 40%;
    margin: 15px auto;
}
.logo img {
    width: 100%;
    height: auto;
    vertical-align: middle;
}

nav ul {
    list-style: none;
    display: flex;
    gap: var(--spacing-md);
}

nav a {
    color: var(--text-color);
    font-weight: 600;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

nav a:hover,
nav a.active {
    background-color: var(--primary-color);
    color: var(--light-text-color);
}
nav a:hover, nav a.active {
    text-decoration: none;
}

/* -------------------------------------------------------------------------- */
/*                                 5. Footer                                  */
/* -------------------------------------------------------------------------- */
footer {
    background-color: var(--background-dark);
    color: var(--light-text-color);
    padding: var(--spacing-xl) 0;
    text-align: center;
    font-size: 0.9em;
}

footer p {
    margin-bottom: var(--spacing-sm);
}

footer a {
    color: var(--primary-color);
    margin: 0 var(--spacing-sm);
}

footer a:hover {
    color: var(--white);
    filter: brightness(1.2); /* Rende più chiaro */
}

.footer-links {
    margin-top: var(--spacing-md);
}

.legal-disclaimer {
    margin-top: var(--spacing-md);
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.7);
}

/* -------------------------------------------------------------------------- */
/*                                 6. Bottoni                                 */
/* -------------------------------------------------------------------------- */
.sandwich-menu {
    display: none; /* Hidden by default */
    background: none;
    border: none;
    font-size: 1.8em;
    cursor: pointer;
    color: var(--text-color);
}

.cta-button, .btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--light-text-color);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1em;
    text-align: center;
}

.cta-button:hover, .btn:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:focus, .cta-button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* -------------------------------------------------------------------------- */
/*                                 7. Sezioni Generali                        */
/* -------------------------------------------------------------------------- */
section {
    padding: var(--spacing-xl) 0;
}

section:nth-of-type(even) {
    background-color: var(--background-light);
}

/* -------------------------------------------------------------------------- */
/*                                 8. Index Page                              */
/* -------------------------------------------------------------------------- */
/* Hero Section */
#hero {
    position: relative;
    overflow: hidden; /* Nasconde le parti del video che escono */
    background-color: var(--background-dark); /* Colore di fallback se il video non carica */
    color: var(--light-text-color);
    text-align: center;
    padding: var(--spacing-xl) 0;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6));
    z-index: 1;
}

#hero .container {
    position: relative;
    z-index: 2; 
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 0;
    object-fit: cover; /* Assicura che il video copra l'area senza distorsioni */
}

#hero h1 {
    font-size: 3.5em;
    margin-bottom: var(--spacing-md);
    color: var(--light-text-color);
}

#hero .subtitle {
    font-size: 1.3em;
    max-width: 800px;
    margin: 0 auto var(--spacing-lg);
    color: rgba(255, 255, 255, 0.9);
}

.hero-ticino-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(5px);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-ticino-banner img {
    height: 80px;
}

.hero-ticino-banner p {
    font-size: 1.5em;
    font-weight: 600;
    color: var(--light-text-color);
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}


/* Specific fix for homepage services title */
#servizi-home h2 {
    text-align: center;
}

/* Servizi Grid (usato anche in cosa_faccaimo_ticino.html) */
.servizi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.servizio-card {
    background-color: var(--white);
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.servizio-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.servizio-card .icon {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.servizio-card h3 {
    font-size: 1.4em;
    margin-bottom: var(--spacing-sm);
}

.servizio-card p {
    font-size: 0.95em;
    color: var(--secondary-color);
}

/* Diorama Section */
#diorama-container {
    background-color: var(--background-light);
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.diorama-main-title {
    font-size: 2.5em;
    margin-bottom: var(--spacing-sm);
}

.diorama-sub-title {
    font-size: 1.1em;
    max-width: 700px;
    margin: 0 auto var(--spacing-lg);
    color: var(--secondary-color);
}

/* Glitch animation for Diorama title */
.diorama-main-title {
    position: relative;
    opacity: 0; /* Initially hidden */
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.diorama-main-title.in-view {
    opacity: 1;
    transform: translateY(0);
    animation: glitch 1s 0.5s; /* Animation runs after the fade-in */
}

@keyframes glitch {
    0% { transform: none; opacity: 1; }
    25% { transform: skew(-0.5deg, -0.5deg); opacity: 0.75; }
    50% { transform: none; opacity: 1; }
    75% { transform: skew(0.5deg, 0.5deg); opacity: 0.75; }
    100% { transform: none; opacity: 1; }
}

.diorama-main-title.in-view::before,
.diorama-main-title.in-view::after {
    content: 'Sherlock Holmes e lo strano caso';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-light);
    overflow: hidden;
}

.diorama-main-title.in-view::before {
    left: 2px;
    text-shadow: -2px 0 var(--primary-color);
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.diorama-main-title.in-view::after {
    left: -2px;
    text-shadow: -2px 0 var(--secondary-color), 2px 2px var(--primary-color);
    animation: glitch-anim-2 2s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% { clip-path: inset(40% 0 60% 0); }
    20% { clip-path: inset(10% 0 85% 0); }
    40% { clip-path: inset(55% 0 20% 0); }
    60% { clip-path: inset(30% 0 30% 0); }
    80% { clip-path: inset(80% 0 5% 0); }
    100% { clip-path: inset(50% 0 45% 0); }
}

@keyframes glitch-anim-2 {
    0% { clip-path: inset(70% 0 15% 0); }
    20% { clip-path: inset(90% 0 5% 0); }
    40% { clip-path: inset(35% 0 40% 0); }
    60% { clip-path: inset(60% 0 20% 0); }
    80% { clip-path: inset(10% 0 75% 0); }
    100% { clip-path: inset(80% 0 5% 0); }
}

.diorama-instructions {
    max-width: 700px;
    margin: calc(var(--spacing-lg) * -0.5) auto var(--spacing-lg); /* Spazio negativo per avvicinarlo al titolo */
    padding: var(--spacing-md);
    background-color: var(--white);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    text-align: left;
    box-shadow: var(--shadow-sm);
}

.diorama-instructions h4 {
    font-size: 1.2em;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    text-align: center;
}

.diorama-instructions ul {
    list-style: none;
    padding-left: 0;
}

.diorama-instructions li {
    margin-bottom: var(--spacing-xs);
    font-size: 0.95em;
    color: var(--text-color);
}

#gameContainer {
    display: flex;
    flex-direction: column; /* Default to column for smaller screens */
    align-items: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

#controls {
    background-color: var(--white);
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 300px;
    text-align: left;
}

#controls h3 {
    margin-bottom: var(--spacing-md);
    color: var(--text-color);
}

#figurinesContainer {
    display: grid;
    /* Changed from fixed 6 columns to auto-fit with minmax for better responsiveness */
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: var(--spacing-md);
    max-height: 400px; /* Limita l'altezza per lo scroll */
    overflow-y: auto;
    padding-right: var(--spacing-xs); /* Spazio per la scrollbar */
}

.figurine {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: var(--spacing-xs);
    text-align: center;
    cursor: grab;
    background-color: var(--background-light);
    transition: all 0.2s ease;
    user-select: none; /* Impedisce la selezione del testo */
}

.figurine-img-wrapper {
    height: 50px; /* Fixed height for alignment */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-xs);
}

.figurine-name {
    font-family: var(--font-family-gothic);
    font-size: 0.9em;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-color);
}

.figurine-img-wrapper img {
    width: 100%; /* Ensure image fills its wrapper */
    height: auto;
    max-height: 100%;
}

.figurine:hover {
    background-color: #e9ecef;
    box-shadow: var(--shadow-sm);
}

.figurine img {
    max-width: 100%;
    height: auto;
    max-height: 100%; /* Ensure image fits within the wrapper */
    display: block;
    margin: 0 auto;
    pointer-events: none; /* Permette il drag del div, non dell'immagine */
}

.figurine.dragging {
    opacity: 0.5;
    border-style: dashed;
}

#gameBoard {
    width: 100%;
    max-width: 800px;
    height: 500px;
    background: url('image/tavola.png') no-repeat center center/cover; /* Immagine di sfondo per la tavola */
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    perspective: 1000px; /* Abilita l'effetto parallax 3D */
    transform-style: preserve-3d;
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Allinea i bottoni in basso */
    padding-bottom: var(--spacing-md);
}

#gameBoard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.1) 100%);
    opacity: 0.5;
    pointer-events: none; /* Non blocca gli eventi del mouse */
}

.placed-figurine {
    position: absolute;
    cursor: grab;
    width: 40px; /* Ridotto del 50% */
    height: 40px; /* Ridotto del 50% */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out, opacity 0.3s ease, left 0.1s linear, top 0.1s linear; /* Add left/top for smoother touch drag */
    z-index: 10; /* Z-index base per le figurine */
}

.placed-figurine img {
    max-width: 100%; /* L'immagine si adatta al nuovo width/height del parent */
    height: auto;
    display: block;
    pointer-events: none; /* Permette il click/drag del div genitore */
}

.placed-figurine .character-base {
    width: 80%; /* Aumentato per proporzione */
    height: 3px; /* Ridotto per proporzione */
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    position: absolute;
    bottom: 0;
    transform: translateZ(-1px); /* Leggermente dietro il personaggio per effetto ombra */
}

.placed-figurine.focused {
    z-index: 100; /* Z-index più alto quando in focus */
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
    box-shadow: 0 0 15px rgba(222, 74, 218, 0.5);
}

.placed-figurine.dimmed {
    opacity: 0.3;
}

#tooltip {
    position: absolute;
    background-color: var(--background-dark);
    color: var(--light-text-color);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 4px;
    font-size: 0.8em;
    white-space: nowrap;
    pointer-events: none; /* Non blocca gli eventi del mouse */
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 1001;
    transform: translateX(-50%);
}

#tooltip.show {
    opacity: 1;
}

#analyzeBtn, #resetBtn {
    position: absolute;
    bottom: var(--spacing-md);
    z-index: 20; 
    padding: calc(var(--spacing-xs) / 2) var(--spacing-sm); /* Padding ridotto */
    font-size: 0.8em; /* Font più piccolo */
    opacity: 0.7; /* Leggermente trasparente di default */
    transition: all 0.3s ease; /* Transizione per tutti gli stati */
}

#analyzeBtn {
    left: 50%;
    transform: translateX(-50%);
}

#analyzeBtn:hover, #resetBtn:hover {
    opacity: 1; /* Opacità piena su hover */
}

#resetBtn {
    left: calc(50% + 100px); /* Posiziona a destra di analyzeBtn */
    transform: translateX(-50%);
    background-color: var(--secondary-color);
}

#resetBtn:hover {
    filter: brightness(0.85);
} 

/* Modal per i risultati */
#resultModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#resultModal.show {
    opacity: 1;
    visibility: visible;
}

/* Stili per il modale di conferma */
#confirmModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#confirmModal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--white);
    padding: var(--spacing-lg);
    border-radius: 8px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    text-align: left;
}

.modal-content .close {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    font-size: 1.8em;
    cursor: pointer;
    color: var(--secondary-color);
}

.modal-content .close:hover {
    color: var(--text-color);
}

#personalityResult {
    margin-top: var(--spacing-md);
    font-size: 1em;
}

.modal-content h3 {
    font-size: 1.5em;
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
    text-align: center;
}

.modal-content p {
    text-align: center;
}

/* Stile personalizzato per il modale di conferma */
#confirmModal .modal-content {
    background-color: #f5e8d0; /* Colore pergamena */
    border: 4px solid #5a3a22; /* Bordo marrone scuro */
    max-width: 500px;
    box-shadow: 0 0 25px rgba(0,0,0,0.6);
}

#confirmModal .modal-content h3 {
    font-family: var(--font-family-gothic);
    color: #5a3a22;
    font-size: 2em;
}

#confirmModal .modal-content p {
    font-family: var(--font-family-gothic);
    color: #3d2b1f;
    font-size: 1.3em;
    line-height: 1.5;
}

#confirmModal .modal-buttons .btn {
    font-family: var(--font-family-gothic);
    font-size: 1.1em;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.btn.btn-secondary {
    background-color: var(--secondary-color);
}

.btn.btn-secondary:hover {
    filter: brightness(0.85);
}

#personalityResult p {
    margin-bottom: var(--spacing-sm);
}

/* Modal per le istruzioni */
#instructionsModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#instructionsModal.show {
    opacity: 1;
    visibility: visible;
}

#instructionsModal .instructions-modal-content {
    background-color: #f5e8d0; /* Colore pergamena come confirmModal */
    border: 4px solid #5a3a22; /* Bordo marrone scuro */
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 0 25px rgba(0,0,0,0.6);
}

#instructionsModal .instructions-modal-content h3 {
    font-family: var(--font-family-gothic);
    color: #5a3a22;
    font-size: 2em;
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

#instructionsModal .instructions-modal-content h4 {
    font-family: var(--font-family-gothic);
    color: #5a3a22;
    font-size: 1.4em;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
    border-bottom: 2px solid #5a3a22;
    padding-bottom: var(--spacing-xs);
}

#instructionsModal .instructions-modal-content p {
    font-family: var(--font-family-gothic);
    color: #3d2b1f;
    font-size: 1.1em;
    line-height: 1.7;
    margin-bottom: var(--spacing-md);
    text-align: left;
}

#instructionsModal .instructions-intro {
    font-style: italic;
    text-align: center !important;
    background-color: rgba(90, 58, 34, 0.1);
    padding: var(--spacing-md);
    border-radius: 8px;
    margin-bottom: var(--spacing-lg);
}

#instructionsModal .warning-text {
    background-color: rgba(220, 53, 69, 0.1);
    border-left: 4px solid #5a3a22;
    padding: var(--spacing-md);
    margin-top: var(--spacing-lg);
    font-weight: 600;
}

#instructionsModal .instructions-footer {
    text-align: center !important;
    font-style: italic;
    font-size: 0.9em;
    color: #8b6f47;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid #d4c4a8;
}

#instructionsModal .close {
    color: #5a3a22;
}

#instructionsModal .close:hover {
    color: #3d2b1f;
}

.instructions-link {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s ease;
}

.instructions-link:hover {
    color: var(--secondary-color);
}

/* -------------------------------------------------------------------------- */
/*                        8. Sezione Start-up & Offerta                       */
/* -------------------------------------------------------------------------- */

#startup-focus {
    padding: var(--spacing-xl) 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

#startup-focus h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    font-size: 2.2em;
}

#startup-focus .section-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--spacing-xl) auto;
    font-size: 1.2em;
    color: var(--text-color);
}

/* Offerta Novembre Box */
.offerta-novembre-box {
    background: white;
    border-radius: 12px;
    padding: var(--spacing-xl);
    margin: var(--spacing-xl) 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 3px solid var(--primary-color);
    position: relative;
}

.offerta-badge {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1em;
    display: block;
    text-align: center;
    width: fit-content;
    margin: 0 auto var(--spacing-md);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.offerta-novembre-box h3 {
    color: var(--primary-color);
    font-size: 2em;
    margin-bottom: var(--spacing-sm);
    text-align: center;
}

.offerta-subtitle {
    text-align: center;
    font-size: 1.2em;
    color: var(--text-color);
    margin-bottom: var(--spacing-xl);
}

/* Pacchetto Grid */
.pacchetto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin: var(--spacing-xl) 0;
}

.pacchetto-item {
    background: #f8f9fa;
    padding: var(--spacing-lg);
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.pacchetto-item:hover {
    background: white;
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.pacchetto-item i {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.pacchetto-item h4 {
    color: var(--primary-color);
    font-size: 1.3em;
    margin-bottom: var(--spacing-sm);
}

.pacchetto-item p {
    color: var(--text-color);
    font-size: 1em;
}

/* Prezzo Offerta */
.prezzo-offerta {
    text-align: center;
    margin: var(--spacing-xl) 0;
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.prezzo-vecchio {
    font-size: 1.5em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--spacing-sm);
}

.prezzo-nuovo {
    font-size: 3em;
    font-weight: 700;
    color: white;
    margin: 0;
}

.prezzo-nuovo .small-text {
    font-size: 0.4em;
    font-weight: 400;
    display: block;
    margin-top: var(--spacing-xs);
}

/* CTA Offerta */
.cta-offerta {
    text-align: center;
    margin-top: var(--spacing-xl);
}

.btn-large {
    padding: 18px 40px;
    font-size: 1.2em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
    animation: btn-glow 2s infinite;
}

@keyframes btn-glow {
    0%, 100% {
        box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 5px 30px rgba(102, 126, 234, 0.6);
    }
}

.btn-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.5);
}

.garanzie {
    margin-top: var(--spacing-md);
    font-size: 1em;
    color: var(--text-color);
    font-weight: 600;
}

/* Benefici Start-up */
.startup-benefici {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: white;
    border-radius: 8px;
}

.startup-benefici h3 {
    color: var(--primary-color);
    font-size: 1.8em;
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.benefici-list {
    list-style: none;
    padding: 0;
    max-width: 800px;
    margin: 0 auto;
}

.benefici-list li {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 1.1em;
    position: relative;
    padding-left: 50px;
}

.benefici-list li::before {
    content: '✓';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.benefici-list li strong {
    color: var(--primary-color);
}

/* Start-up Testimonial on Servizi Page */
.startup-testimonial {
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 5px solid var(--primary-color);
    border-radius: 8px;
}

.startup-testimonial blockquote {
    margin: 0;
    font-style: italic;
}

.startup-testimonial p {
    font-size: 1.1em;
    line-height: 1.8;
    color: #495057;
    margin-bottom: 15px;
}

.startup-testimonial cite {
    display: block;
    text-align: right;
    color: var(--primary-color);
    font-weight: 600;
    font-style: normal;
    margin-top: 10px;
}

/* FAQ Start-up Section */
.faq-startup {
    margin-top: 50px;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.faq-startup h3 {
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 1.8em;
    text-align: center;
}

.faq-item {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

.faq-item h4 {
    color: var(--text-color);
    margin-bottom: 12px;
    font-size: 1.2em;
}

.faq-item p {
    color: #6c757d;
    line-height: 1.7;
    margin: 0;
}

/* -------------------------------------------------------------------------- */
/*                      8b. Marketing Start-up Landing Page                   */
/* -------------------------------------------------------------------------- */

/* Hero Section for Landing Page */
#hero-startup {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#hero-startup h1 {
    font-size: 2.8em;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3em;
    margin-bottom: 40px;
    opacity: 0.95;
}

.hero-price-box {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    max-width: 600px;
    margin: 0 auto 40px;
    border: 2px solid rgba(255,255,255,0.3);
}

.hero-price-old {
    font-size: 1.5em;
    color: rgba(255,255,255,0.7);
    margin-bottom: 10px;
}

.hero-price-main {
    font-size: 4em;
    font-weight: 700;
    margin-bottom: 10px;
}

.hero-price-main span {
    font-size: 0.4em;
    opacity: 0.9;
}

.hero-price-subtitle {
    font-size: 1.2em;
    margin-bottom: 15px;
    font-weight: 600;
}

.hero-includes {
    font-size: 1em;
    opacity: 0.9;
}

.hero-cta {
    margin-top: 30px;
}

.hero-guarantee {
    color: white;
    margin-top: 15px;
    font-size: 0.95em;
    opacity: 0.9;
}

/* Problems Section */
#startup-problems {
    padding: var(--spacing-xl) 20px;
}

.problems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.problem-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid #e9ecef;
    transition: all 0.3s;
}

.problem-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.15);
}

.problem-icon {
    font-size: 3em;
    margin-bottom: 20px;
}

.problem-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4em;
}

.problem-card p {
    color: #6c757d;
    line-height: 1.7;
}

.reality-check {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 40px;
    border-radius: 12px;
    margin-top: 50px;
    text-align: center;
}

.reality-check h3 {
    font-size: 1.8em;
    margin-bottom: 20px;
}

.reality-check p {
    font-size: 1.2em;
    line-height: 1.8;
}

/* Solution Section */
.solution-breakdown {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.solution-items {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.solution-item {
    display: flex;
    gap: 20px;
    background: white;
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.solution-item i {
    font-size: 2em;
    color: var(--primary-color);
    min-width: 40px;
}

.solution-item h4 {
    color: var(--text-color);
    margin-bottom: 10px;
    font-size: 1.3em;
}

.solution-item p {
    color: #6c757d;
    line-height: 1.7;
    margin-bottom: 8px;
}

.solution-item small {
    display: block;
    margin-top: 10px;
    color: #868e96;
    font-style: italic;
}

.solution-sticky-box {
    position: sticky;
    top: 100px;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border: 3px solid var(--primary-color);
}

.offerta-badge-large {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.price-old-large {
    text-align: center;
    font-size: 1.5em;
    color: #adb5bd;
    margin-bottom: 10px;
}

.price-large {
    text-align: center;
    font-size: 3em;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.price-large span {
    font-size: 0.5em;
    opacity: 0.8;
}

.price-note {
    text-align: center;
    color: #6c757d;
    margin-bottom: 25px;
}

.included-bonus, .timing-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.included-bonus h4, .timing-box h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.included-bonus ul, .timing-box ul {
    list-style: none;
    padding: 0;
}

.included-bonus li, .timing-box li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: #495057;
}

.included-bonus li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: 700;
}

.cta-urgency {
    text-align: center;
    margin-top: 15px;
    color: #dc3545;
    font-weight: 600;
}

/* Process Steps */
.process-steps {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 900px;
    margin: 40px auto;
}

.process-step {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.step-number {
    min-width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    flex: 1;
}

.step-content h3 {
    color: var(--primary-color);
    margin-bottom: 12px;
}

.step-content p {
    color: #6c757d;
    line-height: 1.7;
}

/* Testimonials Grid */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.testimonial-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.testimonial-stars {
    color: #ffc107;
    font-size: 1.2em;
    margin-bottom: 15px;
}

.testimonial-card p {
    color: #495057;
    line-height: 1.8;
    font-style: italic;
    margin-bottom: 20px;
}

.testimonial-author {
    border-top: 2px solid #e9ecef;
    padding-top: 15px;
    color: #6c757d;
}

.testimonial-author strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 5px;
}

/* FAQ List */
.faq-list {
    max-width: 900px;
    margin: 40px auto;
}

.faq-list .faq-item {
    margin-bottom: 25px;
}

.faq-list .faq-item h3 {
    color: var(--primary-color);
    font-size: 1.3em;
    margin-bottom: 12px;
}

.faq-list .faq-item p {
    color: #495057;
    line-height: 1.8;
}

/* Form Section */
#form-contatto {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: var(--spacing-xl) 20px;
}

#form-contatto h2 {
    color: white;
}

.white-text {
    color: white !important;
    opacity: 0.95;
}

.form-wrapper {
    max-width: 700px;
    margin: 40px auto;
}

#contactForm {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.2);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: white;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    font-size: 1em;
    background: rgba(255,255,255,0.9);
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: white;
    background: white;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

.form-note {
    text-align: center;
    margin-top: 15px;
    color: white;
    opacity: 0.9;
}

.contact-alternative {
    text-align: center;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid rgba(255,255,255,0.2);
}

.contact-alternative p {
    color: white;
    margin-bottom: 15px;
}

.phone-big {
    display: inline-block;
    font-size: 2em;
    font-weight: 700;
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.phone-big:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

.contact-person {
    color: white;
    font-size: 1.1em;
    opacity: 0.95;
}

.privacy-section {
    max-width: 700px;
    margin: 40px auto;
    padding: 30px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.2);
}

.privacy-section h4 {
    color: white;
    margin-bottom: 15px;
}

.privacy-section p {
    color: white;
    opacity: 0.9;
    line-height: 1.7;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .solution-breakdown {
        grid-template-columns: 1fr;
    }

    .solution-sticky-box {
        position: relative;
        top: 0;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    #hero-startup h1 {
        font-size: 2em;
    }

    .hero-price-main {
        font-size: 3em;
    }

    .hero-ticino-banner {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
        text-align: center;
    }

    .hero-ticino-banner img {
        height: 60px;
    }

    .hero-ticino-banner p {
        font-size: 1.2em;
    }
}

/* -------------------------------------------------------------------------- */
/*                             9. Servizi Page                                */
/* -------------------------------------------------------------------------- */
/* Processo Timeline */
#processo {
    text-align: center;
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: var(--spacing-xl) auto;
    padding: var(--spacing-md) 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    z-index: 1;
}

.timeline-item {
    padding: var(--spacing-md) 0;
    position: relative;
    width: 50%;
    text-align: left;
    z-index: 2;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: var(--spacing-xl);
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: var(--spacing-xl);
}

.timeline-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--light-text-color);
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    font-size: 1.5em;
    position: absolute;
    top: 25px;
    right: -25px;
    z-index: 3;
    box-shadow: 0 0 0 3px var(--white), 0 0 0 6px var(--primary-color);
} 

.timeline-item:nth-child(even) .timeline-icon {
    left: -25px;
    right: auto;
}

.timeline-arrow {
    position: absolute;
    top: 40px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    z-index: 3;
}

.timeline-item:nth-child(odd) .timeline-arrow {
    border-left: 10px solid var(--primary-color);
    right: -10px;
}

.timeline-item:nth-child(even) .timeline-arrow {
    border-right: 10px solid var(--primary-color);
    left: -10px;
}

.timeline-content {
    background-color: var(--white);
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.timeline-content h3 {
    margin-top: 0;
    font-size: 1.2em;
    color: var(--primary-color);
}

.timeline-content p {
    font-size: 0.9em;
    margin-bottom: 0;
}

/* -------------------------------------------------------------------------- */
/*                             10. Chi Siamo Page                             */
/* -------------------------------------------------------------------------- */
.hero-chi-siamo {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('image/chisiamo/hero-chisiamo-bg.jpg') no-repeat center center/cover;
    /* Assicurati che 'image/chisiamo/hero-chisiamo-bg.jpg' esista o rimuovi/sostituisci */
    color: var(--light-text-color);
    text-align: center;
    padding: var(--spacing-xl) 0;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-chi-siamo h1 {
    font-size: 3em;
    color: var(--light-text-color);
}

.hero-chi-siamo .section-intro {
    color: rgba(255, 255, 255, 0.9);
}

.content-section {
    padding: var(--spacing-xl) 0;
}

.content-section .row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--spacing-lg);
}

.content-section .col-image,
.content-section .col-text {
    flex: 1;
    min-width: 300px; /* Assicura che le colonne non diventino troppo piccole */
}

.content-section .col-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.content-section h2 {
    font-size: 2em;
    margin-bottom: var(--spacing-md);
}

/* -------------------------------------------------------------------------- */
/*                             11. Contatti Page                              */
/* -------------------------------------------------------------------------- */

/* 11.0. Contact Hero Section */
#contatti-hero {
    background-color: var(--primary-color); /* Colore distintivo per la hero dei contatti */
    color: var(--light-text-color);
    text-align: center;
    padding: var(--spacing-xl) 0;
    min-height: 300px; /* Altezza minima */
    display: flex;
    align-items: center;
    justify-content: center;
}

#contatti-hero h1 {
    font-size: 3em;
    color: var(--light-text-color); /* Titolo bianco */
    margin-bottom: var(--spacing-md);
}

#contatti-hero .section-intro {
    color: rgba(255, 255, 255, 0.9); /* Testo leggermente trasparente */
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* 11.1. Contact Options Section */
#contatti-options {
    padding: var(--spacing-xl) 0;
    background-color: var(--background-light); /* Sfondo leggero per contrasto */
}

.contatti-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.contatto-card {
    background-color: var(--white);
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 11.3. Floating Contact Buttons */
.floating-contact-buttons {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: row;
    gap: 15px;
    z-index: 1000;
}
    
.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8em;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.floating-btn:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
    color: white;
    text-decoration: none;
}

.floating-btn.phone-btn {
    background-color: #343a40; /* Grigio scuro */
}

.floating-btn.whatsapp-btn {
    background-color: #25D366; /* Verde WhatsApp */
}

.floating-btn.mail-btn {
    background-color: #c71610; /* Rosso per email */
}


#contatti-options .contatto-card:hover { /* Specificity for hover */
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.contatto-card .icon {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.contatto-card h3 {
    font-size: 1.4em;
    margin-bottom: var(--spacing-sm);
    color: var(--text-color);
}

.contatto-card p {
    font-size: 0.95em;
    color: var(--secondary-color);
    flex-grow: 1;
    margin-bottom: var(--spacing-md);
}

.contatto-card .btn {
    margin-top: auto;
    width: 100%;
}

/* 11.2. Contact Form Section */
/* Stili per la sezione con il form di contatto */
#contact-form-section { /* This section already exists, just adding a comment for clarity */
    background-color: var(--background-light);
}

#contact-form-section h2,
#contact-form-section .section-intro {
    text-align: center;
}

#contact-form-section form {
    max-width: 600px;
    margin: var(--spacing-lg) auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

#contact-form-section form input,
#contact-form-section form textarea {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: var(--font-family-poppins);
    font-size: 1em;
}

#contact-form-section form input:focus,
#contact-form-section form textarea:focus {
    outline: 2px solid var(--primary-color);
    border-color: transparent;
}

#contact-form-section form textarea {
    min-height: 120px;
    resize: vertical;
}

/* -------------------------------------------------------------------------- */
/*                           11.5. Portfolio Page                             */
/* -------------------------------------------------------------------------- */
#portfolio {
    text-align: center;
}

#client-logos-container {
    margin-top: var(--spacing-xl);
    background-color: var(--white);
    padding: var(--spacing-lg);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

#client-logos-container h3 {
    margin-bottom: var(--spacing-lg);
    font-size: 1.6em;
    color: var(--secondary-color);
}

.client-logos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--spacing-lg);
    align-items: center;
    justify-items: center;
}

.client-logos-grid img {
    max-width: 100%;
    height: auto;
    max-height: 60px; /* Limita l'altezza per uniformità */
    transition: transform 0.3s ease;
}

.client-logos-grid img:hover {
    transform: scale(1.3);
}

/* -------------------------------------------------------------------------- */
/*                             11.8. CTA Path                                 */
/* -------------------------------------------------------------------------- */
.cta-path {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    text-align: center;
    padding: var(--spacing-lg) 0;
}

.cta-path h2 {
    color: var(--light-text-color);
    margin-bottom: var(--spacing-md);
}

.cta-path p {
    max-width: 600px;
    margin: 0 auto var(--spacing-lg);
    opacity: 0.9;
}

.cta-path .cta-button {
    background-color: var(--white);
    color: var(--primary-color);
    font-size: 1.1em; 
}

.cta-path .cta-button:hover {
    background-color: var(--white);
    filter: brightness(0.95);
}

/* -------------------------------------------------------------------------- */
/*                             12. Media Queries                              */
/* -------------------------------------------------------------------------- */
@media (min-width: 769px) {
    #controls {
        max-width: 800px; /* Occupa la stessa larghezza della tavola */
    }

    #figurinesContainer {
        /* Ripristina un layout a 6 colonne fisse solo per desktop per garantire leggibilità */
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 992px) {
    h1 { font-size: 2.5em; }
    h2 { font-size: 2em; }
    #hero h1 { font-size: 3em; }
    .hero-chi-siamo h1 { font-size: 2.5em; }

    .timeline::after {
        left: 20px; /* Sposta la linea a sinistra */
    }

    .timeline-item {
        width: 100%;
        padding-left: var(--spacing-xl); /* Spazio per icona e freccia */
        padding-right: var(--spacing-md);
    }

    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0; /* Allinea tutti gli item a sinistra */
    }

    .timeline-icon {
        left: 0; /* Sposta l'icona a sinistra */
        right: auto;
    }

    .timeline-item:nth-child(odd) .timeline-arrow,
    .timeline-item:nth-child(even) .timeline-arrow {
        border-left: 10px solid var(--primary-color); /* Freccia a sinistra */
        border-right: none;
        left: 10px;
        right: auto;
    }

    .content-section .row {
        flex-direction: column; /* Impila le colonne */
        gap: var(--spacing-md);
    }

    .content-section .reverse-columns {
        flex-direction: column-reverse; /* Inverte l'ordine per mobile */
    }
}
/* Stili Pagina Contatti Nuova - Spostato qui per coerenza */
@media (max-width: 768px) {
    .sandwich-menu {
        display: block;
        position: absolute;
        top: 50%;
        right: 20px;
        transform: translateY(-50%);
        z-index: 1001;
    }

    header .container {
        position: relative;
        flex-direction: column;
        align-items: center;
    }

    nav {
        display: none;
        width: 100%;
        margin-top: 20px;
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-sm);
    }

    /* Typography */
    h1 { font-size: 2.2em; }
    h2 { font-size: 1.8em; }
    h3 { font-size: 1.5em; }

    /* Hero Section */
    #hero h1 { font-size: 2.5em; }
    #hero .subtitle { font-size: 1.1em; }
    .hero-chi-siamo h1 { font-size: 2em; }

    /* Grids */
    .servizi-grid,
    .pacchetto-grid, 
    .offerta-servizi-grid {
        grid-template-columns: 1fr; /* Una colonna per i servizi */
        gap: var(--spacing-md);
    }

    .pacchetto-item, .offerta-servizio-item {
        padding: var(--spacing-md); /* Aumentato il padding per più aria */
    }

    .pacchetto-item i, .offerta-servizio-item .icon {
        font-size: 2.5em;
        margin-bottom: var(--spacing-sm);
    }
    
    .offerta-servizio-item h3 {
        font-size: 1.3em;
    }
    
    .offerta-servizio-item p {
        font-size: 0.95em;
    }

    /* Logo */
    .logo {
        width: 65%;
        margin: 15px auto;
    }
    .logo img {
        width: 100%;
        height: auto;
    }

    /* Diorama */
    #gameBoard {
        height: 400px;
    }

    #analyzeBtn, #resetBtn {
        position: static; /* Rimuove il posizionamento assoluto */
        transform: none;
        margin-top: var(--spacing-sm);
        width: 80%; /* Rende i bottoni più larghi */
    }

    #gameBoard {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        align-items: center;
        gap: var(--spacing-sm);
    }
    .placed-figurine {
        width: 50px; /* Slightly larger for touch */
        height: 50px;
    }

    #gameContainer {
        flex-direction: column;
    }

    #controls {
        max-width: 100%;
    }

    /* Floating Buttons */
    .floating-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5em;
    }

    .floating-contact-buttons {
        gap: 10px;
    }

    /* Process Steps */
    .process-step {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* Stili per la griglia dell'offerta speciale (es. cosa_faccaimo_ticino.html) */
.offerta-servizi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin: var(--spacing-xl) 0;
}

.offerta-servizio-item {
    background: var(--white);
    padding: var(--spacing-lg);
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
    display: flex;
    flex-direction: column;
}

.offerta-servizio-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.offerta-servizio-item .icon {
    font-size: 3.5em;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.offerta-servizio-item h3 {
    font-size: 1.5em;
    margin-bottom: var(--spacing-sm);
    color: var(--text-color);
    flex-shrink: 0;
}

.offerta-servizio-item p {
    font-size: 1em;
    color: var(--secondary-color);
    flex-grow: 1;
    margin-bottom: var(--spacing-md);
}

.offerta-servizio-item .btn {
    margin-top: auto;
}



@media (max-width: 768px) {
    /* Stili unificati per tablet */
    .pacchetto-grid, .offerta-servizi-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .pacchetto-item, .offerta-servizio-item {
        padding: var(--spacing-md);
    }

    .pacchetto-item i, .offerta-servizio-item .icon {
        font-size: 2.5em;
    }
    
    .offerta-servizio-item h3 {
        font-size: 1.3em;
    }
    
    .offerta-servizio-item p {
        font-size: 0.95em;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2em; }
    h2 { font-size: 1.8em; }
    h3 { font-size: 1.5em; }
    .section-intro { font-size: 1em; }
    #hero h1 { font-size: 2em; }
    .hero-chi-siamo h1 { font-size: 1.8em; }

    .logo img {
        max-width: 250px;
    }

    nav a {
        padding: var(--spacing-xs) 10px;
        font-size: 0.9em;
        white-space: nowrap;
    }

    .cta-button, .btn {
        font-size: 0.9em;
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    nav ul {
        gap: var(--spacing-sm);
    }

    .modal-content {
        padding: var(--spacing-md);
    }

    #figurinesContainer {
        grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
        gap: var(--spacing-sm);
    }

    .figurine {
        padding: calc(var(--spacing-xs) / 2);
    }

    .figurine-name {
        font-size: 0.65em;
    }

    #contatti-hero h1 {
        font-size: 2.2em;
    }

    #contact-form-section form label {
        word-break: break-word;
    }

    .floating-contact-buttons {
        bottom: 15px;
        right: 15px;
    }

    /* Offerta speciale su schermi molto piccoli */
    .offerta-servizio-item {
        padding: var(--spacing-sm);
    }

    .offerta-servizio-item h3 {
        font-size: 1.2em;
    }

    .offerta-servizio-item p {
        font-size: 0.9em;
    }
}

@media (max-width: 380px) {
    #hero h1 { font-size: 1.8em; } /* Ulteriore riduzione per schermi molto piccoli */
}