        /* ============================================================
   CSS ESPECÍFICO DE SECCIONES (LISTADOS)
   ============================================================ */

:root {
    /* Estas variables se sobreescriben dinámicamente desde PHP */
    --section-color:      #0a2540;
    --section-color-dark: #1e3a5f;
    --section-color-soft: #f0f4f8;
}

/* ------------ HERO DE SECCIÓN ------------ */
.sg-section-hero {
    background: linear-gradient(135deg, var(--section-color) 0%, var(--section-color-dark) 100%);
    color: #fff;
    padding: 30px 0;
    position: relative;
    overflow: hidden;
}
.sg-section-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.sg-section-hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}
.sg-section-hero-text { flex: 1; min-width: 280px; }
.sg-section-hero .kicker {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sg-section-hero .kicker .line {
    width: 40px;
    height: 2px;
    background: var(--brand-accent);
}
.sg-section-hero h1 {
    font-size: 52px;
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1.05;
    margin-bottom: 16px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.2);
    color: #fff;
}
.sg-section-hero .description {
    font-size: 17px;
    line-height: 1.6;
    color: rgba(255,255,255,0.9);
    max-width: 640px;
}
.sg-section-hero .stats {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}
.sg-section-hero .stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sg-section-hero .stat-number {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1;
    color: var(--brand-accent);
}
.sg-section-hero .stat-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.7);
}
@media (max-width: 700px) {
    .sg-section-hero { padding: 40px 0; }
    .sg-section-hero h1 { font-size: 32px; letter-spacing: -1px; }
    .sg-section-hero .stats { gap: 20px; }
    .sg-section-hero .stat-number { font-size: 26px; }
}

/* ------------ LAYOUT LISTA + SIDEBAR ------------ */
.sg-list-section { padding: 32px 0 60px; }
.sg-list-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}
@media (max-width: 900px) {
    .sg-list-layout { grid-template-columns: 1fr; gap: 32px; }
}

/* ------------ ARTÍCULO DESTACADO ------------ */
.sg-featured-post {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 32px;
    transition: box-shadow var(--transition-base);
}
.sg-featured-post:hover { box-shadow: var(--shadow-lg); }
.sg-featured-post-image {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e0e0e0;
}
.sg-featured-post-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.sg-featured-post:hover .sg-featured-post-image img { transform: scale(1.04); }
.sg-featured-post-body { padding: 28px 32px; }
.sg-featured-post-cat {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--section-color);
    background: var(--section-color-soft);
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 14px;
}
.sg-featured-post-title {
    font-size: 32px;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -1px;
    color: var(--text-primary);
    margin-bottom: 14px;
    transition: color var(--transition-fast);
}
.sg-featured-post:hover .sg-featured-post-title { color: var(--section-color); }
.sg-featured-post-excerpt {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.sg-featured-post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
    padding-top: 16px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}
.sg-featured-post-meta .author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
}
.sg-featured-post-meta .avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--section-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 11px;
}
.sg-featured-post-meta .dot { color: var(--border); }
@media (max-width: 700px) {
    .sg-featured-post-body { padding: 20px 22px; }
    .sg-featured-post-title { font-size: 22px; letter-spacing: -0.5px; }
    .sg-featured-post-excerpt { font-size: 15px; }
}

/* ------------ LISTA DE POSTS (formato fila) ------------ */
.sg-posts-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.sg-post-row {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    display: grid;
    grid-template-columns: 240px 1fr;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border: 1px solid transparent;
}
.sg-post-row:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--section-color);
    transform: translateY(-2px);
}
.sg-post-row-image {
    position: relative;
    overflow: hidden;
    background: #e0e0e0;
}
.sg-post-row-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.sg-post-row:hover .sg-post-row-image img { transform: scale(1.06); }
.sg-post-row-body {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.sg-post-row-cat {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--section-color);
    margin-bottom: 8px;
}
.sg-post-row-title {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.4px;
    color: var(--text-primary);
    margin-bottom: 10px;
    transition: color var(--transition-fast);
}
.sg-post-row:hover .sg-post-row-title { color: var(--section-color); }
.sg-post-row-excerpt {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sg-post-row-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.sg-post-row-meta .author-name {
    font-weight: 600;
    color: var(--text-primary);
}
.sg-post-row-meta .dot { color: var(--border); }
@media (max-width: 700px) {
    .sg-post-row { grid-template-columns: 1fr; }
    .sg-post-row-image { aspect-ratio: 16/9; }
    .sg-post-row-body { padding: 16px 18px; }
    .sg-post-row-title { font-size: 17px; }
}

/* ------------ PAGINACIÓN ------------ */
.sg-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 40px;
    flex-wrap: wrap;
}
.sg-pagination a,
.sg-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    background: #fff;
    border: 1px solid var(--border);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}
.sg-pagination a:hover {
    background: var(--bg-body);
    border-color: var(--section-color);
    color: var(--section-color);
}
.sg-pagination .current {
    background: var(--section-color);
    border-color: var(--section-color);
    color: #fff;
    cursor: default;
}
.sg-pagination .dots {
    background: transparent;
    border: none;
    cursor: default;
}
.sg-pagination .nav-arrow {
    padding: 0 16px;
    gap: 6px;
}

/* ------------ SIDEBAR ------------ */
.sg-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 100px;
}
@media (max-width: 900px) { .sg-sidebar { position: static; } }

.sg-sidebar-card {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.sg-sidebar-card-header {
    padding: 16px 20px;
    border-bottom: 2px solid var(--section-color);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--brand-primary);
}
.sg-sidebar-card-header .icon {
    color: var(--section-color);
    font-size: 16px;
}
.sg-sidebar-list { list-style: none; }
.sg-sidebar-list li {
    border-bottom: 1px solid var(--border);
}
.sg-sidebar-list li:last-child { border-bottom: none; }
.sg-sidebar-list a {
    display: flex;
    gap: 14px;
    padding: 14px 20px;
    transition: background var(--transition-fast);
    align-items: center;
}
.sg-sidebar-list a:hover { background: var(--section-color-soft); }
.sg-sidebar-list .num {
    font-size: 18px;
    font-weight: 900;
    color: var(--section-color);
    min-width: 24px;
    letter-spacing: -0.5px;
    line-height: 1;
}
.sg-sidebar-list .title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sg-sidebar-list a:hover .title { color: var(--section-color); }

/* Estado vacío */
.sg-empty {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
}
.sg-empty h3 {
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* ------------ BARRA DE BÚSQUEDA EN LISTADOS ------------ */
.sg-search-bar {
    display: flex;
    justify-content: flex-end;
    margin: 16px 0 24px;
}
.sg-search-bar form {
    display: flex;
    gap: 8px;
    max-width: 480px;
    width: 100%;
}
.sg-search-bar-input {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    transition: all var(--transition-fast);
}
.sg-search-bar-input:focus-within {
    border-color: var(--section-color, #2980b9);
    box-shadow: 0 0 0 4px rgba(41, 128, 185, 0.1);
}
.sg-search-bar-input svg {
    color: var(--text-muted);
    flex-shrink: 0;
}
.sg-search-bar-input input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    min-width: 0;
}
.sg-search-bar-input input::placeholder {
    color: var(--text-muted);
}
.sg-search-bar button {
    padding: 10px 22px;
    background: var(--section-color, #2980b9);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.sg-search-bar button:hover {
    background: var(--section-color-dark, #1a5c8a);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(41, 128, 185, 0.25);
}
@media (max-width: 700px) {
    .sg-search-bar { justify-content: stretch; }
    .sg-search-bar form { max-width: 100%; flex-direction: column; }
    .sg-search-bar button { justify-content: center; padding: 12px; }
}