/* ==============================
   RESET BASE
============================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: darkgreen;
}

/* COLORI */
:root {
    --darkgreen: darkgreen;
    --light-gray: #f5f5f5;
}

/* =========================
   HEADER E MENU PRINCIPALE
========================= */
header {
    background: white;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav ul li {
    position: relative;
}

nav ul li a {
    text-decoration: none;
    color: var(--darkgreen);
    font-weight: 500;
    padding: 10px;
}

/* SUBMENU */
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 100;
}

.submenu li a {
    display: block;
    padding: 10px;
    color: var(--darkgreen);
    text-decoration: none;
}

.submenu .submenu {
    left: 100%;
    top: 0;
}

.has-submenu:hover > .submenu {
    display: block;
}

/* MENU MOBILE */
.mobile-menu-btn {
    display: none;
}

/* MENU LINGUA */
.language-menu {
    position: relative;
}

.language-btn {
    background: white;
    border: 1px solid var(--darkgreen);
    color: var(--darkgreen);
    padding: 8px 14px;
    cursor: pointer;
}

.language-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 110%;
    background: white;
    list-style: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    min-width: 150px;
    z-index: 999;
}

.language-dropdown li a {
    display: block;
    padding: 10px;
    color: var(--darkgreen);
    text-decoration: none;
}

.language-menu:hover .language-dropdown {
    display: block;
}

/* =========================
   HERO / SFONDO PAGINA
========================= */
.hero {
    height: 80vh;
    background: url("../img/sfondo-impiantistica.jpg") center/cover no-repeat;
    position: relative;
}

.hero-overlay {
    background: rgba(0,0,0,0.45);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    color: white;
    text-align: center;
}

.hero-content h2 {
    font-size: 2.5rem;
}

/* =========================
   PARALLAX
========================= */
.parallax {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('img/parallaxie.jpg'); /* sfondo parallax */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 1;
}

/* =========================
   MENU SECONDARIO A SCHEDE (Impianti Elettrici)
========================= */
.imp-menu-section {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 100px 20px;
    color: #fff;
}

.imp-tab-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.imp-tab-btn {
    padding: 12px 25px;
    border: none;
    background-color: rgba(255,255,255,0.1);
    color: #fff;
    font-weight: 500;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.imp-tab-btn:hover,
.imp-tab-btn.active {
    background-color: rgba(255,255,255,0.3);
    font-weight: bold;
}

.imp-menu-content {
    width: 80%;
    max-width: 1000px;
    position: relative;
}

.imp-service-section {
    display: none;
    opacity: 0;
    transform: translateX(-50px); /* testo da sinistra */
    transition: all 0.7s ease;
}

.imp-service-section.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.imp-service-section p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.imp-menu-img {
    width: 100%;
    max-width: 500px;
    opacity: 0;
    transform: translateX(50px); /* immagine da destra */
    transition: all 0.7s ease;
    display: block;
    margin-top: 20px;
}

.imp-service-section.active .imp-menu-img {
    opacity: 1;
    transform: translateX(0);
}

/* =========================
   QUICK INFO
========================= */
#quick-info {
    background: #fafafa;
    padding: 60px 0;
}

.quick-info-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.quick-info-logo img {
    width: 150px;
}

.quick-info-center {
    text-align: center;
}

.quick-info-center a,
.quick-info-menu a {
    color: var(--darkgreen);
    text-decoration: none;
}

.quick-info-menu ul {
    list-style: none;
}

.quick-info-menu li {
    margin-bottom: 10px;
}

#quick-info .btn-primary {
    background: var(--darkgreen);
    color: white;
    padding: 12px 30px;
    display: inline-block;
}

/* =========================
   FOOTER
========================= */
footer {
    text-align: center;
    padding: 20px;
    background: darkgreen;
    color: white;
}

/* =========================
   SCROLL TOP BUTTON
========================= */
#scrollTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: darkgreen;
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.6rem;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

#scrollTopBtn.show {
    opacity: 1;
    pointer-events: auto;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
    .imp-tab-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .imp-menu-img {
        max-width: 100%;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
    }

    .mobile-menu-btn {
        display: block;
    }
}