/* Variables CSS para la tabla de recursos */
:root {
    /* Colores principales - Cambiados a rojizos */
    --primary-blue: #dc2626;
    --primary-blue-dark: #991b1b;
    --secondary-blue: #ef4444;
    --accent-blue: #f87171;
    --light-blue: #fca5a5;
    
    /* Colores neutros */
    --white: #ffffff;
    --glass-white: rgba(255, 255, 255, 0.95);
    --border-white: rgba(255, 255, 255, 0.18);
    --text-primary: #000000;
    --text-secondary: #333333;
    --text-muted: #000000;
    --background-light: #fef2f2;
    --background-lighter: #fef7f7;
    --border-light: rgba(220, 38, 38, 0.1);
    
    /* Espaciado */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 2.5rem;
    --spacing-3xl: 3rem;
    
    /* Bordes */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.1);
    
    /* Transiciones */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Tipografía */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
}

/* Contenedor principal de la tabla */
.page-cms-10-table {
    width: 100% !important;
    max-width: 1200px;
    margin: 0 auto;
    border-collapse: separate !important;
    border-spacing: var(--spacing-lg) !important;
    border: none !important;
    background: transparent;
    font-family: var(--font-family);
    position: relative;
    padding: var(--spacing-lg);
}

/* Estilos para las celdas */
.page-cms-10-table th,
.page-cms-10-table td {
    background: var(--glass-white);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    vertical-align: top;
    border: 1px solid var(--border-white);
    box-shadow: 
        var(--shadow-lg),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-slow);
    contain: layout style paint;
    
    /* Gradiente sutil de fondo - Cambiado a rojizo */
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(220, 38, 38, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(239, 68, 68, 0.03) 0%, transparent 50%);
}

/* Efecto hover en las celdas */
.page-cms-10-table th:hover,
.page-cms-10-table td:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        var(--shadow-2xl),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        0 0 30px rgba(220, 38, 38, 0.15);
    background: linear-gradient(
        145deg, 
        var(--white) 0%, 
        var(--background-lighter) 100%
    );
    border-color: rgba(220, 38, 38, 0.2);
}

/* Títulos (h1) */
.page-cms-10-table h1 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 700;
    color: #000000;
    -webkit-text-fill-color: #000000;
    background: none;
    margin: 0 0 var(--spacing-md) 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
    position: relative;
    text-align: center;
}

/* Efecto de brillo en los títulos */
.page-cms-10-table h1::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent
    );
    animation: shine 4s ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

@keyframes shine {
    0% { left: -100%; }
    50% { left: -100%; }
    100% { left: 100%; }
}

/* Añadir delays diferentes para cada título */
.page-cms-10-table tr:nth-child(1) th:nth-child(1) h1::after { --delay: 0s; }
.page-cms-10-table tr:nth-child(1) td:nth-child(2) h1::after { --delay: 0.5s; }
.page-cms-10-table tr:nth-child(1) td:nth-child(3) h1::after { --delay: 1s; }

/* Texto descriptivo */
.page-cms-10-table pre {
    font-family: var(--font-family) !important;
    color: #000000;
    font-size: var(--font-size-base);
    font-weight: 400;
    margin: 0 0 var(--spacing-lg) 0;
    white-space: pre-wrap !important;
    line-height: 1.5;
    text-align: center;
    opacity: 0.9;
}

/* Contenedor de párrafos */
.page-cms-10-table p {
    margin: var(--spacing-lg) 0;
    text-align: center;
}

/* Imágenes */
.page-cms-10-table img {
    border-radius: var(--radius-lg);
    transition: all var(--transition-slow);
    box-shadow: var(--shadow-md);
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: var(--white);
    padding: var(--spacing-xs);
	max-width: 33.3dvw;
	height: auto;
	object-fit: cover;
}

/* Efecto hover en imágenes */
.page-cms-10-table img:hover {
    transform: scale(1.05) rotate(1deg);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-blue);
}

/* Enlaces */
.page-cms-10-table a {
    color: var(--primary-blue);
    text-decoration: none;
    position: relative;
    transition: all var(--transition-normal);
    border-radius: var(--radius-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    margin: calc(-1 * var(--spacing-xs)) calc(-1 * var(--spacing-sm));
    display: inline-block;
    font-weight: 500;
}

/* Enlaces que contienen imágenes */
.page-cms-10-table a[href] {
    display: inline-block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    transition: all var(--transition-slow);
}

/* Overlay para enlaces con imágenes */
.page-cms-10-table a[href]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(220, 38, 38, 0.1) 0%,
        rgba(239, 68, 68, 0.05) 100%
    );
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: 1;
    border-radius: var(--radius-lg);
}

.page-cms-10-table a[href]:hover::before {
    opacity: 1;
}

/* Enlaces de texto dentro de pre */
.page-cms-10-table pre a {
    color: var(--accent-blue);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 4px;
    transition: all var(--transition-normal);
}

.page-cms-10-table pre a:hover {
    text-decoration-color: var(--accent-blue);
    color: var(--primary-blue-dark);
    background: rgba(220, 38, 38, 0.05);
    transform: translateY(-1px);
}

/* Estados focus para accesibilidad */
.page-cms-10-table a:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
    background: rgba(220, 38, 38, 0.05);
}

/* Animaciones de entrada */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Aplicar animaciones escalonadas */
.page-cms-10-table th,
.page-cms-10-table td {
    animation: slideInUp 0.6s ease-out;
    animation-fill-mode: both;
}

/* Delays para cada celda */
.page-cms-10-table tr:nth-child(1) th:nth-child(1) { animation-delay: 0.1s; }
.page-cms-10-table tr:nth-child(1) td:nth-child(2) { animation-delay: 0.2s; }
.page-cms-10-table tr:nth-child(1) td:nth-child(3) { animation-delay: 0.3s; }
.page-cms-10-table tr:nth-child(2) td:nth-child(1) { animation-delay: 0.4s; }
.page-cms-10-table tr:nth-child(2) td:nth-child(2) { animation-delay: 0.5s; }
.page-cms-10-table tr:nth-child(2) td:nth-child(3) { animation-delay: 0.6s; }
.page-cms-10-table tr:nth-child(3) td:nth-child(1) { animation-delay: 0.7s; }
.page-cms-10-table tr:nth-child(3) td:nth-child(2) { animation-delay: 0.8s; }
.page-cms-10-table tr:nth-child(3) td:nth-child(3) { animation-delay: 0.9s; }

/* Efectos flotantes decorativos */
.page-cms-10-table::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
    z-index: -1;
}

.page-cms-10-table::after {
    content: '';
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
    z-index: -1;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
        opacity: 0.6;
    }
    50% { 
        transform: translateY(-20px) rotate(180deg); 
        opacity: 0.8;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-cms-10-table {
        border-spacing: var(--spacing-md) !important;
        padding: var(--spacing-md);
    }
    
    .page-cms-10-table th,
    .page-cms-10-table td {
        padding: var(--spacing-lg);
    }
}

@media (max-width: 768px) {
    .page-cms-10-table {
        border-spacing: var(--spacing-sm) !important;
        padding: var(--spacing-sm);
    }
    
    .page-cms-10-table th,
    .page-cms-10-table td {
        padding: var(--spacing-md);
        display: block;
        width: 100% !important;
        margin-bottom: var(--spacing-md);
    }
    
    .page-cms-10-table tr {
        display: block;
        margin-bottom: var(--spacing-lg);
    }
    
    .page-cms-10-table tbody {
        display: block;
    }
    
    .page-cms-10-table h1 {
        font-size: clamp(1.125rem, 4vw, 1.25rem);
    }
    
    .page-cms-10-table img {
        max-width: 280px;
        height: auto;
    }
}

@media (max-width: 480px) {
    .page-cms-10-table {
        padding: var(--spacing-xs);
        border-spacing: var(--spacing-xs) !important;
    }
    
    .page-cms-10-table th,
    .page-cms-10-table td {
        padding: var(--spacing-sm);
        border-radius: var(--radius-md);
    }
    
    .page-cms-10-table img {
        max-width: 250px;
    }
    
    .page-cms-10-table pre {
        font-size: var(--font-size-sm);
    }
}

/* Soporte para reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .page-cms-10-table th:hover,
    .page-cms-10-table td:hover {
        transform: none;
    }
    
    .page-cms-10-table img:hover {
        transform: scale(1.02);
    }
}

/* Estados de alto contraste */
@media (prefers-contrast: high) {
    .page-cms-10-table th,
    .page-cms-10-table td {
        border-width: 2px;
        border-color: var(--primary-blue);
    }
    
    .page-cms-10-table h1 {
        -webkit-text-fill-color: #000000;
        background: none;
    }
    
    .page-cms-10-table img {
        border-width: 3px;
    }
}

/* Optimizaciones de performance */
.page-cms-10-table th,
.page-cms-10-table td,
.page-cms-10-table img,
.page-cms-10-table a {
    transform: translateZ(0); /* Forzar aceleración de hardware */
	object-fit: fill;
}

/* Efectos de pulso para diferentes tipos de contenido */

/* WhatsApp - Verde */
.page-cms-10-table a[href*="wa.me"] {
    position: relative;
}

.page-cms-10-table a[href*="wa.me"]:hover {
    animation: whatsappPulse 1s ease-in-out infinite;
}

@keyframes whatsappPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
    }
    50% { 
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
}

/* Catálogos PDF - Azul */
.page-cms-10-table a[href*=".pdf"] {
    position: relative;
}

.page-cms-10-table a[href*=".pdf"]:hover {
    animation: catalogPulse 1.2s ease-in-out infinite;
}

@keyframes catalogPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    50% { 
        box-shadow: 0 0 0 12px rgba(59, 130, 246, 0);
    }
}

/* Archivos Excel - Naranja */
.page-cms-10-table a[href*=".xlsx"] {
    position: relative;
}

.page-cms-10-table a[href*=".xlsx"]:hover {
    animation: excelPulse 1.1s ease-in-out infinite;
}

@keyframes excelPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4);
    }
    50% { 
        box-shadow: 0 0 0 11px rgba(249, 115, 22, 0);
    }
}

/* Flipbox (catálogo interactivo) - Púrpura */
.page-cms-10-table a[href*="flipboxapp.net"] {
    position: relative;
}

.page-cms-10-table a[href*="flipboxapp.net"]:hover {
    animation: flipboxPulse 1.3s ease-in-out infinite;
}

@keyframes flipboxPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(147, 51, 234, 0.4);
    }
    50% { 
        box-shadow: 0 0 0 13px rgba(147, 51, 234, 0);
    }
}

/* Subenix - Rosa */
.page-cms-10-table a[href*="subenix.com"] {
    position: relative;
}

.page-cms-10-table a[href*="subenix.com"]:hover {
    animation: subenixPulse 1.4s ease-in-out infinite;
}

@keyframes subenixPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.4);
    }
    50% { 
        box-shadow: 0 0 0 14px rgba(236, 72, 153, 0);
    }
}

/* Enlaces internos de la web - Teal */
.page-cms-10-table a[href*="enyes.es"] {
    position: relative;
}

.page-cms-10-table a[href*="enyes.es"]:hover {
    animation: internalPulse 1.15s ease-in-out infinite;
}

@keyframes internalPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.4);
    }
    50% { 
        box-shadow: 0 0 0 11px rgba(20, 184, 166, 0);
    }
}

/* Catapendix - Amarillo */
.page-cms-10-table a[href*="catapendix.es"] {
    position: relative;
}

.page-cms-10-table a[href*="catapendix.es"]:hover {
    animation: catapendixPulse 1.25s ease-in-out infinite;
}

@keyframes catapendixPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
    }
    50% { 
        box-shadow: 0 0 0 12px rgba(245, 158, 11, 0);
    }
}