/* ============================================================
   RESET & BASE
============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f4f6f9;
    color: #222;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ============================================================
   HEADER
============================================================ */
header {
    background: #0A1A2F;
    color: white;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    margin-top: 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    min-height: 70px;
    position: relative;
}

.logo {
    flex-shrink: 0;
    z-index: 1001;
}

.logo img {
    height: 55px;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.4));
    transition: height 0.3s ease;
}

/* ============================================================
   THEME SWITCH
============================================================ */
.theme-switch {
    margin-left: auto;
    display: flex;
    align-items: center;
    z-index: 1001;
}

.theme-switch input {
    display: none;
}

.switch-label {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ffffff22;
    padding: 6px 12px;
    border-radius: 30px;
    cursor: pointer;
    color: white;
    font-size: 0.85rem;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.switch-label:hover {
    background: #ffffff33;
}

.switch-icon {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

/* ============================================================
   HAMBURGER MENU
============================================================ */
.hamburger {
    display: none;
    width: 24px;
    height: 20px;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    margin-left: 15px;
    flex-shrink: 0;
    z-index: 1001;
}

.hamburger span {
    display: block;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: 0.3s;
}

#nav-toggle {
    display: none;
}

/* ============================================================
   MENU DESKTOP
============================================================ */
nav {
    display: flex !important;
    align-items: center;
}

.menu {
    list-style: none;
    display: flex !important;
    align-items: center;
    gap: 18px;
}

.menu > li > a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.25s ease, transform 0.2s ease;
}

.menu > li > a:hover {
    background: #F28C28;
    transform: translateY(-2px);
}

/* ============================================================
   DROPDOWN
============================================================ */
.dropdown {
    position: relative;
}

.dropdown > a {
    position: relative;
    padding-right: 20px !important;
}

.dropdown > a:after {
    content: "▾";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8em;
}

.submenu {
    list-style: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #0A1A2F;
    padding: 10px 0;
    border-radius: 8px;
    min-width: 200px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
    display: none;
    z-index: 1100;
    margin-top: 5px;
}

.submenu li a {
    display: block;
    padding: 8px 16px;
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.25s ease;
}

.submenu li a:hover {
    background: #F28C28;
}

/* Dropdown visibile al hover su desktop */
@media (min-width: 769px) {
    .dropdown:hover .submenu {
        display: block;
    }
}

/* ============================================================
   MENU MOBILE
============================================================ */
@media (max-width: 768px) {
    .header-inner {
        padding: 10px 0;
        min-height: 65px;
        flex-wrap: nowrap;
    }
    
    .logo img {
        height: 45px;
    }
    
    .hamburger {
        display: flex;
        margin-left: 10px;
    }
    
    .switch-text {
        display: none;
    }
    
    .switch-label {
        padding: 6px 10px;
    }
    
    nav {
        display: none !important;
        position: fixed;
        top: 65px;
        left: 0;
        right: 0;
        width: 100%;
        background: #0A1A2F;
        z-index: 999;
        box-shadow: 0 6px 18px rgba(0,0,0,0.5);
    }
    
    #nav-toggle:checked ~ nav {
        display: block !important;
    }
    
    .menu {
        flex-direction: column;
        width: 100%;
        padding: 0;
        margin: 0;
        gap: 0;
    }
    
    .menu > li {
        width: 100%;
    }
    
    .menu > li > a {
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        justify-content: flex-start;
        font-size: 1rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .dropdown > a:after {
        content: "▸";
        transform: translateY(-50%) rotate(0deg);
        transition: transform 0.3s ease;
    }
    
    .dropdown.active > a:after {
        transform: translateY(-50%) rotate(90deg);
    }
    
    .submenu {
        position: static;
        display: none;
        box-shadow: none;
        background: rgba(0,0,0,0.2);
        margin: 0;
        padding: 0;
        border-radius: 0;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    
    .dropdown.active .submenu {
        display: block;
    }
    
    .submenu li a {
        padding: 12px 20px 12px 30px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    
    .submenu li:last-child a {
        border-bottom: none;
    }
    
    #nav-toggle:checked + .hamburger .line1 {
        transform: translateY(8px) rotate(45deg);
    }
    #nav-toggle:checked + .hamburger .line2 {
        opacity: 0;
    }
    #nav-toggle:checked + .hamburger .line3 {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    @media (max-width: 360px) {
        .logo img {
            height: 40px;
        }
        
        .switch-label {
            padding: 5px 8px;
        }
        
        .hamburger {
            width: 22px;
            height: 18px;
            margin-left: 8px;
        }
    }
}

/* ============================================================
   HERO
============================================================ */
.page-hero {
    background: linear-gradient(135deg, rgba(10,26,47,0.75), rgba(12,52,98,0.75)),
                url('../img/hero.jpg') center/cover no-repeat;
    color: white;
    padding: 60px 0 50px;
    display: flex;
    align-items: center;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
    min-height: 30vh;
    position: relative;
    margin-top: 0;
}

.page-hero .container {
    position: relative;
    z-index: 2;
}

.page-hero h1 {
    font-size: 2.2rem;
    margin-bottom: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.page-hero p {
    font-size: 1.05rem;
    max-width: 700px;
    color: #f0f0f0;
    margin-bottom: 20px;
    line-height: 1.5;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.home-hero {
    min-height: 35vh;
    padding: 70px 0 60px;
}

.home-hero h1 {
    font-size: 2.4rem;
    margin-bottom: 15px;
}

.home-hero p {
    font-size: 1.1rem;
    margin-bottom: 25px;
}

@media (max-width: 768px) {
    .page-hero {
        padding: 40px 0 30px;
        min-height: 25vh;
    }
    
    .home-hero {
        padding: 50px 0 40px;
        min-height: 30vh;
    }
    
    .page-hero h1 {
        font-size: 1.8rem;
        line-height: 1.3;
        margin-bottom: 10px;
    }
    
    .home-hero h1 {
        font-size: 2rem;
        line-height: 1.3;
        margin-bottom: 12px;
    }
    
    .page-hero p {
        font-size: 1rem;
        line-height: 1.4;
        margin-bottom: 15px;
    }
    
    .home-hero p {
        font-size: 1.05rem;
        line-height: 1.4;
        margin-bottom: 18px;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 10px;
        margin-top: 15px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        padding: 12px 18px;
        font-size: 0.95rem;
    }
}

@media (max-width: 375px) {
    .page-hero {
        padding: 30px 0 20px;
        min-height: 22vh;
    }
    
    .home-hero {
        padding: 40px 0 30px;
        min-height: 25vh;
    }
    
    .page-hero h1 {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }
    
    .home-hero h1 {
        font-size: 1.7rem;
        margin-bottom: 10px;
    }
    
    .page-hero p {
        font-size: 0.9rem;
        line-height: 1.3;
        margin-bottom: 12px;
    }
    
    .home-hero p {
        font-size: 0.95rem;
        line-height: 1.3;
        margin-bottom: 15px;
    }
    
    .hero-cta {
        gap: 8px;
        margin-top: 12px;
    }
}

/* ============================================================
   BUTTONS
============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.btn-primary {
    background: #F28C28;
    color: #0A1A2F;
    box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}

.btn-primary:hover {
    background: #ff9b36;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.35);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.7);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.btn-outline:hover {
    background: white;
    color: #0A1A2F;
    transform: translateY(-3px);
}

.btn-download {
    background: #28a745;
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow: 0 6px 15px rgba(40, 167, 69, 0.3);
}

.btn-download:hover {
    background: #218838;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(40, 167, 69, 0.4);
}

.btn-download i {
    font-size: 1.2rem;
}

/* ============================================================
   PAGINA CONTATTI - MODULO IN EVIDENZA
============================================================ */

/* Layout a 3 colonne per contatti */
.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
}

@media (max-width: 1100px) {
    .grid-3 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .grid-3 > div:nth-child(2) {
        order: 1;
    }
    
    .grid-3 > div:first-child {
        order: 2;
    }
    
    .grid-3 > div:last-child {
        order: 3;
    }
}

/* Box del modulo centrale evidenziato */
.modulo-box {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 2px solid #28a745;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.modulo-box h2 {
    color: #28a745;
    margin-bottom: 15px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.modulo-box p {
    color: #666;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

/* Passaggi del modulo */
.modulo-steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 25px 0;
}

@media (max-width: 480px) {
    .modulo-steps {
        grid-template-columns: 1fr;
    }
}

.step {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease;
}

.step:hover {
    transform: translateY(-5px);
}

.step-number {
    width: 35px;
    height: 35px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: bold;
    font-size: 1.1rem;
}

.step p {
    margin: 0;
    font-size: 0.85rem;
    color: #555;
}

/* Pulsante modulo */
.btn-modulo {
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
    border: none;
    padding: 14px 25px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 10px;
    margin-top: 20px;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.btn-modulo:hover {
    background: linear-gradient(135deg, #218838, #1e7e34);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.4);
}

/* Informazioni modulo */
.modulo-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.modulo-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
    font-size: 0.9rem;
    color: #666;
}

.modulo-info i {
    color: #28a745;
}

/* Box WhatsApp */
.whatsapp-box {
    background: rgba(37, 211, 102, 0.1);
    border: 2px solid #25d366;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    margin-top: 30px;
}

.whatsapp-box i {
    font-size: 2.5rem;
    color: #25d366;
    margin-bottom: 15px;
}

.whatsapp-box h3 {
    color: #25d366;
    margin-bottom: 10px;
}

.whatsapp-box p {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.btn-whatsapp {
    background: #25d366;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    width: 100%;
    transition: background 0.3s ease;
}

.btn-whatsapp:hover {
    background: #1da851;
}

/* Box servizi */
.servizi-box {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.servizi-box h3 {
    color: #0A1A2F;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

/* Box chiamata emergenza */
.chiama-box {
    background: rgba(242, 140, 40, 0.1);
    border: 2px solid #F28C28;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    margin-top: 20px;
}

.chiama-box h4 {
    color: #F28C28;
    margin-bottom: 15px;
}

.btn-chiama {
    background: #F28C28;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1.1rem;
    width: 100%;
    transition: background 0.3s ease;
    display: block;
}

.btn-chiama:hover {
    background: #e07c18;
}

/* Numero telefono evidenziato */
.phone-number {
    font-size: 1.4rem;
    color: #0A1A2F;
    font-weight: bold;
    display: block;
    margin-top: 5px;
}

/* ============================================================
   CONTACT BUTTONS - NUOVO LAYOUT PER WHATSAPP E EMAIL
============================================================ */

.contact-buttons-container {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.contact-buttons-container h3 {
    color: #0A1A2F;
    margin-bottom: 20px;
    font-size: 1.3rem;
    text-align: center;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.contact-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.contact-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-button.whatsapp {
    background: rgba(37, 211, 102, 0.08);
    border: 2px solid rgba(37, 211, 102, 0.3);
}

.contact-button.email {
    background: rgba(33, 150, 243, 0.08);
    border: 2px solid rgba(33, 150, 243, 0.3);
}

.contact-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.contact-button.whatsapp:hover {
    background: rgba(37, 211, 102, 0.12);
    border-color: rgba(37, 211, 102, 0.5);
}

.contact-button.email:hover {
    background: rgba(33, 150, 243, 0.12);
    border-color: rgba(33, 150, 243, 0.5);
}

.contact-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 2.2rem;
}

.contact-button.whatsapp .contact-icon {
    background: rgba(37, 211, 102, 0.15);
    color: #25D366;
}

.contact-button.email .contact-icon {
    background: rgba(33, 150, 243, 0.15);
    color: #2196F3;
}

.contact-content h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.contact-button.whatsapp h4 {
    color: #25D366;
}

.contact-button.email h4 {
    color: #2196F3;
}

.contact-content p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    min-height: 2.5em;
}

.btn-contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    border: none;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    width: 100%;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.contact-button.whatsapp .btn-contact {
    background: #25D366;
    color: white;
}

.contact-button.whatsapp .btn-contact:hover {
    background: #1da851;
    transform: translateY(-2px);
}

.contact-button.email .btn-contact {
    background: #2196F3;
    color: white;
}

.contact-button.email .btn-contact:hover {
    background: #0d8bf2;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .contact-buttons {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .contact-button {
        padding: 15px;
    }
    
    .contact-icon {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
}

/* Dark mode */
body.dark-mode .contact-buttons-container {
    background: #1a1f27;
}

body.dark-mode .contact-buttons-container h3 {
    color: #e5e5e5;
    border-bottom-color: #444;
}

body.dark-mode .contact-button.whatsapp {
    background: rgba(37, 211, 102, 0.12);
    border-color: rgba(37, 211, 102, 0.4);
}

body.dark-mode .contact-button.email {
    background: rgba(33, 150, 243, 0.12);
    border-color: rgba(33, 150, 243, 0.4);
}

body.dark-mode .contact-content p {
    color: #ccc;
}

body:not(.dark-mode) .info-box .phone-number {
    color: white !important;
}

body.dark-mode .info-box .phone-number {
    color: #F28C28 !important;
}

body:not(.dark-mode) .info-box .info-item strong {
    color: white;
}

body:not(.dark-mode) .info-box a {
    color: #ddd;
}

body:not(.dark-mode) .info-box a:hover {
    color: #F28C28;
}

/* ============================================================
   CARDS
============================================================ */
.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    margin-top: 30px;
}

.card {
    background: white;
    border-radius: 14px;
    padding: 26px 22px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.10);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(0,0,0,0.18);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(242,140,40,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #F28C28;
    margin-bottom: 14px;
    font-size: 1.4rem;
}

.card h3 {
    margin-bottom: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #0A1A2F;
}

.card p {
    font-size: 0.97rem;
    color: #555;
    margin-bottom: 14px;
}

.card a.more-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.92rem;
    color: #0A1A2F;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.25s ease;
}

.card a.more-link:hover {
    color: #F28C28;
}

@media (max-width: 900px) {
    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 620px) {
    .cards {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   CATALOGO BOX
============================================================ */
.catalogo-boxes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin: 30px 0;
}

.catalogo-box {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border-left: 4px solid #F28C28;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.catalogo-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.catalogo-box h3 {
    color: #0A1A2F;
    margin-bottom: 15px;
    font-size: 1.3rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.catalogo-category {
    font-weight: bold;
    color: #F28C28;
    margin-bottom: 8px;
    display: block;
    font-size: 0.9rem;
}

.catalogo-products {
    margin: 15px 0;
    padding-left: 20px;
}

.catalogo-products li {
    margin-bottom: 8px;
    color: #444;
    position: relative;
}

.catalogo-products li:before {
    content: "•";
    color: #F28C28;
    font-weight: bold;
    position: absolute;
    left: -15px;
}

.catalogo-notes {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #666;
    border-left: 3px solid #0A1A2F;
}

@media (max-width: 768px) {
    .catalogo-boxes {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   PAGE CONTENT
============================================================ */
.page-content {
    padding: 60px 0 90px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 2fr 1.1fr;
    gap: 40px;
}

@media (max-width: 900px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   INFO BOX
============================================================ */
.info-box {
    background: #0A1A2F;
    color: white;
    padding: 26px 22px;
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.25);
}

.info-box h3 {
    margin-bottom: 20px;
    color: white;
    font-size: 1.3rem;
}

.info-item {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 0.97rem;
    align-items: flex-start;
}

.info-item i {
    color: #F28C28;
    margin-top: 3px;
    flex-shrink: 0;
}

.info-item a {
    color: #ddd;
    text-decoration: none;
}

.info-item a:hover {
    color: #F28C28;
    text-decoration: underline;
}

/* ============================================================
   FORM
============================================================ */
.form-card {
    background: white;
    padding: 28px 24px;
    border-radius: 14px;
    box-shadow: 0 10px 22px rgba(0,0,0,0.12);
}

.form-row {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 220px;
    margin-bottom: 14px;
}

label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 6px;
    font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #ccc;
    padding: 10px 12px;
    font-size: 0.97rem;
    background: #fafafa;
    transition: border 0.25s ease, box-shadow 0.25s ease;
    font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #F28C28;
    box-shadow: 0 0 0 3px rgba(242,140,40,0.25);
    outline: none;
}

textarea {
    min-height: 140px;
    resize: vertical;
}

/* ============================================================
   FOOTER
============================================================ */
footer {
    background: #050b13;
    color: #aaa;
    padding: 24px 0;
    font-size: 0.9rem;
    margin-top: auto;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.25);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
}

.footer-inner a {
    color: #ddd;
    text-decoration: none;
}

.footer-inner a:hover {
    text-decoration: underline;
}

/* ============================================================
   DARK MODE
============================================================ */
body.dark-mode {
    background: #0b0f14;
    color: #e5e5e5;
}

body.dark-mode header {
    background: #05080c;
}

body.dark-mode .page-hero {
    filter: brightness(0.8);
}

body.dark-mode .section-light {
    background: #11161d;
    color: #e5e5e5;
}

body.dark-mode .section-subtitle {
    color: #ccc;
}

body.dark-mode .card {
    background: #1a1f27;
    color: #e5e5e5;
}

body.dark-mode .card h3 {
    color: #e5e5e5;
}

body.dark-mode .card p {
    color: #d5d5d5;
}

body.dark-mode .card a.more-link {
    color: #F28C28;
}

body.dark-mode .info-box {
    background: #11161d;
}

body.dark-mode .info-box h3 {
    color: white;
}

body.dark-mode .form-card {
    background: #181d25;
    color: #e5e5e5;
}

body.dark-mode input[type="text"],
body.dark-mode input[type="email"],
body.dark-mode input[type="tel"],
body.dark-mode textarea,
body.dark-mode select {
    background: #151920;
    border-color: #444;
    color: #e5e5e5;
}

body.dark-mode label {
    color: #e5e5e5;
}

body.dark-mode .modulo-box {
    background: #1a1f27;
    border-color: #28a745;
}

body.dark-mode .modulo-box h2 {
    color: #4cd964;
}

body.dark-mode .modulo-box p {
    color: #ccc;
}

body.dark-mode .step {
    background: #252a32;
}

body.dark-mode .step p {
    color: #ddd;
}

body.dark-mode .modulo-info {
    border-top-color: #444;
}

body.dark-mode .modulo-info p {
    color: #aaa;
}

body.dark-mode .whatsapp-box {
    background: rgba(37, 211, 102, 0.15);
}

body.dark-mode .whatsapp-box p {
    color: #ccc;
}

body.dark-mode .servizi-box {
    background: #1a1f27;
}

body.dark-mode .servizi-box h3 {
    color: #e5e5e5;
}

body.dark-mode .chiama-box {
    background: rgba(242, 140, 40, 0.15);
}

body.dark-mode .phone-number {
    color: #F28C28;
}

body.dark-mode footer {
    background: #000;
    color: #ccc;
}

body.dark-mode footer a {
    color: #ddd;
}

body.dark-mode .catalogo-box {
    background: #1a1f27;
    color: #e5e5e5;
    border-left-color: #F28C28;
}

body.dark-mode .catalogo-box h3 {
    color: #e5e5e5;
    border-bottom-color: #444;
}

body.dark-mode .catalogo-category {
    color: #F28C28;
}

body.dark-mode .catalogo-products li {
    color: #d5d5d5;
}

body.dark-mode .catalogo-notes {
    background: #151920;
    color: #ccc;
    border-left-color: #0A1A2F;
}

/* ============================================================
   UTILITIES
============================================================ */
.section {
    padding: 60px 0;
}

.section-light {
    background: #f5f5f5;
}

.section-title {
    text-align: center;
    font-size: 1.9rem;
    margin-bottom: 12px;
    font-weight: 700;
    color: #0A1A2F;
}

.section-subtitle {
    text-align: center;
    color: #555;
    max-width: 650px;
    margin: 0 auto 32px;
    font-size: 1rem;
}

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }
.mt-50 { margin-top: 50px; }

.text-center {
    text-align: center;
}

.text-link {
    color: #F28C28;
    text-decoration: none;
    font-weight: 600;
}

.text-link:hover {
    text-decoration: underline;
}

body.dark-mode .text-link {
    color: #ff9b36;
}

/* List with checkmarks */
.list-check {
    list-style: none;
}

.list-check li {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
}

.list-check li i {
    color: #F28C28;
    margin-right: 10px;
    margin-top: 3px;
    flex-shrink: 0;
}

html {
    scroll-behavior: smooth;
}

/* Smooth transitions */
* {
    transition: background-color 0.3s ease,
                color 0.3s ease,
                box-shadow 0.3s ease,
                transform 0.3s ease,
                border-color 0.3s ease;
}

/* Additional fixes */
body.dark-mode .section-title {
    color: #e5e5e5;
}

/* Responsive fixes */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 0 10px;
    }
    
    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .download-card {
        padding: 25px 20px;
        margin: 30px 0;
    }
    
    .download-card h3 {
        font-size: 1.5rem;
    }
    
    .download-icon {
        font-size: 2.5rem;
    }
    
    .btn-download {
        padding: 12px 20px;
        font-size: 1rem;
        width: 100%;
    }
}
/* ============================================================
   COOKIE BANNER
============================================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #0A1A2F;
    color: white;
    padding: 15px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
    z-index: 9999;
    display: none;
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    gap: 20px;
}

.cookie-content p {
    margin: 0;
    font-size: 0.9rem;
    flex: 1;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.btn-cookie {
    padding: 8px 15px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-accept {
    background: #F28C28;
    color: white;
}

.btn-accept:hover {
    background: #ff9b36;
}

.btn-info {
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-info:hover {
    background: rgba(255,255,255,0.1);
}

.dark-mode .cookie-banner {
    background: #05080c;
    border-top: 1px solid #333;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-content p {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-cookie {
        width: 100%;
        padding: 10px;
    }
}

/* ============================================================
   INDEX.HTML MOBILE FIXES 
============================================================ */
@media (max-width: 768px) {
    .home-hero {
        min-height: 180px;
        height: 35vh;
        max-height: 220px;
        padding: 20px 0 15px;
    }
    
    .home-hero h1 {
        font-size: 1.4rem;
        line-height: 1.2;
        margin-bottom: 8px;
    }
    
    .home-hero p {
        font-size: 0.85rem;
        line-height: 1.2;
        margin-bottom: 10px;
        max-height: 2.4em; 
        overflow: hidden;
        position: relative;
    }
    
    .home-hero p.truncate::after {
        content: '...';
        position: absolute;
        right: 0;
        bottom: 0;
        background: linear-gradient(to right, transparent, rgba(10,26,47,0.9) 40%);
        padding-left: 10px;
    }
    
    .hero-cta .btn {
        padding: 10px 12px;
        font-size: 0.85rem;
        min-height: 40px;
    }
}

@media (max-width: 400px) {
    .home-hero {
        min-height: 150px;
        height: 30vh;
        max-height: 180px;
        padding: 15px 0 10px;
    }
    
    .home-hero h1 {
        font-size: 1.2rem;
        margin-bottom: 5px;
    }
    
    .home-hero p {
        font-size: 0.8rem;
        line-height: 1.1;
        margin-bottom: 8px;
        max-height: 2.2em;
        /* Soluzione più semplice: mostra tutto su una riga */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .hero-cta .btn {
        padding: 8px 10px;
        font-size: 0.8rem;
        min-height: 36px;
    }
}

@media (max-width: 320px) and (max-height: 570px) {
    .home-hero {
        min-height: 120px !important;
        height: 25vh !important;
        padding: 10px 0 8px !important;
    }
    
    .home-hero h1 {
        font-size: 1.1rem !important;
        margin-bottom: 4px !important;
    }
    
    .home-hero p {
        display: none !important;
    }
    
    .hero-cta .btn {
        padding: 6px 8px !important;
        font-size: 0.75rem !important;
        min-height: 32px !important;
    }
}
/* ============================================================
   BREADCRUMB NAVIGATION - Aggiungi alla fine del file
============================================================ */

/* Breadcrumb Navigation */
.breadcrumb {
  margin-bottom: 30px;
  padding: 10px 15px;
  background: #f8f9fa;
  border-radius: 8px;
  font-size: 0.9rem;
}

.breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb li:not(:last-child):after {
  content: "›";
  margin: 0 10px;
  color: #666;
}

.breadcrumb a {
  color: #0A1A2F;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
  color: #F28C28;
}

.breadcrumb [aria-current="page"] {
  color: #666;
  font-weight: 600;
}

/* Dark mode support */
body.dark-mode .breadcrumb {
  background: #1a1f27;
}

body.dark-mode .breadcrumb a {
  color: #e5e5e5;
}

body.dark-mode .breadcrumb [aria-current="page"] {
  color: #aaa;
}

@media (max-width: 768px) {
  .breadcrumb {
    padding: 8px 10px;
    font-size: 0.85rem;
  }
  
  .breadcrumb li:not(:last-child):after {
    margin: 0 6px;
  }
}

/* ============================================================
   WHATSAPP BUTTON STYLE - Aggiungi alla fine del file
============================================================ */

.btn-whatsapp {
  background-color: #25D366 !important;
  color: white !important;
  border: none !important;
}

.btn-whatsapp:hover {
  background-color: #1da851 !important;
  transform: translateY(-3px);
}

/* ============================================================
   ACCESSIBILITY IMPROVEMENTS
============================================================ */

/* Focus styles for better accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid #F28C28;
  outline-offset: 2px;
}

/* Skip to main content link for screen readers */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #0A1A2F;
  color: white;
  padding: 8px;
  z-index: 10000;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
  }
  
  a[href]:after {
    content: " (" attr(href) ")";
  }
  
  .page-hero {
    background: white !important;
    color: black !important;
    text-shadow: none !important;
  }
}
/* ============================================================
   PAGINA 404 - STILI CORRETTI
============================================================ */

/* Contenuto errore */
.error-content {
    text-align: center;
    padding: 50px 0;
}

.error-icon {
    font-size: 4rem;
    color: #F28C28;
    margin-bottom: 20px;
    display: block;
}

.error-description {
    max-width: 600px;
    margin: 20px auto;
    font-size: 1.1rem;
    color: #555;
}

body.dark-mode .error-description {
    color: #ccc;
}

/* Bottoni errore */
.error-buttons {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-3px);
}

/* Box suggerimenti */
.suggestions-box {
    margin-top: 40px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid #dee2e6;
}

body.dark-mode .suggestions-box {
    background: #1a1f27;
    border-color: #444;
}

.suggestions-box h3 {
    color: #0A1A2F;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.3rem;
}

body.dark-mode .suggestions-box h3 {
    color: #e5e5e5;
}

/* Link suggerimenti */
.suggestions-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.suggestion-link {
    display: inline-block;
    padding: 10px 20px;
    background: #e9ecef;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #ced4da;
}

.suggestion-link:hover {
    background: #dee2e6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

body.dark-mode .suggestion-link {
    background: #2a2f37;
    color: #e5e5e5;
    border-color: #444;
}

body.dark-mode .suggestion-link:hover {
    background: #3a3f47;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Responsive per pagina 404 */
@media (max-width: 768px) {
    .error-content {
        padding: 30px 0;
    }
    
    .error-icon {
        font-size: 3rem;
    }
    
    .error-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .error-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .suggestions-box {
        padding: 20px 15px;
    }
    
    .suggestions-links {
        gap: 8px;
    }
    
    .suggestion-link {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .suggestions-links {
        flex-direction: column;
        align-items: center;
    }
    
    .suggestion-link {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }
}