/* ============================================
   ARTICLES.CSS - Articoli e Post
   Tema: antonellacatania.net
   Usa variabili di style.css — zero colori hardcoded
   ============================================ */

/* ============================================
   HERO
   ============================================ */
.articles-hero,
.post-hero {
    background: var(--light-alt);
    color: var(--dark);
    padding: 4rem 0 3rem;
    border-bottom: 2px solid var(--border);
}

.articles-hero h1,
.post-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--dark);
}

.articles-hero .description {
    font-size: 1.1rem;
    color: var(--text-medium);
    line-height: 1.7;
}

/* ============================================
   POST META
   ============================================ */
.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
    font-size: 0.95rem;
    color: var(--text-medium);
}

.post-meta .badge {
    background: var(--primary);
    color: #ffffff;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

.post-meta .bi,
.post-meta svg {
    color: var(--primary);
    fill: var(--primary);
}

.meta-updated-span {
    color: var(--text-medium);
    font-size: 0.9rem;
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-medium);
    margin-top: 1rem;
    flex-wrap: wrap;
}

.breadcrumb-nav a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-nav a:hover {
    color: var(--primary-dark);
}

.breadcrumb-current-page {
    color: var(--text-dark);
}

/* ============================================
   BADGES PRIVATE / DRAFT
   ============================================ */
.badge-private,
.badge-draft {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-light);
    border: 1px solid var(--primary);
    color: var(--primary-dark);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.badge-draft {
    background: rgba(232, 196, 154, 0.2);
    border-color: var(--warning);
    color: var(--dark);
}

/* ============================================
   SEZIONI PRINCIPALI
   ============================================ */
.articles-section,
.post-section {
    background: var(--light);
    color: var(--text-dark);
    padding: 3rem 0;
    min-height: 60vh;
}

/* ============================================
   LAYOUT FLUID — immagine + contenuto + sidebar
   ============================================ */
.articles-fluid {
    padding-left: 0;
    padding-right: 0;
}

.articles-img-col {
    align-items: flex-start;
    padding: 3rem 0 0 0;
    position: relative;
}

.articles-img-col picture,
.articles-img-col img {
    position: sticky;
    top: 2rem;
    display: block;
    width: 100%;
}

.articles-main-col {
    padding: 0;
}

.articles-inner {
    padding: 3rem 2rem 3rem 2.5rem;
}

.articles-sidebar-col {
    padding: 0;
}

.articles-sidebar-inner {
    padding: 3rem 2rem 3rem 1.5rem;
    position: sticky;
    top: 2rem;
}

/* ============================================
   ARTICLE CARD (lista)
   ============================================ */
.article-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    transition: all 0.3s ease;
}

.article-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(196, 116, 138, 0.12);
    transform: translateY(-2px);
}

.article-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark);
}

.article-card h2 a {
    color: var(--dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-card h2 a:hover {
    color: var(--primary);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-medium);
}

.article-meta .badge {
    background: var(--primary);
    color: #ffffff;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.82rem;
}

.article-meta .bi {
    color: var(--primary);
}

.article-excerpt {
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* ============================================
   POST CONTENT CARD
   ============================================ */
.post-content-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2.5rem;
}

.post-featured-image {
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-content {
    color: var(--text-dark);
    font-size: 1.05rem;
    line-height: 1.8;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    color: var(--dark);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.post-content h2 {
    font-size: 1.6rem;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 0.5rem;
}

.post-content a {
    color: var(--primary);
    text-decoration: underline;
}

.post-content a:hover {
    color: var(--primary-dark);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.post-content ul,
.post-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-medium);
    background: var(--primary-light);
    border-radius: 0 8px 8px 0;
}

.post-content code {
    background: var(--light-alt);
    color: var(--primary-dark);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.post-content pre {
    background: var(--light-alt);
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
}

/* ============================================
   ADMIN EDIT SECTION
   ============================================ */
.admin-edit-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.sidebar-card h5 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.25rem;
}

.contact-sidebar-note {
    color: var(--text-medium);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* ============================================
   RELATED LIST
   ============================================ */
.related-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-list li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.related-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.related-list a {
    display: block;
    text-decoration: none;
    color: var(--text-dark);
    transition: color 0.2s ease;
}

.related-list a:hover {
    color: var(--primary);
}

.related-list .lock-icon,
.related-list .draft-icon {
    fill: var(--primary);
    margin-right: 0.35rem;
    width: 14px;
    height: 14px;
}

.related-list .title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.related-list .date {
    font-size: 0.85rem;
    color: var(--text-medium);
}

/* ============================================
   CATEGORY LIST
   ============================================ */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 0.25rem;
}

.category-list a {
    display: block;
    padding: 0.5rem 0.5rem;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.category-list a:hover,
.category-list a.active {
    color: var(--primary);
    background: var(--primary-light);
    padding-left: 1rem;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.per-page-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.per-page-selector label {
    color: var(--text-medium);
    font-size: 0.9rem;
}

.per-page-selector select {
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text-dark);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
}

.smaller-text {
    font-size: 0.88rem;
    color: var(--text-medium);
}

.pagination {
    display: flex;
    list-style: none;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
}

.pagination .page-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.pagination .page-item a:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-dark);
}

.pagination .page-item.active a {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.pagination .page-item.disabled a {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============================================
   NO ARTICLES
   ============================================ */
.no-articles {
    text-align: center;
    padding: 4rem 2rem;
}

.no-articles .bi {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: block;
}

.no-articles h4 {
    color: var(--dark);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.no-articles p {
    color: var(--text-medium);
}

/* ============================================
   ACCESS DENIED
   ============================================ */
.access-denied {
    background: var(--light);
    color: var(--text-dark);
    padding: 5rem 0;
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.access-denied .bi {
    font-size: 5rem;
    color: var(--primary);
    margin-bottom: 2rem;
    display: block;
}

.access-denied h2 {
    color: var(--dark);
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.access-denied p {
    color: var(--text-medium);
}

.denied-permission-note {
    font-size: 0.95rem;
    color: var(--text-medium);
    margin: 1rem 0;
}

/* ============================================
   SHORTCODES — TOC
   ============================================ */
.toc-container {
    background: var(--primary-light);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 0 8px 8px 0;
    padding: 1.5rem;
    margin: 2rem 0;
}

.toc-title {
    color: var(--dark);
    font-size: 1.1rem;
    margin: 0 0 1rem 0;
    font-weight: 700;
}

.toc-nav {
    color: var(--text-dark);
}

.toc-list {
    list-style: decimal;
    padding-left: 1.5rem;
    margin: 0;
}

.toc-list li {
    margin: 0.5rem 0;
}

.toc-level-3 { margin-left: 1.5rem; }
.toc-level-4 { margin-left: 3rem; }

.toc-list a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.toc-list a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.toc-empty {
    color: var(--text-medium);
    font-style: italic;
}

.toc-highlight {
    background-color: var(--primary-light) !important;
    transition: background-color 0.3s ease;
}

/* ============================================
   SHORTCODES — NOTIFICA
   ============================================ */
.notifica-container {
    width: 100%;
    margin: 2rem 0;
}

.notifica-wrap {
    margin: 0 auto;
    max-width: 800px;
    background: var(--primary-light);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
}

.notifica-title {
    color: var(--primary-dark);
    margin-bottom: 1rem;
    font-weight: 700;
}

.notifica-checkboxes {
    margin: 1.5rem 0;
}

.notifica-checkbox-item {
    margin: 1rem 0;
}

.notifica-checkbox-item label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    color: var(--text-dark);
    gap: 0.5rem;
}

.notifica-checkbox-item input[type="checkbox"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
    accent-color: var(--primary);
}

.notifica-submit {
    text-align: center;
    margin-top: 2rem;
}

.notifica-success {
    text-align: center;
    padding: 2rem;
    color: var(--success);
}

/* ============================================
   SHORTCODES — VIDEO
   ============================================ */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 2rem auto;
    border-radius: 8px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-container-native {
    margin: 2rem auto;
}

.video-container-native video {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(196, 116, 138, 0.15);
}

.video-error {
    color: var(--danger);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .articles-inner,
    .articles-sidebar-inner {
        padding: 2rem 1rem;
    }

    .articles-sidebar-inner {
        position: static;
    }
}

@media (max-width: 768px) {
    .articles-hero,
    .post-hero {
        padding: 3rem 0 2rem;
    }

    .pagination-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .per-page-selector {
        justify-content: space-between;
    }

    .pagination {
        justify-content: center;
    }

    .post-content-card {
        padding: 1.5rem;
    }

    .notifica-wrap {
        padding: 1.5rem;
    }

    .toc-container {
        padding: 1rem;
    }
}
