/* =========================================
   STILE RETRO-MODERN 2010s (BASE)
   ========================================= */
body {
    font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
    background-color: #e9ebee;
    /* Grigio azzurrino tipico di quegli anni */
    margin: 0;
    padding: 0;
}

.main-wrapper {
    max-width: 1100px;
    /* Un po' più largo per l'admin layout */
    margin: 20px auto;
    background: #fff;
    border: 1px solid #999;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
}

/* Navbar Glossy */
.navbar {
    background: linear-gradient(to bottom, #4c66a4 0%, #3b5998 100%);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid #2d4473;
}

.navbar a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9em;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
}

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

/* =========================================
   AREA PUBBLICA (HOMEPAGE E ARTICOLI)
   ========================================= */
.content-area {
    padding: 40px;
    /* Aumentato per non far toccare il testo ai bordi */
    min-height: 500px;
}

/* Stile per il saluto in Homepage (Hero) */
.hero {
    padding: 40px 30px;
    background: linear-gradient(to bottom, #f9f9f9 0%, #ececec 100%);
    border-bottom: 1px solid #ccc;
    text-align: center;
    box-shadow: inset 0 -1px 3px rgba(0, 0, 0, 0.05);
}

.hero h1 {
    margin: 0;
    color: #333;
    font-size: 2.4em;
    text-shadow: 1px 1px 0 #fff;
}

.hero p {
    color: #666;
    font-style: italic;
    margin-top: 10px;
}

/* Stile per la lista articoli in Homepage e Posts */
.post-preview {
    border-bottom: 1px dashed #ccc;
    padding: 20px 0;
}

.post-preview h3 {
    margin: 5px 0;
}

.post-preview a {
    color: #3b5998;
    text-decoration: none;
    font-size: 1.2em;
}

.post-preview a:hover {
    text-decoration: underline;
}

.post-preview p {
    color: #444;
    line-height: 1.5;
}

/* Fix Impaginazione Articolo */
article {
    margin-top: 15px;
}

article h1 {
    margin-top: 0;
    color: #222;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

#contenuto-articolo img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 18px auto;
}

#contenuto-articolo img.img-fixed-small {
    width: 200px;
}

#contenuto-articolo img.img-fixed-medium {
    width: 320px;
}

#contenuto-articolo img.img-fixed-large {
    width: 480px;
}

/* Box per i commenti pubblici (Stile 2010s) */
.comment-item-public {
    background: #fdfdfd;
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(0, 0, 0, 0.05);
}

.comment-item-public .meta {
    font-size: 0.85em;
    color: #777;
    border-bottom: 1px dotted #ccc;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

/* Contenitore Paginazione (Commenti e Homepage) */
.pagination-container {
    margin-top: 20px;
    padding: 15px 0;
    text-align: center;
    border-top: 1px dashed #ccc;
}

/* Footer & Contatti */
footer {
    background: #f0f0f0;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #ddd;
    font-size: 0.85em;
}

.contact-box {
    margin-top: 10px;
    padding: 10px;
    background: #fff;
    border: 1px solid #ddd;
    display: inline-block;
}

/* =========================================
   DASHBOARD ADMIN
   ========================================= */
.admin-layout {
    display: flex;
    gap: 0;
    border-top: 1px solid #ccc;
}

.sidebar {
    flex: 0 0 300px;
    background-color: #f0f2f5;
    border-right: 1px solid #ccc;
    padding: 20px;
    min-height: 600px;
}

.editor-area {
    flex: 1;
    padding: 25px;
    background: #ffffff;
}

/* Post Item nella Sidebar */
.post-item-admin {
    background: linear-gradient(to bottom, #ffffff 0%, #f1f1f1 100%);
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.post-item-admin h4 {
    margin: 0 0 8px 0;
    font-size: 0.9em;
    color: #3b5998;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Badge Stati */
.badge {
    font-size: 0.7em;
    padding: 2px 5px;
    border-radius: 3px;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
}

.bg-published {
    background: #5cb85c;
    border: 1px solid #4cae4c;
}

.bg-draft {
    background: #f0ad4e;
    border: 1px solid #eea236;
}

/* Sezione Moderazione Commenti (Admin) */
.comment-item-admin {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-left: 5px solid #3b5998;
    padding: 10px;
    margin-bottom: 8px;
    font-size: 0.85em;
}

/* =========================================
   BOTTONI E FORM (STILE GLOSSY)
   ========================================= */
.btn-glossy {
    padding: 5px 12px;
    font-size: 0.8em;
    border: 1px solid #ccc;
    background: linear-gradient(to bottom, #ffffff 0%, #e6e6e6 100%);
    border-radius: 3px;
    cursor: pointer;
    font-weight: bold;
    color: #333;
    box-shadow: inset 0 1px 0 #fff;
    /* Effetto luce dall'alto */
}

.btn-glossy:hover {
    background: linear-gradient(to bottom, #f0f0f0 0%, #dcdcdc 100%);
    border-color: #bbb;
}

.btn-danger-glossy {
    background: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
    color: white;
    border: 1px solid #ac2925;
    box-shadow: inset 0 1px 0 #eb9391;
}

.btn-danger-glossy:hover {
    background: linear-gradient(to bottom, #c9302c 0%, #ac2925 100%);
}

/* Form inputs universali */
input,
textarea,
select {
    width: 100%;
    padding: 10px;
    margin: 5px 0 15px 0;
    border: 1px solid #bdc3c7;
    border-radius: 3px;
    box-sizing: border-box;
    font-family: inherit;
}

textarea {
    resize: vertical;
}