:root {
    --primary: #356549;
    --primary-light: #4a8a63;
    --primary-dark: #264a35;
    --accent: #1abc9c;
    --text-dark: #2c3e50;
    --text-light: #546e7a;
    --white: #ffffff;
    --bg-light: #f4f7f6;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

/* Hero Subpage */
.hero-page {
    padding: 80px 10%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .75), rgba(0, 0, 0, .45)), url('sede.webp');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
}

.hero-page h1 {
    font-size: 40px;
    margin-bottom: 15px;
    font-weight: 700;
}

.hero-page h1 span {
    color: var(--accent);
}

.hero-page p {
    max-width: 750px;
    margin: 0 auto;
    font-weight: 300;
    font-size: 16px;
}

/* Sezione Contenuto Tecnologie */
main {
    padding: 70px 10%;
}

.section-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.divider {
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 15px auto;
    border-radius: 2px;
}

h2 {
    font-size: 34px;
    color: var(--text-dark);
    font-weight: 600;
}

/* Griglia Strumentazioni: 2 Colonne Fisse per Desktop */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 45px;
}

.tech-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-top: 4px solid var(--primary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.tech-image {
    width: 100%;
    height: 260px;
    background-color: #eee;
    overflow: hidden;
}

.tech-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.tech-card:hover .tech-image img {
    transform: scale(1.04);
}

.tech-body {
    padding: 35px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.tech-badge {
    display: inline-block;
    background: #eef5f1;
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 4px;
    margin-bottom: 15px;
    align-self: flex-start;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tech-body h3 {
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 15px;
    font-weight: 600;
}

.tech-body p {
    color: var(--text-light);
    font-size: 14.5px;
    margin-bottom: 20px;
    flex-grow: 1;
}

.tech-features-list {
    list-style: none;
    margin-bottom: 10px;
}

.tech-features-list li {
    font-size: 13.5px;
    color: var(--text-dark);
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.tech-features-list li::before {
    content: "\f058";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* Local SEO Content block */
.seo-local-text {
    margin-top: 70px;
    padding-top: 40px;
    border-top: 1px solid #e0e0e0;
    color: var(--text-light);
    font-size: 14px;
}

/* Banner CTA */
.cta-banner {
    background-color: var(--bg-light);
    text-align: center;
    border-radius: 8px;
    padding: 55px;
    margin-top: 60px;
}

.cta-banner h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.btn-main {
    background: var(--primary);
    color: white;
    padding: 16px 40px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: 0.3s;
    margin-top: 20px;
    box-shadow: 0 4px 10px rgba(53, 101, 73, 0.2);
}

.btn-main:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(53, 101, 73, 0.3);
}

/* ==========================================
   MEDIA QUERIES (RESPONSIVE DESIGN)
   ========================================== */

/* Laptop Standard (sotto i 1024px) */
@media (max-width: 1024px) {
    .hero-page, main {
        padding-left: 5%;
        padding-right: 5%;
    }
    
    .tech-grid {
        gap: 30px; /* Riduce leggermente lo spazio tra le 2 colonne su schermi medi */
    }
}

/* Tablet e Mobile (sotto i 768px) -> Passa a 1 Colonna */
@media (max-width: 768px) {
    .hero-page {
        padding: 60px 20px;
    }

    .hero-page h1 {
        font-size: 30px;
    }

    .hero-page p {
        font-size: 15px;
    }

    main {
        padding: 45px 20px;
    }

    h2 {
        font-size: 28px;
    }

    .section-intro {
        margin-bottom: 40px;
    }

    .tech-grid {
        grid-template-columns: 1fr; /* Una colonna solo su schermi piccoli */
        gap: 30px;
    }

    .tech-body {
        padding: 25px;
    }

    .cta-banner {
        padding: 35px 20px;
    }

    .cta-banner h3 {
        font-size: 20px;
    }
}

/* Smartphone Small (sotto i 480px) */
@media (max-width: 480px) {
    .hero-page h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 24px;
    }

    .tech-image {
        height: 200px;
    }

    .btn-main {
        width: 100%;
        padding: 14px 20px;
    }
}

/* Hover / Menu Dropdown per Desktop */
@media (min-width: 993px) {
    nav ul li:hover > .dropdown-menu,
    nav ul .dropdown-menu li:hover > .flyout-menu {
        display: block !important;
    }
}



/* Barra dei filtri */
.tech-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 45px;
}

.filter-btn {
    background: #eef5f1;
    color: var(--primary);
    border: 1px solid transparent;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.filter-btn:hover {
    background: var(--primary-light);
    color: var(--white);
}

.filter-btn.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 10px rgba(53, 101, 73, 0.25);
}

/* Transizione e animazione schede */
.tech-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.35s ease;
}

.tech-card.is-hidden {
    display: none !important;
}

/* OTTIMIZZAZIONE RESPONSIVE PER MOBILE */
@media (max-width: 768px) {
    .tech-filters {
        gap: 8px; /* Riduce lo spazio tra i filtri */
        margin-bottom: 30px;
    }

    .filter-btn {
        padding: 8px 14px; /* Riduce leggermente il padding interno */
        font-size: 13px;   /* Diminuisce il carattere per far stare più bottoni */
    }
}