/* ==========================================================================
   1. RESET & SETUP GENERALE
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f7f7f5;
    color: #202124;
    line-height: 1.6;
}

/* ==========================================================================
   2. HEADER & NAVBAR
   ========================================================================== */
header {
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
}

.navbar, .header-inner {
    max-width: 1150px;
    margin: 0 auto;
    padding: 22px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -1px;
    color: #222222;
}

.logo a {
    color: inherit;
    text-decoration: none;
}

nav {
    display: flex;
    gap: 28px;
}

nav a {
    text-decoration: none;
    color: #555555;
    font-size: 15px;
    transition: color 0.2s;
}

nav a:hover {
    color: #111111;
}

/* Hamburger Menu (Mobile) */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1000;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #222222;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -7px);
}

/* ==========================================================================
   3. HERO SECTION & STRUTTURE RICERCA
   ========================================================================== */
.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 30px 20px 30px !important;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 50px;
    align-items: center;
}

.hero-content {
    max-width: 700px;
}

.hero-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #1f6f78;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 62px;
    line-height: 1.05;
    letter-spacing: -2.5px;
    color: #202124;
    margin-bottom: 15px !important;
}

.hero p {
    font-size: 20px;
    line-height: 1.7;
    color: #666666;
    max-width: 650px;
    margin-bottom: 18px !important;
}

.search-form {
    display: flex;
    max-width: 620px;
    gap: 10px;
    margin: 0 auto;
}

.hero .search-form {
    margin: 0;
}

.search-form input[type="text"] {
    flex: 1;
    padding: 15px 18px;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s;
}

.search-form input[type="text"]:focus {
    border-color: #1f6f78;
}

.search-form button {
    padding: 15px 25px;
    border: none;
    border-radius: 8px;
    background: #1f6f78;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.search-form button:hover {
    background: #185861;
}

.hero-illustration {
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e7f0ed;
    border-radius: 35px;
    position: relative;
    overflow: hidden;
}

.hero-illustration::before,
.hero-illustration::after {
    content: "";
    position: absolute;
    border-radius: 50%;
}

.hero-illustration::before {
    width: 220px;
    height: 220px;
    background: #d6a84f;
    top: -70px;
    right: -50px;
    opacity: 0.65;
}

.hero-illustration::after {
    width: 170px;
    height: 170px;
    background: #1f6f78;
    bottom: -60px;
    left: -40px;
    opacity: 0.75;
}

.hero-illustration img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

/* ==========================================================================
   4. SEZIONI STRUTTURALI & CATEGORIE
   ========================================================================== */
.section {
    background: #ffffff;
    padding: 25px 30px !important;
}

.section-inner {
    max-width: 1150px;
    margin: 0 auto;
}

.section h2 {
    font-size: 32px;
    margin-bottom: 12px;
}

.section-intro {
    color: #777777;
    margin-bottom: 15px !important;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.card {
    background: #f7f7f5;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.09);
}

.card h3 {
    font-size: 21px;
    margin-bottom: 12px;
}

.card h3 a {
    color: #202124;
    text-decoration: none;
}

.card h3 a::after {
    content: " →";
    font-weight: 400;
    color: #888888;
}

.card h3 a:hover {
    text-decoration: underline;
}

.card p {
    color: #666666;
    font-size: 15px;
    line-height: 1.6;
}

/* ==========================================================================
   5. BLOCCO ARTICOLI (HOME & LISTA)
   ========================================================================== */
.articles {
    background: #f7f7f5;
}

.article-box.article-media-wrapper {
    display: flex !important;
    flex-direction: row;
    gap: 30px;
    align-items: center;
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    border: 1px solid #e5e5e5;
    margin-bottom: 25px;
}

.article-thumbnail {
    width: 240px !important;
    height: 160px !important;
    flex-shrink: 0 !important;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.article-thumbnail img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}

.article-text-content {
    flex: 1;
}

.article-box h3 {
    font-size: 23px;
    margin-bottom: 10px;
}

.article-box p {
    color: #666666;
}

.article-box h3 a {
    color: #202124;
    text-decoration: none;
}

.article-box h3 a:hover {
    text-decoration: underline;
}

.article-category {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #1f6f78;
    margin-top: 12px;
}

/* ==========================================================================
   6. PAGINE INTERNE (EFFETTO FOGLIO LIBRO 3D AUTOMATICO)
   ========================================================================== */
body:has(.article-page), 
body:has(.article),
body:has(article),
body:has(.chi-sono-page) {
    background-color: #fcfaf6 !important;
    background-image: radial-gradient(#e2decb 0.6px, transparent 0.6px), radial-gradient(#e2decb 0.6px, #fcfaf6 0.6px) !important;
    background-size: 24px 24px !important;
    background-position: 0 0, 12px 12px !important;
}

.article-page, .article, article, .chi-sono-page {
    background: #ffffff !important;
    max-width: 720px;
    margin: 3rem auto !important;
    padding: 3rem 2.5rem !important;
    border-radius: 8px;
    border: 1px solid #f1ece1;
    box-shadow: 0 10px 25px -5px rgba(120, 110, 90, 0.08), 0 8px 166px -6px rgba(120, 110, 90, 0.05);
}


.article-content {
    font-size: 18px;
    color: #333333;
    line-height: 1.8;
}

.article-page > img {
    display: block !important;
    max-width: 100% !important; 
    width: 100% !important;     
    height: auto !important;    
    margin: 30px auto !important; 
    border-radius: 12px !important; 
}

.article-image-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

.article-content iframe {
    width: 100% !important;
    max-width: 100%;
    height: 400px;
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin: 25px 0;
}

#chi-sono {
    background: #fbfbfa;
    padding: 25px 30px !important;
    border-top: 1px solid #eaeae8;
}

#chi-sono h2 {
    font-family: 'Georgia', serif;
    font-size: 36px;
    text-align: center;
    color: #1f6f78;
    margin-bottom: 30px;
    letter-spacing: -0.5px;
}

#chi-sono .article-content {
    max-width: 750px;
    margin: 0 auto;
    font-size: 19px;
    color: #4a4a4a;
    line-height: 1.8;
    text-align: center;
}

.btn-scopri {
    display: inline-block;
    padding: 12px 28px;
    background-color: #ffffff;
    color: #1f6f78 !important;
    border: 2px solid #1f6f78;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none !important;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.btn-scopri:hover {
    background-color: #1f6f78;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(31, 111, 120, 0.2);
    transform: translateY(-2px);
}

/* ==========================================================================
   7. PAGINA CONTATTI
   ========================================================================== */
.contact-intro {
    max-width: 600px;
    margin: 0 auto 40px auto;
    text-align: center;
    font-size: 17px;
    color: #666666;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: #ffffff;
    padding: 40px;
    border-radius: 16px;
    border: 1px solid #eaeaea;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.02);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #444444;
    margin-bottom: 8px;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.contact-form input:focus, .contact-form textarea:focus {
    border-color: #1f6f78;
    background-color: #fcfdfe;
}

.contact-form button[type="submit"] {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 8px;
    background: #1f6f78;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s;
}

.contact-form button[type="submit"]:hover {
    background: #185861;
}

.contact-success {
    text-align: center;
    padding: 40px;
    background: #edf7f7;
    border: 1px solid #dbebeb;
    border-radius: 12px;
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   8. GESTIONE COPERTINE E DETTAGLI LIBRI AMAZON
   ========================================================================== */
.edoodle-book-cover-container {
    width: 100%;
    max-width: 130px;
    min-width: 100px;
    display: flex;
    justify-content: center;
    margin: 0 auto;
}

.edoodle-book-cover {
    width: 100%;
    height: 180px;
    object-fit: contain;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    border-radius: 4px;
}

@media (min-width: 576px) {
    .edoodle-book-cover-container {
        margin: 0;
    }
}
/* ==========================================================================
   9. SCHEDA PRODOTTO AMAZON AUTOMATICA (UNIFICATA)
   ========================================================================== */
.edoodle-book-card {
    border: 1px solid #f1ece1 !important; /* Si abbina al bordo dell'articolo */
    border-radius: 12px !important;
    margin: 50px auto !important;
    max-width: 700px !important;
    background-color: #ffffff !important;
    overflow: hidden !important;
    box-shadow: 0 10px 25px -5px rgba(120, 110, 90, 0.05);
    display: flex;
    flex-direction: column;
}

/* Il badge superiore con il caratteristico giallo caldo di Amazon */
.edoodle-book-badge {
    background-color: #ff9900 !important; /* Giallo/Arancione istituzionale Amazon */
    color: #111111 !important;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 20px;
    text-align: center;
}

/* Corpo interno della scheda */
.edoodle-book-body {
    display: flex;
    flex-direction: row;
    gap: 25px;
    padding: 25px;
    align-items: center;
}

.edoodle-book-info {
    flex: 1;
}

.edoodle-book-title {
    font-size: 20px;
    color: #1e1b4b; /* Blu scuro elegante per il titolo */
    margin-bottom: 8px;
}

.edoodle-book-text {
    font-size: 15px;
    color: #555555;
    margin-bottom: 20px !important;
}

/* Il pulsante d'acquisto giallo oro sfumato con scritte scure */
.edoodle-book-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(to bottom, #f7dfa5, #f0c14b) !important; /* Giallo sfumato classico */
    border: 1px solid #a88734 !important;
    border-radius: 8px;
    color: #111111 !important;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: background 0.2s;
}

.edoodle-book-btn:hover {
    background: linear-gradient(to bottom, #f5d78e, #eeb933) !important;
}

.edoodle-book-btn svg {
    margin-left: 4px;
    vertical-align: middle;
}

/* Ottimizzazione per dispositivi mobili */
@media (max-width: 576px) {
    .edoodle-book-body {
        flex-direction: column;
        text-align: center;
    }
    .edoodle-book-cover-container {
        margin: 0 auto;
    }
}


/* ==========================================================================
   10. FASCIA SOTTILE TEST VAK (ALTO IMPATTO)
   ========================================================================== */
.test-slim-bar {
    max-width: 750px;
    margin: 2.5rem auto;
    padding: 1rem 1.8rem;
    background: linear-gradient(135deg, #f0f7ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-left: 5px solid #0284c7;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(2, 132, 199, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.test-slim-bar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px -2px rgba(2, 132, 199, 0.1);
}

.test-slim-text {
    color: #0369a1 !important;
    font-size: 0.98rem;
    margin: 0 !important;
    line-height: 1.4;
    text-align: left;
}

.test-slim-link {
    background: #0284c7;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.2);
    transition: background 0.2s ease;
}

.test-slim-link:hover {
    background: #0369a1;
}

/* ==========================================================================
   11. BANNER CON CITAZIONE ROSA SALMONE (RACCRACHIUSO E MOLTO PIÙ SOTTILE)
   ========================================================================== */
.banner-container-citazione {
    max-width: 1150px;
    margin: 30px auto !important;
    background: linear-gradient(135deg, #de993f 0%, #e6b95f 100%); 
    padding: 30px 24px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.quote-box-sovrapposto {
    max-width: 500px;
    background: rgba(255, 255, 255, 0.45);
    padding: 15px 35px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(120, 53, 4, 0.02); 
}

.quote-text {
    color: #1e1b4b !important; 
    font-size: 1.15rem;
    line-height: 1.5;
    margin-bottom: 8px;
    font-style: italic;
    font-weight: 500; 
}

.quote-author {
    color: #9a3412 !important; 
    font-size: 0.95rem; 
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* ==========================================================================
   12. MAIN FOOTER
   ========================================================================== */
.main-footer {
    background-color: #fcfcfb !important;
    border-top: 1px solid #eaeae6 !important;
    padding: 30px 20px 20px 20px !important;
    margin-top: 15px !important;
}

.footer-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.footer-logo {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #222222;
    margin-bottom: 12px;
}

.footer-tagline {
    font-size: 14px;
    color: #777777;
    max-width: 450px;
    margin: 0 auto 28px auto !important;
    line-height: 1.5;
}

.footer-legal-links {
    margin-bottom: 28px;
}

.footer-legal-links a {
    color: #1f6f78 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none !important;
    transition: color 0.2s;
    display: inline-block;
}

.footer-legal-links a:hover {
    color: #14494f !important;
    text-decoration: underline !important;
}

.footer-separator {
    color: #cccccc;
    margin: 0 14px;
    font-size: 12px;
}

.footer-copyright {
    font-size: 12px;
    color: #999999;
    letter-spacing: 0.5px;
    border-top: 1px solid #f0f0ed;
    padding-top: 20px;
    max-width: 350px;
    margin: 0 auto;
}

/* ==========================================================================
   13. MEDIA QUERIES GENERALE RESPONSIVE (MOBILE)
   ========================================================================== */
@media (max-width: 800px) {
    .menu-toggle {
        display: flex;
    }

    nav {
        display: none;
        position: absolute;
        top: 75px;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        flex-direction: column;
        gap: 0;
        padding: 10px 0;
        border-bottom: 1px solid #e5e5e5;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        z-index: 999;
    }

    nav a {
        padding: 15px 30px;
        width: 100%;
        border-bottom: 1px solid #f7f7f5;
        font-size: 16px;
    }

    nav a:last-child {
        border-bottom: none;
    }

    nav.active {
        display: flex;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .article-content iframe {
        height: 220px;
    }

    .article-box.article-media-wrapper {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 20px !important;
        gap: 15px !important;
    }

    .article-thumbnail {
        width: 100% !important;
        height: 200px !important;
    }

    .article-text-content {
        width: 100% !important;
    }
    
    .article-box h3 {
        font-size: 20px !important;
    }

    .banner-container-citazione {
        width: 100% !important;
        max-width: 100% !important;
        padding: 25px 15px !important;
        margin: 20px 0 !important;
        height: auto !important;
        float: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .quote-box-sovrapposto {
        position: relative !important;
        transform: none !important;
        top: 0 !important;
        left: 0 !important;
        margin: 0 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 20px !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
        border-radius: 12px !important;
        box-sizing: border-box !important;
        z-index: 2 !important;
    }

    .test-slim-bar {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 1rem;
        padding: 1.2rem;
    }
    .test-slim-text, .test-slim-link {
        text-align: center;
    }

    body:has(.article-page), body:has(.chi-sono-page) {
        background-color: #ffffff !important;
        background-image: none !important;
    }
    
    .article-page, .chi-sono-page {
        margin: 0 auto !important;
        padding: 1.5rem 1rem !important;
        border-radius: 0;
        border: none;
        box-shadow: none;
    }
}
