/* Reset & Basic Styles */
:root {
    --primary-color: #7fdbbb; /* Verde acqua originale */
    --secondary-color: #303c4e; /* Blu/Grigio scuro originale */
    --accent-color: #50b893; /* Verde pių scuro per hover */
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
    --text-color: #495057;
    --white: #ffffff;
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Raleway', sans-serif; /* Per titoli */

    --header-height: 70px; /* Altezza header per offset scroll */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%; /* 1rem = 10px */
    scroll-behavior: smooth; /* Abilita smooth scroll */
    scroll-padding-top: var(--header-height); /* Offset per header fisso */
}

body {
    font-family: var(--font-primary);
    font-size: 1.6rem; /* Default font size */
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden; /* Previene scroll orizzontale */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

h1 {
    font-size: 4.5rem;
    font-weight: 800;
}

h2 {
    font-size: 3.5rem;
}

h3 {
    font-size: 2.4rem;
}

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

    a:hover {
        color: var(--accent-color);
    }

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* Utility Classes */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 2rem; /* Padding laterale */
}

.section-padding {
    padding: 8rem 0;
}

.bg-light {
    background-color: var(--light-gray);
}

.text-center {
    text-align: center;
}

.highlight {
    color: var(--primary-color);
}

.section-subtitle {
    display: block;
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.section-title {
    margin-bottom: 4rem;
}

/* Grid System (Semplice - Usato in About e Services) */
.grid {
    display: grid;
    gap: 3rem;
}

.grid-2-cols {
    grid-template-columns: 1fr; /* Default: 1 colonna */
}

.grid-3-cols {
    grid-template-columns: 1fr; /* Default: 1 colonna */
}

@media (min-width: 768px) {
    .grid-2-cols {
        grid-template-columns: repeat(2, 1fr);
        align-items: center; /* Allinea elementi verticalmente */
    }

    .grid-3-cols {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1.2rem 3rem;
    border-radius: 5px;
    font-weight: 700;
    font-size: 1.6rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: 2px solid var(--primary-color);
}

    .btn-primary:hover {
        background-color: var(--accent-color);
        border-color: var(--accent-color);
        color: var(--white);
        transform: translateY(-2px);
    }

/* Header & Navigation */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

    /* Stile header 'scrolled' aggiunto via JS */
    .main-header.scrolled {
        background-color: rgba(255, 255, 255, 0.95);
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    }

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 2.4rem;
    font-weight: 800;
    font-family: var(--font-secondary);
    color: var(--secondary-color);
}

    .nav-logo:hover {
        color: var(--secondary-color);
    }
    /* No cambio colore su hover logo */

    .nav-logo img {
        height: 40px;
        margin-right: 1rem;
    }

    .nav-logo span {
        /* Stile base per il testo accanto al logo */
        font-size: 2rem; /* Dimensione default */
        font-weight: 700;
    }

.nav-menu {
    display: flex;
    gap: 3rem;
}

.nav-link {
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--secondary-color);
    position: relative;
    padding-bottom: 0.5rem;
}

    .nav-link::after { /* Effetto sottolineatura su hover/active */
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 2px;
        background-color: var(--primary-color);
        transition: width 0.3s ease;
    }

    .nav-link:hover::after,
    .nav-link.active::after { /* .active aggiunto via JS */
        width: 100%;
    }

    .nav-link:hover,
    .nav-link.active { /* Colore primario su hover e link attivo */
        color: var(--primary-color);
    }

.nav-toggle {
    display: none; /* Nascosto su desktop */
    font-size: 2.5rem;
    color: var(--secondary-color);
    background: none;
    border: none;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 4rem;
    padding-left: 2rem;
    padding-right: 2rem;
    box-sizing: border-box;
    color: var(--white);
    text-align: center;
    background: linear-gradient(rgba(48, 60, 78, 0.7), rgba(48, 60, 78, 0.7));
    background-image: linear-gradient(rgba(48, 60, 78, 0.7), rgba(48, 60, 78, 0.7)), url('/images/2.jpg');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover; /* O 'contain' se preferisci */
}

.hero-content {
    max-width: 800px;
    width: 100%;
    padding: 3rem;
}

.hero-title {
    color: var(--white);
    font-size: 5rem;
    margin-bottom: 2rem;
}

.hero-subtitle {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.hero-social {
    margin-top: 3rem;
}

    .hero-social a {
        color: var(--white);
        font-size: 2.5rem;
        margin: 0 1.5rem;
        transition: color 0.3s ease, transform 0.3s ease;
    }

        .hero-social a:hover {
            color: var(--primary-color);
            transform: scale(1.1);
        }

/* About Section */
.about-section .grid {
    gap: 5rem; /* Mantiene spazio tra colonna immagini e colonna testo */
    align-items: start; /* Allinea l'inizio delle colonne in alto (utile se una č pių alta) */
}

/* Stili Contenitore Immagini (About) */
.about-image {
    display: flex; /* Centra la griglia al suo interno */
    justify-content: center;
    align-items: center;
}

/* Stili per la Image Wall nella Sezione About - NUOVO */
.image-wall-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 450px;
    width: 100%;
    /* Stili per animazione fade-in (da attivare con JS) */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.wall-image-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    aspect-ratio: 1 / 1; /* Forza rapporto quadrato, rimuovi/modifica se necessario */
}

    .wall-image-item img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s ease-out;
    }

    /* Effetto Hover Image Wall */
    .wall-image-item:hover img {
        transform: scale(1.1);
        opacity: 0.85;
    }

    .wall-image-item::after { /* Overlay hover */
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.2);
        opacity: 0;
        transition: opacity 0.3s ease-out;
        pointer-events: none;
    }

    .wall-image-item:hover::after {
        opacity: 1;
    }
/* Fine Stili Image Wall */

.about-text strong {
    color: var(--secondary-color);
    font-weight: 700;
}

/* Statistiche (se decommentate nell'HTML) */
.about-stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
    flex-wrap: wrap;
    justify-content: flex-start; /* Allinea a sinistra */
}

.stat-item {
    text-align: center;
    min-width: 120px;
}

.stat-number {
    display: block;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: var(--font-secondary);
}

.stat-label {
    font-size: 1.4rem;
    color: var(--text-color);
}

/* Services Section */
.services-section .grid {
    margin-top: 5rem;
}

.service-card {
    background-color: var(--white);
    padding: 4rem 3rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.6s ease-out, transform 0.6s ease-out; /* Aggiunta transizione opacity/transform */
    /* Stili per animazione fade-in (da attivare con JS) */
    opacity: 0;
    transform: translateY(20px);
}

    .service-card:hover {
        transform: translateY(-10px); /* Sovrascrive il translateY dell'animazione solo su hover */
        box-shadow: 0 15px 25px rgba(0, 0, 0, 0.12);
    }

.service-icon {
    font-size: 4.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.service-title {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}

/* Network Section (Se aggiunta) */
.network-section {
    /* Stili base sezione */
}

.network-content {
    max-width: 800px;
    margin: 0 auto;
    /* Stili per animazione fade-in (se si vuole animarla) */
    /* opacity: 0; */
    /* transform: translateY(20px); */
    /* transition: opacity 0.6s ease-out, transform 0.6s ease-out; */
}

.network-icon {
    font-size: 5rem;
    color: var(--primary-color);
    margin-bottom: 2.5rem;
}

.network-description, .network-advantage {
    font-size: 1.7rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.network-advantage {
    font-weight: 500;
    color: var(--secondary-color);
}

.network-content strong {
    font-weight: 700;
}

.coworking-note { /* Se usato nella sezione contatti */
    font-size: 1.4rem;
    color: var(--text-color);
    margin-top: -0.5rem;
    margin-bottom: 1.5rem;
}

/* Contact Section */
.contact-section {
    /* background-color: var(--light-gray); */
}

.contact-intro {
    max-width: 600px;
    margin: 0 auto 4rem auto;
    font-size: 1.8rem;
    line-height: 1.6;
    text-align: center;
}

.contact-details-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 5rem auto 0 auto;
    padding: 0 1rem;
}

.contact-block {
    background-color: var(--white);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    /* Stili per animazione fade-in (da attivare con JS) */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

    .contact-block h3 {
        font-size: 2.2rem;
        margin-top: 1.5rem;
        margin-bottom: 2rem;
        color: var(--primary-color);
    }

.contact-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
}

.address-block p {
    font-size: 1.6rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.address-block strong {
    font-weight: 700;
    color: var(--secondary-color);
}

.map-link {
    display: inline-block;
    margin-top: 1rem;
    font-size: 1.4rem;
    font-weight: 500;
}

    .map-link i {
        margin-left: 0.5rem;
        font-size: 1.2rem;
    }

.contact-list {
    list-style: none;
    padding: 0;
    margin-bottom: 3rem;
    text-align: left;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

    .contact-list li {
        display: flex;
        align-items: center;
        font-size: 1.7rem;
        margin-bottom: 1.5rem;
    }

        .contact-list li .list-icon {
            font-size: 2rem;
            color: var(--secondary-color);
            margin-right: 1.5rem;
            width: 25px;
            text-align: center;
        }

        .contact-list li a {
            color: var(--text-color);
            word-break: break-all;
        }

            .contact-list li a:hover {
                color: var(--primary-color);
            }

.contact-social {
    margin-top: 2rem;
    border-top: 1px solid #eee;
    padding-top: 2.5rem;
}

    .contact-social a {
        font-size: 3.2rem;
        margin: 0 1.5rem;
        color: var(--secondary-color);
        transition: color 0.3s ease, transform 0.3s ease;
    }

        .contact-social a:hover {
            color: var(--primary-color);
            transform: scale(1.1);
        }

/* Footer */
.main-footer {
    background-color: var(--secondary-color);
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 0;
    text-align: center;
    font-size: 1.4rem;
}

    .main-footer p {
        margin-bottom: 0.5rem;
    }

    .main-footer a {
        color: var(--primary-color);
    }

        .main-footer a:hover {
            color: var(--white);
        }

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 3rem;
    right: 3rem;
    background-color: var(--primary-color);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease, background-color 0.3s ease;
    z-index: 900;
}

    .back-to-top.visible { /* Classe aggiunta via JS */
        opacity: 1;
        visibility: visible;
    }

    .back-to-top:hover {
        background-color: var(--accent-color);
        color: var(--white);
    }

/* Scrollbar Styling (Opzionale) */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--accent-color);
    }

/* ===== MEDIA QUERIES ===== */

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .contact-details-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 4rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    html {
        font-size: 61%;
    }

    .container {
        max-width: 960px;
    }

    .section-padding {
        padding: 7rem 0;
    }

    h1 {
        font-size: 4.2rem;
    }

    h2 {
        font-size: 3.2rem;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    html {
        font-size: 62.5%;
    }

    .container {
        max-width: 1140px;
    }

    .section-padding {
        padding: 8rem 0;
    }

    h1 {
        font-size: 4.5rem;
    }

    h2 {
        font-size: 3.5rem;
    }
}

/* Smaller devices (landscape phones, tablets portrait) */
@media (max-width: 767px) { /* < 768px */
    html {
        font-size: 58%;
    }

    .container {
        padding: 0 1.5rem;
    }

    .section-padding {
        padding: 5rem 0;
    }

    h1 {
        font-size: 3.5rem;
    }

    h2 {
        font-size: 2.8rem;
    }

    .hero-section {
        min-height: 85vh;
        padding-top: calc(var(--header-height) + 2rem);
        padding-bottom: 2rem;
    }

    .hero-content {
        padding: 2rem;
    }

    /* Stili per Menu Mobile e Header su Mobile */
    .nav-menu {
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        transform: translateY(-150%);
        transition: transform 0.4s ease-out;
        z-index: 999;
    }

        .nav-menu.active {
            transform: translateY(0);
        }

    .nav-link {
        font-size: 1.8rem;
        padding: 1rem 0;
    }

    .nav-toggle {
        display: block;
    }

    .nav-logo span { /* Riduci testo accanto a logo mobile */
        font-size: 1.6rem;
    }
    /* .nav-logo img { height: 35px; } */ /* Opzionale: riduci logo */

    /* Assicura che le griglie siano a 1 colonna */
    .grid-2-cols, .grid-3-cols {
        grid-template-columns: 1fr;
    }

    .about-section .grid {
        gap: 3rem;
        /* La griglia a 2 colonne diventa implicitamente a 1 colonna per .grid-2-cols */
    }

    .about-image {
        margin-bottom: 3rem; /* Spazio sotto le immagini prima del testo su mobile */
    }

    .image-wall-grid { /* Stili responsive image wall */
        max-width: 350px;
        gap: 1rem;
    }

    .service-card {
        padding: 3rem 2rem;
    }

    .contact-block {
        padding: 2.5rem;
    }

    .contact-intro {
        font-size: 1.7rem;
    }

    .contact-list {
        max-width: none;
    }
}

/* Extra small devices (phones, 576px and down) */
@media (max-width: 576px) {
    .hero-section {
        min-height: 75vh;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.6rem;
    }

    .btn {
        padding: 1rem 2rem;
        font-size: 1.5rem;
    }

    .about-stats {
        justify-content: center;
        gap: 2rem;
    }

    .stat-item {
        min-width: 100px;
    }

    .stat-number {
        font-size: 3rem;
    }

    .stat-label {
        font-size: 1.3rem;
    }

    .contact-social a {
        font-size: 2.8rem;
        margin: 0 1rem;
    }

    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 40px;
        height: 40px;
        font-size: 1.6rem;
    }

    .main-footer {
        padding: 2rem 0;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .image-wall-grid { /* Image wall passa a 1 colonna */
        grid-template-columns: 1fr;
        max-width: 280px;
    }
    /* .wall-image-item { */ /* Opzionale: cambia aspect ratio se passi a 1 colonna */
    /* aspect-ratio: 4 / 3; */
    /* } */
}
