﻿/* =================================================================
   STILI CSS PER PAGINA SEGNALETICA - CARTELLI.IT
   (Derivato e uniformato dallo stile Chi Siamo)
   ================================================================= */

/* -----------------------------------------------------------------
   0. VARIABILI ROOT & BASE UTILITY
   ----------------------------------------------------------------- */
:root {
    --cs-primary: #2e7d32;        
    --cs-primary-dark: #1b5e20;
    --cs-primary-light: #e8f5e9;
    --cs-dark: #666666;
    --cs-grey-bg: #f8f9fa;
    --cs-border: #e0e0e0;
    --cs-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --cs-radius: 0px;
    --cs-text-color: #666666;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* -----------------------------------------------------------------
   1. LAYOUT GENERALE
   ----------------------------------------------------------------- */
.cs-container {
    color: var(--cs-text-color);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px 10px 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: 10px;
}

.cs-section-title {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    color: #666666;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 0;
}

.cs-responsive-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain; /* Garantisce la visione completa dell'immagine */
}

/* -----------------------------------------------------------------
   2. HERO BLOCK & RIGHE / COLONNE
   ----------------------------------------------------------------- */
.cs-about-alternate {
    background-color: #ffffff;
    padding: 0 0 10px 0;
}

.cs-hero-block {
    margin-top: 0;
    margin-bottom: 35px;
    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: 0 !important;
    margin-bottom: 25px;
}

.cs-hero-img-wrapper .cs-responsive-img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

.cs-hero-title {
    font-size: 32px !important;
}

.cs-hero-content {
    text-align: left;
}

.cs-hero-content p {
    font-size: 15px;
    color: var(--cs-text-color);
    line-height: 1.7;
    margin-bottom: 12px;
}

.cs-hero-content p:last-child {
    margin-bottom: 0;
}

/* Layout a 2 Colonne per Segnaletica Standard e Personalizzata */
.cs-two-columns {
    display: flex;
    gap: 60px;
    align-items: flex-start; /* Allinea in alto eliminando distensioni artificiali */
}

.cs-col-block {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cs-col-block .cs-col-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    text-align: left; /* Allineamento a sinistra */
}

/* Elenco Punti con Check Verde */
.cs-check-list {
    list-style: none;
    padding: 0;
    margin: 5px 0 15px 0;
}

.cs-check-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 15px;
    color: var(--cs-text-color);
    line-height: 1.5;
}

.cs-check-list li:last-child {
    margin-bottom: 0;
}

.cs-check-icon {
    width: 18px;
    height: 18px;
    color: #4caf50; /* Verde tema del pulsante */
    flex-shrink: 0;
    margin-top: 3px;
}

/* Eliminazione spazio vuoto tra il testo e i pulsanti */
.cs-col-block .cs-btn-wrapper {
    margin-top: 15px; /* Spazio controllato direttamente sotto al testo */
    padding-top: 0;
}

/* Immagine completa e non tagliata */
.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: 0 !important;
    margin-bottom: 20px;
}

.cs-row-title {
    font-size: 22px;
    font-weight: 700;
    color: #666666;
    margin-top: 0;
    margin-bottom: 15px;
    text-align: left; /* Allineamento titolo a sinistra */
}

.cs-col-content p {
    font-size: 15px;
    color: var(--cs-text-color);
    line-height: 1.7;
    margin-bottom: 12px;
    text-align: left; /* Allineamento testo paragrafi a sinistra */
}

/* -----------------------------------------------------------------
   3. GALLERIA IMMAGINI (7 IMMAGINI SU UNA RIGA IN DESKTOP)
   ----------------------------------------------------------------- */
.cs-gallery-section {
    margin-top: 25px;
    margin-bottom: 15px;
}

.cs-gallery-grid-full {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}

.cs-gallery-item {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--cs-border);
    border-radius: 0 !important;
    background-color: #ffffff;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    box-shadow: var(--cs-shadow);
}

.cs-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.cs-gallery-item:hover img {
    transform: scale(1.06);
    opacity: 0.9;
}

/* Lightbox Modal */
.cs-lightbox {
    display: none;
    position: fixed;
    z-index: 99999;
    padding-top: 30px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.cs-lightbox-content {
    margin: auto;
    display: block;
    max-width: 1000px;
    max-height: 750px;
    width: auto;
    height: auto;
    object-fit: contain;
    border: none !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    animation: csZoom 0.25s ease-out;
}

@keyframes csZoom {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* -----------------------------------------------------------------
   4. PERCHÉ SCEGLIERE LA NOSTRA SEGNALETICA (CARD GRID)
   ----------------------------------------------------------------- */
.cs-why-us {
    background-color: #f5f5f5;
    color: #666666;
    padding: 2.5rem 1rem 3rem 1rem;
    margin: 10px auto 20px auto;
    box-sizing: border-box;
    width: 100%;
}

.cs-why-us .cs-section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #666666;
    margin-top: 0;
    margin-bottom: 2rem;
}

.cs-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.cs-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 0 !important;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cs-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cs-card .img-wrapper {
    max-width: 60px;
    margin: 0 auto 10px auto;
}

.cs-card .img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.cs-card h4 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    color: #666666;
    font-weight: 700;
}

.cs-card p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--cs-text-color);
    line-height: 1.4;
}

/* -----------------------------------------------------------------
   5. BOTTONI
   ----------------------------------------------------------------- */
.cs-btn-wrapper {
    width: 100%;
}

.cs-btn-scopri {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background-color: #4caf50 !important;
    color: #ffffff !important;
    font-size: 0.9rem !important;
    font-weight: 600;
    padding: 12px 8px;
    text-align: center;
    text-decoration: none !important;
    transition: background-color 0.2s linear;
    border-radius: 0 !important;
}

.cs-btn-scopri:hover {
    background-color: #424242 !important;
    color: #ffffff !important;
}

/* -----------------------------------------------------------------
   6. MEDIA QUERIES & OTTIMIZZAZIONE MOBILE
   ----------------------------------------------------------------- */
@media (max-width: 992px) {
    .cs-gallery-grid-full {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .cs-container {
        padding: 0 15px 10px 15px !important;
    }

    .cs-container p,
    .cs-hero-content p, 
    .cs-col-content p,
    .cs-card p,
    .cs-check-list li {
        font-size: 14px !important;
        line-height: 1.5 !important;
    }

    .cs-hero-title,
    .cs-section-title,
    .cs-row-title,
    .cs-why-us .cs-section-title {
        font-size: 20px !important;
        line-height: 1.35 !important;
        margin-bottom: 12px !important;
    }

    .cs-card h4 {
        font-size: 18px !important;
    }

    /* Layout monocolonna per mobile */
    .cs-two-columns {
        flex-direction: column !important;
        gap: 25px !important;
    }

    /* Galleria scorrevole Swipe Touch */
    .cs-gallery-grid-full {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 10px !important;
        padding-bottom: 5px;
    }

    .cs-gallery-item {
        flex: 0 0 75% !important;
        max-width: 280px;
        scroll-snap-align: start;
    }

    .cs-grid-3 {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .cs-lightbox-content {
        max-width: min(95vw, 1000px);
        max-height: min(80vh, 750px);
    }
}