html, body {
    background: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}
main {
    flex: 1 0 auto;
}

/* WhatsApp floating button */
#whatsapp-float {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 9999;
    background: #25d366;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    text-decoration: none;
    transition: transform 0.2s ease;
}

#whatsapp-float:hover {
    transform: scale(1.1);
}

/* Filters section styling */
.filters-section {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    background: #f8f9fa;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.1);
    padding: 1.5rem;
}

.filters-section label {
    font-weight: bold;
    color: #333;
    margin-right: 0.5rem;
}

.filters-section select,
.filters-section input {
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-family: 'Montserrat', Arial, sans-serif;
}

.filters-section input::placeholder {
    color: #888;
}

body {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    background: #fff;
    color: #222;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

.italian-banner {
    width: 100%;
    height: 32px;
    display: flex;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}
.italian-banner .flag-green {
    background: #008C45;
    width: 33.33%;
    height: 100%;
}
.italian-banner .flag-white {
    background: #fff;
    width: 33.33%;
    height: 100%;
}
.italian-banner .flag-red {
    background: #CD212A;
    width: 33.33%;
    height: 100%;
}
.italian-banner-horizontal {
    width: 100vw;
    height: 18px;
    display: flex;
    position: relative;
    z-index: 2;
}
.italian-banner-horizontal .flag-green {
    background: #008C45;
    width: 33.33%;
    height: 100%;
}
.italian-banner-horizontal .flag-white {
    background: #fff;
    width: 33.33%;
    height: 100%;
}
.italian-banner-horizontal .flag-red {
    background: #CD212A;
    width: 33.33%;
    height: 100%;
}

.sidebar {
    background: #fff;
    color: #222;
    box-shadow: 2px 0 12px rgba(0,0,0,0.10);
}
.sidebar nav a {
    font-size: 1.1em;
    padding: 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #eee;
    color: #222;
    font-weight: 500;
    font-family: 'Montserrat', Arial, sans-serif;
    letter-spacing: 1px;
    transition: color 0.2s;
}
.sidebar nav a:last-child {
    border-bottom: none;
}
.sidebar nav a:hover {
    color: #008C45;
}
.close-btn {
    color: #222;
}
.hamburger span {
    background: #008C45;
}
.hamburger span:nth-child(2) {
    background: #fff;
    border: 1px solid #eee;
}
.hamburger span:nth-child(3) {
    background: #CD212A;
}
.azienda-nome {
    width: 100%;
    text-align: center;
    margin-top: 32px;
    margin-bottom: 18px;
}
.azienda-nome h1 {
    font-size: 2.6rem;
    font-weight: 700;
    color: #222;
    letter-spacing: 2px;
    margin: 32px 0 18px 0;
    text-align: center;
    font-family: 'Montserrat', Arial, sans-serif;
}

.main-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 48px;
    background: #fff;
    border-bottom: 2px solid #008C45;
    box-shadow: 0 2px 8px rgba(0,140,69,0.07);
    padding: 18px 12px 12px 12px;
    font-size: 1.15em;
    font-family: 'Montserrat', Arial, sans-serif;
    flex-wrap: wrap;
}
.nav-link {
    color: #008C45;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    min-height: 44px;
    display: flex;
    align-items: center;
}
.nav-link.active, .nav-link:hover {
    background: #008C45;
    color: #fff;
}

.hero-header {
    text-align: center;
    margin: 48px 0 32px 0;
}
.hero-header h1 {
    font-size: 3rem;
    font-weight: 800;
    color: #CD212A;
    letter-spacing: 2px;
    margin-bottom: 16px;
}
.hero-header .logo {
    max-width: 200px;
    height: auto;
    margin: 16px 0 24px 0;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
    transition: transform 0.3s ease;
}
.hero-header .logo:hover {
    transform: scale(1.05);
}
.hero-header .subtitle {
    font-size: 1.5rem;
    color: #008C45;
    font-weight: 600;
    margin-bottom: 32px;
    letter-spacing: 1px;
}
.hero-image-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    background: linear-gradient(45deg, #008C45, #CD212A);
    padding: 4px;
}
.hero-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 16px;
    display: block;
}
.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 40px 30px 30px 30px;
    text-align: left;
}
.hero-overlay h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    color: #fff;
}
.hero-overlay p {
    font-size: 1.2rem;
    margin: 0;
    opacity: 0.95;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.carousel-caption {
    text-align: center;
    margin-top: 18px;
}
.carousel-caption h3 {
    color: #008C45;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    font-family: 'Montserrat', Arial, sans-serif;
}
.about.center {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,140,69,0.07);
    margin: 40px auto;
    max-width: 900px;
    padding: 32px 24px;
    text-align: center;
    font-family: 'Montserrat', Arial, sans-serif;
}
.about.center h2 {
    color: #CD212A;
    font-size: 2rem;
    font-family: 'Montserrat', Arial, sans-serif;
    margin-bottom: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}
.about.center p {
    font-size: 1.15rem;
    color: #222;
}

.contacts {
    max-width: 600px;
    margin: 0 auto;
    padding: 0;
    text-align: center;
}
.contact-info p {
    font-size: 1.15rem;
    margin: 12px 0;
}
.contact-info a {
    color: #008C45;
    text-decoration: none;
    font-weight: bold;
}
.contact-info a:hover {
    color: #CD212A;
}
.map-container {
    margin: 28px 0 0 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}
.map-container small {
    display: block;
    margin-top: 8px;
}

.maps-btn {
    display: inline-block;
    margin: 18px auto 0 auto;
    padding: 12px 28px;
    background: linear-gradient(90deg, #008C45 0%, #fff 50%, #CD212A 100%);
    color: #222;
    font-weight: bold;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transition: background 0.2s, color 0.2s;
}
.maps-btn:hover {
    background: #008C45;
    color: #fff;
}

.main-footer {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 18px 0 0 0;
    text-align: center;
    font-size: 1rem;
    border-bottom: none;
    margin-top: auto;
    background: #008C45;
    color: #fff;
    box-shadow: 0 -2px 8px rgba(0,140,69,0.07);
}
.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    align-items: center;
}
.footer-content a {
    color: #fff;
    text-decoration: underline;
    font-weight: bold;
}
.footer-content a:hover {
    color: #CD212A;
}

.footer-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #25d366;
    font-weight: bold;
    text-decoration: none;
}

.footer-whatsapp svg {
    vertical-align: middle;
}

.cta-button {
    background: #21d457;
    color: #fff;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 0.5rem;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: background 0.2s ease;
    min-height: 44px;
    touch-action: manipulation;
}

.cta-button:hover, .cta-button:focus {
    background: #1e7e34;
    outline: 1px solid #008C45;
    outline-offset: 1px;
}

.products h2, .contacts h2, .about.center h2 {
    display: block;
    width: 100vw;
    max-width: 300vw;
    margin-left: calc(-50vw + 50%);
    box-sizing: border-box;
    background: linear-gradient(90deg, #008C45 0%, #F4F5F0 50%, #CD212A 100%);
    color: #222;
    padding: 12px 0;
    border-radius: 0;
    font-size: 2rem;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    text-align: center;
}

.products {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    margin: 40px auto;
    max-width: 900px;
    padding: 32px 24px;
}

.filter-form {
    display: flex;
    gap: 18px;
    justify-content: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.filter-form select, .filter-form button {
    padding: 10px 18px;
    font-size: 1.05rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-family: 'Montserrat', Arial, sans-serif;
}
.filter-form button {
    background: linear-gradient(90deg, #008C45 0%, #fff 50%, #CD212A 100%);
    color: #222;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.filter-form button:hover {
    background: #008C45;
    color: #fff;
}

.product-list {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 32px;
}
.product {
    background: #fff;
    border: 2px solid #F4F5F0;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    padding: 24px;
    width: 270px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
    font-family: 'Montserrat', Arial, sans-serif;
}
.product:hover {
    box-shadow: 0 16px 48px rgba(0,0,0,0.18);
    transform: translateY(-10px) scale(1.05);
    border-color: #008C45;
}
.product img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 16px;
    border: 3px solid #F4F5F0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.product h3 {
    color: #008C45;
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 8px;
    font-family: 'Montserrat', Arial, sans-serif;
}
.badge {
    position: absolute;
    top: 18px;
    left: 18px;
    background: #008C45;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    z-index: 2;
    font-family: 'Montserrat', Arial, sans-serif;
}
.badge-green {
    background: #43a047;
}
.badge-red {
    background: #CD212A;
}
.product-icons {
    margin: 12px 0 18px 0;
    font-size: 1.3em;
    display: flex;
    gap: 12px;
    justify-content: center;
}
.details-btn {
    background: linear-gradient(90deg, #008C45 0%, #fff 50%, #CD212A 100%);
    color: #222;
    font-weight: 600;
    font-family: 'Montserrat', Arial, sans-serif;
    border: none;
    border-radius: 8px;
    padding: 10px 28px;
    margin-top: 10px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transition: background 0.2s, color 0.2s;
}
.details-btn:hover {
    background: #008C45;
    color: #fff;
}
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s, transform 0.7s;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.cta-btn {
    display: inline-block;
    background: linear-gradient(90deg, #008C45 0%, #fff 50%, #CD212A 100%);
    color: #222;
    font-weight: 700;
    font-family: 'Montserrat', Arial, sans-serif;
    border: none;
    border-radius: 8px;
    padding: 12px 32px;
    margin-top: 8px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transition: background 0.2s, color 0.2s;
    font-size: 1.1em;
}
.cta-btn:hover {
    background: #008C45;
    color: #fff;
}
.services {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,140,69,0.07);
    margin: 40px auto;
    max-width: 900px;
    padding: 32px 24px;
    text-align: center;
    font-family: 'Montserrat', Arial, sans-serif;
}
.services h2 {
    color: #CD212A;
    font-size: 2rem;
    font-family: 'Montserrat', Arial, sans-serif;
    margin-bottom: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}
.services-list {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
}
.service {
    background: #f5f6fa;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,140,69,0.07);
    padding: 24px 18px;
    width: 220px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    font-family: 'Montserrat', Arial, sans-serif;
}
.service:hover {
    box-shadow: 0 8px 32px rgba(0,140,69,0.18);
    transform: translateY(-8px) scale(1.04);
}
.service-icon {
    font-size: 2.2em;
    margin-bottom: 12px;
    display: block;
    color: #008C45;
}
.service h3 {
    color: #CD212A;
    font-size: 1.15em;
    margin-bottom: 8px;
    font-weight: 700;
}
.service p {
    color: #222;
    font-size: 1em;
    margin-bottom: 0;
}
.equipments {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,140,69,0.07);
    margin: 40px auto;
    max-width: 900px;
    padding: 32px 24px;
    text-align: center;
    font-family: 'Montserrat', Arial, sans-serif;
}
.equipments h2 {
    color: #CD212A;
    font-size: 2rem;
    font-family: 'Montserrat', Arial, sans-serif;
    margin-bottom: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}
.equipments-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    margin-top: 24px;
}

.equipments-row {
    display: flex;
    gap: 40px;
    justify-content: center;
    align-items: stretch;
    width: 100%;
    max-width: 920px;
}
.equipment-card {
    display: block; /* anchor behaves like a card */
    background: #f5f6fa;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,140,69,0.07);
    padding: 18px 12px;
    width: 160px;
    text-align: center;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    position: relative;
    font-family: 'Montserrat', Arial, sans-serif;
    color: inherit; /* ensure link color doesn't override */
    text-decoration: none; /* remove underline if any */
}
.equipment-card:hover {
    box-shadow: 0 8px 32px rgba(0,140,69,0.18);
    transform: translateY(-8px) scale(1.04);
}
.equipment-card img {
    display: block;
    margin: 0 auto 12px auto; /* center image horizontally and add small gap */
    width: 120px;
    height: 90px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.equipment-card h3 {
    color: #008C45; /* make title visible and consistent with theme */
    font-size: 1.05em;
    margin: 6px 0 6px 0;
    font-weight: 700;
    line-height: 1.2;
}

/* Truncate long titles and descriptions to avoid layout break on small screens */
.equipment-card h3 {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.equipment-card p {
    color: #222;
    font-size: 1em;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* show maximum 2 lines */
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* show full text on hover/focus via title attribute (assistive) */
.equipment-card[title] {
    cursor: pointer;
}
.equipment-card:focus,
.equipment-card:focus-visible,
.equipment-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(0,140,69,0.16);
    outline: none;
}
.equipment-card:focus-visible {
    outline: 3px solid rgba(0,140,69,0.12);
    outline-offset: 4px;
}
.equipment-card p {
    color: #222;
    font-size: 1em;
    margin-bottom: 0;
}
.equipments-caption {
    text-align: center;
    margin-top: 28px;
}
.equipments-caption h3 {
    color: #008C45;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    font-family: 'Montserrat', Arial, sans-serif;
}
.equipments-caption .cta-btn {
    display: inline-block;
    background: linear-gradient(90deg, #008C45 0%, #fff 50%, #CD212A 100%);
    color: #222;
    font-weight: 700;
    font-family: 'Montserrat', Arial, sans-serif;
    border: none;
    border-radius: 8px;
    padding: 12px 32px;
    margin-top: 8px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transition: background 0.2s, color 0.2s;
    font-size: 1.1em;
}
.equipments-caption .cta-btn:hover {
    background: #008C45;
    color: #fff;
}
/* Mobile First Responsive Design */

/* Extra small devices (phones, 576px and down) */
@media (max-width: 576px) {
    #whatsapp-float {
        width: 50px;
        height: 50px;
        left: 16px;
        bottom: 16px;
    }
    
    .main-nav {
        gap: 8px;
        padding: 12px 8px 8px 8px;
        font-size: 0.9em;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 0.85em;
    }
    
    .hero-header .logo {
        max-width: 120px;
    }
    
    .hero-header .subtitle {
        font-size: 1rem;
        margin-bottom: 16px;
    }
    
    .hero-image-container {
        margin: 0 8px;
    }
    
    .hero-image {
        height: 240px;
    }
    
    .hero-overlay {
        padding: 16px;
    }
    
    .hero-overlay h2 {
        font-size: 1.3rem;
    }
    
    .hero-overlay p {
        font-size: 0.9rem;
    }
    
    .about.center {
        margin: 20px 8px;
        padding: 16px 12px;
    }
    
    .about.center h2 {
        font-size: 1.6rem;
    }
    
    .about.center p {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    .equipment-card {
        width: 95vw;
        padding: 16px;
    }

    /* iPhone / small screens: stack rows and ensure images scale */
    .equipments-row {
        display: flex;
        flex-direction: column;
        gap: 14px;
        align-items: center;
        width: 100%;
        max-width: none;
        padding: 0 8px;
        box-sizing: border-box;
    }

    .equipment-card {
        width: 95vw; /* full width with small side padding */
        max-width: 420px;
        padding: 14px;
    }

    .equipment-card img {
        width: 140px;
        height: auto;
        max-width: 45%;
        margin-bottom: 10px;
    }
    
    .equipment-card h3 {
        font-size: 1rem;
    }
    
    .equipment-card p {
        font-size: 0.9rem;
    }
    
    .cta-button {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        padding: 0 12px;
    }
    
    .main-footer {
        font-size: 0.8rem;
        padding: 16px 0;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 577px) and (max-width: 768px) {
    .main-nav {
        gap: 24px;
        font-size: 1em;
    }
    
    .hero-header .logo {
        max-width: 140px;
    }
    
    .hero-image-container {
        margin: 0 12px;
    }
    
    .hero-image {
        height: 260px;
    }
    
    .equipment-card {
        width: 85vw;
    }
}

/* Medium devices (tablets, 768px and up) - existing rules apply */
@media (max-width: 700px) {
    .azienda-nome h1 {
        font-size: 2rem;
    }
    .hero-header h1 {
        font-size: 2.2rem;
    }
    .hero-header .logo {
        max-width: 150px;
    }
    .hero-header .subtitle {
        font-size: 1.2rem;
        margin-bottom: 24px;
    }
    .hero-image-container {
        margin: 0 16px;
        max-width: none;
    }
    .hero-image {
        height: 280px;
    }
    .hero-overlay {
        padding: 20px 20px 20px 20px;
    }
    .hero-overlay h2 {
        font-size: 1.6rem;
    }
    .hero-overlay p {
        font-size: 1rem;
    }
    .about.center {
        padding: 18px 6px;
    }
    .main-footer {
        font-size: 0.9rem;
    }
    .main-nav {
        gap: 18px;
        font-size: 1em;
    }
    .services-list {
        flex-direction: column;
        align-items: center;
        gap: 18px;
    }
    .service {
        width: 90vw;
        margin-bottom: 12px;
    }
    .equipments-list {
        flex-direction: column;
        align-items: center;
        gap: 18px;
    }
    .equipment-card {
        width: 90vw;
        margin-bottom: 20px;
    }
}

