/* Variables */
:root {
    --c-black: #000000;
    --c-white: #ffffff;
    --c-dark-gray: #1a1a1a;
    --c-medium-gray: #e0e0e0;
    --c-light-gray: #f5f6f8;
    --c-text-main: #333333;
    --c-text-muted: #888888;
    --c-primary: #007bff;
    --c-primary-hover: #0056b3;
    --c-tag-dark: #4a5568;
    --c-tag-light: #48bb78;
    --font-main: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --transition: all 0.3s ease;
}

/* Reset Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--c-text-main);
    background-color: var(--c-white);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* Layout y Contenedores */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Cabecera Principal */
.main-header {
    background-color: var(--c-black);
    color: var(--c-white);
    padding: 15px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 1px;
}

.logo span {
    font-weight: 400;
}

.slogan {
    font-size: 14px;
    color: var(--c-text-muted);
    margin-left: 10px;
    border-left: 1px solid var(--c-text-muted);
    padding-left: 10px;
}

.main-nav ul {
    display: flex;
    gap: 20px;
}

.main-nav a {
    font-weight: 600;
    font-size: 14px;
}

.main-nav a:hover {
    color: var(--c-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-btn img {
    filter: invert(1);
    transition: var(--transition);
}

.icon-btn:hover img {
    opacity: 0.7;
}

.btn-login {
    background-color: var(--c-primary);
    color: var(--c-white);
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.btn-login:hover {
    background-color: var(--c-primary-hover);
}

.mobile-menu-toggle {
    display: none;
}

/* Navegación de Categorías */
.category-nav-wrapper {
    border-bottom: 1px solid var(--c-medium-gray);
    background-color: var(--c-white);
}

.category-nav ul {
    display: flex;
    gap: 20px;
    padding: 12px 0;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.category-nav ul::-webkit-scrollbar {
    display: none;
}

.category-nav a {
    font-size: 14px;
    color: var(--c-text-main);
}

.category-nav a:hover {
    color: var(--c-primary);
}

/* Main Content */
.main-content {
    padding: 30px 15px;
}

/* Hero Section */
.hero-section {
    margin-bottom: 30px;
}

.hero-card {
    display: grid;
    grid-template-columns: 2fr 1.5fr;
    gap: 20px;
    align-items: center;
}

.hero-image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 4px;
}

.hero-content h2 {
    font-size: 28px;
    margin-bottom: 15px;
    line-height: 1.3;
}

.hero-content h2 a:hover {
    color: var(--c-primary);
}

/* Meta & Tags */
.meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13px;
}

.tag {
    padding: 4px 10px;
    border-radius: 12px;
    color: var(--c-white);
    font-weight: 600;
    font-size: 12px;
}

.tag-dark {
    background-color: var(--c-tag-dark);
}

.tag-light {
    background-color: transparent;
    color: var(--c-tag-light);
    padding: 0;
}

.pos-abs {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}

.date {
    color: var(--c-text-muted);
}

/* Grid Section */
.grid-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.grid-card {
    display: flex;
    background: var(--c-light-gray);
    border-radius: 4px;
    overflow: hidden;
    transition: var(--transition);
}

.grid-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.grid-card .card-img {
    position: relative;
    width: 40%;
    flex-shrink: 0;
}

.grid-card .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4/3;
}

.grid-card .card-info {
    padding: 15px;
    width: 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.grid-card h3 {
    font-size: 16px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.grid-card h3 a:hover {
    color: var(--c-primary);
}

/* Content Layout (News + Sidebar) */
.content-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.list-card {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--c-medium-gray);
}

.list-card .card-img {
    position: relative;
    width: 250px;
    flex-shrink: 0;
}

.list-card .card-img img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 4px;
}

.list-card .card-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.list-card .card-info h3 a:hover {
    color: var(--c-primary);
}

.btn-load-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px;
    background-color: #eaf3ff;
    color: var(--c-primary);
    font-weight: 600;
    border-radius: 4px;
    transition: var(--transition);
}

.btn-load-more:hover {
    background-color: #d1e5ff;
}

/* Sidebar */
.widget-title {
    font-size: 18px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--c-primary);
    padding-bottom: 5px;
    display: inline-block;
}

.popular-list li {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: flex-start;
}

.comments-count {
    background-color: #0099ff;
    color: var(--c-white);
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    position: relative;
}

.popular-info h4 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.popular-info h4 a:hover {
    color: var(--c-primary);
}

/* Pre-Footer Welcome */
.pre-footer-welcome {
    background-color: var(--c-light-gray);
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--c-medium-gray);
}

.pre-footer-welcome h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--c-black);
}

.pre-footer-welcome p {
    max-width: 800px;
    margin: 0 auto;
    color: var(--c-text-muted);
    font-size: 15px;
}

/* Footer */
.main-footer {
    background-color: var(--c-black);
    color: var(--c-white);
    padding: 40px 0 20px;
    font-size: 12px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    padding-bottom: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo {
    font-size: 18px;
}

.footer-logo span {
    font-weight: 300;
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a:hover {
    color: var(--c-primary);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 40px;
}

.footer-info {
    max-width: 70%;
    color: #aaaaaa;
}

.footer-info p {
    margin-bottom: 8px;
}

.disclaimer {
    color: #888888;
    font-size: 11px;
    border-top: 1px dotted #444;
    padding-top: 10px;
    margin-top: 10px;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #444;
    border-radius: 50%;
    transition: var(--transition);
}

.footer-social img {
    width: 16px;
    height: 16px;
    filter: invert(1);
}

.footer-social a:hover {
    border-color: var(--c-white);
    background-color: #333;
}

/* Cookie Modal (Modal Flotante a la Derecha) */
.cookie-modal {
    position: fixed;
    bottom: 30px;
    right: -400px; /* Hidden initially via CSS for slide-in effect */
    width: 350px;
    background-color: var(--c-white);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 20px;
    z-index: 9999;
    border-left: 4px solid var(--c-primary);
    transition: right 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cookie-modal.show {
    right: 30px;
}

.cookie-content h4 {
    margin-bottom: 10px;
    font-size: 16px;
    color: var(--c-black);
}

.cookie-content p {
    font-size: 13px;
    color: var(--c-text-muted);
    margin-bottom: 15px;
    line-height: 1.4;
}

.cookie-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.cookie-actions button {
    padding: 8px 15px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 4px;
}

.btn-accept {
    background-color: var(--c-primary);
    color: var(--c-white);
}

.btn-accept:hover {
    background-color: var(--c-primary-hover);
}

.btn-decline {
    background-color: var(--c-medium-gray);
    color: var(--c-text-main);
}

.btn-decline:hover {
    background-color: #d0d0d0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-card {
        grid-template-columns: 1fr;
    }
    
    .content-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: -1; /* Sidebar above news on tablet if desired, or keep as is */
    }
}

@media (max-width: 768px) {
    .main-nav, .slogan {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .mobile-menu-toggle img {
        filter: invert(1);
    }
    
    .grid-section {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-info {
        max-width: 100%;
    }
    
    .list-card {
        flex-direction: column;
    }
    
    .list-card .card-img {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .cookie-modal {
        width: calc(100% - 40px);
        bottom: 20px;
    }
    .cookie-modal.show {
        right: 20px;
    }
}
/* Inner page styles */
/* ===== ESTILOS PÁGINA INTERNA (ARTÍCULO) ===== */

/* Contenedores Principales */
.post-wrapper {
    max-width: 850px;
    margin: 0 auto;
    padding-bottom: 40px;
}
.related-wrapper {
    max-width: 850px;
    margin: 40px auto 0;
    border-top: 1px solid var(--c-medium-gray);
    padding-top: 30px;
}

/* Cabecera del Artículo */
.article-header {
    margin-bottom: 25px;
}
.article-header h1 {
    font-size: 38px;
    line-height: 1.25;
    margin: 15px 0;
    color: var(--c-black);
    font-weight: 800;
}

/* Imágenes Responsivas y Adaptativas */
.article-main-image {
    margin-bottom: 35px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.article-main-image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}
.article-inline-image {
    margin: 2.5em 0;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--c-light-gray);
}
.article-inline-image img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
}
.article-inline-image figcaption {
    font-size: 13px;
    color: var(--c-text-muted);
    text-align: center;
    padding: 10px;
    font-style: italic;
    border-bottom: 1px solid var(--c-medium-gray);
}

/* Tipografía del Cuerpo del Artículo */
.article-body {
    font-size: 17px;
    line-height: 1.8;
    color: var(--c-text-main);
}
.article-body p {
    margin-bottom: 1.4em;
}
.article-body span.highlight {
    color: var(--c-primary);
    font-weight: 600;
    background-color: #eaf3ff;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Encabezados h2 a h6 dentro del artículo */
.article-body h2 { font-size: 30px; margin: 1.6em 0 0.6em; color: var(--c-black); line-height: 1.3; }
.article-body h3 { font-size: 24px; margin: 1.5em 0 0.5em; color: var(--c-black); line-height: 1.3; }
.article-body h4 { font-size: 20px; margin: 1.4em 0 0.5em; color: var(--c-black); }
.article-body h5 { font-size: 18px; margin: 1.3em 0 0.5em; color: var(--c-black); }
.article-body h6 { font-size: 15px; margin: 1.2em 0 0.5em; color: var(--c-text-muted); text-transform: uppercase; letter-spacing: 1px; }

/* Listas ul, ol */
.article-body ul, .article-body ol {
    margin: 0 0 1.5em 2.5em;
    color: var(--c-text-main);
}
.article-body ul {
    list-style-type: disc;
}
.article-body ol {
    list-style-type: decimal;
}
.article-body li {
    margin-bottom: 0.6em;
    padding-left: 5px;
}
.article-body li::marker {
    color: var(--c-primary);
    font-weight: bold;
}

/* Estilos para Tablas */
.article-table-wrapper {
    overflow-x: auto;
    margin: 2.5em 0;
    border-radius: 6px;
    box-shadow: 0 0 0 1px var(--c-medium-gray);
}
.article-body table {
    width: 100%;
    border-collapse: collapse;
    min-width: 650px;
    background: var(--c-white);
    font-size: 15px;
}
.article-body th, .article-body td {
    padding: 16px;
    border-bottom: 1px solid var(--c-medium-gray);
    text-align: left;
    vertical-align: middle;
}
.article-body th {
    background-color: var(--c-light-gray);
    font-weight: 700;
    color: var(--c-black);
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}
.article-body tr:last-child td {
    border-bottom: none;
}
.article-body tr:nth-child(even) {
    background-color: #fafbfc;
}
.article-body tr:hover td {
    background-color: #f1f5f9;
}

/* Títulos de Secciones Auxiliares */
.section-title {
    font-size: 24px;
    margin-bottom: 25px;
    border-bottom: 3px solid var(--c-primary);
    display: inline-block;
    padding-bottom: 5px;
    color: var(--c-black);
    margin-top: 20px;
}

/* Formularios (Comentarios y Contacto) */
.form-box {
    background: var(--c-light-gray);
    padding: 35px;
    border-radius: 10px;
    margin-bottom: 50px;
    border: 1px solid var(--c-medium-gray);
}
.custom-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.form-group label {
    font-weight: 600;
    font-size: 14px;
    color: var(--c-dark-gray);
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--c-medium-gray);
    border-radius: 6px;
    font-family: inherit;
    font-size: 15px;
    color: var(--c-text-main);
    transition: var(--transition);
    background-color: var(--c-white);
}
.form-group input:focus, .form-group textarea:focus {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
    outline: none;
}
.form-group textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.6;
}
.btn-submit {
    background-color: var(--c-primary);
    color: var(--c-white);
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    align-self: flex-start;
    transition: var(--transition);
}
.btn-submit:hover {
    background-color: var(--c-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

/* Media Queries para Página Interna */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    .article-header h1 {
        font-size: 28px;
    }
    .article-body h2 {
        font-size: 24px;
    }
    .form-box {
        padding: 20px;
    }
}
.table-of-contents {
    margin: 28px 0 34px;
    padding: 22px 24px;
    background: #f7f9fc;
    border: 1px solid #e2e7ef;
    border-radius: 14px;
}

.table-of-contents h3 {
    margin: 0 0 16px;
    font-size: 22px;
    line-height: 1.25;
    color: #101828;
    font-weight: 800;
}

.table-of-contents ol {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: toc-counter;
}

.table-of-contents li {
    position: relative;
    margin: 0;
    padding-top: 7px;
    padding-bottom: 7px;
    line-height: 1.45;
    counter-increment: toc-counter;
}

.table-of-contents li::before {
    content: counter(toc-counter) ".";
    position: absolute;
    left: 0;
    top: 7px;
    min-width: 24px;
    color: #7b8794;
    font-size: 14px;
    font-weight: 700;
}

.table-of-contents li[style*="20px"]::before {
    left: 20px;
}

.table-of-contents li[style*="40px"]::before {
    left: 40px;
}

.table-of-contents a {
    display: inline-block;
    padding-left: 30px;
    color: #102a43;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.table-of-contents a:hover {
    color: #0066cc;
    text-decoration: underline;
}

.table-of-contents li[style*="20px"] a {
    font-size: 14px;
    font-weight: 500;
    color: #334e68;
}

.table-of-contents li[style*="40px"] a {
    font-size: 13px;
    font-weight: 500;
    color: #52606d;
}

@media (max-width: 768px) {
    .table-of-contents {
        padding: 18px 16px;
        border-radius: 10px;
    }

    .table-of-contents h3 {
        font-size: 20px;
    }

    .table-of-contents a {
        font-size: 14px;
    }
}