/* Configuración Base y Colores Mandatorios */
body {
    background-color: #000000; /* Fondo Negro */
    color: #ffffff;            /* Texto Blanco General */
    font-family: 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Encabezado */
.main-header {
    background-color: #0a0a0a;
    border-bottom: 2px solid #f1c40f; /* Línea divisoria amarilla */
    padding: 15px 20px;
    text-align: center;
}

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

/* Icono de X (Twitter) */
.x-link {
    display: flex;
    align-items: center;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    background: #111;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid #333;
}
.x-link:hover {
    border-color: #f1c40f;
    color: #f1c40f;
}

.cms-login-btn {
    background: #111;
    color: #a0a0a0;
    border: 1px solid #333;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}
.cms-login-btn:hover {
    color: #f1c40f;
    border-color: #f1c40f;
}

/* ==========================================
   MEJORA COMPLETA: MENÚ DE CATEGORÍAS TIPO PÍLDORA (PREMIUM UI)
   ========================================== */
.main-nav {
    margin-top: 15px;
}
.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}
.main-nav a {
    color: #f1c40f !important; /* Mantiene el color dorado corporativo */
    text-decoration: none !important;
    font-size: 0.85rem !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    padding: 8px 18px !important;
    border: 1px solid #1f1f1f !important; /* Borde oscuro refinado */
    border-radius: 25px !important;       /* Forma perfecta de píldora */
    background-color: #050505 !important;  /* Fondo muy oscuro */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    display: inline-block !important;
}

/* Efecto hover y Estado Activo (Sección Encendida) */
.main-nav a:hover, .main-nav a.active {
    background-color: #111111 !important;  /* El fondo se aclara levemente */
    border-color: #f1c40f !important;      /* El borde brilla en dorado */
    box-shadow: 0 0 10px rgba(241, 196, 15, 0.15) !important; /* Brillo de neón sutil */
    text-shadow: 0 0 4px rgba(241, 196, 15, 0.3) !important;
}

/* Buscador */
.search-container {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 8px;
}
.search-container input {
    background: #111;
    border: 1px solid #333;
    color: white;
    padding: 8px 12px;
    width: 250px;
    border-radius: 4px;
    font-size: 0.9rem;
}
.search-container input:focus {
    outline: none;
    border-color: #f1c40f;
}
.search-container button {
    background: #f1c40f;
    color: black;
    border: none;
    padding: 8px 16px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
}
.search-container button:hover {
    background: #d4ac0d;
}

/* Layout Principal */
.main-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}
@media (min-width: 900px) {
    .main-container {
        grid-template-columns: 3fr 1fr;
    }
}

/* Feed de Noticias */
.news-feed {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Tarjeta de Artículo Enmarcado */
.news-card {
    background-color: #0b0b0b; 
    border: 1px solid #1f1f1f; 
    border-radius: 8px;        
    padding: 25px;             
    margin-bottom: 30px;       
    transition: all 0.3s ease; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); 
}

.news-card:hover {
    border-color: #f1c40f;     
    transform: translateY(-3px); 
    box-shadow: 0 8px 20px rgba(241, 196, 15, 0.08); 
}

.news-card .card-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.news-card .category-tag {
    background: #222222;
    color: #f1c40f;
    padding: 4px 8px;
    border-radius: 4px;
}

.news-card .date-tag {
    color: #777777;
}

.news-card h3 {
    margin: 0 0 15px 0;
    font-size: 1.6rem;
    line-height: 1.3;
}

.news-card img {
    border-radius: 4px;
    margin-bottom: 15px;
    border: 1px solid #222;
    background-color: #111;
}

.news-card p {
    color: #cccccc;
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0;
}

/* Barra Lateral (Sidebar) */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.widget-top-5 {
    background: #0a0a0a;
    border: 1px solid #1c1c1c;
    padding: 20px;
    border-radius: 6px;
}
.widget-top-5 h3 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #f1c40f;
    border-bottom: 1px solid #222;
    padding-bottom: 8px;
}
.widget-top-5 ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.widget-top-5 li {
    padding: 10px 0;
    border-bottom: 1px solid #111;
    font-size: 0.95rem;
}
.widget-top-5 li:last-child {
    border-bottom: none;
}
.widget-top-5 a {
    color: #e0e0e0;
    text-decoration: none;
}
.widget-top-5 a:hover {
    color: #f1c40f;
}

/* Footer Sólido */
.main-footer {
    background: #0a0a0a;
    border-top: 1px solid #1c1c1c;
    padding: 40px 20px;
    text-align: center;
    margin-top: 60px;
}
.footer-content p {
    color: #666;
    font-size: 0.9rem;
    margin: 0 0 15px 0;
}
.contacto-trigger {
    color: #a0a0a0;
    text-decoration: none;
    font-size: 0.85rem;
}
.contacto-trigger:hover {
    color: #f1c40f;
    text-decoration: underline;
}

/* Modales Administrativos */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5000;
}
.modal-content {
    background-color: #0a0a0a;
    border: 1px solid #222;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    border-radius: 6px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}
.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #666;
    font-size: 1.8rem;
    cursor: pointer;
}
.close-modal:hover {
    color: #fff;
}
.modal h2 {
    margin-top: 0;
    color: #f1c40f;
    font-size: 1.5rem;
    margin-bottom: 20px;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #a0a0a0;
    margin-bottom: 6px;
    font-weight: bold;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    box-sizing: border-box;
    background: #111;
    border: 1px solid #333;
    color: #fff;
    padding: 10px;
    border-radius: 4px;
    font-size: 0.95rem;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #f1c40f;
}
.btn-submit {
    background: #f1c40f;
    color: black;
    border: none;
    padding: 12px 20px;
    font-weight: bold;
    font-size: 0.95rem;
    width: 100%;
    border-radius: 4px;
    cursor: pointer;
}
.btn-submit:hover {
    background: #d4ac0d;
}

/* Paginación */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}
.btn-pagi {
    background: #111;
    color: white;
    border: 1px solid #333;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9rem;
}
.btn-pagi:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.btn-pagi:not(:disabled):hover {
    border-color: #f1c40f;
    color: #f1c40f;
}

/* Toasts */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    background: #0a0a0a;
    color: #ffffff;
    padding: 14px 22px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #222;
    transform: translateX(120%);
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 280px;
}
.toast.show { transform: translateX(0); }
.toast-success { border-left: 4px solid #2ecc71; }
.toast-error { border-left: 4px solid #e74c3c; }
.toast-info { border-left: 4px solid #f1c40f; }

/* CMS Table */
.cms-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #0a0a0a;
    border: 1px solid #222;
}
.cms-table th {
    background: #111111;
    color: #f1c40f; 
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #222;
}
.cms-table td {
    padding: 12px;
    font-size: 0.9rem;
    color: #e0e0e0;
    border-bottom: 1px solid #1c1c1c;
}
.cms-table tr:hover td { background: #111111; }

/* Cookies */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1000px;
    background-color: #0a0a0a;
    border: 2px solid #f1c40f;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 6px;
    z-index: 10000;
    box-sizing: border-box;
}
.cookie-banner-content { display: flex; flex-direction: column; gap: 15px; }
@media (min-width: 768px) {
    .cookie-banner-content { flex-direction: row; align-items: center; justify-content: space-between; }
    .cookie-banner-content p { margin: 0; padding-right: 20px; }
}
.cookie-banner p { color: #cccccc; font-size: 0.9rem; line-height: 1.5; }
.cookie-banner p strong { color: #f1c40f; }
.cookie-banner a { color: #f1c40f; text-decoration: underline; }
.cookie-banner-buttons { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.btn-cookie-primary { background-color: #f1c40f; color: #000000; border: none; padding: 10px 20px; font-weight: bold; border-radius: 4px; cursor: pointer; font-size: 0.85rem; transition: background 0.2s ease; }
.btn-cookie-primary:hover { background-color: #d4ac0d; }
.btn-cookie-secondary { background-color: #111111; color: #ffffff; border: 1px solid #333333; padding: 10px 20px; font-weight: bold; border-radius: 4px; cursor: pointer; font-size: 0.85rem; transition: all 0.2s ease; }
.btn-cookie-secondary:hover { border-color: #f1c40f; color: #f1c40f; }

/* FIX ENLACES AZULES */
.titulo-noticia { color: #ffffff !important; text-decoration: none !important; transition: color 0.2s ease; }
.titulo-noticia:hover { color: #f1c40f !important; }
.sidebar-link { color: #e0e0e0 !important; text-decoration: none !important; transition: color 0.2s ease; }
.sidebar-link:hover { color: #f1c40f !important; }

/* ==========================================
   NUEVO: PANTALLA DE CARGA GLOBAL Y SPINNERS
   ========================================== */
#global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.spinner {
    width: 45px;
    height: 45px;
    border: 4px solid #1a1a1a;
    border-top-color: #f1c40f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================
   RESTAURADO: BOTONES SOCIALES DE COMPARTIR
   ========================================== */
.social-share-container {
    margin: 40px 0;
    padding-top: 20px;
    border-top: 1px solid #222;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}
.social-share-label {
    font-weight: bold;
    color: #a0a0a0;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}
.btn-share {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    padding: 8px 16px !important;
    border-radius: 4px;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 0.9rem !important;
    font-weight: bold !important;
    transition: opacity 0.2s, transform 0.2s;
}
.btn-share:hover {
    opacity: 0.85;
    transform: translateY(-2px);
    color: #ffffff !important;
}
.share-x { background-color: #000000 !important; border: 1px solid #333333 !important; }
.share-wa { background-color: #25D366 !important; color: #000000 !important; }
.share-tg { background-color: #0088cc !important; }
.share-fb { background-color: #1877F2 !important; }

/* ==========================================
   NUEVO: BOTÓN VOLVER ARRIBA (BACK TO TOP)
   ========================================== */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: #f1c40f;
    color: #000000;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 9000;
}
#back-to-top.show {
    opacity: 1;
    visibility: visible;
}
#back-to-top:hover {
    background-color: #d4ac0d;
    transform: translateY(-3px);
}
@media (max-width: 600px) {
    #back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

/* ==========================================
   QUILL EDITOR CLASSES (PUBLIC RENDER FIXES)
   ========================================== */
.ql-align-center { text-align: center !important; }
.ql-align-left { text-align: left !important; }
.ql-align-right { text-align: right !important; }
.ql-align-justify { text-align: justify !important; }

/* Sangrías y espaciados generados por el editor */
.content .ql-indent-1 { padding-left: 3em; }
.content .ql-indent-2 { padding-left: 6em; }
.content .ql-indent-3 { padding-left: 9em; }
.content .ql-indent-4 { padding-left: 12em; }


/* ==========================================
   FIX: IGUALAR ESPACIADOS PÚBLICOS AL EDITOR
   ========================================== */
.full-story .content {
    white-space: pre-wrap;   /* Obliga al navegador a respetar cada espacio en blanco y salto de línea */
    word-break: break-word;  /* Evita que enlaces largos rompan el diseño */
}
.full-story .content p { 
    margin-bottom: 1.25rem;  /* FIX: RESTAURADO EL ESPACIO ENTRE PÁRRAFOS */
    line-height: 1.7; 
}

/* Ajuste perfecto de listas numéricas y viñetas */
.content ul, .content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
    line-height: 1.7;
}
.content li {
    margin-bottom: 0.5rem;
}