/* ==============================

   SINGLE POST STYLES - css/single-post.css

   ============================== */

/* Section wrapper per ereditare il gradiente dal global CSS */
.single-post-section { padding: 0; margin: 0; min-height: 100vh; }


/* Layout Articolo Singolo */
.single-post-container { max-width: 1400px !important; margin: 0 auto; padding: 2rem 2rem 3rem 2rem !important; display: grid; grid-template-columns: 1fr 350px !important; gap: 4rem !important; background: transparent !important; }
.single-post-main { max-width: 100%; padding-left: 0; margin-left: 0; background: transparent; }
.single-post-sidebar { position: static; top: 2rem; align-self: start; margin-left: 0 !important; }



/* Header Articolo - trasparente con titolo scuro */
/* Correzione di visualizzazione forzata per il titolo */
.post-header .post-title h1 {display: block !important;visibility: visible !important; transform: none !important;}
.post-header { margin-bottom: 2rem; padding: 2rem 0; margin-top: 2rem !important; background: transparent !important; }
.post-title h1 { font-size: 2.5rem; line-height: 1.2; margin-bottom: 1rem; margin-top: 2rem;color: #494236 !important; }
.post-meta { font-size: 0.9rem; margin-bottom: 0; margin-top: 0 !important; padding-top: 0.5rem; }


/* Immagine Featured - NASCOSTA */
.single-post .post-featured-image { display: none !important; visibility: hidden !important; height: 0 !important; overflow: hidden !important; }
.post-featured-image { display: none !important; visibility: hidden !important; height: 0 !important; overflow: hidden !important; }
article .post-featured-image { display: none !important; visibility: hidden !important; height: 0 !important; overflow: hidden !important; }



/* Contenuto Articolo - trasparente per ereditare lo sfondo */

.post-content { font-size: 1rem; line-height: 1.8; color: #494236 !important; margin-top: 0 !important; padding: 0 !important; background: transparent !important; }
.post-content h2 { font-size: 2.5rem; margin: 0 0 1rem!important}
.post-content h3 { font-size: 2.5rem; margin: 0rem 0 1rem}
.post-content h5 { font-size: 1.5rem; margin: 0rem 0 1rem!important}
.post-content p { margin-bottom: 1.5rem;font-size: 1.2rem}
.post-content ul { margin: 1.5rem 0; padding-left: 2rem; }
.post-content ol { margin: 1.5rem 0; padding-left: 2rem; }
.post-content li { margin-bottom: 0.5rem}
.post-content strong { font-weight: 700; }
.post-content a { color: #7a9b76 !important; text-decoration: underline; }

/* Audio Player Section */
.audio-section { background-color: #FDFDF7; padding: 2rem; border-radius: 8px; margin: 2rem 0; }
.audio-section h3 { font-size: 1.5rem; margin-bottom: 1rem}
.audio-section p { font-size: 0.95rem; line-height: 1.6; margin-bottom: 1rem}
.audio-section audio { width: 100%; margin: 1rem 0; }

/* Navigazione Post */
.post-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin: 3rem 0; padding: 2rem 0; border-top: 2px solid rgba(132, 119, 98, 0.2); border-bottom: 2px solid rgba(132, 119, 98, 0.2); }
.nav-post { display: flex; align-items: center; gap: 1rem; text-decoration: none; padding: 1rem; border-radius: 8px; background:  #FDFDF7; transition: background 0.3s; }
.nav-post:hover { background: rgba(248, 246, 240, 0.9); }
.nav-post-image { width: 80px; height: 80px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: #ddd; }
.nav-post-image img { width: 100%; height: 100%; object-fit: cover; }
.nav-post-content { flex: 1; }
.nav-post-label { font-size: 0.75rem; color: #6E8F56; text-transform: uppercase; font-weight: 600; margin-bottom: 0.25rem; display: block; }
.nav-post-title h3{ font-size: 1rem}
.nav-previous { text-align: left; }
.nav-next { text-align: right; }

/* Articoli Correlati */
.related-posts { margin: 3rem 0; }
.related-posts h3 { font-size: 1.75rem; margin-bottom: 2rem;}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.related-card { text-decoration: none; display: block; background: #FDFDF7; border-radius: 8px; padding: 1rem; transition: transform 0.3s, background 0.3s; }
.related-card:hover { background: rgba(248, 246, 240, 0.5); }
.related-card-image { width: 100%; height: 200px; border-radius: 8px; overflow: hidden; margin-bottom: 1rem; background: #f0f0f0; }
.related-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.related-card:hover .related-card-image img { transform: scale(1.05); }
.related-card-title h4 { font-size: 1.1rem; color: #494236 !important;margin-bottom: 0.5rem}
.related-card-date { font-size: 0.85rem; color:#6E8F56; font-weight: 500;padding-top: 0.5rem}

/* Lista Commenti Esistenti */
.comment-list { list-style: none; padding: 0; margin: 2rem 0; border-top: 1px solid #6e9056; padding-top: 2rem; }
.comment-list .comment { margin-bottom: 0; padding: 1.5rem 0; background: transparent; border-radius: 0; border-left: none; border-bottom: 1px solid #6e9056; }
.comment-list .comment-body { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; position: relative; }
.comment-list .comment-author { display: flex; align-items: center; gap: 0.75rem; flex: 0 0 auto; }
.comment-list .comment-author img { width: 50px; height: 50px; border-radius: 50%; }
.comment-list .comment-author .fn { font-weight: 600; font-size: 1rem; color: #6e9056; text-decoration: none; }
.comment-list .comment-author .fn:hover { text-decoration: underline; }
.comment-list .comment-author .says { display: none; }
.comment-list .comment-meta { position: absolute; right: 0; top: 0; display: flex; align-items: center; gap: 1.5rem; }
.comment-list .comment-meta a { color: #6e9056; text-decoration: none; font-size: 0.85rem; }
.comment-list .comment-meta a:hover { text-decoration: underline; }
.comment-list .reply { margin: 0; }
.comment-list .reply a { color: #6e9056; font-size: 0.85rem; font-weight: 500; text-decoration: none; text-transform: uppercase; }
.comment-list .reply a:hover { text-decoration: underline; }
.comment-list .comment-body > p { width: 100%; margin-top: 1rem; line-height: 1.6; color: #494236; }
.comment-list .comment-body > p a { color: #6e9056; text-decoration: none; }
.comment-list .comment-body > p a:hover { text-decoration: underline; }
.comment-list .children { list-style: none; margin-left: 3rem; margin-top: 2rem; padding-left: 0; border-top: 1px solid #6e9056; padding-top: 2rem; }
.comment-list .children .comment { background: transparent; border-bottom: none; padding: 0 0 1.5rem 0; }
.comments-title { font-size: 1.75rem; margin-bottom: 1.5rem; color: #494236; font-weight: 600; }
.no-comments { font-size: 1rem; color: #666; font-style: italic; }

/* Sezione Commenti */
.comments-section { margin: 3rem 0; padding: 2rem; background: transparent!important; border-radius: 8px; }
.comments-section h3 { font-size: 1.75rem; margin-bottom: 1rem; }
.comment-form p { margin-bottom: 1.5rem; }
.comment-form .comment-notes { margin-bottom: 1rem; }
.comment-form textarea { width: 100%; min-height: 150px; padding: 1rem; border: 1px solid #ddd; border-radius: 8px; font-size: 1rem; margin-bottom: 0; background: white; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"] { width: 100%; padding: 1rem; border: 1px solid #ddd; border-radius: 8px; font-family: inherit; font-size: 1rem; margin-bottom: 0; background: white; }
.comment-form label { display: block; margin-bottom: 0.5rem; }
.comment-form .comment-form-privacy { margin-bottom: 1.5rem; margin-top: 1.5rem; display: flex; align-items: center; gap: 0.5rem; }
.comment-form .comment-form-privacy input[type="checkbox"] { margin: 0; accent-color: #6e9056; }
.comment-form .comment-form-privacy label { margin: 0; display: inline; }
.comment-form .comment-form-privacy a { color: #6e9056; text-decoration: none; }
.comment-form .comment-form-privacy a:hover { text-decoration: underline; }
.comment-form input[type="submit"] { background: #6e9056; color: white; padding: 0.8rem 2rem; border: none; border-radius: 15px; font-family: 'Inter', sans-serif; font-size: 1.12rem !important; font-weight: 500; cursor: pointer; transition: all 0.3s; }
.comment-form input[type="submit"]:hover { background: #89a885; }
.comment-form textarea:focus, .comment-form input[type="text"]:focus, .comment-form input[type="email"]:focus, .comment-form input[type="url"]:focus { outline: none; border-color: #6e9056; box-shadow: 0 0 0 2px rgba(110, 144, 86, 0.2); }

/* Sidebar Widgets */
.sidebar-widget { background: #FDFDF7; padding: 1.5rem; border-radius: 8px; margin-bottom: 2rem; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); }
.sidebar-widget:first-child {margin-top: 8rem; }
.sidebar-widget h3 { font-size: 1.25rem; margin-bottom: 1rem }
.sidebar-widget ul { list-style: none; padding: 0; margin: 0; }
.sidebar-widget li { margin-bottom: 0.75rem; }
.sidebar-widget a { color: #6E8F56; text-decoration: none; font-size: 0.95rem; transition: color 0.3s; }
.sidebar-widget a:hover { color: #89a885 !important; text-decoration: underline; }
.widget-link-home { display: inline-block; color: #7a9b76 !important; font-weight: 500; text-decoration: none; font-size: 1.25rem}

/* Ultimi Commenti */
.comment-item { display: flex; gap: 0.75rem; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid rgba(132, 119, 98, 0.2); }
.comment-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.comment-avatar { width: 40px; height: 40px; border-radius: 50%; background: #ddd; flex-shrink: 0; overflow: hidden; }
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-content { flex: 1; }
.comment-author { font-weight: 600; color: #494236 !important; font-size: 0.9rem; margin-bottom: 0.25rem; }
.comment-author a { color: #7a9b76 !important;font-weight: 500 }
.comment-text { font-size: 0.85rem; color: #666 !important; line-height: 1.4; }
.comment-date { font-size: 0.75rem; color: #999 !important; margin-top: 0.25rem; }

/* Responsive */


/* Responsive */

/* Elementi all'interno del contenuto che potrebbero sforare */
.post-content img,
.post-content iframe,
.post-content video {
    max-width: 100%;
    height: auto; /* Mantiene l'aspect ratio */
}

/* Tablet Grande (1024px - 1200px) */
@media (max-width: 1200px) {
.single-post-container { max-width: 1200px !important; gap: 3rem !important; }
}

/* Tablet Pro / Tablet Grande (768px - 1024px) */
@media (max-width: 1024px) {
.single-post-container { 
    grid-template-columns: 1fr !important; 
    gap: 2rem !important; 
    padding: 5rem 2rem 3rem 2rem !important; 
    max-width: 900px !important; /* Rimuovi o riduci questo max-width se vuoi che occupi tutta la larghezza */
}
.single-post-sidebar { position: static; margin-left: 0 !important; margin-top: 2rem; }
.single-post-main { padding-left: 0 !important; }
.related-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.post-title h1 { font-size: 2.2rem; }
.post-content h2 { font-size: 2rem; }
.post-content h3 { font-size: 2rem; }
.post-content h5 { font-size: 1.3rem; }
.post-navigation { gap: 1.5rem; }
}

/* Tablet Piccolo (600px - 768px) */
@media (max-width: 768px) {
.single-post-container { 
    padding: 4rem 1.5rem 2rem 1.5rem !important; 
    gap: 1.5rem !important; 
    max-width: 100% !important; /* Aggiunto per maggiore sicurezza */
}
.post-title h1 { font-size: 1.8rem; }
.post-header { padding: 1.5rem 0; }
.post-content { padding: 0 !important; font-size: 1rem; }
.post-content h2 { font-size: 1.8rem; }
.post-content h3 { font-size: 1.8rem; }
.post-content h5 { font-size: 1.2rem; }
.post-content p { font-size: 1.1rem; }
.post-navigation { 
    grid-template-columns: 1fr; /* Una colonna */
    gap: 1rem; 
}
.related-grid { 
    grid-template-columns: 1fr; /* Una colonna per gli articoli correlati */
    gap: 1.5rem; 
}
.related-card-image { height: 180px; }
.nav-post { 
    flex-direction: row; /* Mantengo il layout orizzontale */
    text-align: left;
    align-items: center;
}
.nav-next { text-align: left; /* Allineo a sinistra anche il prossimo post */ }
.nav-post-image { width: 60px; height: 60px; flex-shrink: 0; }
.comment-list .children { margin-left: 1.5rem; }

/* Correggere l'allineamento dei commenti per evitare overflow a causa del posizionamento assoluto */
.comment-list .comment-meta {
    position: static; /* Rimuove l'assoluto */
    margin-top: 0.5rem; /* Aggiunge spazio sotto l'autore */
    display: block; /* Va a capo */
}

}

/* Mobile (max 600px) */
@media (max-width: 600px) {
.single-post-container { 
    padding: 3rem 1rem 2rem 1rem !important; 
    gap: 1rem !important; 
    max-width: 100% !important; /* Aggiunto per maggiore sicurezza */
}
.post-title h1 { font-size: 1.5rem; line-height: 1.3; }
.post-meta { font-size: 0.85rem; }
.post-content { font-size: 0.95rem; line-height: 1.7; }
.post-content h2 { font-size: 1.5rem; margin: 1.5rem 0 0.8rem; }
.post-content h3 { font-size: 1.5rem; margin: 1.2rem 0 0.8rem; }
.post-content h5 { font-size: 1.1rem; margin: 1rem 0 0.6rem; }
.post-content p { font-size: 1rem; margin-bottom: 1.2rem; }
.post-content ul, .post-content ol { padding-left: 1.5rem; }
.audio-section { padding: 1.5rem; margin: 1.5rem 0; }
.audio-section h3 { font-size: 1.2rem; }
.audio-section p { font-size: 0.9rem; }
.post-navigation { 
    gap: 0.8rem; 
    margin: 2rem 0; 
    padding: 1.5rem 0; 
}
.nav-post { 
    padding: 0.8rem; 
    gap: 0.8rem; 
    flex-direction: row; /* Mantengo orizzontale */
    text-align: left; 
}
.nav-post-image { width: 50px; height: 50px; }
.nav-post-label { font-size: 0.7rem; }
.nav-post-title h3 { font-size: 0.9rem; }
.related-posts { margin: 2rem 0; }
.related-posts h3 { font-size: 1.4rem; margin-bottom: 1.5rem; }
.related-grid { gap: 1rem; }
.related-card { padding: 0.8rem; }
.related-card-image { height: 150px; }
.related-card-title h4 { font-size: 1rem; }
.related-card-date { font-size: 0.8rem; }
.sidebar-widget { padding: 1.2rem; margin-bottom: 1.5rem; }
.sidebar-widget h3 { font-size: 1.1rem; }
.sidebar-widget a { font-size: 0.9rem; }
.widget-link-home { font-size: 1.1rem; }
.comments-section { 
    padding: 1.5rem; /* Ho rimosso l'1rem a destra/sinistra per coerenza con il padding del container */
    margin: 2rem 0; 
}
.comments-section h3 { font-size: 1.4rem; }
.comments-title { font-size: 1.4rem; }
.comment-form textarea { min-height: 120px; padding: 0.8rem; font-size: 0.95rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"] { padding: 0.8rem; font-size: 0.95rem; }
.comment-form input[type="submit"] { padding: 0.7rem 1.5rem; font-size: 1rem !important; }
.comment-list .children { margin-left: 1rem; }
.comment-list .comment-author img { width: 40px; height: 40px; }
.comment-item { gap: 0.5rem; }
.comment-avatar { width: 35px; height: 35px; }
.comment-author { font-size: 0.85rem; }
.comment-text { font-size: 0.8rem; }

/* Correggere l'allineamento dei commenti per evitare overflow a causa del posizionamento assoluto */
.comment-list .comment-meta {
    position: static; 
    margin-top: 0.5rem; 
    display: block; 
}
}

/* Tablet Grande (1024px - 1200px) */
@media (max-width: 1200px) {
.single-post-container { max-width: 1200px !important; gap: 3rem !important; }
}

/* Tablet Pro / Tablet Grande (768px - 1024px) */
@media (max-width: 1024px) {
.single-post-container { grid-template-columns: 1fr !important; gap: 2rem !important; padding: 5rem 2rem 3rem 2rem !important; max-width: 900px !important; }
.single-post-sidebar { position: static; margin-left: 0 !important; margin-top: 2rem; }
.single-post-main { padding-left: 0 !important; }
.related-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.post-title h1 { font-size: 2.2rem; }
.post-content h2 { font-size: 2rem; }
.post-content h3 { font-size: 2rem; }
.post-content h5 { font-size: 1.3rem; }
.post-navigation { gap: 1.5rem; }
}

/* Tablet Piccolo (600px - 768px) */
@media (max-width: 768px) {
.single-post-container { padding: 4rem 1.5rem 2rem 1.5rem !important; gap: 1.5rem !important; }
.post-title h1 { font-size: 1.8rem; }
.post-header { padding: 1.5rem 0; }
.post-content { padding: 0 !important; font-size: 1rem; }
.post-content h2 { font-size: 1.8rem; }
.post-content h3 { font-size: 1.8rem; }
.post-content h5 { font-size: 1.2rem; }
.post-content p { font-size: 1.1rem; }
.post-navigation { grid-template-columns: 1fr; gap: 1rem; }
.related-grid { grid-template-columns: 1fr; gap: 1.5rem; }
.related-card-image { height: 180px; }
.nav-post { flex-direction: column; text-align: center; }
.nav-post-image { width: 60px; height: 60px; }
.nav-next { text-align: center; }
.comment-list .children { margin-left: 1.5rem; }
}

/* Mobile (max 600px) */
@media (max-width: 600px) {
.single-post-container { padding: 3rem 1rem 2rem 1rem !important; gap: 1rem !important; }
.post-title h1 { font-size: 1.5rem; line-height: 1.3; }
.post-meta { font-size: 0.85rem; }
.post-content { font-size: 0.95rem; line-height: 1.7; }
.post-content h2 { font-size: 1.5rem; margin: 1.5rem 0 0.8rem; }
.post-content h3 { font-size: 1.5rem; margin: 1.2rem 0 0.8rem; }
.post-content h5 { font-size: 1.1rem; margin: 1rem 0 0.6rem; }
.post-content p { font-size: 1rem; margin-bottom: 1.2rem; }
.post-content ul, .post-content ol { padding-left: 1.5rem; }
.audio-section { padding: 1.5rem; margin: 1.5rem 0; }
.audio-section h3 { font-size: 1.2rem; }
.audio-section p { font-size: 0.9rem; }
.post-navigation { gap: 0.8rem; margin: 2rem 0; padding: 1.5rem 0; }
.nav-post { padding: 0.8rem; gap: 0.8rem; }
.nav-post-image { width: 50px; height: 50px; }
.nav-post-label { font-size: 0.7rem; }
.nav-post-title h3 { font-size: 0.9rem; }
.related-posts { margin: 2rem 0; }
.related-posts h3 { font-size: 1.4rem; margin-bottom: 1.5rem; }
.related-grid { gap: 1rem; }
.related-card { padding: 0.8rem; }
.related-card-image { height: 150px; }
.related-card-title h4 { font-size: 1rem; }
.related-card-date { font-size: 0.8rem; }
.sidebar-widget { padding: 1.2rem; margin-bottom: 1.5rem; }
.sidebar-widget h3 { font-size: 1.1rem; }
.sidebar-widget a { font-size: 0.9rem; }
.widget-link-home { font-size: 1.1rem; }
.comments-section { padding: 1.5rem 1rem; margin: 2rem 0; }
.comments-section h3 { font-size: 1.4rem; }
.comments-title { font-size: 1.4rem; }
.comment-form textarea { min-height: 120px; padding: 0.8rem; font-size: 0.95rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"] { padding: 0.8rem; font-size: 0.95rem; }
.comment-form input[type="submit"] { padding: 0.7rem 1.5rem; font-size: 1rem !important; }
.comment-list .children { margin-left: 1rem; }
.comment-list .comment-author img { width: 40px; height: 40px; }
.comment-item { gap: 0.5rem; }
.comment-avatar { width: 35px; height: 35px; }
.comment-author { font-size: 0.85rem; }
.comment-text { font-size: 0.8rem; }
}