/*
 Theme Name: GeneratePress Child
 Template: generatepress
 Version: 1.0
*/
/* Layout a tre colonne */
/* === Layout generale === */
/* === Layout generale === */
body {
    background-color: #fff;
}

.site {
    background-color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
    /*padding: 2rem;*/
    max-width: 1200px;
    margin: 1rem auto;
}

/* === Layout a tre colonne === */
.layout-container {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 2rem;
    /*padding: 2rem;*/
    max-width: 1200px;
    margin: auto;
}

/* Responsive: su mobile diventa una colonna */
@media (max-width: 900px) {
    .layout-container {
        grid-template-columns: 1fr;
        padding: 2rem;
    }
}

/* === Sidebar === */
.sidebar {
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
}

.sidebar h3 {
    margin-top: 1rem;
    font-size: 1.1rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.5rem;
}

.sidebar ul {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
    padding-bottom: 20px;
    border-bottom: 4px solid #ffc107;
}

.sidebar li {
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
    border-bottom: 2px solid #fff;
    padding: 0.5rem 0 0.5rem 0;
}

.sidebar a {
    text-decoration: none;
    color: #333;
}

.sidebar a:hover {
    text-decoration: underline;
}

/* === Citazioni === */
.quote-list {
    padding-top: 1rem;
    padding-left: 0;
}

.back-to-search {
    margin: 1em 0;
}

.back-button {
    display: inline-block;
    padding: 0.5em 1em;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
}

.back-button:hover {
    background: #005f8d;
}

.page-header {
    margin-bottom: 0px !important;
    padding: 0px !important;
}

.page-title {
    margin-bottom: 0px !important;
}

.quote-meta {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

/* === Tag cloud === */
.tag-cloud,
.custom-tag-cloud {
    margin-top: 2rem;
    padding: 1rem;
    background: #f0f0f0;
    border-radius: 8px;
}

.tag-cloud h3,
.custom-tag-cloud h3 {
    margin-top: 0;
    font-size: 1.1rem;
    border-bottom: 1px solid #ccc;
    padding-bottom: 0.5rem;
}

.tag-cloud a,
.custom-tag-cloud a {
    margin: 0 0.3rem 0.3rem 0;
    display: inline-block;
    text-decoration: none;
    color: #444;
    font-weight: 500;
}

.tag-cloud a:hover,
.custom-tag-cloud a:hover {
    color: #000;
    text-decoration: underline;
    opacity: 0.9;
}

/* === Immagine citazione === */
.quote-image-only {
    margin: 2rem 0;
}

/* === Pulsanti condivisione === */
.share-buttons {
    border-top: 1px solid #ddd;
    margin-top: 1.5em;
    padding-top: 0.5em;
    text-align: center;
}

.share-buttons a {
    font-size: 0.9em;
    color: #0073aa;
    text-decoration: none;
}

.share-buttons a:hover {
    text-decoration: underline;
}

/* === Post recenti === */
.recent-posts {
    list-style: none;
    padding-left: 0;
}

.recent-post-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.recent-thumb {
    margin-right: 0.8rem;
}

.recent-thumb img {
    width: 60px;
    height: 60px;
    object-fit: cover;
}

.recent-content {
    flex: 1;
}

.recent-excerpt {
    font-size: 0.85em;
    color: #555;
}

/* === Breadcrumbs === */
.breadcrumbs-wrapper {
    margin: 1rem 0;
    font-size: 0.9em;
}

.breadcrumbs {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.breadcrumbs ul {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    list-style: none;
}

.breadcrumbs li {
    margin-right: 0.5rem;
    white-space: nowrap;
}

.breadcrumbs li::after {
    content: "›";
    margin-left: 0.5rem;
    color: #999;
}

.breadcrumbs li:last-child::after {
    content: "";
}

.breadcrumbs a {
    text-decoration: none;
    color: #0073aa; /* colore esplicito al posto di var(--accent) */
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/*LISTA AUTORI*/
/* Contenitore della sezione di controllo */
.page-header {
    background: #f9f9f9;
    padding: 1.5em !important;
    border-radius: 8px;
    margin-bottom: 2em;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Titolo */
.page-title {
    font-size: 1.8em;
    margin-bottom: 1em;
    color: #333;
}

/* Form di ricerca e ordinamento */
.author-search,
.author-order,
.author-perpage {
    display: inline-block;
    margin-right: 1em;
    margin-bottom: 1em;
}

.author-search input[type="text"] {
    padding: 0.5em;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 200px;
}

.author-search button {
    padding: 0.5em 1em;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    margin-left: 0.5em;
    cursor: pointer;
}

.author-search button:hover {
    background: #005f8d;
}

.author-order select,
.author-perpage select {
    padding: 0.5em;
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* Lettere alfabetiche */
.author-letters {
    margin-top: 1em;
    padding: 1em;
    border-top: 1px solid #eee;
}

.author-letters a {
    display: inline-block;
    margin: 2px;
    padding: 4px 10px;
    background: #e0e0e0;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9em;
}

.author-letters a:hover,
.author-letters a.active {
    background: #0073aa;
    color: #fff;
}

.author-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.author-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.author-link {
    display: flex;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.author-thumb-wrap {
    flex: 0 0 80px;
}

.author-thumb {
    border-radius: 6px;
    width: 80px;
    height: auto;
}

.author-info {
    flex: 1;
}

.author-name {
    margin: 0;
    font-size: 1.2rem;
}

.author-meta {
    font-size: 0.9rem;
    color: #777;
    margin: 0.2rem 0;
}

.author-excerpt {
    margin: 0;
    color: #555;
    font-size: 0.95rem;
}

.note-wrapper {
    position: relative;
}

/* Pagina sotto: effetto sovrapposto */
.note-shadow {
    position: absolute;
    top: 18px;
    left: 11px;
    width: 95%;
    height: 94%;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 0;
    transform: rotate(-1deg);
}

/* Pagina principale */
.note-paper {
    position: relative;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    padding: 2rem;
    z-index: 1;
}

/* Graffetta rossa */
.paperclip {
    position: absolute;
    top: -1.5rem;
    right: -0.5rem;
    width: 25px;
    height: 61px;
    border: 3px solid red;
    border-radius: 4px;
    transform: rotate(45deg);
    background: transparent;
}

.paperclip_up {
    position: absolute;
    top: -0.6rem;
    right: 0.1rem;
    width: 33px;
    height: 54px;
    border: 3px solid red;
    border-radius: 4px;
    transform: rotate(45deg);
    background: transparent;
}

/* Citazione */
.note-paper blockquote {
    position: relative;
    font-family: Georgia, "Times New Roman", serif;
    max-width: 620px;
    margin: 0 auto 2rem auto;
    align-self: center;
}

.note-paper blockquote h4::first-letter {
    margin-left: -12px;
}

.note-paper blockquote h4 {
    position: relative;
    color: #707070;
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1.2;
    margin: 0 0 0 130px;
    padding-top: 15px;
    z-index: 1;
    padding-left: 12px;
}

.note-paper blockquote h4::first-letter {
    margin-left: -12px;
}

.note-paper blockquote h5::after {
    content: "";
    position: absolute;
    border: 2px solid #000;
    border-bottom-width: 2px;
    border-bottom-style: solid;
    border-bottom-color: rgb(0, 0, 0);
    border-left-width: 2px;
    border-left-style: solid;
    border-left-color: rgb(0, 0, 0);
    border-radius: 0 50px 0 0;
    width: 60px;
    height: 60px;
    bottom: -60px;
    left: 50px;
    border-bottom: none;
    border-left: none;
    z-index: 3;
}

.note-paper blockquote h5::before {
    content: "";
    position: absolute;
    width: 80px;
    border: 6px solid #fff;
    bottom: -3px;
    left: 50px;
    z-index: 2;
}

.note-paper blockquote h5 {
    font-family: Georgia, "Times New Roman", cursive;
    font-family: "Lora", serif;
    position: relative;
    font-size: 1.3rem;
    font-weight: normal;
    line-height: 1.3;
    margin: 0;
    border: 2px solid #000;
    border-radius: 20px;
    padding: 25px;
}

.titolo-condividi {
    /*border: 1px solid #000;
    background: #e7e7e7;*/
    border-top: 1px solid #ddd;
    padding: 5px;
    text-align: center;
}

blockquote {
    border-left: 0px;
    padding: 0px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Playfair Display", Georgia, "Times New Roman", serif;
}

.taxonomy-description {
    margin-top: 1rem;
    margin-bottom: 2rem;
    font-size: 1rem;
    color: #555;
    position: relative;
}

.taxonomy-description .desc-toggle {
    background: none;
    border: none;
    color: #0066cc;
    cursor: pointer;
    font-weight: bold;
    margin-top: 0.5rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2em;
    margin: 3em 0;
}

.cat-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease;
}

.cat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cat-card-img-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.cat-card-img-wrap img.cat-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cat-card-title {
    font-size: 1.1em;
    font-weight: 600;
    margin: 1em 1em 0.5em;
    color: #222;
}

.cat-card-desc {
    font-size: 0.95em;
    margin: 0 1em 1em;
    color: #555;
    line-height: 1.4;
}

.cat-card-link {
    margin: 0 1em 1.2em;
    align-self: flex-start;
    font-size: 0.9em;
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.cat-card-link:hover {
    text-decoration: underline;
}

/*PAGINAZIONE*/
/* Contenitore nav */
.navigation.pagination,
.pagination,
.pagination-author {
    text-align: center;
    margin-top: 4rem;
    margin-bottom: 2rem;
}

/*FOTO DELL'AUTORE*/
.author-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.author-gallery img {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Lista paginazione */
.page-numbers {
    display: inline-flex;
    justify-content: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0 auto;
}

/* Link e numeri */
.page-numbers li a,
.page-numbers li span {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border: 1px solid #ccc;
    background: #f9f9f9;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1rem;
}

/* Pagina corrente */
.page-numbers li .current {
    background: #333;
    color: #fff;
    font-weight: bold;
}

@media (min-width: 600px) {
    .note-paper blockquote h5 {
        font-size: 1.3rem;
        line-height: 1.5;
    }

    .note-paper blockquote h4 {
        font-size: 1.3rem;
        line-height: 1.3;
    }
}

/* === MOBILE SELECT: VERSIONE FINALE UNIVERSALE === */

.sidebar-list-desktop {
    display: block;
}

.sidebar-select-mobile {
    display: none;
}

@media (max-width: 900px) {
    /* Nascondi liste, mostra select */
    .sidebar-list-desktop {
        display: none !important;
    }

    .sidebar-select-mobile {
        display: block !important;
    }

    /* FORZA flexbox sul container */
    .layout-container {
        display: flex !important;
        flex-direction: column !important;
        padding: 1rem !important;
    }

    /* ===== ORDINE ELEMENTI ===== */

    /* 1. Sidebar SINISTRA per prima (categorie) */
    .sidebar-left,
    .layout-container > aside:first-child {
        order: -2 !important;
        margin-bottom: 0 !important;
    }

    /* 2. Sidebar DESTRA per seconda (autori) */
    .sidebar-right,
    .layout-container > aside:last-child {
        order: -1 !important;
        margin-bottom: 0 !important;
    }

    /* 3. CONTENUTO PRINCIPALE per terzo */
    /* Copre tutti i casi: main, .quote-list, .main-content, article */
    .layout-container > main,
    .layout-container > .quote-list,
    .layout-container > .main-content,
    main.quote-list,
    main[id],
    article {
        order: 0 !important;
        margin-bottom: 2rem !important;
    }

    /* ===== GESTIONE SIDEBAR ===== */

    /* Nascondi TUTTO il contenuto delle sidebar tranne le select */
    .sidebar > *,
    .sidebar-left > *,
    .sidebar-right > * {
        display: none !important;
    }

    /* Mostra SOLO le select */
    .sidebar .sidebar-select-mobile,
    .sidebar-left .sidebar-select-mobile,
    .sidebar-right .sidebar-select-mobile {
        display: block !important;
        background: #f9f9f9 !important;
        padding: 0.875rem !important;
        border-radius: 8px !important;
        margin-bottom: 0.5rem !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    }

    /* Label sopra la select */
    .sidebar .sidebar-select-mobile::before,
    .sidebar-left .sidebar-select-mobile::before,
    .sidebar-right .sidebar-select-mobile::before {
        content: attr(data-label);
        display: block;
        font-size: 0.85rem;
        font-weight: 600;
        color: #555;
        margin-bottom: 0.5rem;
    }

    /* Maggior spazio dopo la seconda select (autori) */
    .sidebar-right .sidebar-select-mobile {
        margin-bottom: 1.5rem !important;
    }

    /* ===== STILE SELECT ===== */

    .sidebar-mobile-select {
        width: 100%;
        padding: 0.75rem;
        font-size: 1rem;
        border: 2px solid #ddd;
        border-radius: 6px;
        background-color: #fff;
        color: #333;
        cursor: pointer;
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3e%3cpolyline points="6 9 12 15 18 9"%3e%3c/polyline%3e%3c/svg%3e');
        background-repeat: no-repeat;
        background-position: right 0.75rem center;
        background-size: 1.25rem;
        padding-right: 2.5rem;
        transition: all 0.2s ease;
    }

    .sidebar-mobile-select:hover,
    .sidebar-mobile-select:focus {
        border-color: #0073aa;
        outline: none;
        box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
    }

    .sidebar-mobile-select option {
        padding: 0.5rem;
    }

    /* ===== PULISCI STILE SIDEBAR ===== */

    .sidebar,
    .sidebar-left,
    .sidebar-right {
        background: transparent !important;
        padding: 0 !important;
        border-radius: 0 !important;
        margin: 0 !important;
        flex: 0 !important;
    }

    /* ===== CONTENUTO PRINCIPALE ===== */

    /* Rimuovi padding extra dal contenuto */
    .quote-list {
        padding-top: 0;
        padding-left: 0;
    }

    /* Assicura che il main sia visibile */
    main {
        display: block !important;
    }
}
