:root {
    --bento-gap: 20px;
    --bento-radius: 18px;
    --bento-bg: #ffffff;
    --bento-border: 1px solid #eef0f3;
    --brand-orange: #ff9900;
    --brand-green: #15b663;
    --text-dark: #333333;
    --text-muted: #666666;
}

/* Reset Base */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background-color: #f8f9fa; color: var(--text-dark); line-height: 1.5; }
h1, h2, h3, h4 { font-family: 'Montserrat', sans-serif; font-weight: 700; color: #111; }
a { color: var(--brand-orange); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }
img { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* HEADER & UTILITY STRIPS */
.header-top { display: flex; flex-direction: column; padding: 15px 0; gap: 15px; border-bottom: 1px solid #ededed; }
.logo img { max-width: 280px; width: 100%; }
.header-right { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.contact-links { display: flex; flex-direction: column; gap: 8px; font-size: 16px; font-weight: 500; }
.contact-links a { color: var(--text-muted); display: inline-flex; align-items: center; gap: 8px; }
.contact-links i { color: var(--brand-orange); font-size: 20px; }

/* SYSTEM NAV HAMBURGER (PURE CSS) */
.main-nav { background: #ffffff; border-bottom: 1px solid #ededed; border-top: 1px solid #ededed; position: relative; }
.nav-container { display: flex; flex-direction: column; width: 100%; }

/* Checkbox per il controllo dello stato del menu (nascosta) */
#menu-toggle { display: none; }

/* Bottone Hamburger grafico per mobile */
.menu-button-container { display: flex; height: 50px; width: 100%; justify-content: space-between; align-items: center; cursor: pointer; padding: 0 15px; user-select: none; }
.menu-button-text { font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 14px; text-transform: uppercase; color: #111; }
.menu-icon { font-size: 22px; color: #111; }

/* Lista dei link (nascosta di base su mobile) */
.nav-list { display: none; flex-direction: column; list-style: none; width: 100%; background: #ffffff; }
.nav-list li { border-bottom: 1px solid #f1f3f5; }
.nav-list li a { display: block; padding: 15px 20px; color: #444; font-weight: 500; font-size: 15px; width: 100%; }
.nav-list li.active a { color: var(--brand-orange); font-weight: 700; background: #fffcf7; }

/* Quando la checkbox è spuntata, mostra la lista su mobile */
#menu-toggle:checked ~ .nav-list { display: flex; }

/* ==========================================
   BRICIOLE DI PANE (BREADCRUMBS) RESPONSIVE
   ========================================== */
.breadcrumbs { 
    padding: 15px 0; 
    background: #f1f3f5; 
    border-bottom: 1px solid #eef0f3; 
}

/* Di base su Mobile: elementi incolonnati e allineati a sinistra */
.breadcrumbs-inner { 
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
}

.breadcrumbs h1 { 
    font-size: 20px; 
    line-height: 1.2;
}

/* Lista dei link ottimizzata per schermi piccoli */
.breadcrumb-links { 
    list-style: none; 
    display: flex; 
    flex-wrap: wrap; /* Permette ai link di andare a capo se il titolo è molto lungo su schermi mini */
    gap: 6px; 
    font-size: 13px; 
    color: var(--text-muted); 
}

.breadcrumb-links li {
    display: inline-flex;
    align-items: center;
    /* Evita che la singola parola si spezzi a metà nei telefoni stretti */
    white-space: nowrap; 
}

/* Separatore / tra i link */
.breadcrumb-links li+li::before { 
    content: "/"; 
    margin-right: 6px; 
    color: #ccc; 
}

.breadcrumb-links a {
    color: var(--brand-orange);
}

.breadcrumb-links .active { 
    color: var(--text-dark); 
    font-weight: 500;
    /* Se l'ultimo link (la pagina corrente) è troppo lungo su mobile, mette i puntini di sospensione (...) */
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px; 
}

/* CONTENITORE PRINCIPALE BENTO GRID (MOBILE-FIRST) */
.bento-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--bento-gap);
    margin: 30px 0 50px 0;
}

/* CARD STYLE BASE */
.bento-card {
    background: var(--bento-bg);
    border: var(--bento-border);
    border-radius: var(--bento-radius);
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.bento-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.06);
}

.bento-card h2, .bento-card h3 { margin-bottom: 15px; font-size: 20px; line-height: 1.3; }
.bento-card p { color: #555; font-size: 15px; line-height: 1.6; }

/* MICRO-GRID INTERNA PER LE IMMAGINI */
.bento-gallery-inner { display: grid; grid-template-columns: 1fr; gap: var(--bento-gap); }
.gallery-item img { width: 100%; border-radius: 12px; object-fit: cover; height: 200px; display: block; }

/* PULSANTI DELLE CARD */
.bento-btn { 
    display: block; 
    width: 100%; 
    text-align: center; 
    padding: 14px; 
    color: #fff !important; 
    border-radius: 10px; 
    font-weight: 600; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    margin-top: 15px;
}
.btn-orange { background-color: var(--brand-orange); }
.btn-green { background-color: var(--brand-green); }

.side-card { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.side-card img { max-height: 70px; margin-bottom: 15px; object-fit: contain; }

.tax-block { 
    background: linear-gradient(135deg, #fffcf6 0%, #fff8eb 100%); 
    border-left: 5px solid var(--brand-orange); 
}

.features-block ul { padding-left: 20px; margin-top: 15px; }
.features-block li { margin-bottom: 8px; line-height: 1.6; color: #444; }

/* STRUTTURA TABELLA RESPONSIVA NATIVA */
.table-responsive { overflow-x: auto; width: 100%; margin-top: 15px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
th, td { padding: 12px; border-bottom: 1px solid #eee; }
th { background: #f9f9f9; font-weight: 700; color: #111; }
td.status { color: var(--brand-green); font-weight: 600; }

/* FAQ STYLE */
.faq-item h4 { font-size: 15px; margin: 15px 0 5px 0; color: #111; }
.faq-item p { font-size: 14px; }

/* COLLEGAMENTI SEO RAPIDI */
.bento-navigation-card ul { list-style: none; margin-top: 10px; line-height: 2; font-size: 13px; }

/* FOOTER STRUTTURALE */
.footer-v1 { background: #1a1a1a; color: #ccc; padding: 40px 0 20px 0; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 30px; border-bottom: 1px solid #333; padding-bottom: 30px; }
.footer-col h2 { color: #fff; font-size: 16px; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-col address { font-style: normal; line-height: 1.8; }
.footer-col address a, .footer-col ul a { color: #aaa; }
.footer-col address a:hover, .footer-col ul a:hover { color: #fff; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.social-icons { display: flex; gap: 15px; margin-top: 15px; }
.social-icons a { color: #fff; font-size: 24px; }

.copyright-bar { display: flex; flex-direction: column; gap: 10px; padding-top: 20px; font-size: 13px; text-align: center; }
.copyright-bar a { color: #888; margin: 0 5px; }

/* ==========================================
   MEDIA QUERY: TABLET (>= 768px)
   ========================================== */
@media (min-width: 768px) {
    .header-top { flex-direction: row; justify-content: space-between; align-items: center; }
    .header-right { align-items: flex-end; }
    .contact-links { flex-direction: row; gap: 20px; }
    
    /* Trasformazione da Hamburger a Menu Orizzontale Esteso */
    .menu-button-container { display: none; }
    .nav-list { display: flex !important; flex-direction: row; width: auto; justify-content: flex-start; }
    .nav-list li { border-bottom: none; }
    .nav-list li a { padding: 15px 20px; text-align: center; width: auto; }
    .nav-list li.active a { border-bottom: 2px solid var(--brand-orange); background: transparent; }

/* BREAKPOINT BREADCRUMBS: su schermi grandi il titolo va a sinistra e i link a destra */
    .breadcrumbs {
        padding: 20px 0;
    }
    .breadcrumbs-inner { 
        flex-direction: row; 
        justify-content: space-between; 
        align-items: center; 
    }
    .breadcrumbs h1 { 
        font-size: 24px; 
    }
    .breadcrumb-links { 
        font-size: 14px; 
        gap: 8px;
    }
    .breadcrumb-links li+li::before { 
        margin-right: 8px; 
    }
    .breadcrumb-links .active {
        max-width: none; /* Rimuove il limite di larghezza sui display grandi */
    }
    
    .bento-container { grid-template-columns: repeat(2, 1fr); }
    .hero-block, .features-block, .gallery-block, .pricing-block, .tax-block, .faq-block, .bento-navigation-card { grid-column: span 2; }
    .bento-gallery-inner { grid-template-columns: repeat(3, 1fr); }
    
    .side-card { grid-column: span 1; }
    
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
    .copyright-bar { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* ==========================================
   MEDIA QUERY: DESKTOP (>= 992px)
   ========================================== */
@media (min-width: 992px) {
    .bento-container { grid-template-columns: repeat(12, 1fr); }
    
    .hero-block { grid-column: span 8; }
    .side-card-1 { grid-column: span 4; }
    
    .features-block { grid-column: span 8; }
    .side-card-2 { grid-column: span 4; }
    
    .gallery-block { grid-column: span 12; }
    
    .pricing-block { grid-column: span 6; }
    .faq-block { grid-column: span 6; }
    
    .tax-block { grid-column: span 8; }
    .side-card-3 { grid-column: span 4; }
    
    .side-card-4 { grid-column: span 4; }
    .bento-navigation-card { grid-column: span 8; }
}