/* Stili Generali e Reset */
html {
    scroll-behavior: smooth; /* Manteniamo il fallback, ma Lenis lo sovrascriverà */
    scroll-snap-type: y mandatory; /* Abilita lo scroll snap sull'asse Y (verticale) e rendilo obbligatorio */
    scroll-padding-top: 84px; /* Compensa l'altezza dell'header fisso per lo snap */
    scroll-padding-bottom: 100px;/* Potrebbe essere utile anche scroll-padding-bottom se hai un footer molto grande */
}

/* Modifica la tua regola esistente per .fullscreen-section */
.fullscreen-section {
    min-height: calc(100vh - 160px); /* L'altezza che hai scelto */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start; /* Ogni sezione si aggancerà all'inizio della viewport */
}


:root {
    --dark-anthracite: #2C2C2C;
    --main-blue: #4A6FA5; /* Blu acciaio */
    /* --main-blue: #3498db; /* Alternativa azzurro professionale */
    --white-text: #FFFFFF;
    --dark-text: #2C2C2C;
    --light-gray: #F5F5F5;
    --font-family: 'Poppins', sans-serif; /* O 'Open Sans', sans-serif; */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--dark-anthracite); /* Sfondo generale scuro */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 84px;
}

a {
    color: var(--main-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--white-text); /* Colore hover per link */
}





h1, h2, h3, h4, h5, h6 {
    color: var(--white-text); /* Colore di default per i titoli */
    margin-bottom: 0.8em;
    font-weight: 600;
}

h1 {
    font-size: 4em; /* Dimensioni generose */
    line-height: 1.2;
}

h2 {
    font-size: 3em;
}

h3 {
    font-size: 1.8em;
}

p {
    margin-bottom: 1em;
    font-size: 1.1em;
    line-height: 1.8;
}

/* Sezioni Fullscreen */
.fullscreen-section {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px; /* Padding per evitare che il contenuto tocchi i bordi */
    position: relative; /* Necessario per il parallax */
    overflow: hidden; /* Per contenere il parallax */
}

.section-content {
    max-width: 900px;
    width: 100%;
    position: relative; /* Per le animazioni AOS */
    z-index: 2; /* Assicura che il contenuto sia sopra gli effetti di sfondo */
}

.centered-text {
    text-align: center;
}

/* Colori Sfondo Sezioni */
.dark-bg {
    background-color: var(--dark-anthracite);
    color: var(--white-text);
}

.dark-bg h1, .dark-bg h2, .dark-bg h3, .dark-bg p {
    color: var(--white-text);
}

.white-bg {
    background-color: var(--white-text);
    color: var(--dark-text);
}

.white-bg h1, .white-bg h2, .white-bg h3, .white-bg p {
    color: var(--dark-text);
}

.light-gray-bg {
    background-color: var(--light-gray);
    color: var(--dark-text);
}

.light-gray-bg h1, .light-gray-bg h2, .light-gray-bg h3, .light-gray-bg p {
    color: var(--dark-text);
}


/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(44, 44, 44, 0.95); /* Leggermente trasparente */
    z-index: 1000;
    padding: 20px 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo a {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--white-text);
}

.logo img {
  height: 40px;
  object-fit: contain;
}

@media (max-width: 768px) {
  .logo img {
    height: 22px;
  }
}

.nav-menu ul {
    list-style: none;
    display: flex;
}

.nav-menu li {
    margin-left: 40px;
}

.nav-menu a {
    color: var(--white-text);
    font-weight: 400;
    font-size: 1.1em;
    position: relative;
    padding-bottom: 5px;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--main-blue);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.hamburger-menu {
    display: none; /* Hidden on desktop */
    cursor: pointer;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    z-index: 1001;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--white-text);
    transition: all 0.3s ease;
}

.mobile-menu {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 44, 44, 0.98);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
    display: flex;
}

.mobile-menu ul {
    list-style: none;
    text-align: center;
}

.mobile-menu li {
    margin: 25px 0;
}

.mobile-menu a {
    color: var(--white-text);
    font-size: 2em;
    font-weight: 600;
    padding: 10px 20px;
}

.mobile-menu a:hover {
    color: var(--main-blue);
}

/* Hero Section Specifics */
.hero-section {
    background: url('../img/hero-bg.jpg') no-repeat center center/cover; /* Immagine di sfondo */
    color: var(--white-text);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-section h1 {
    font-size: 5em;
    margin-bottom: 0.2em;
}

.hero-section p {
    font-size: 1.5em;
    margin-bottom: 2em;
    font-weight: 300;
}

/* CTA Button */
.cta-button {
    display: inline-block;
    background-color: var(--main-blue);
    color: var(--white-text);
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: 2px solid var(--main-blue);
}

.cta-button:hover {
    background-color: transparent;
    border-color: var(--white-text);
    color: var(--white-text);
    transform: translateY(-3px);
}

/* Servizi Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.service-card {
    background-color: rgba(255, 255, 255, 0.08); /* Sfondo leggermente visibile */
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background-color 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
  	position: relative;
  	z-index: 1;
	overflow: hidden; /* Limita il contenuto interno ai bordi */
}

.service-card:hover {
    transform: translateY(-10px);
    background-color: rgba(255, 255, 255, 0.15);
}

.service-card h3 {
    color: var(--main-blue);
    font-size: 1.6em;
    margin-bottom: 15px;
}

.service-card p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1em;
}

.service-card .examples {
    font-size: 0.9em;
    margin-top: 10px;
}

.service-card .examples a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: underline;
}

.service-card .examples a:hover {
    color: var(--main-blue);
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.portfolio-item:hover {
    transform: scale(1.03);
}

.portfolio-item img {
    width: 100%;
    height: 300px; /* Altezza fissa per coerenza */
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(74, 111, 165, 0.8); /* Colore overlay */
    color: var(--white-text);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
    padding: 20px;
}

.portfolio-item:hover .overlay {
    opacity: 1;
}

.portfolio-item .overlay h3 {
    color: var(--white-text);
    margin-bottom: 10px;
    font-size: 1.8em;
}

.portfolio-item .overlay a {
    display: inline-block;
    background-color: var(--white-text);
    color: var(--dark-anthracite);
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9em;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.portfolio-item .overlay a:hover {
    background-color: var(--main-blue);
    color: var(--white-text);
}

/* Contact Section */
#contatti {
	min-height: 0vh;
}

.contact-container {
    display: flex;
    flex-wrap: wrap; /* Per la responsività */
    gap: 50px;
    margin-top: 50px;
    justify-content: center;
    align-items: flex-start; /* Allinea in alto gli elementi */
}

.contact-form {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    background-color: rgba(255, 255, 255, 0.08);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--white-text);
    font-family: var(--font-family);
    font-size: 1em;
    outline: none;
    transition: border-color 0.3s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--main-blue);
}

.contact-form .cta-button {
    width: auto; /* Sovrascrive il 100% per il bottone */
    padding: 15px 40px;
    cursor: pointer;
}

.form-message .success {
  color: #3498db; /* blu primario */
}

.form-message .error {
  color: #e74c3c; /* rosso armonico con palette */
}

.contact-info {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    padding: 20px;
}

.contact-info h3 {
    color: var(--main-blue);
    font-size: 1.4em;
    margin-bottom: 20px;
}

.contact-info p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1em;
    margin-bottom: 10px;
}

/* Footer */
.footer {
    background-color: var(--dark-anthracite);
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 30px 20px;
    font-size: 0.9em;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position:relative;
    z-index:2;
}

/* Media Queries per Responsive Design */
@media (max-width: 1024px) {
    .header {
        padding: 20px 20px;
    }
    .nav-menu .desktop-menu {
        display: none;
    }
    .hamburger-menu {
        display: flex;
    }
    .hero-section h1 {
        font-size: 3.5em;
    }
    .hero-section p {
        font-size: 1.2em;
    }
    h2 {
        font-size: 2.5em;
    }
    .services-grid, .portfolio-grid {
        grid-template-columns: 1fr; /* Colonna singola su schermi più piccoli */
    }
    .portfolio-item img {
        height: 250px;
    }
    .contact-container {
        flex-direction: column;
        align-items: center;
    }
    .contact-form, .contact-info {
        width: 100%;
        max-width: 600px; /* Limita larghezza per leggibilità su schermi più grandi ma non desktop */
    }
    .fullscreen-section {
        padding: 60px 15px;
    }
}

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.8em;
    }
    .hero-section p {
        font-size: 1em;
    }
    h2 {
        font-size: 2em;
    }
    .section-content {
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 15px 15px;
    }
    .logo a {
        font-size: 1.5em;
    }
    .hero-section h1 {
        font-size: 2.2em;
    }
    .cta-button {
        padding: 12px 25px;
        font-size: 1em;
    }
    .service-card {
        padding: 25px;
    }
    .contact-form {
        padding: 30px;
    }
}

.service-card .hover-circle {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.05) 80%, transparent 100%);
  filter: blur(45px);
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 0;
  z-index: 0; /* Resta sotto i contenuti */
  transition: opacity 0.2s ease, transform 0.05s ease;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}