/* how_it_works_style.css */

:root {
    /* Palette dei colori condivisa */
    --color-primary: #4D7298;     /* Blu scuro */
    --color-secondary: #77A6B6;   /* Blu medio */
    --color-accent: #9DC3C2;      /* Verde acqua */
    --color-light: #B3D89C;       /* Verde chiaro */
    --color-lighter: #D0EFB1;     /* Verde molto chiaro */
    --color-text: #333333;        /* Grigio scuro per il testo */
    --color-bg: #ffffff;          /* Bianco sfondo */
    --color-border: #9DC3C2;      /* Verde acqua per i bordi */
}

/* General styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    color: var(--color-text);
    line-height: 1.6;
}

.how-it-works-container {
    width: 100%;
    margin: 0 auto;
}

/* Section styling */
section {
    padding: 60px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

section:nth-child(odd) {
    background-color: var(--color-bg);
}

section:nth-child(even) {
    background-color: #f8f9fa;
}

h2 {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--color-primary);
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--color-secondary); /* Using the secondary color from palette */
}

.section-content {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 20px;
}

/* Feature cards layout for first section */
.feature-cards {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    flex-wrap: wrap;
}

.feature-card {
    width: 280px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature-card img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 20px;
}

.feature-card p {
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-text);
}

/* Second section - Image left, list right */
section:nth-child(2) .section-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

/* Smaller image class */
.smaller-image {
    max-width: 350px;
    flex: 0 0 40%;
}

section:nth-child(2) ul {
    flex: 0 0 45%;
    padding-left: 20px;
}

section:nth-child(2) li {
    margin-bottom: 12px;
    padding-left: 10px;
    position: relative;
    list-style-type: none;
}

section:nth-child(2) li::before {
    content: '•';
    color: var(--color-accent);
    font-weight: bold;
    font-size: 20px;
    position: absolute;
    left: -15px;
}

/* Third section - Text left, image right */
section:nth-child(3) .section-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

section:nth-child(3) p {
    flex: 0 0 45%;
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-text);
}

section:nth-child(3) img {
    flex: 0 0 40%;
    max-width: 350px;
}

/* Fourth section - "Who created" section */
section:nth-child(4) .section-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 30px;
}

section:nth-child(4) p {
    max-width: 800px;
    font-size: 16px;
}

section:nth-child(4) img {
    max-width: 350px;
    border-radius: 8px;
}

/* Fifth section - "How to use forum" */
section:nth-child(5) .section-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    flex-direction: row-reverse;
}

section:nth-child(5) img {
    flex: 0 0 40%;
    max-width: 350px;
}

section:nth-child(5) ul {
    flex: 0 0 45%;
    padding-left: 20px;
}

section:nth-child(5) li {
    margin-bottom: 12px;
    padding-left: 10px;
    position: relative;
    list-style-type: none;
}

section:nth-child(5) li::before {
    content: '•';
    color: var(--color-accent);
    font-weight: bold;
    font-size: 20px;
    position: absolute;
    left: -15px;
}

/* Sixth section - "How to verify" */
section:nth-child(6) .section-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

section:nth-child(6) ul {
    flex: 0 0 45%;
    padding-left: 20px;
}

section:nth-child(6) li {
    margin-bottom: 12px;
    padding-left: 10px;
    position: relative;
    list-style-type: none;
}

section:nth-child(6) li::before {
    content: '•';
    color: var(--color-accent);
    font-weight: bold;
    font-size: 20px;
    position: absolute;
    left: -15px;
}

section:nth-child(6) img {
    flex: 0 0 40%;
    max-width: 350px;
}

/* Learn More links */
.learn-more {
    display: inline-block;
    margin-top: 15px;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.learn-more:hover {
    color: var(--color-secondary);
}

.learn-more::after {
    content: '→';
    margin-left: 5px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* --- TABLET (iPad, ≤992px) --- */
@media (max-width: 992px) {

    h2 {
        font-size: 22px;
        margin-bottom: 25px;
        padding: 0 20px;
    }

    section {
        padding: 50px 0;
    }

    /* Tutte le sezioni con layout affiancato → colonna */
    section:nth-child(2) .section-content,
    section:nth-child(3) .section-content,
    section:nth-child(5) .section-content,
    section:nth-child(6) .section-content {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    /* La sezione 5 aveva row-reverse: in colonna torna normale */
    section:nth-child(5) .section-content {
        flex-direction: column;
    }

    /* Immagini: dimensione uniforme su tablet */
    section:nth-child(2) img,
    section:nth-child(3) img,
    section:nth-child(4) img,
    section:nth-child(5) img,
    section:nth-child(6) img,
    .smaller-image {
        max-width: 320px;
        width: 100%;
        flex: none;
    }

    /* Liste e paragrafi: larghezza piena */
    section:nth-child(2) ul,
    section:nth-child(3) p,
    section:nth-child(5) ul,
    section:nth-child(6) ul {
        flex: none;
        width: 100%;
        max-width: 560px;
    }

    /* Feature cards: 2 per riga su tablet */
    .feature-cards {
        gap: 16px;
    }

    .feature-card {
        width: calc(50% - 20px);
        max-width: 280px;
    }
}

/* --- MOBILE (≤768px) --- */
@media (max-width: 768px) {

    section {
        padding: 36px 0;
    }

    h2 {
        font-size: 20px;
        margin-bottom: 24px;
    }

    .section-content {
        padding: 0 16px;
    }

    /* Feature cards: 1 per riga su mobile */
    .feature-cards {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .feature-card {
        width: 100%;
        max-width: 340px;
    }

    .feature-card img {
        width: 90px;
        height: 90px;
    }

    /* Immagini più compatte */
    section:nth-child(2) img,
    section:nth-child(3) img,
    section:nth-child(4) img,
    section:nth-child(5) img,
    section:nth-child(6) img,
    .smaller-image {
        max-width: 260px;
    }

    /* Testo sezione 3: leggibile su mobile */
    section:nth-child(3) p {
        font-size: 15px;
        line-height: 1.7;
    }

    /* Lista items più spaziati */
    section:nth-child(2) li,
    section:nth-child(5) li,
    section:nth-child(6) li {
        margin-bottom: 10px;
        font-size: 15px;
    }
}

/* --- MOBILE PICCOLO (≤480px) --- */
@media (max-width: 480px) {

    h2 {
        font-size: 18px;
    }

    .section-content {
        padding: 0 12px;
    }

    .feature-card {
        max-width: 100%;
        padding: 16px 12px;
    }

    .feature-card p {
        font-size: 14px;
    }

    section:nth-child(2) img,
    section:nth-child(3) img,
    section:nth-child(4) img,
    section:nth-child(5) img,
    section:nth-child(6) img,
    .smaller-image {
        max-width: 200px;
    }

    section:nth-child(3) p,
    section:nth-child(4) p {
        font-size: 14px;
        line-height: 1.65;
    }

    section:nth-child(2) li,
    section:nth-child(5) li,
    section:nth-child(6) li {
        font-size: 14px;
    }
}