/* =================================================================
   GUIDA PRODOTTI - CSS UNIFICATO COMPLETO CON TESTI UNIFORMATI (CARTELLI.IT)
   File: /CSS/landing/guida_prodotti.css
   ================================================================= */

/* -----------------------------------------------------------------
   0. VARIABILI ROOT & RESET DI BASE
   ----------------------------------------------------------------- */
:root {
    --cs-primary: #4caf50;        /* Verde principale */
    --cs-primary-dark: #388e3c;   /* Verde scuro hover */
    --cs-primary-light: #e8f5e9;
    --cs-accent: #4caf50;
    --cs-dark: #666666;
    --cs-text-color: #666666;
    --cs-grey-bg: #f5f5f5;
    --cs-border: #e0e0e0;
    --cs-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --cs-radius: 0px;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

header .BG,
.contenuti .path {
    display: none;
}

/* -----------------------------------------------------------------
   1. LAYOUT GENERALE & STRUTTURA
   ----------------------------------------------------------------- */
.contenuti {
    margin-bottom: 1rem;
}

.cs-container {
    color: var(--cs-text-color);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px 20px 25px;
    line-height: 1.6;
    box-sizing: border-box;
}

.cs-container *, 
.cs-container *::before, 
.cs-container *::after {
    box-sizing: border-box;
}

.cs-section {
    margin-bottom: 20px;
    padding-bottom: 0 !important;
}

/* TITOLO DI SEZIONE (H2) - MANTENUTO ORIGINALE */
.cs-section-title {
    text-align: left;
    font-size: 26px;
    font-weight: 700;
    color: var(--cs-dark);
    margin-bottom: 15px;
    position: relative;
}

.cs-section-title.text-center {
    text-align: center;
}

sup {
    font-size: 50%;
    vertical-align: super;
    line-height: 0;
}

.cs-separator,
.separator {
    height: 1px;
    background: linear-gradient(to right, transparent, #e0e0e0, transparent);
    margin: 30px auto !important;
    width: 100%;
}

.cs-responsive-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* -----------------------------------------------------------------
   2. UNIFORMAZIONE GENERALE DI TUTTI I TESTI (0.95rem / 15px)
   ----------------------------------------------------------------- */
.cs-container p,
.cs-hero-content p,
.cs-hero-intro-lead,
.cs-col-content p,
.cs-info-intro,
.cs-guide-intro p,
.cs-card p,
.cs-why-intro-text {
    font-size: 0.95rem !important; /* Uniforma la dimensione per tutti i paragrafi a 15px */
    color: var(--cs-text-color);
    line-height: 1.6 !important;
    margin-bottom: 12px;
    text-align: left !important;
}

/* -----------------------------------------------------------------
   3. SEZIONE HERO, INTRODUZIONE & HIGHLIGHTS
   ----------------------------------------------------------------- */
.cs-about-alternate {
    background-color: #ffffff;
    padding: 0 0 20px 0;
}

.cs-hero-block {
    margin-top: 0;
    margin-bottom: 30px;
    width: 100%;
}

.cs-hero-img-wrapper {
    width: 100%;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius);
    margin-bottom: 25px;
}

.cs-hero-img-wrapper .cs-responsive-img {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
}

/* TITOLO HERO (H1) - MANTENUTO ORIGINALE */
.cs-hero-title {
    font-size: 32px !important;
    font-weight: 700;
    color: var(--cs-dark);
    margin-top: 0;
    margin-bottom: 15px;
}

.cs-hero-content {
    text-align: left;
}

.cs-hero-gallery {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-bottom: 25px;
}

.cs-hero-gallery a {
    display: block;
    border: 1px solid var(--cs-border);
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background-color: #ffffff;
}

.cs-hero-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cs-hero-gallery a:hover img {
    transform: scale(1.08);
}

/* BARRA VANTAGGI CENTRATA */
.cs-highlights-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 25px;
    background-color: var(--cs-grey-bg);
    padding: 15px 20px;
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius);
    margin-top: 20px;
    margin-bottom: 25px;
}

.cs-highlight-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.95rem; /* Dimensione uniformata */
    font-weight: 600;
    color: var(--cs-dark);
    text-align: center;
}

.cs-highlight-item svg {
    width: 22px;
    height: 22px;
    stroke: #4caf50;
    flex-shrink: 0;
}

.cs-sub-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--cs-dark);
    margin-top: 25px;
    margin-bottom: 12px;
    text-align: left;
}

/* -----------------------------------------------------------------
   4. PULSANTI E CALL TO ACTION
   ----------------------------------------------------------------- */
.cs-hero-btn-wrapper,
.cs-btn-wrapper {
    margin-top: 20px;
    margin-bottom: 25px;
    width: 100%;
    text-align: center;
}

.cs-btn-cta {
    display: inline-block;
    background-color: #4caf50 !important;
    color: #ffffff !important;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 14px 26px;
    text-align: center;
    text-decoration: none !important;
    border-radius: var(--cs-radius);
    border: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.cs-card-btn-wrapper {
    margin-top: auto;
    padding-top: 15px;
    width: 100%;
}

.cs-btn-card {
    display: block;
    width: 100%;
    padding: 10px 12px;
    font-size: 0.88rem;
    background-color: #4caf50;
    color: #ffffff !important;
    text-align: center;
    font-weight: 700;
    transition: background-color 0.2s ease;
    box-sizing: border-box;
}

/* HOVER PER TUTTI I PULSANTI -> GRIGIO SCURO (#424242) */
.cs-btn-cta:hover,
.cs-btn-card:hover,
.cs-btn-scopri:hover,
.cs-product-card:hover .cs-btn-card {
    background-color: #424242 !important; /* Grigio scuro */
    color: #ffffff !important;
}

/* -----------------------------------------------------------------
   5. LISTE ED ELENCHI UNIFORMATI (0.95rem / 15px)
   ----------------------------------------------------------------- */
.cs-check-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 15px 0 25px 0 !important;
    text-align: left;
}

.cs-check-list li,
.cs-info-list li,
.cs-bullet-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.95rem !important; /* Dimensione uniformata a 15px */
    line-height: 1.6 !important;
    color: var(--cs-text-color);
    text-align: left;
}

.cs-check-icon {
    width: 20px;
    height: 20px;
    stroke: #4caf50;
    flex-shrink: 0;
    margin-top: 3px;
}

.cs-info-list {
    list-style-type: disc !important;
    padding-left: 20px !important;
    margin: 10px 0 20px 0 !important;
}

.cs-info-list li {
    display: list-item;
}

/* RIGHE ALTERNATE */
.cs-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 40px;
}

.cs-row:last-child {
    margin-bottom: 0;
}

.cs-row-reverse {
    flex-direction: row-reverse;
}

.cs-col-img {
    width: 45%;
    padding-left: 25px !important; /* Aumentato lo spazio interno */
    padding-right: 25px !important;
    box-sizing: border-box;
}

.cs-col-content {
    width: 55%;
    padding-right: 20px !important;
    text-align: left;
    box-sizing: border-box;
}

.cs-img-wrapper {
    width: 100%;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius);
}

.cs-img-clean {
    width: 100%;
    border: none !important;
    box-shadow: none !important;
}

.cs-row-title,
.cs-row-title-with-badge {
    font-size: 22px;
    font-weight: 700;
    color: var(--cs-dark);
    margin-top: 0;
    margin-bottom: 15px;
    text-align: left;
}

.cs-row-title-with-badge {
    display: flex;
    align-items: center;
}

.cs-title-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background-color: #f0f0f0;
    color: #444444;
    border: 1px solid #d6d6d6;
    border-radius: 4px;
    margin-right: 10px;
    vertical-align: middle;
    flex-shrink: 0;
}

.cs-title-badge svg {
    width: 16px;
    height: 16px;
    stroke: #555555;
}

/* -----------------------------------------------------------------
   6. SEZIONE GUIDA E CARD BIANCHE (GRID)
   ----------------------------------------------------------------- */
.cs-guide-section {
    background-color: var(--cs-grey-bg);
    padding: 35px 0;
    margin: 30px 0;
    border-top: 1px solid var(--cs-border);
    border-bottom: 1px solid var(--cs-border);
}

.cs-guide-intro {
    margin-bottom: 25px;
    text-align: left !important;
}

.cs-why-us {
    background-color: var(--cs-grey-bg);
    color: var(--cs-dark);
    padding: 2.5rem 1rem;
    margin: 1.5rem auto;
    width: 100%;
    box-sizing: border-box;
}

.cs-why-us .cs-section-title {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    color: var(--cs-dark);
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.cs-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.cs-card {
    background-color: #ffffff;
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    height: 100%;
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cs-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.cs-card h3,
.cs-card h4 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    color: var(--cs-dark);
    font-weight: 700;
    text-align: left;
}

/* -----------------------------------------------------------------
   7. GRIGLIA PRODOTTI & REGOLAZIONE DINAMICA CARD PER RIGA
   ----------------------------------------------------------------- */
.cs-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* REGOLE DESKTOP (> 992px): DISPOSIZIONE DINAMICA SULLA BASE DEL NUMERO DI CARD */
@media (min-width: 993px) {

    /* 8 Prodotti -> 4 per riga (2 righe da 4) */
    .cs-products-grid:has(> .cs-product-card:nth-child(8):last-child) {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 15px !important;
    }

    /* 6 Prodotti -> 3 per riga (2 righe da 3) */
    .cs-products-grid:has(> .cs-product-card:nth-child(6):last-child) {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px !important;
    }

    /* 4 Prodotti -> tutti su 1 riga (1 riga da 4) */
    .cs-products-grid:has(> .cs-product-card:nth-child(4):last-child),
    .cs-products-grid-4 {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 15px !important;
    }

    /* 3 Prodotti -> tutti su 1 riga (1 riga da 3) */
    .cs-products-grid:has(> .cs-product-card:nth-child(3):last-child) {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px !important;
    }

    /* 2 Prodotti -> 2 su 1 riga */
    .cs-products-grid:has(> .cs-product-card:nth-child(2):last-child) {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px !important;
    }
}

.cs-product-card {
    background-color: #ffffff;
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    text-align: left;
}

.cs-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.cs-product-card .cs-card-img-wrapper {
    width: 100%;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    overflow: hidden;
    border: none;
    box-shadow: none;
}

.cs-product-img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.cs-product-card .cs-card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: left !important;
}

.cs-product-card h3 {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--cs-dark);
    margin: 0 0 12px 0;
    text-align: left !important;
}

.cs-product-specs {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 15px 0 !important;
    width: 100% !important;
    text-align: left !important;
}

/* BULLET POINT DELLE CARD PRODOTTO UNIFORMATI (0.95rem / 15px) */
.cs-product-specs li {
    position: relative;
    padding-left: 16px !important;
    margin-bottom: 6px !important;
    font-size: 0.95rem !important; /* Uniformato a 15px */
    line-height: 1.6 !important;
    color: var(--cs-dark) !important;
    text-align: left !important;
}

.cs-product-specs li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
    color: #4caf50;
    font-weight: bold;
    font-size: 1.1rem;
}

.cs-badge-rating {
    color: #4caf50;
    letter-spacing: 2px;
}

/* -----------------------------------------------------------------
   8. TABELLE E NORMATIVE
   ----------------------------------------------------------------- */
.cs-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 25px;
}

.cs-tables-grid-2 {
    display: flex;
    gap: 25px;
    margin-bottom: 20px;
}

.cs-table-col {
    flex: 1;
}

.cs-table-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cs-dark);
    margin-top: 0;
    margin-bottom: 12px;
    text-align: left;
}

.cs-custom-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    border: 1px solid var(--cs-border);
}

.cs-custom-table th {
    background-color: #f5f5f5;
    color: var(--cs-dark) !important;
    font-weight: 700;
    padding: 10px 12px !important;
    border: 1px solid var(--cs-border);
    border-bottom: 2px solid var(--cs-dark);
    text-align: left !important;
    font-size: 0.88rem !important;
}

.cs-custom-table td {
    padding: 9px 12px !important;
    border: 1px solid var(--cs-border);
    color: var(--cs-dark) !important;
    font-size: 0.88rem !important;
    text-align: left !important;
}

.cs-custom-table tr:nth-child(even) { 
    background-color: #fafafa; 
}

.cs-custom-table tr:hover { 
    background-color: #eeeeee; 
}

.cs-code-badge {
    display: inline-block;
    background-color: #e8f5e9;
    color: #2e7d32;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 3px 8px;
    border-radius: 3px;
    font-family: monospace, sans-serif;
}

.cs-tables-sub-grid {
    display: flex;
    gap: 25px;
}

.cs-table-sub-col {
    flex: 1;
}

/* -----------------------------------------------------------------
   9. MEDIA QUERIES RESPONSIVE (TABLET & MOBILE)
   ----------------------------------------------------------------- */
@media (max-width: 992px) {
    .cs-media-grid {
        flex-direction: column;
    }

    .cs-media-col-video, .cs-media-col-gallery {
        width: 100%;
        flex: 0 0 100%;
    }

    .cs-proposte-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .cs-container {
        padding: 0 15px 15px 15px !important;
    }

    .cs-container p, .cs-hero-content p, .cs-col-content p, .cs-card p, .cs-hero-intro-lead, .cs-product-specs li, .cs-check-list li {
        font-size: 14px !important;
        line-height: 1.5 !important;
    }

    .cs-hero-title, .cs-section-title, .cs-banner-title, .cs-row-title, .cs-row-title-with-badge {
        font-size: 20px !important;
        line-height: 1.35 !important;
    }

    .cs-row, .cs-row-reverse {
        flex-direction: column !important;
        margin-bottom: 25px !important;
    }

    .cs-col-img, .cs-col-content {
        width: 100% !important;
        padding: 0 !important;
    }

    .cs-col-img {
        margin-bottom: 15px !important;
    }

    .cs-grid-3 {
        grid-template-columns: 1fr;
    }

    .cs-highlights-bar {
        flex-direction: column;
        gap: 12px;
    }

    .cs-tables-grid-2,
    .cs-tables-sub-grid {
        flex-direction: column;
        gap: 15px;
    }

    /* SCORRIMENTO ORIZZONTALE DELLE CARD PRODOTTI SU MOBILE */
    .cs-products-grid {
        display: flex !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 15px !important;
        padding-bottom: 15px !important;
        margin-bottom: 15px !important;
    }

    .cs-products-grid .cs-product-card {
        flex: 0 0 80% !important;
        max-width: 300px !important;
        scroll-snap-align: start !important;
    }

    /* Personalizzazione barra di scorrimento (opzionale) */
    .cs-products-grid::-webkit-scrollbar {
        height: 6px;
    }

    .cs-products-grid::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
    }

    .cs-products-grid::-webkit-scrollbar-thumb {
        background: #4caf50;
        border-radius: 3px;
    }
}

@media (max-width: 480px) {
    .cs-products-grid .cs-product-card {
        flex: 0 0 85% !important;
    }
}