/* Variables Globales y Colores */
:root {
    --primary: #007bff;
    --primary-dark: #0056b3;
    --bg-main: #fef9f0; /* Tu color de fondo */
    --bg-card: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --border-color: #e0e0e0;
    --radius: 10px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
}

/* Soporte de Modo Oscuro Automático */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-main: #121212;
        --bg-card: #1e1e1e;
        --text-main: #e0e0e0;
        --text-muted: #aaaaaa;
        --border-color: #333333;
    }
}

/* Estructura Principal */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.columna {
    padding: 20px 15px;
    box-sizing: border-box;
}

/* Títulos con Iconos FontAwesome */
h2 {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

h3 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin: 15px 0 5px 0;
    border-left: 4px solid var(--primary);
    padding-left: 10px;
}

/* Listas de Descargas (Estilo Card) */
.lista-categoria {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lista-categoria li {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.lista-categoria li:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.lista-categoria .contenido {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lista-categoria img {
    border-radius: 6px;
    object-fit: cover;
    background: #eee;
}

.lista-categoria a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
}

.lista-categoria .descripcion {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 8px 0 0 0;
    line-height: 1.4;
}

/* Divisores Especiales */
.divisor {
    height: 1px;
    background: var(--border-color);
    margin: 30px 0;
    width: 100%;
}

.divisor-vertical {
    width: 1px;
    background: var(--border-color);
    margin: 0 10px;
}

/* Columna Derecha: Categorías Jerárquicas */
.columna.derecha {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    height: fit-content;
}

.lista-categorias {
    list-style: none;
    padding: 0;
}

.lista-categorias a {
    text-decoration: none;
    color: var(--text-main);
    display: block;
    padding: 6px 0;
    transition: color 0.2s;
}

.lista-categorias a:hover {
    color: var(--primary);
}

.subcategorias {
    list-style: none;
    padding-left: 18px;
    border-left: 1px solid var(--border-color);
    margin: 5px 0;
}

/* Paginación */
.paginacion {
    margin-top: 20px;
    display: flex;
    gap: 8px;
}

.paginacion a, .paginacion span {
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    text-decoration: none;
    color: var(--primary);
    background: var(--bg-card);
}

.paginacion .current {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Ajustes de Grilla para tu PHP */
@media (min-width: 992px) {
    .columna.izquierda { flex: 0 0 35%; max-width: 35%; }
    .columna.central { flex: 0 0 45%; max-width: 45%; }
    .columna.derecha { flex: 0 0 20%; max-width: 20%; }
}

@media (max-width: 991px) {
    .columna.izquierda, .columna.central, .columna.derecha {
        flex: 0 0 100%;
        max-width: 100%;
        border: none;
    }
}

/* --- Ajustes finales de optimización --- */

/* Asegura el fondo crema en toda la página */
body.page-template-categoria-personalizada {
    background-color: var(--bg-main) !important;
    margin: 0;
    padding: 0;
}

/* Optimización de iconos e imágenes */
.lista-categoria img {
    flex-shrink: 0; /* Evita que la imagen se deforme */
    object-fit: contain;
    display: block;
    background: transparent; /* Por si tus iconos son PNG transparentes */
}

/* Suavizado de tipografía */
html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth; /* Para que el scroll sea fluido */
}

/* Ajuste para que el texto de la descripción no se pegue al icono */
.lista-categoria .descripcion {
    margin-left: 44px; /* Alinea el texto con el inicio del título */
}

/* Mejora visual para móviles */
@media (max-width: 768px) {
    .lista-categoria .descripcion {
        margin-left: 0; /* En móvil aprovechamos todo el ancho */
    }
    h2 {
        justify-content: center; /* Centra los títulos en pantallas pequeñas */
    }
}





.download-list {
    list-style: none;
    padding: 0;
    max-width: 600px;
    margin: 0 auto;
}

.download-list li {
    margin: 8px 0;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
}

.download-list a {
    display: flex;
    align-items: center;
    padding: 15px;
    color: #007BFF;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
}

.download-list a i {
    margin-right: 12px;
    font-size: 1.2em;
}

.download-list a span {
    margin-left: auto;
    font-size: 0.9em;
    color: #6c757d;
    transition: color 0.3s;
}

.download-list a:hover {
    background-color: #007BFF;
    color: #fff;
    transform: scale(1.03);
}

.download-list a:hover span {
    color: #fff;
}

.download-list a:active {
    transform: scale(0.98);
}

.download-list a:visited {
    color: inherit !important; 
}

/* Responsive */
@media screen and (max-width: 600px) {
    .download-list a {
        font-size: 0.85em;
        padding: 12px;
    }

    .download-list a i {
        margin-right: 8px;
        font-size: 1em;
    }
}



.rounded-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    width: 100%;              /* 👈 clave: ocupa todo el ancho */
    max-width: 600px;         /* igual que tu download-list */
    margin: 20px auto;

    padding: 16px 18px;

    border-radius: 12px;

    background: linear-gradient(135deg, #00aaff, #0077cc);
    color: #fff !important;

    font-weight: 600;
    font-size: 1rem;
    text-align: center;

    cursor: pointer;
    transition: all 0.25s ease;

    box-shadow: 0 4px 12px rgba(0, 150, 255, 0.25);
}

/* ICONO */
.rounded-block i {
    font-size: 1.2rem;
}

/* HOVER */
.rounded-block:hover {
    background: linear-gradient(135deg, #0077cc, #005fa3);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 150, 255, 0.35);
}

/* CLICK */
.rounded-block:active {
    transform: scale(0.98);
}

/* RESPETAR CENTRADO DE WP */
.has-text-align-center.rounded-block {
    margin-left: auto;
    margin-right: auto;
}




/* TBTEc */

/* Contenedor de la tabla para quitar bordes feos de WordPress */
.wp-block-table.is-style-stripes {
    border: none !important;
    margin: 2em 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Estilo general de la tabla */
.wp-block-table.is-style-stripes table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); /* Sombra suave */
    border: 1px solid #e1e8ed;
}

/* Ajuste de las celdas */
.wp-block-table.is-style-stripes td {
    padding: 12px 20px !important;
    border-bottom: 1px solid #f0f2f5;
    background-color: #ffffff !important; /* Fondo limpio */
}

/* Columna de etiquetas (la izquierda) */
.wp-block-table.is-style-stripes td:first-child {
    width: 30%;
    background-color: #f8f9fa !important;
    color: #4a5568;
    font-size: 0.95em;
    border-right: 1px solid #f0f2f5;
}

/* Columna de datos (la derecha) */
.wp-block-table.is-style-stripes td:last-child {
    color: #2d3748;
    font-weight: 500;
}

/* Eliminar espacios en blanco de cabeceras y pies vacíos */
.wp-block-table thead, .wp-block-table tfoot {
    display: none;
}

/* Efecto Hover: se ilumina la fila al pasar el mouse */
.wp-block-table.is-style-stripes tr:hover td {
    background-color: #f1f7ff !important;
    transition: background 0.2s ease;
}

/* Estilo específico para los enlaces de licencia */
.wp-block-table td a {
    color: #3182ce;
    text-decoration: none;
    border-bottom: 1px dashed #3182ce;
}

.wp-block-table td a:hover {
    color: #2b6cb0;
    border-bottom-style: solid;
}