/* 
 * Nativi - Cultura dei Nativi Americani
 * Stylesheet principale - VERSIONE PULITA
 */

/* ============================================
   RESET E BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', serif;
    line-height: 1.6;
    color: #2c1810;
    background-color: #f5f1eb;
}

a {
    color: #8b4513;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #d2691e;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   ICONE SVG
   ============================================ */
.icon-feather, .icon-sun, .icon-book, .icon-calendar, .icon-quote, .icon-news {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
    margin-right: 8px;
}

.icon-feather {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23f5f1eb"><path d="M12 2c-1.5 4-3 6-6 8 0 0 1 1 2 1s2-1 2-1c0 2-1 4-3 6-1 1-2 2-2 4 0 2 2 4 5 4 4 0 7-3 7-7 0-3-2-5-4-6 3-1 5-3 6-6 0 0-1 1-2 1s-2-1-2-1c1-1 2-2 2-3h-5z"/></svg>');
}

.icon-sun {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23f5f1eb"><circle cx="12" cy="12" r="5"/><path d="M12 1v3m0 16v3M23 12h-3M4 12H1m17.66-7.66l-2.12 2.12M8.46 15.54l-2.12 2.12m12.12 0l-2.12-2.12M8.46 8.46L6.34 6.34"/></svg>');
}

.icon-calendar {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23f5f1eb"><path d="M19 4h-1V2h-2v2H8V2H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"/></svg>');
}

.icon-quote {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23f5f1eb"><path d="M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z"/></svg>');
}

.icon-news {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23f5f1eb"><path d="M20 3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM4 19V5h7v14H4zm16 0h-7v-7h7v7zm0-9h-7V5h7v5z"/></svg>');
}

/* Icone dark per card headings */
.icon-feather-dark, .icon-calendar-dark, .icon-news-dark, .icon-quote-dark {
    display: inline-block;
    width: 28px;
    height: 28px;
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
    margin-right: 10px;
}

.icon-feather-dark {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%238b4513"><path d="M12 2c-1.5 4-3 6-6 8 0 0 1 1 2 1s2-1 2-1c0 2-1 4-3 6-1 1-2 2-2 4 0 2 2 4 5 4 4 0 7-3 7-7 0-3-2-5-4-6 3-1 5-3 6-6 0 0-1 1-2 1s-2-1-2-1c1-1 2-2 2-3h-5z"/></svg>');
}

.icon-calendar-dark {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%238b4513"><path d="M19 4h-1V2h-2v2H8V2H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"/></svg>');
}

.icon-news-dark {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%238b4513"><path d="M20 3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM4 19V5h7v14H4zm16 0h-7v-7h7v7zm0-9h-7V5h7v5z"/></svg>');
}

.icon-quote-dark {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%238b4513"><path d="M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z"/></svg>');
}

/* ============================================
   HEADER
   ============================================ */
header {
    background: linear-gradient(135deg, #8b4513 0%, #d2691e 100%);
    color: #f5f1eb;
    padding: 2rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-container {
    flex-shrink: 0;
}

.logo-container img {
    width: 150px;
    height: 150px;
    object-fit: contain;
}

.title-container {
    flex-grow: 1;
    text-align: center;
}

h1 {
    font-size: 4rem;
    margin: 0;
    font-weight: normal;
    letter-spacing: 8px;
}

h1 a {
    color: #f5f1eb;
}

h1 a:hover {
    color: #fff;
}

.tagline {
    font-size: 1.1rem;
    font-style: italic;
    opacity: 0.9;
    margin-top: 0.5rem;
    letter-spacing: 2px;
}

/* ============================================
   TOP BAR - RICERCA E LOGIN/PROFILO  
   ============================================ */
.top-bar {
    background: #f5f1eb;
    border-bottom: 2px solid #d2691e;
    padding: 12px 0;
}

.top-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

/* RICERCA - SINISTRA */
.search-box {
    flex: 0 0 auto;
}

.search-form {
    display: flex;
    gap: 8px;
}

.search-form input[type="text"] {
    padding: 10px 15px;
    border: 2px solid #d2691e;
    border-radius: 6px;
    font-size: 1rem;
    width: 300px;
    transition: border-color 0.3s;
}

.search-form input[type="text"]:focus {
    outline: none;
    border-color: #8b4513;
}

.search-form button {
    padding: 10px 20px;
    background: #8b4513;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
}

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

/* LOGIN/PROFILO - DESTRA */
.user-box {
    flex: 0 0 auto;
}

/* Form login inline */
.login-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-form-inline {
    display: flex;
    gap: 8px;
    align-items: center;
}

.login-form-inline input[type="text"],
.login-form-inline input[type="password"] {
    padding: 10px 15px;
    border: 2px solid #d2691e;
    border-radius: 6px;
    font-size: 0.95rem;
    width: 140px;
    transition: border-color 0.3s;
}

.login-form-inline input:focus {
    outline: none;
    border-color: #8b4513;
}

.login-form-inline button {
    padding: 10px 20px;
    background: #8b4513;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
}

.login-form-inline button:hover {
    background: #d2691e;
}

.btn-register {
    padding: 10px 20px;
    background: white;
    color: #8b4513;
    border: 2px solid #8b4513;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-register:hover {
    background: #8b4513;
    color: white;
}

/* Profilo utente */
.user-profile-area {
    position: relative;
}

.user-profile-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: white;
    border: 2px solid #8b4513;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    z-index: 1000;
}

.user-profile-link:hover {
    background: #8b4513;
}

.user-profile-link:hover .user-greeting {
    color: white;
}

.user-avatar-mini {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #8b4513;
    object-fit: cover;
}

.user-greeting {
    color: #5d4037;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s;
    white-space: nowrap;
}

/* Dropdown menu utente - CON DELAY 0.5s */
.user-dropdown {
    position: absolute;
    top: calc(100% - 4px);
    right: 0;
    background: white;
    border: 2px solid #8b4513;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 220px;
    z-index: 999;
    padding-top: 12px;
    
    /* Usa visibility + opacity con DELAY */
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0.5s;
}

/* Mostra dropdown - appare subito, scompare dopo 0.5s */
.user-profile-area:hover .user-dropdown {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0s;
}

.user-dropdown a {
    display: block;
    padding: 14px 18px;
    color: #2c1810;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s;
}

.user-dropdown a:last-child {
    border-bottom: none;
}

.user-dropdown a:hover {
    background: #f5f1eb;
}

/* ============================================
   NAVIGATION
   ============================================ */
nav {
    background-color: #5d4037;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav ul {
    list-style: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

nav a {
    color: #f5f1eb;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

nav a:hover,
nav a.active {
    color: #d4af37;
}

/* ============================================
   CONTAINER E LAYOUT
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero section */
.hero {
    background: linear-gradient(rgba(139, 69, 19, 0.7), rgba(139, 69, 19, 0.7)),
                linear-gradient(135deg, #8b4513 0%, #d2691e 100%);
    color: #f5f1eb;
    padding: 4rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
    border-radius: 8px;
}

.hero-quote {
    font-size: 1.5rem;
    font-style: italic;
    max-width: 800px;
    margin: 0 auto 1rem;
    line-height: 1.8;
}

.hero-author {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main grid layout */
.main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #8b4513;
    margin-bottom: 2rem;
}

.card h2 {
    color: #8b4513;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    border-bottom: 2px solid #d2691e;
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.card h3 {
    color: #5d4037;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* ============================================
   ACCADDE OGGI
   ============================================ */
.today-event {
    background: linear-gradient(135deg, #f5deb3 0%, #deb887 100%);
    padding: 1.5rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.today-event .date {
    font-weight: bold;
    color: #8b4513;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.today-event .event-text {
    font-size: 1rem;
    line-height: 1.6;
}

.event-note {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    font-style: italic;
    color: #5d4037;
}

/* ============================================
   QUOTE BOX
   ============================================ */
.quote-box {
    background: linear-gradient(135deg, #e8d5c4 0%, #d4af37 100%);
    padding: 2rem;
    border-radius: 6px;
    font-style: italic;
    text-align: center;
    margin-bottom: 1rem;
}

.quote-text {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.quote-author {
    font-size: 1rem;
    font-weight: bold;
    color: #5d4037;
    font-style: normal;
}

.quote-tribe {
    font-size: 0.9rem;
    color: #5d4037;
    margin-top: 0.3rem;
}

/* ============================================
   BIOGRAFIE
   ============================================ */
.bio-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.bio-card {
    background: #faf8f5;
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid #d2691e;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.bio-card::before {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23d2691e" opacity="0.3"><path d="M12 2c-1.5 4-3 6-6 8 0 0 1 1 2 1s2-1 2-1c0 2-1 4-3 6-1 1-2 2-2 4 0 2 2 4 5 4 4 0 7-3 7-7 0-3-2-5-4-6 3-1 5-3 6-6 0 0-1 1-2 1s-2-1-2-1c1-1 2-2 2-3h-5z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.3;
}

.bio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.2);
}

.bio-card h4 {
    color: #8b4513;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.bio-card .tribe {
    color: #5d4037;
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.bio-card .dates {
    font-size: 0.85rem;
    color: #5d4037;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.bio-card p {
    font-size: 0.95rem;
    color: #4a3428;
}

/* Biografie grid */
.biografie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.biografia-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #d2691e;
    transition: transform 0.3s, box-shadow 0.3s;
}

.biografia-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.2);
}

.biografia-card h3 {
    color: #8b4513;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.nome-originale {
    font-style: italic;
    color: #5d4037;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.bio-info {
    background: #faf8f5;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.bio-info p {
    margin: 0.25rem 0;
}

.bio-excerpt {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.read-more {
    text-align: right;
    margin-top: 1rem;
}

.read-more a {
    font-weight: bold;
    color: #8b4513;
}

/* Biografia singola */
.biografia-single {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 900px;
    margin: 0 auto;
}

.bio-header {
    border-bottom: 3px solid #d2691e;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.bio-header h1 {
    font-size: 2.5rem;
    color: #8b4513;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.bio-meta {
    font-size: 0.95rem;
    color: #5d4037;
}

.bio-meta span {
    margin-right: 1.5rem;
}

.bio-content {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    overflow: hidden;
}

.bio-content::after {
    content: "";
    display: table;
    clear: both;
}

.bio-image {
    float: left;
    max-width: 300px;
    width: 100%;
    height: auto;
    margin: 0 2rem 1rem 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border: 3px solid #d2691e;
}

.bio-content p {
    margin-bottom: 1rem;
}

.bio-footer {
    padding-top: 1.5rem;
    border-top: 2px solid #e0d5c7;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.back-link, .tribe-link {
    font-weight: bold;
}

/* ============================================
   NEWS
   ============================================ */
.news-list {
    list-style: none;
}

.news-item {
    padding: 1rem 0;
    border-bottom: 1px solid #e0d5c7;
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    color: #5d4037;
    font-size: 0.9rem;
    font-weight: bold;
}

.news-title {
    color: #2c1810;
    font-size: 1.1rem;
    margin: 0.3rem 0;
    font-weight: 600;
}

.news-title a {
    color: #2c1810;
    transition: color 0.3s;
}

.news-title a:hover {
    color: #8b4513;
}

.news-snippet {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.3rem;
}

.more-link {
    margin-top: 1rem;
    text-align: right;
}

.more-link a {
    font-weight: bold;
    color: #8b4513;
}

/* News container */
.news-container {
    margin-bottom: 2rem;
}

.news-article {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #8b4513;
    margin-bottom: 2rem;
}

.news-header h2 {
    font-size: 1.8rem;
    color: #ffffff;
    margin-bottom: 0.75rem;
    border: none;
    padding: 0;
    font-weight: bold;
}

.news-header h2 a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s;
}

.news-header h2 a:hover {
    color: #f5f1eb;
    text-decoration: underline;
}

.news-meta {
    font-size: 0.9rem;
    color: #f5f1eb;
    margin-bottom: 1rem;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.news-views {
    color: #f5f1eb;
}

.news-category {
    background: #d2691e;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    font-size: 0.85rem;
}

.news-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.news-footer .read-more {
    color: #ffffff;
    font-weight: bold;
    text-decoration: none;
}

.news-footer .read-more:hover {
    color: #f5f1eb;
    text-decoration: underline;
}

/* News singola */
.news-single {
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 900px;
    margin: 0 auto;
}

.news-single .news-header {
    background: linear-gradient(135deg, #5d4037 0%, #3e2723 100%);
    border-radius: 8px 8px 0 0;
    padding: 2rem;
    margin: -2.5rem -2.5rem 2rem -2.5rem;
}

.news-single h1 {
    font-size: 2.2rem;
    color: #f5f1eb;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.news-single .news-meta {
    font-size: 0.9rem;
    color: #f5f1eb;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.news-single .news-date,
.news-single .news-views,
.news-single .news-author {
    color: #f5f1eb;
}

.news-content {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.news-content p {
    margin-bottom: 1rem;
}

.news-content a {
    color: #8b4513;
    text-decoration: underline;
}

.news-content a:hover {
    color: #d2691e;
}

.news-content ul,
.news-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.news-content img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
}

.news-content blockquote {
    border-left: 4px solid #d2691e;
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: #5d4037;
}

/* News rating and voting */
.news-rating {
    background: #f5f1eb;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.stars-display {
    display: inline-flex;
    gap: 0.25rem;
}

.stars-display .star {
    font-size: 1.5rem;
    color: #ddd;
}

.stars-display .star.filled {
    color: #ffd700;
    text-shadow: 0 0 2px rgba(255, 215, 0, 0.5);
}

.rating-value {
    font-weight: bold;
    color: #8b4513;
    font-size: 1.1rem;
}

.rating-count {
    color: #666;
    font-size: 0.9rem;
}

/* Vote section */
.news-vote-section {
    background: linear-gradient(135deg, #f5f1eb 0%, #e8d5c4 100%);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    text-align: center;
}

.news-vote-section h3 {
    color: #8b4513;
    margin-bottom: 0.5rem;
}

.vote-instruction {
    color: #666;
    margin-bottom: 1rem;
}

.stars-vote {
    display: inline-flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.star-vote {
    font-size: 2.5rem;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.star-vote:hover,
.star-vote.hover {
    color: #ffd700;
    transform: scale(1.2);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.vote-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 4px;
    font-weight: bold;
    min-height: 20px;
}

.vote-message.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.vote-message.error {
    background: #ffebee;
    color: #c62828;
}

.vote-message.info {
    background: #e3f2fd;
    color: #1565c0;
}

.already-voted {
    color: #2e7d32;
    font-size: 1.1rem;
    font-weight: bold;
}

.news-single .news-footer {
    padding-top: 1.5rem;
    border-top: 2px solid #e0d5c7;
}

/* ============================================
   COMMENTI NEWS
   ============================================ */
.commenti-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e0e0e0;
}

.commenti-section h2 {
    color: #5d4037;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #d2691e;
}

.commenti-lista {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.commento-item {
    background: #f9f9f9;
    border-left: 4px solid #8b4513;
    padding: 1.5rem;
    border-radius: 4px;
    transition: background 0.3s;
}

.commento-item:hover {
    background: #f5f5f5;
}

.commento-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.commento-autore {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.commento-autore strong {
    color: #2c1810;
    font-size: 1.05rem;
}

.badge-utente {
    background: #4caf50;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-ospite {
    background: #9e9e9e;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.commento-data {
    color: #666;
    font-size: 0.9rem;
}

.commento-titolo {
    color: #5d4037;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.commento-testo {
    color: #4a3428;
    line-height: 1.7;
    font-size: 1rem;
}

.no-commenti {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 4px;
}

/* ============================================
   ANIMALI TOTEM
   ============================================ */
.totale-animali {
    color: #666;
    margin-top: 1rem;
}

.animali-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.animale-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.animale-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.animale-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.animale-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
    padding: 1rem;
}

.animale-card:hover .animale-image img {
    transform: scale(1.05);
}

.animale-content {
    padding: 1.5rem;
}

.animale-content h2 {
    color: #8b4513;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.animale-content h2 a {
    color: #8b4513;
    text-decoration: none;
}

.animale-content h2 a:hover {
    color: #d2691e;
}

.animale-preview {
    color: #4a3428;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.animale-card .read-more {
    color: #8b4513;
    font-weight: bold;
    text-decoration: none;
}

.animale-card .read-more:hover {
    color: #d2691e;
    text-decoration: underline;
}

/* Singolo Animale */
.animale-single {
    max-width: 1200px;
    margin: 0 auto;
}

.animale-header {
    text-align: center;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #8b4513 0%, #5d4037 100%);
    padding: 2rem;
    border-radius: 8px;
}

.animale-header h1 {
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.animale-subtitle {
    color: #f5f1eb;
    font-style: italic;
    font-size: 1.1rem;
}

.animale-layout {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: flex-start;
}

.animale-image-sidebar {
    flex: 0 0 300px;
    background: #000000;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    position: sticky;
    top: 2rem;
}

.animale-image-sidebar img {
    width: 100%;
    height: auto;
    display: block;
}

.animale-image-large {
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background: #000000;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.animale-image-large img {
    max-width: 100%;
    height: auto;
    display: block;
}

.animale-content {
    flex: 1;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #2c1810;
}

.animale-footer {
    border-top: 2px solid #e0d5c7;
    padding-top: 2rem;
    margin-top: 3rem;
}

.animale-navigation {
    margin-bottom: 2rem;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-prev, .nav-next, .nav-back {
    padding: 0.75rem 1.25rem;
    background: #8b4513;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
    font-weight: 500;
}

.nav-prev:hover, .nav-next:hover, .nav-back:hover {
    background: #d2691e;
    color: #ffffff;
}

.nav-back {
    background: #5d4037;
}

/* ============================================
   EVENTI / ACCADDE OGGI
   ============================================ */
.eventi-container {
    margin-bottom: 2rem;
}

.evento-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #8b4513;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1.5rem;
}

.evento-year {
    font-size: 2rem;
    font-weight: bold;
    color: #8b4513;
    flex-shrink: 0;
    min-width: 100px;
}

.evento-content {
    flex-grow: 1;
}

.evento-note {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    font-style: italic;
    color: #5d4037;
    background: #faf8f5;
    padding: 0.5rem;
    border-radius: 4px;
}

/* Date navigator */
.date-navigator {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.date-form {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.date-form label {
    font-weight: bold;
    color: #5d4037;
}

.date-form select {
    padding: 0.5rem;
    border: 1px solid #d2691e;
    border-radius: 4px;
    background: white;
    font-size: 1rem;
}

.date-form button {
    padding: 0.5rem 1.5rem;
    background: #8b4513;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.date-form button:hover {
    background: #d2691e;
}

.quick-links a {
    padding: 0.5rem 1rem;
    background: #5d4037;
    color: white;
    border-radius: 4px;
    transition: background 0.3s;
}

.quick-links a:hover {
    background: #8b4513;
}

.current-date {
    background: linear-gradient(135deg, #f5deb3 0%, #deb887 100%);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.current-date h2 {
    color: #8b4513;
    font-size: 1.6rem;
}

.adjacent-days {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    gap: 1rem;
}

.adjacent-days a {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #d2691e;
    border-radius: 6px;
    color: #8b4513;
    font-weight: bold;
    transition: all 0.3s;
}

.adjacent-days a:hover {
    background: #8b4513;
    color: white;
    border-color: #8b4513;
}

/* ============================================
   AFORISMI
   ============================================ */
.aforismi-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.aforisma-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #d2691e;
    transition: transform 0.3s, box-shadow 0.3s;
}

.aforisma-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.2);
}

.aforisma-text {
    font-size: 1.15rem;
    font-style: italic;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: #2c1810;
}

.aforisma-meta {
    padding-top: 1rem;
    border-top: 1px solid #e0d5c7;
    font-size: 0.9rem;
}

.aforisma-author {
    display: block;
    font-weight: bold;
    color: #8b4513;
    margin-bottom: 0.3rem;
}

.aforisma-tribe {
    display: block;
    color: #5d4037;
    font-style: italic;
}

.aforisma-category {
    display: inline-block;
    background: #f5deb3;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* ============================================
   FILTRI E RICERCA
   ============================================ */
.filter-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.filter-form {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.filter-form label {
    font-weight: bold;
    color: #5d4037;
}

.filter-form select {
    padding: 0.5rem 1rem;
    border: 1px solid #d2691e;
    border-radius: 4px;
    background: white;
    font-size: 1rem;
    min-width: 200px;
}

.filters-section {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.filters-form {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: #5d4037;
    font-size: 0.9rem;
}

.filter-group select {
    padding: 0.5rem 0.75rem;
    border: 2px solid #d2691e;
    border-radius: 4px;
    background: white;
    font-size: 1rem;
    min-width: 180px;
    cursor: pointer;
}

.filter-group select:focus {
    outline: none;
    border-color: #8b4513;
}

.btn-reset-filters {
    padding: 0.5rem 1rem;
    background: #c62828;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.3s;
    display: inline-block;
}

.btn-reset-filters:hover {
    background: #b71c1c;
}

.filter-results {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

.filter-results strong {
    color: #8b4513;
}

/* Search results */
.search-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.search-section h2 {
    color: #8b4513;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #d2691e;
    display: flex;
    align-items: center;
}

.search-results {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.search-result-item {
    padding: 1.5rem;
    background: #faf8f5;
    border-radius: 6px;
    border-left: 4px solid #d2691e;
    transition: transform 0.3s, box-shadow 0.3s;
}

.search-result-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.15);
}

.search-result-item h3 {
    color: #8b4513;
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

.search-result-item h3 a {
    color: #8b4513;
    text-decoration: none;
}

.search-result-item h3 a:hover {
    color: #d2691e;
    text-decoration: underline;
}

.search-result-item h3 mark,
.result-meta mark,
.result-preview mark {
    background-color: #ffd700;
    color: #2c1810;
    font-weight: bold;
    padding: 2px 4px;
    border-radius: 2px;
}

.result-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.result-preview {
    color: #4a3428;
    line-height: 1.6;
}

.search-result-item.aforisma {
    background: linear-gradient(135deg, #e8d5c4 0%, #f5deb3 100%);
}

.search-again {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.search-again h3 {
    color: #8b4513;
    margin-bottom: 1rem;
}

.search-form-page {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.search-form-page input[type="text"] {
    padding: 0.75rem 1rem;
    border: 2px solid #d2691e;
    border-radius: 4px;
    font-size: 1rem;
    min-width: 300px;
}

.search-form-page input[type="text"]:focus {
    outline: none;
    border-color: #8b4513;
}

/* ============================================
   PAGINAZIONE
   ============================================ */
.pagination {
    margin: 2rem 0;
    text-align: center;
}

.pagination ul {
    list-style: none;
    display: inline-flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination li a,
.pagination li span {
    display: block;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #d2691e;
    border-radius: 4px;
    color: #8b4513;
    transition: all 0.3s;
}

.pagination li a:hover {
    background: #8b4513;
    color: white;
    border-color: #8b4513;
}

.pagination li.active span {
    background: #8b4513;
    color: white;
    border-color: #8b4513;
}

/* No results */
.no-results {
    background: white;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    color: #5d4037;
    font-size: 1.1rem;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #d2691e;
}

.page-header h1 {
    font-size: 2.5rem;
    color: #8b4513;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    letter-spacing: 2px;
}

.page-intro {
    font-size: 1.1rem;
    color: #5d4037;
    line-height: 1.6;
}

/* ============================================
   FORM REGISTRAZIONE
   ============================================ */
.field-feedback {
    display: block;
    font-size: 0.9rem;
    margin-top: 0.3rem;
    font-weight: 600;
}

.field-feedback.success {
    color: #4caf50;
}

.field-feedback.error {
    color: #c62828;
    background: #ffebee;
    padding: 0.5rem;
    border-radius: 4px;
    border-left: 4px solid #c62828;
}

.field-feedback.error::before {
    content: '⚠️ ';
    font-size: 1.1rem;
}

.field-feedback.info {
    color: #2196f3;
}

.alert {
    padding: 1.25rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #28a745;
    border-left: 6px solid #28a745;
}

.alert-success::before {
    content: '✅ ';
    font-size: 1.3rem;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #c62828;
    border-left: 6px solid #c62828;
}

.alert-error::before {
    content: '🔺 ';
    font-size: 1.3rem;
}

.btn-link {
    color: #8b4513;
    font-weight: bold;
    text-decoration: underline;
}

.btn-link:hover {
    color: #d2691e;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

input.error {
    border-color: #c62828 !important;
    background: #fff5f5;
}

input.success {
    border-color: #4caf50 !important;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background-color: #5d4037;
    color: #f5f1eb;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .top-bar-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-box,
    .user-box {
        width: 100%;
    }
    
    .search-form,
    .login-area {
        width: 100%;
        justify-content: center;
    }
    
    .search-form input[type="text"] {
        flex: 1;
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
    
    .login-form-inline {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .login-form-inline input[type="text"],
    .login-form-inline input[type="password"] {
        width: calc(50% - 4px);
        min-width: 120px;
    }
    
    .login-form-inline button {
        width: 100%;
    }
    
    .user-greeting {
        display: none;
    }
    
    .search-form input[type="text"] {
        width: 100%;
    }
    
    h1 {
        font-size: 3rem;
        letter-spacing: 4px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .logo-container img {
        width: 120px;
        height: 120px;
    }
    
    nav ul {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
    
    .bio-preview,
    .biografie-grid,
    .aforismi-container,
    .animali-grid {
        grid-template-columns: 1fr;
    }
    
    .bio-image {
        float: none;
        display: block;
        max-width: 100%;
        margin: 0 0 1rem 0;
    }
    
    .date-navigator {
        flex-direction: column;
        align-items: stretch;
    }
    
    .date-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .date-form select {
        width: 100%;
    }
    
    .evento-card {
        flex-direction: column;
    }
    
    .evento-year {
        font-size: 1.5rem;
    }
    
    .bio-footer {
        flex-direction: column;
    }
    
    .news-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .animale-layout {
        flex-direction: column;
    }
    
    .animale-image-sidebar {
        flex: 0 0 auto;
        width: 100%;
        position: static;
    }
    
    .nav-links {
        flex-direction: column;
    }
    
    .nav-prev, .nav-next {
        width: 100%;
        text-align: center;
    }
    
    .commento-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .commento-item {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
        letter-spacing: 2px;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .hero-quote {
        font-size: 1.2rem;
    }
    
    .container {
        padding: 1rem;
    }
}
/* ============================================
   STILI COMMENTI BIOGRAFIE - Aggiungi a style.css
   ============================================ */

/* Sezione commenti */
.commenti-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e0e0e0;
}

.commenti-section h2 {
    color: #5d4037;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #d2691e;
}

/* NAVIGAZIONE RAPIDA */
.commenti-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: white;
    border: 2px solid #d2691e;
    border-radius: 8px;
    color: #5d4037;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-nav:hover {
    background: #8b4513;
    color: white;
    border-color: #8b4513;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-nav.active {
    background: #8b4513;
    color: white;
    border-color: #8b4513;
}

.nav-icon {
    font-size: 1.2rem;
}

.nav-text {
    white-space: nowrap;
}

.nav-badge {
    background: rgba(255,255,255,0.3);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: bold;
}

.btn-nav:hover .nav-badge {
    background: rgba(255,255,255,0.4);
}

/* Form commento */
.commento-form-container {
    background: #f9f9f9;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 3rem;
    border-left: 4px solid #8b4513;
    scroll-margin-top: 100px;
}

.commento-form-container h3 {
    color: #5d4037;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
}

.commento-form {
    max-width: 800px;
}

.commento-as-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #e8f5e9;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #4caf50;
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #8b4513;
    object-fit: cover;
}

/* Lista commenti */
#lista-commenti {
    scroll-margin-top: 100px;
}

.commenti-header {
    color: #5d4037;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e0e0e0;
}

.commento-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #8b4513;
    object-fit: cover;
}

.no-commenti {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 3rem 2rem;
    background: #f9f9f9;
    border-radius: 8px;
    border: 2px dashed #d2691e;
}

.no-commenti p {
    font-size: 1.1rem;
    margin: 0;
}

/* Link torna su */
.back-to-form {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.btn-back {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #8b4513;
    border-radius: 6px;
    color: #5d4037;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-back:hover {
    background: #8b4513;
    color: white;
    transform: translateY(-2px);
}

/* Scroll smooth */
html {
    scroll-behavior: smooth;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .commenti-nav {
        flex-direction: column;
    }
    
    .btn-nav {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .nav-text {
        font-size: 0.9rem;
    }
    
    .commento-avatar,
    .user-avatar-small {
        width: 36px;
        height: 36px;
    }
}
.report-modal{
  position:fixed; inset:0;
  background:rgba(0,0,0,.45);
  display:none;
  align-items:center;
  justify-content:center;
  padding:16px;
  z-index:9999;
}
.report-modal.open{ display:flex; }

.report-dialog{
  width:min(640px, 100%);
  background:#fff;
  border-radius:14px;
  border:2px solid #8b4513;
  overflow:hidden;
  box-shadow:0 10px 30px rgba(0,0,0,.25);
}
.report-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px;
  background:#faf6ef;
}
.report-close{
  background:none; border:0; font-size:18px; cursor:pointer;
}
#report-form{ padding:14px 16px; }
#report-form label{ display:block; font-weight:700; margin:10px 0 6px; color:#5d4037; }
#report-form input, #report-form textarea{
  width:100%; padding:10px 12px;
  border:1px solid rgba(0,0,0,.2);
  border-radius:10px;
  font-size:1rem;
}
#report-form textarea{ min-height:120px; }

.report-actions{
  display:flex; gap:10px; justify-content:flex-end;
  margin-top:12px;
}
.btn-report-send{
  background:#8b4513; color:#fff; border:0;
  padding:10px 14px; border-radius:10px;
  font-weight:800; cursor:pointer;
}
.btn-report-cancel{
  background:#eee; border:0;
  padding:10px 14px; border-radius:10px;
  font-weight:700; cursor:pointer;
}
.report-msg{
  margin-top:10px;
  padding:10px 12px;
  border-radius:10px;
  background:#f5f5f5;
}
 .avatar-picker { max-width: 560px; }

.avatar-preview{
  display:flex; gap:12px; align-items:center;
  padding:12px; border:2px solid rgba(0,0,0,.12);
  border-radius:12px; background:#fff;
}
.avatar-preview img{
  width:48px; height:48px; border-radius:12px;
  border:2px solid #8b4513; object-fit:cover;
}
.avatar-preview-meta{ display:flex; flex-direction:column; gap:8px; }

.avatar-dropdown{
  display:none;
  margin-top:10px;
  border:2px solid #8b4513;
  border-radius:12px;
  background:#fff;
  box-shadow: 0 10px 28px rgba(0,0,0,.15);
  overflow:hidden;
}
.avatar-dropdown.open{ display:block; }

.avatar-dropdown-head{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  background: rgba(139,69,19,.08);
}
.avatar-nav{ display:flex; align-items:center; gap:8px; }
.avatar-page{ font-weight:800; color:#5d4037; }

.avatar-close{
  background:transparent; border:0; cursor:pointer;
  font-size:18px; padding:6px 8px;
}

.avatar-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:10px;
  padding:12px;
}
.avatar-tile{
  border:2px solid rgba(0,0,0,.12);
  border-radius:12px;
  background:#fff;
  padding:8px;
  cursor:pointer;
}
.avatar-tile img{
  width:40px; height:40px; /* circa 50% */
  border-radius:10px; object-fit:cover;
  display:block; margin:0 auto;
}
.avatar-tile:hover{ border-color: rgba(139,69,19,.6); }
.avatar-tile.active{ border-color:#8b4513; box-shadow: 0 8px 18px rgba(139,69,19,.15); }

.btn.btn-sm{ padding:8px 10px; border-radius:10px; }
.dm-modal{position:fixed;inset:0;background:rgba(0,0,0,.55);display:none;align-items:center;justify-content:center;padding:18px;z-index:9999}
.dm-modal.open{display:flex}
.dm-modal-dialog{width:min(720px,100%);background:#fff;border-radius:14px;box-shadow:0 18px 48px rgba(0,0,0,.25);overflow:hidden;align-items: center}


#dm-new-form{padding:14px}
#dm-new-form label{display:block;font-weight:700;margin:10px 0 6px;color:#5d4037}
#dm-new-form input,#dm-new-form textarea{width:100%;border:1px solid rgba(0,0,0,.18);border-radius:10px;padding:10px 12px;font-size:1rem}
.dm-modal-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:12px}
.dm-modal-msg{margin-top:10px;background:#f8d7da;border:1px solid rgba(198,40,40,.35);color:#721c24;border-radius:10px;padding:10px 12px}
/* nuovo dm */
.dm-modal-head{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center; /* centra il titolo */
  padding: 12px 44px;      /* spazio per la X a destra */
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.dm-modal-head h2{
  margin: 0;
  text-align: center;
  font-weight: 900;
}

.dm-modal-close{
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.dm-menu-link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.dm-badge{
  min-width:20px;
  height:20px;
  padding:0 6px;
  border-radius:999px;
  font-size:12px;
  line-height:20px;
  text-align:center;
  font-weight:800;
  background:#c62828;
  color:#fff;
}
.dm-pill{
  margin-left:10px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  background:#c62828;
  color:#fff;
  text-decoration:none;
  font-weight:800;
  font-size:.9rem;
  line-height:1;
  box-shadow:0 6px 16px rgba(0,0,0,.12);
}

.dm-pill:hover{ opacity:.92; }

.dm-pill-count{
  background:rgba(255,255,255,.18);
  border-radius:999px;
  padding:3px 7px;
  min-width:22px;
  text-align:center;
}
