/* Colori principali */
:root {
    --blue: #4a6fa5;
    --orange: #fca311;
    --strong-green: #d1ffd1;
    --mid-gray: #ebebeb;
    --text-color: #333;
    --light-green: #e9f5e9;
    --promo-red: #e74c3c;
    --soft-orange: #ffb74d;
    --light-blue-header: #e3f2fd;
}

/* Stili generali */
body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.main-content {
    max-width: 900px;
    margin: 0 auto;
}

/* Navigazione */
nav {
    background-color: var(--blue);
    padding: 15px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: color 0.3s ease;
    cursor: pointer;
}

nav a:hover {
    color: var(--orange);
}

nav a.active {
    border-bottom: 2px solid var(--orange);
}

/* Header */
.main-header {
    text-align: center;
    padding: 40px 20px;
    background-color: var(--light-blue-header);
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.main-header h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin: 0 0 10px;
}

.intro-text, .intro-text-secondary {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1em;
    color: #555;
}

.intro-text-secondary {
    margin-top: 15px;
}

/* Sezioni principali */
.top-sections-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .top-sections-container {
        flex-direction: row;
    }
    
    .articles-grid {
        flex: 2;
    }

    .contact-and-form-container {
        flex: 1;
    }
}

/* Lista articoli Home */
#articles-list-home {
    display: grid;
    gap: 20px;
}

@media (min-width: 768px) {
    #articles-list-home {
        grid-template-columns: repeat(2, 1fr);
    }
}

.article-teaser-link {
    text-decoration: none;
    color: inherit;
}

/* --- INIZIO MODIFICHE: BOX ARTICOLI --- */
.articles-section,
.article-preview {
    background-color: #ffffff;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.articles-section:hover,
.article-preview:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

/* Stile per alternare i colori di sfondo dei box */
.articles-section:nth-child(even),
.article-preview:nth-child(even) {
    background-color: #f9f9fc;
}

.articles-section h3,
.article-preview h3 {
    color: #3498db;
    margin-top: 0;
    font-size: 1.2em;
}

.articles-section p,
.article-preview p {
    font-size: 0.95em;
    color: #666;
    margin-bottom: 10px;
}

/* Pulsanti */
.cta-button, .nav-button, .chat-button, .read-more-link {
    display: inline-block;
    padding: 12px 20px;
    background-color: var(--soft-orange);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: bold;
    margin-top: 10px;
}

.cta-button:hover, .nav-button:hover, .chat-button:hover, .read-more-link:hover {
    background-color: var(--orange);
}

/* CORREZIONE: Assicura che il testo del pulsante della chat sia bianco */
.chat-button {
    color: white !important;
}

/* Box contatti */
.tally-form-container, .contact-info-box {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.contact-info-box h2, .tally-form-container h2 {
    color: #2c3e50;
    margin-top: 0;
}

.contact-info-box ul {
    list-style: none;
    padding: 0;
}

.contact-info-box li {
    margin-bottom: 10px;
}

.contact-info-box strong {
    color: #333;
    font-weight: bold;
}

/* NUOVO STILE PER PAGINA CONTATTI */
.contact-info-box li {
    font-size: 1.1em;
    color: var(--blue);
    font-weight: bold;
}

.all-articles-button-container {
    text-align: center;
    margin-top: 20px;
}

.nav-buttons-footer {
    text-align: center;
    padding: 20px;
    border-top: 1px solid #ddd;
    margin-top: 20px;
}

/* STILE PULSANTI FOOTER - Colore Verde */
.nav-buttons-footer .nav-button {
    background-color: #6c8c7d;
    color: white;
    font-weight: bold;
    min-width: 150px; 
    text-decoration: none;
    border-radius: 50px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 10px;
    padding: 12px 25px;
    font-size: 1rem;
    box-sizing: border-box;
    border: none;
    cursor: pointer;
    line-height: 1.2;
    min-height: 48px;
}

.nav-buttons-footer .nav-button:hover {
    background-color: #5a7266;
    transform: translateY(-2px);
}

.page-title {
    color: #2c3e50;
    text-align: center;
    font-size: 2.2em;
    margin-bottom: 20px;
}

/* Lista articoli pagina dedicata */
.articles-container {
    display: grid;
    gap: 20px;
    padding: 0 20px;
}

@media (min-width: 768px) {
    .articles-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Pagine degli articoli singoli */
.article-content {
    background-color: #f9f9fc;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 20px auto;
}

.article-content h1 {
    color: #2c3e50;
    font-size: 2.2em;
    margin-top: 0;
}

.article-content h2 {
    color: #3498db;
    border-bottom: 2px solid #ddd;
    padding-bottom: 5px;
}

.article-content p, .article-content ul, .article-content li {
    font-size: 1.1em;
    color: #444;
}

.article-content ul {
    list-style-type: disc;
    padding-left: 20px;
}

.article-content strong {
    color: #2c3e50;
}

.final-note {
    font-style: italic;
    color: #888;
    margin-top: 20px;
}

.article-date {
    color: #888;
    font-size: 0.9em;
    margin-top: -10px;
    margin-bottom: 15px;
}

/* Mobile */
@media (max-width: 768px) {
    #articles-list-home {
        display: grid;
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .articles-section {
        padding: 15px;
    }
}

/* STILI SPECIFICI PER LA PAGINA SERVIZI - CORRETTI */
.services-intro-section, .discount-codes-section, .call-to-action-section {
    text-align: center;
    margin-bottom: 20px;
}

.services-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    align-items: stretch;
}

.service-box {
    background-color: #ffffff;
    border: 1px solid #ddd;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.service-box h2 {
    color: var(--blue);
    margin-top: 0;
}

.service-box p {
    flex-grow: 1;
}

.discount-codes-section {
    margin-top: 20px;
    padding: 20px;
    background-color: #f9f9fc;
    border-radius: 8px;
    text-align: center;
}