/* ===========================
   FONT & BASE
=========================== */
body {
    font-family: 'Lexend', sans-serif;
    margin: 0;
    padding: 0;
    background: #eef2f7;
    color: #1b1b1b;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* ===========================
   NAVBAR
=========================== */
.navbar {
    background: #ffffff;
    padding: 18px 0;
    border-bottom: 1px solid #e2e2e2;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    width: 50px;
    height: 50px;
}

.logo-text {
    font-size: 26px;
    font-weight: 700;
}

/* NAV DESKTOP */
.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    font-size: 18px;
    color: #222;
    font-weight: 500;
    transition: 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #1f49ff;
}

/* ===========================
   HAMBURGER MOBILE
=========================== */
.hamburger {
    display: none;
    width: 33px;
    height: 33px;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 20px;
    background: white;
    padding: 20px;
    border-top: 1px solid #eee;
}

.mobile-menu a {
    text-decoration: none;
    color: #222;
    font-size: 20px;
    font-weight: 500;
}

/* ===========================
   HOME HERO
=========================== */
.hero {
    padding: 80px 0 40px;
}

.hero-title {
    font-size: 52px;
    font-weight: 700;
}

.hero-subtitle {
    max-width: 700px;
    font-size: 20px;
    line-height: 1.6;
    color: #444;
}

.hero-buttons {
    margin-top: 25px;
    display: flex;
    gap: 18px;
}

/* BUTTONS */
.btn-primary {
    background: #1f49ff;
    color: white;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 18px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.btn-primary:hover {
    background: #1638cc;
}

.btn-secondary {
    background: white;
    color: #1f49ff;
    padding: 14px 32px;
    border: 2px solid #1f49ff;
    border-radius: 12px;
    font-size: 18px;
    text-decoration: none;
    cursor: pointer;
}

/* ===========================
   SEZIONI GENERALI
=========================== */
.section {
    padding: 40px 0;
}

.section-title {
    font-size: 36px;
    margin-bottom: 20px;
}

.paragraph {
    font-size: 18px;
    line-height: 1.7;
}

/* ===========================
   LABORATORIO AI
=========================== */
.lab-title {
    font-size: 44px;
    font-weight: 800;
    margin-top: 40px;
}

.lab-subtitle {
    font-size: 20px;
    color: #444;
    margin-bottom: 30px;
}

.lab-options {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.lab-option-btn {
    background: white;
    border: 2px solid #1f49ff;
    padding: 14px 30px;
    font-size: 18px;
    border-radius: 12px;
    cursor: pointer;
}

.lab-option-btn.active {
    background: #1f49ff;
    color: white;
}

.input-area {
    width: 100%;
    height: 200px;
    padding: 12px;
    border-radius: 12px;
    border: 2px solid #d9d9d9;
    font-size: 18px;
    resize: none;
    margin-bottom: 20px;
}

.map-area {
    padding: 20px;
    background: white;
    border-radius: 18px;
    min-height: 220px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}

/* ===========================
   LETTURA ASSISTITA (NUOVA)
=========================== */
.read-page {
    padding: 40px 0 60px;
}

.read-title {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 10px;
}

.read-subtitle {
    font-size: 18px;
    color: #444;
    max-width: 780px;
    margin-bottom: 25px;
}

.read-layout {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
    padding: 24px;
}

/* textarea grande */
.read-textarea {
    width: 100%;
    min-height: 220px;
    resize: vertical;
    padding: 12px 14px;
    font-size: 18px;
    border-radius: 12px;
    border: 2px solid #d9d9d9;
    margin-bottom: 16px;
}

/* riquadro con testo evidenziato */
.read-display {
    margin-top: 18px;
    min-height: 160px;
    border-radius: 12px;
    background: #f5f7fb;
    padding: 14px 16px;
    font-size: 18px;
    line-height: 1.7;
}

/* CONTROLLI */
.read-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0 18px;
}

.read-btn {
    padding: 10px 22px;
    font-size: 16px;
    border-radius: 12px;
    border: 2px solid #1f49ff;
    cursor: pointer;
    background: #ffffff;
    color: #1f49ff;
    font-weight: 500;
}

.read-btn.primary {
    background: #1f49ff;
    color: #ffffff;
}

.read-btn.danger {
    border-color: #ff4444;
    color: #ff4444;
}

/* modalità DSA (verde) */
.read-btn.dsa-active {
    background: #2ecc71;
    border-color: #2ecc71;
    color: #ffffff !important;
}

/* righe impostazioni */
.read-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    margin-top: 8px;
    margin-bottom: 4px;
}

.read-row label {
    font-weight: 600;
}

.read-row select {
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #d2d2d2;
    font-size: 15px;
}

/* LINK INDIETRO */
.read-back {
    margin-top: 18px;
    font-size: 15px;
}

.read-back a {
    color: #1f49ff;
    text-decoration: none;
}

/* evidenziatore */
.read-highlight {
    background: #fff89a;
    transition: background 0.15s;
}

/* ===========================
   FOOTER
=========================== */
.footer {
    background: white;
    padding: 30px 0;
    text-align: center;
    font-size: 16px;
    border-top: 1px solid #e5e5e5;
}

.footer a {
    color: #1f49ff;
    text-decoration: none;
    margin: 0 5px;
}

/* ===========================
   RESPONSIVE MOBILE
=========================== */
@media (max-width: 768px) {

    .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .mobile-menu {
        display: none;
    }

    .hero-title {
        font-size: 38px;
    }

    .lab-title {
        font-size: 34px;
    }

    .lab-options {
        flex-direction: column;
    }

    .input-area {
        height: 260px;
    }

    /* Lettura assistita mobile */
    .read-page {
        padding: 24px 0 40px;
    }

    .read-title {
        font-size: 32px;
    }

    .read-layout {
        padding: 16px;
    }

    .read-textarea {
        min-height: 280px;
    }

    .read-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .read-btn {
        width: 100%;
        text-align: center;
    }

    .read-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .read-row select {
        width: 100%;
    }
}
