/* =====================================================
   LA RED DE INNOVACIÓN FP CANARIAS - SISTEMA DE DISEÑO
   ===================================================== */

/* ===== CSS VARIABLES ===== */
:root {
    /* Colores Primarios */
    --primary: #0066CC;
    --primary-dark: #004C99;
    --primary-light: #3399FF;
    --secondary: #004C99;
    --accent: #F7B500;
    --accent-dark: #D69E00;

    /* Fondos */
    --bg-light: #F5F7F8;
    --bg-dark: #0F1923;
    --bg-white: #FFFFFF;
    --bg-card: #FFFFFF;

    /* Texto */
    --text-primary: #101418;
    --text-secondary: #5E758D;
    --text-muted: #6B7280;
    --text-white: #FFFFFF;

    /* Bordes */
    --border-light: #F0F2F5;
    --border-dark: #374151;

    /* Sombras */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Espaciado */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;       /* Previamente faltaba (usado en 10 reglas) */
    --space-6: 1.5rem;
    --space-7: 1.75rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;

    /* Colores de estado (antes se usaba --error sin definir) */
    --error:   #DC2626;
    --danger:  #DC2626;
    --success: #16A34A;
    --warning: #F59E0B;
    --info:    #2563EB;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Transiciones */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;

    /* Breakpoints (para referencia) */
    --bp-sm: 640px;
    --bp-md: 768px;
    --bp-lg: 1024px;
    --bp-xl: 1280px;
}

/* Dark Mode Variables */
.dark {
    --bg-light: #0F1923;
    --bg-card: #1F2937;
    --bg-white: #1a2332;
    --text-primary: #FFFFFF;
    --text-secondary: #9CA3AF;
    --border-light: #374151;
}

/* Dark Mode - Header Overrides */
.dark .header {
    background-color: rgba(15, 25, 35, 0.95);
    border-bottom-color: rgba(55, 65, 81, 0.5);
}

.dark .nav-link {
    color: #E5E7EB;
}

.dark .nav-link:hover,
.dark .nav-link.active {
    color: #60A5FA;
}

.dark .logo-text {
    color: #FFFFFF;
}

/* Dark Mode - Mobile Menu */
.dark .mobile-menu {
    background-color: #0F1923;
}

.dark .mobile-menu-link {
    color: #E5E7EB;
    border-bottom-color: #374151;
}

.dark .mobile-menu-link:hover {
    background-color: rgba(96, 165, 250, 0.1);
    color: #60A5FA;
}

/* Dark Mode - Footer */
.dark .footer {
    background-color: #0a1219;
}

/* Dark Mode - Cards */
.dark .card {
    background-color: #1F2937;
    border-color: #374151;
}

.dark .login-card {
    background-color: #1F2937;
}

.dark .form-input {
    background-color: #374151;
    border-color: #4B5563;
    color: #FFFFFF;
}

.dark .form-input::placeholder {
    color: #9CA3AF;
}

/* ===== ACCESSIBILITY (WCAG 2.1 AA) ===== */

/* Skip Link for keyboard navigation */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    z-index: 10000;
    text-decoration: none;
    font-weight: 600;
    transition: top var(--transition-base);
}

.skip-link:focus {
    top: 0;
}

/* Focus visible styles */
:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Remove focus outline for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-light: #000000;
    }

    .btn-primary {
        border: 2px solid var(--text-white);
    }
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

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

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

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

ul,
ol {
    list-style: none;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

/* ===== TIPOGRAFÍA ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.75rem);
    letter-spacing: -0.033em;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    letter-spacing: -0.025em;
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.875rem);
}

h4 {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.font-medium {
    font-weight: 500;
}

.font-black {
    font-weight: 900;
}

.text-primary {
    color: var(--primary);
}

.text-accent {
    color: var(--accent);
}

.text-white {
    color: var(--text-white);
}

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

.text-center {
    text-align: center;
}

.uppercase {
    text-transform: uppercase;
}

.tracking-wide {
    letter-spacing: 0.05em;
}

.tracking-wider {
    letter-spacing: 0.1em;
}

.tracking-widest {
    letter-spacing: 0.2em;
}

/* ===== LAYOUT ===== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--space-10);
    }
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: var(--space-2);
}

.gap-3 {
    gap: var(--space-3);
}

.gap-4 {
    gap: var(--space-4);
}

.gap-6 {
    gap: var(--space-6);
}

.gap-8 {
    gap: var(--space-8);
}

.gap-10 {
    gap: var(--space-10);
}

.gap-12 {
    gap: var(--space-12);
}

/* Grid */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, 1fr);
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (min-width: 640px) {
    .sm\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }

    .lg\:grid-cols-5 {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Spacing */
.p-4 {
    padding: var(--space-4);
}

.p-6 {
    padding: var(--space-6);
}

.p-8 {
    padding: var(--space-8);
}

.p-10 {
    padding: var(--space-10);
}

.px-4 {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

.px-6 {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
}

.px-8 {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
}

.py-3 {
    padding-top: var(--space-3);
    padding-bottom: var(--space-3);
}

.py-4 {
    padding-top: var(--space-4);
    padding-bottom: var(--space-4);
}

.py-8 {
    padding-top: var(--space-8);
    padding-bottom: var(--space-8);
}

.py-12 {
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
}

.py-16 {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
}

.py-20 {
    padding-top: var(--space-20);
    padding-bottom: var(--space-20);
}

.m-auto {
    margin: auto;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.mb-2 {
    margin-bottom: var(--space-2);
}

.mb-3 {
    margin-bottom: var(--space-3);
}

.mb-4 {
    margin-bottom: var(--space-4);
}

.mb-6 {
    margin-bottom: var(--space-6);
}

.mb-8 {
    margin-bottom: var(--space-8);
}

.mb-10 {
    margin-bottom: var(--space-10);
}

.mb-12 {
    margin-bottom: var(--space-12);
}

/* ===== COMPONENTES ===== */

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) var(--space-6);
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    white-space: nowrap;
}

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

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

.btn-accent {
    background-color: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 4px 14px rgba(247, 181, 0, 0.3);
}

.btn-accent:hover {
    transform: scale(1.05);
}

.btn-outline {
    border: 2px solid var(--border-light);
    background: transparent;
    color: var(--text-primary);
}

.btn-outline:hover {
    background-color: rgba(0, 102, 204, 0.05);
    border-color: var(--primary);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: 1rem;
    height: 48px;
}

/* Cards */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    transition: all var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-xl);
    border-color: rgba(0, 102, 204, 0.3);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background-color: rgba(0, 102, 204, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-6);
    transition: all var(--transition-base);
}

.card:hover .card-icon {
    background-color: var(--primary);
    color: var(--text-white);
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-light);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: var(--space-3) var(--space-4);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

@media (min-width: 768px) {
    .header-container {
        padding: var(--space-3) var(--space-10);
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.logo-icon {
    width: 32px;
    height: 32px;
    background-color: var(--primary);
    color: var(--text-white);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-img {
    height: 48px;
    width: auto;
}

/* Navegación */
.nav {
    display: none;
    align-items: center;
    gap: var(--space-8);
}

@media (min-width: 1024px) {
    .nav {
        display: flex;
    }
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: color var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

/* Menu hamburguesa */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    cursor: pointer;
}

@media (min-width: 1024px) {
    .menu-toggle {
        display: none;
    }
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-base);
}

/* Menú móvil */
.mobile-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-white);
    z-index: 40;
    padding: var(--space-6);
    flex-direction: column;
    gap: var(--space-4);
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    font-size: 1.125rem;
    font-weight: 500;
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-light);
}

/* Search Box */
.search-box {
    display: none;
    align-items: center;
    background-color: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: var(--space-2) var(--space-3);
}

@media (min-width: 768px) {
    .search-box {
        display: flex;
    }
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    width: 120px;
    font-size: 0.875rem;
    color: var(--text-primary);
}

@media (min-width: 1024px) {
    .search-box input {
        width: 180px;
    }
}

.search-box input::placeholder {
    color: var(--text-muted);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 520px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-8);
    background-size: cover;
    background-position: center;
}

@media (min-width: 768px) {
    .hero {
        padding: var(--space-16);
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 76, 153, 0.9) 0%, rgba(0, 102, 204, 0.4) 50%, rgba(0, 0, 0, 0.2) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 672px;
}

.hero-badge {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    background-color: rgba(247, 181, 0, 0.2);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-3);
}

.hero h1 {
    color: var(--text-white);
    margin-bottom: var(--space-4);
}

.hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    margin-bottom: var(--space-6);
}

@media (min-width: 768px) {
    .hero p {
        font-size: 1.25rem;
    }
}

/* Estadísticas */
.stats-section {
    background-color: var(--secondary);
    padding: var(--space-16) 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--space-10);
    text-align: center;
}

@media (min-width: 640px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-number {
    font-size: clamp(3rem, 8vw, 4rem);
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
}

.stat-label {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: var(--space-2);
}

/* Featured Project */
.featured-project {
    background-color: var(--bg-card);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
}

@media (min-width: 1024px) {
    .featured-project {
        flex-direction: row;
    }
}

.featured-image {
    height: 320px;
    background-size: cover;
    background-position: center;
    position: relative;
}

@media (min-width: 1024px) {
    .featured-image {
        width: 50%;
        height: auto;
    }
}

.featured-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(0, 102, 204, 0.2);
}

.featured-content {
    padding: var(--space-10);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (min-width: 768px) {
    .featured-content {
        padding: var(--space-16);
    }
}

@media (min-width: 1024px) {
    .featured-content {
        width: 50%;
    }
}

.featured-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-4);
}

/* Footer */
.footer {
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-light);
    padding: var(--space-16) 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-12);
    margin-bottom: var(--space-12);
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--primary);
    margin-bottom: var(--space-6);
}

.footer-brand span:first-child {
    font-size: 1.875rem;
}

.footer-brand span:last-child {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-description {
    color: var(--text-muted);
    max-width: 380px;
    margin-bottom: var(--space-6);
}

.social-links {
    display: flex;
    gap: var(--space-4);
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-base);
}

.social-link:hover {
    background-color: var(--primary);
    color: var(--text-white);
}

.footer-links h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-4);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.footer-links a {
    font-size: 0.875rem;
    color: var(--text-muted);
}

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

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
    padding-top: var(--space-8);
    border-top: 1px solid var(--border-light);
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
    }
}

.footer-logos {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    filter: grayscale(100%);
    opacity: 0.7;
}

.footer-logo {
    height: 40px;
    padding: 0 var(--space-4);
    background-color: var(--bg-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--text-muted);
}

.footer-copyright {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ===== SECCIONES ESPECÍFICAS ===== */

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: var(--space-10);
}

.section-label {
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: var(--space-4);
}

.section-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: var(--space-6);
}

.section-description {
    max-width: 768px;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--space-6);
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.breadcrumbs span {
    color: var(--text-secondary);
}

/* Page Header */
.page-header {
    padding: var(--space-8) 0;
}

.page-title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    margin-bottom: var(--space-4);
}

.page-description {
    max-width: 800px;
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* Map Container */
.map-container {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    height: 400px;
    background-color: #e5e7eb;
}

.map-container iframe,
.map-container #map {
    width: 100%;
    height: 100%;
    border: none;
}

.map-overlay-btn {
    position: absolute;
    bottom: var(--space-4);
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bg-white);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* Info Panel */
.info-panel {
    background-color: var(--primary);
    color: var(--text-white);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
}

.info-panel-title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--space-4);
    color: var(--text-white);
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item-icon {
    width: 32px;
    height: 32px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-item-label {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-bottom: 2px;
}

.info-item-value {
    font-weight: 500;
}

.info-item a {
    color: #93C5FD;
}

.info-item a:hover {
    text-decoration: underline;
}

/* Accordion */
.accordion {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.accordion-item {
    border-bottom: 1px solid var(--border-light);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--space-4) var(--space-6);
    font-weight: 600;
    text-align: left;
    background: transparent;
    transition: background-color var(--transition-base);
}

.accordion-header:hover {
    background-color: var(--bg-light);
}

.accordion-icon {
    transition: transform var(--transition-base);
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    display: none;
    padding: 0 var(--space-6) var(--space-4);
}

.accordion-item.active .accordion-content {
    display: block;
}

/* Document List */
.doc-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.doc-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    transition: background-color var(--transition-base);
}

.doc-item:hover {
    background-color: var(--bg-light);
}

.doc-icon {
    width: 40px;
    height: 40px;
    background-color: var(--bg-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.doc-info {
    flex: 1;
}

.doc-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 2px;
}

.doc-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Tags/Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.badge-primary {
    background-color: rgba(0, 102, 204, 0.1);
    color: var(--primary);
}

.badge-accent {
    background-color: rgba(247, 181, 0, 0.2);
    color: var(--accent-dark);
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #059669;
}

/* Form Elements */
.form-group {
    margin-bottom: var(--space-4);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
}

.form-label.required::after {
    content: ' *';
    color: #EF4444;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: 0.875rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    background-color: var(--bg-white);
    color: var(--text-primary);
    transition: all var(--transition-base);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: var(--space-4);
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.table th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.table td {
    font-size: 0.875rem;
}

.table tr:hover {
    background-color: var(--bg-light);
}

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 2px solid rgba(0, 102, 204, 0.2);
}

.avatar-sm {
    width: 32px;
    height: 32px;
}

.avatar-lg {
    width: 56px;
    height: 56px;
}

/* Material Icons */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ===== INTRANET ESPECÍFICO ===== */

.intranet-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background-color: var(--bg-white);
    border-right: 1px solid var(--border-light);
    display: none;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

@media (min-width: 1024px) {
    .sidebar {
        display: flex;
    }
}

.sidebar-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--border-light);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-4);
}

.sidebar-user-info h4 {
    font-size: 0.875rem;
    font-weight: 600;
}

.sidebar-user-info p {
    font-size: 0.75rem;
    color: var(--primary);
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-4);
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-base);
    margin-bottom: var(--space-1);
}

.sidebar-nav-item:hover {
    background-color: var(--bg-light);
    color: var(--text-primary);
}

.sidebar-nav-item.active {
    background-color: rgba(0, 102, 204, 0.1);
    color: var(--primary);
}

.sidebar-footer {
    padding: var(--space-4);
    border-top: 1px solid var(--border-light);
}

.intranet-main {
    flex: 1;
    padding: var(--space-6);
    background-color: var(--bg-light);
}

@media (min-width: 1024px) {
    .intranet-main {
        margin-left: 260px;
        padding: var(--space-8);
    }
}

.intranet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.dashboard-card {
    background-color: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    border: 1px solid var(--border-light);
}

.dashboard-stat {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
}

.dashboard-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-stat-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: var(--space-1);
}

.dashboard-stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.dashboard-stat-change {
    font-size: 0.75rem;
    font-weight: 600;
}

.dashboard-stat-change.positive {
    color: #10B981;
}

.dashboard-stat-change.negative {
    color: #EF4444;
}

/* ===== UTILITIES ===== */
.hidden {
    display: none !important;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.z-10 {
    z-index: 10;
}

.z-20 {
    z-index: 20;
}

.overflow-hidden {
    overflow: hidden;
}

.rounded-xl {
    border-radius: var(--radius-xl);
}

.rounded-lg {
    border-radius: var(--radius-lg);
}

.rounded-full {
    border-radius: var(--radius-full);
}

.w-full {
    width: 100%;
}

.max-w-3xl {
    max-width: 768px;
}

.max-w-2xl {
    max-width: 672px;
}

/* Visually Hidden (accessibility) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== ANIMACIONES ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.5s ease forwards;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .hide-desktop {
        display: none !important;
    }
}

/* ===== PRINT ===== */
@media print {

    .header,
    .footer,
    .sidebar,
    .no-print {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }
}

/* ===== FLIP CARDS ===== */
.flip-card {
    perspective: 1000px;
    height: 320px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease;
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.flip-card-front {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
}

.flip-card-back {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    transform: rotateY(180deg);
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.flip-card-back h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-3);
    color: white;
}

.flip-card-back p {
    font-size: 0.875rem;
    opacity: 0.95;
    line-height: 1.6;
    flex-grow: 1;
    color: white;
}

.flip-card-back .center-info {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.flip-card-back .center-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-bottom: var(--space-1);
    color: white;
}

.flip-card-back .center-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
}

.flip-card-back .flip-hint {
    font-size: 0.75rem;
    opacity: 0.7;
    text-align: center;
    margin-top: var(--space-3);
    color: white;
}

.flip-card .category-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    z-index: 2;
}

.flip-card .card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-4);
}

@media (max-width: 768px) {
    .flip-card {
        height: 280px;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .flip-card-inner {
        transition: none;
    }
}

/* ===================================
   PARALLAX SECTION STYLES
   =================================== */
.parallax-section {
    position: relative;
    min-height: 400px;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.parallax-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 76, 153, 0.85) 0%, rgba(0, 153, 204, 0.75) 50%, rgba(0, 102, 178, 0.85) 100%);
    z-index: 1;
}

.parallax-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: var(--space-12) var(--space-6);
    max-width: 1200px;
    width: 100%;
}

.parallax-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: var(--space-4);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: -1px;
}

.parallax-subtitle {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    font-weight: 500;
    color: white !important;
    opacity: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    max-width: 800px;
    margin: 0 auto var(--space-10);
    line-height: 1.6;
}

/* Stats Counter Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-8);
    margin-top: var(--space-8);
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    transition: all var(--transition-base);
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.stat-number {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 800;
    color: white;
    line-height: 1;
    margin-bottom: var(--space-2);
    background: linear-gradient(135deg, #ffffff 0%, #99d6ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.9;
    color: white;
}

/* Floating elements animation */
.parallax-section .floating-element {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.parallax-section .floating-element:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.parallax-section .floating-element:nth-child(2) {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.parallax-section .floating-element:nth-child(3) {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.3;
    }

    50% {
        transform: translateY(-20px) rotate(10deg);
        opacity: 0.6;
    }
}

/* Responsive parallax - disable fixed for mobile */
@media (max-width: 768px) {
    .parallax-section {
        background-attachment: scroll;
        min-height: 500px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }

    .stat-item {
        padding: var(--space-4);
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .parallax-section .floating-element {
        animation: none;
    }

    .stat-item:hover {
        transform: none;
    }
}

/* ===================================
   SCROLL REVEAL ANIMATIONS
   =================================== */
.reveal-on-scroll {
    opacity: 1;
    /* Visible por defecto - Progressive Enhancement */
    transform: none;
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
    will-change: opacity, transform;
}

/* Estado inicial controlado por JS */
.reveal-on-scroll.js-hidden {
    opacity: 0;
    transform: translateY(30px);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.5, 0, 0, 1) forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ajuste Hero para partículas */
/* Ajuste Hero para partículas */
.hero {
    position: relative;
    overflow: hidden;
    /* Contener canvas */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    /* Sobre el canvas (z-index 1 en JS) pero bajo el contenido */
    pointer-events: none;
}

#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    /* Fondo base */
}

@media (prefers-reduced-motion: reduce) {
    .reveal-on-scroll {
        transition: none;
        opacity: 1;
        transform: none;
    }

    .fade-in-up {
        animation: none;
        opacity: 1;
    }
}

/* ===================================
   ACCESSIBILITY WIDGET STYLES
   =================================== */

/* Font Scaling */
html[data-font-size="1"] {
    font-size: 17px;
}

html[data-font-size="2"] {
    font-size: 18px;
}

html[data-font-size="3"] {
    font-size: 19px;
}

/* Widget Container */
.a11y-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 10000;
    font-family: 'Public Sans', sans-serif;
}

/* Toggle Button */
.a11y-toggle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.a11y-toggle:hover {
    transform: scale(1.1);
    background-color: var(--primary-dark);
}

.a11y-toggle:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* Menu */
.a11y-menu {
    position: absolute;
    bottom: 60px;
    left: 0;
    width: 280px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 16px;
    display: none;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.a11y-widget.open .a11y-menu {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* Header */
.a11y-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 8px;
}

.a11y-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.a11y-header button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

.a11y-header button:hover {
    color: var(--text-primary);
}

/* Controls */
.a11y-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.a11y-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background-color: var(--bg-light);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.a11y-btn:hover {
    background-color: var(--border-light);
}

.a11y-btn.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.a11y-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    background-color: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.a11y-btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-primary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.a11y-btn-icon:hover {
    background-color: var(--primary-light);
    color: white;
}

.a11y-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.a11y-btn.link {
    background: none;
    border: none;
    color: var(--text-muted);
    justify-content: center;
    padding: 8px;
    font-size: 0.8rem;
    text-decoration: underline;
}

.a11y-btn.link:hover {
    color: var(--error);
    background: none;
}

/* Dark Mode Overrides for Widget */
.dark .a11y-menu {
    background-color: #1F2937;
    border-color: #374151;
}

.dark .a11y-btn {
    background-color: #374151;
    border-color: #4B5563;
    color: white;
}

.dark .a11y-btn:hover {
    background-color: #4B5563;
}

.dark .a11y-group {
    background-color: #374151;
    border-color: #4B5563;
}

.dark .a11y-btn-icon {
    background-color: #1F2937;
    color: white;
}

/* ===== 404 ERROR PAGE DESIGN ===== */
.error-page-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.error-hero {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8);
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--primary-dark) 100%);
    overflow: hidden;
    color: var(--text-white);
}

.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    padding: var(--space-10);
    border-radius: var(--radius-2xl);
    text-align: center;
    max-width: 600px;
    width: 100%;
    position: relative;
    z-index: 10;
}

.error-code-glitch {
    font-size: 8rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: var(--space-4);
    position: relative;
    color: transparent;
    -webkit-text-stroke: 2px var(--accent);
    letter-spacing: -5px;
}

.error-code-glitch::before,
.error-code-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.error-code-glitch::before {
    color: var(--accent);
    animation: glitch-effect 3s infinite linear alternate-reverse;
}

.error-code-glitch::after {
    color: var(--text-white);
    animation: glitch-effect 2s infinite linear alternate;
}

@keyframes glitch-effect {
    0% {
        clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
        transform: translate(-2px);
    }

    10% {
        clip-path: polygon(0 15%, 100% 15%, 100% 85%, 0 85%);
        transform: translate(2px);
    }

    20% {
        clip-path: polygon(0 10%, 100% 10%, 100% 50%, 0 50%);
        transform: translate(-2px);
    }

    30% {
        clip-path: polygon(0 5%, 100% 5%, 100% 100%, 0 100%);
        transform: translate(2px);
    }

    40% {
        clip-path: polygon(0 35%, 100% 35%, 100% 90%, 0 90%);
        transform: translate(-2px);
    }

    50% {
        clip-path: polygon(0 20%, 100% 20%, 100% 45%, 0 45%);
        transform: translate(0);
    }

    100% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        transform: translate(0);
    }
}

.error-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-bottom: var(--space-6);
}

.error-icon-wrapper .material-symbols-outlined {
    font-size: 40px;
    color: var(--accent);
}

/* =====================================================
   EVENT BANNER ANIMATIONS
   ===================================================== */

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(5deg);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    }

    50% {
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.4), 0 0 30px rgba(247, 181, 0, 0.3);
    }
}

@keyframes badge-shine {
    0% {
        background-position: -100% center;
    }

    100% {
        background-position: 200% center;
    }
}

.event-banner-dynamic {
    background: linear-gradient(135deg, #F7B500 0%, #FFD700 25%, #FFA500 50%, #FFD700 75%, #F7B500 100%);
    background-size: 400% 100%;
    animation: shimmer 8s ease-in-out infinite;
    padding: 1.5rem 0;
    position: relative;
    overflow: hidden;
}

/* Banner secundario — convocatoria Dualiza (más sobrio) */
/* ─── Banner secundario "Dualiza 2026" ────────────────────────────────
   Acento sutil de color: gradiente pastel azul→verde, borde lateral
   con degradado en paleta institucional Canarias, indicador "live"
   con pulso suave para señalar que la convocatoria está abierta.    */
.conv-strip {
    position: relative;
    background:
        radial-gradient(circle at 92% 50%, rgba(0, 143, 57, 0.06) 0%, transparent 38%),
        linear-gradient(135deg, #EFF6FF 0%, #F8FAFC 55%, #ECFDF5 100%);
    border-top: 1px solid rgba(0, 102, 204, 0.18);
    border-bottom: 1px solid rgba(0, 143, 57, 0.18);
    border-left: 4px solid transparent;
    border-image: linear-gradient(180deg, #0066CC 0%, #0EA5E9 50%, #008f39 100%) 1;
    padding: 0.9rem 0;
    overflow: hidden;
}
/* Resplandor decorativo casi imperceptible a la derecha */
.conv-strip::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -8%;
    width: 360px;
    height: 200%;
    background: radial-gradient(ellipse, rgba(0, 102, 204, 0.07) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}
.conv-strip > * { position: relative; z-index: 1; }

.conv-strip-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.conv-strip-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #DBEAFE 0%, #E0F2FE 60%, #D1FAE5 100%);
    color: #0066CC;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px -3px rgba(0, 102, 204, 0.22),
                inset 0 0 0 1px rgba(0, 102, 204, 0.10);
}

.conv-strip-icon .material-symbols-outlined {
    font-size: 22px;
}

.conv-strip-body {
    flex: 1;
    min-width: 240px;
}

.conv-strip-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0066CC;
    margin-bottom: 0.15rem;
}
/* Punto verde pulsante = indicador "abierta / en plazo" (sobrio) */
.conv-strip-tag::before {
    content: '';
    width: 7px;
    height: 7px;
    background: #10B981;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55);
    animation: conv-strip-pulse 2.6s ease-in-out infinite;
}
@keyframes conv-strip-pulse {
    0%, 100% { box-shadow: 0 0 0 0   rgba(16, 185, 129, 0.55); }
    50%      { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0);    }
}
/* Respeta usuarios que prefieren menos animación */
@media (prefers-reduced-motion: reduce) {
    .conv-strip-tag::before { animation: none; }
}

/* Variante "Próximamente" — tono ámbar institucional sobrio, sin pulso verde */
.conv-strip-pending {
    background:
        radial-gradient(circle at 92% 50%, rgba(245, 158, 11, 0.08) 0%, transparent 38%),
        linear-gradient(135deg, #FFFBEB 0%, #FAF7F0 55%, #FEF3C7 100%);
    border-top:    1px solid rgba(217, 119, 6, 0.18);
    border-bottom: 1px solid rgba(217, 119, 6, 0.18);
    border-image:  linear-gradient(180deg, #D97706 0%, #F59E0B 50%, #C68A00 100%) 1;
}
.conv-strip-pending::after {
    background: radial-gradient(ellipse, rgba(217, 119, 6, 0.07) 0%, transparent 60%);
}
.conv-strip-pending .conv-strip-icon {
    background: linear-gradient(135deg, #FDE68A 0%, #FEF3C7 60%, #FEF9C3 100%);
    color: #B45309;
    box-shadow: 0 4px 10px -3px rgba(217, 119, 6, 0.22),
                inset 0 0 0 1px rgba(217, 119, 6, 0.10);
}
.conv-strip-pending .conv-strip-tag {
    color: #B45309;
}
/* En el aviso "Próximamente" usamos punto ámbar sin pulso (es un aviso, no un "live") */
.conv-strip-pending .conv-strip-tag::before {
    background: #D97706;
    animation: none;
    box-shadow: none;
}
.conv-strip-pending .conv-strip-title strong {
    color: #B45309;
}

.conv-strip-title {
    font-size: 1rem;
    font-weight: 600;
    color: #0F172A;
    line-height: 1.35;
    margin: 0;
}

.conv-strip-title strong {
    color: #0066CC;
}

.conv-strip-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.conv-strip-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-md, 6px);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--transition-base, 0.18s ease), color var(--transition-base, 0.18s ease), border-color var(--transition-base, 0.18s ease);
}

.conv-strip-btn-primary {
    background: #0066CC;
    color: #fff;
    border: 1px solid #0066CC;
}

.conv-strip-btn-primary:hover {
    background: #004C99;
    border-color: #004C99;
}

.conv-strip-btn-outline {
    background: transparent;
    color: #0066CC;
    border: 1px solid #94A3B8;
}

.conv-strip-btn-outline:hover {
    background: #fff;
    border-color: #0066CC;
}

.conv-strip-btn .material-symbols-outlined {
    font-size: 16px;
}

@media (max-width: 640px) {
    .conv-strip-actions { width: 100%; }
    .conv-strip-btn { flex: 1; justify-content: center; }
}

.event-banner-dynamic .float-element {
    position: absolute;
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.event-banner-dynamic .btn-event {
    background: #1F2937;
    color: white;
    padding: 0.75rem 1.5rem;
}

/* Utility classes for index.html inline style refactor */
.mt-4 {
    margin-top: 1rem;
}

/* Animation Delays */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-500 {
    animation-delay: 0.5s;
}

.delay-700 {
    animation-delay: 0.7s;
}

/* Hero Section */
.hero-bg-custom {
    background-image: linear-gradient(to top, rgba(0, 76, 153, 0.9) 0%, rgba(0, 102, 204, 0.4) 50%, rgba(0, 0, 0, 0.2) 100%), url('https://images.unsplash.com/photo-1532094349884-543bc11b234d?w=1920&q=80');
}

/* Event Banner Float Elements */
.float-el-1 {
    top: -20px;
    right: 10%;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.25);
    animation-delay: 0s;
}

.float-el-2 {
    bottom: -30px;
    right: 20%;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    animation-delay: 2s;
}

.float-el-3 {
    top: 50%;
    left: 5%;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    animation-delay: 4s;
}

.float-el-4 {
    bottom: 10px;
    left: 15%;
    width: 50px;
    height: 50px;
    background: rgba(0, 102, 204, 0.15);
    animation-delay: 1s;
}

.container-relative {
    position: relative;
    z-index: 2;
}

.flex-between-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.flex-center-wrap {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Date Box */
.date-box-number {
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1;
}

.date-box-month {
    font-size: 0.75rem;
    text-transform: uppercase;
    opacity: 0.9;
}

/* Featured Badge */
.icon-xs {
    font-size: 14px;
}

.event-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: #1F2937;
    margin: 0;
    line-height: 1.2;
}

.event-location {
    color: rgba(0, 0, 0, 0.75);
    margin: 0.25rem 0 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
}

.icon-sm {
    font-size: 16px;
}

.icon-md {
    font-size: 18px;
}

/* Flip Cards */
.grid-mb-8 {
    margin-bottom: var(--space-8);
}

.bg-blue-light {
    background: #DBEAFE;
    color: #1D4ED8;
}

.bg-purple-light {
    background: #F3E8FF;
    color: #7C3AED;
}

.bg-amber-light {
    background: #FEF3C7;
    color: #D97706;
}

.bg-cyan-light {
    background: #CFFAFE;
    color: #0891B2;
}

.bg-pink-light {
    background: #FCE7F3;
    color: #DB2777;
}

.bg-blue-gradient {
    background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
    color: white;
}

.bg-purple-gradient {
    background: linear-gradient(135deg, #A855F7 0%, #7C3AED 100%);
    color: white;
}

.bg-amber-gradient {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
}

.bg-cyan-gradient {
    background: linear-gradient(135deg, #06B6D4 0%, #0891B2 100%);
    color: white;
}

.bg-pink-gradient {
    background: linear-gradient(135deg, #EC4899 0%, #DB2777 100%);
    color: white;
}

.text-secondary-color {
    color: var(--text-secondary);
}

.touch-hint {
    color: var(--primary);
    margin-top: auto;
    padding-top: var(--space-3);
}

.icon-subtle {
    font-size: 16px;
    vertical-align: middle;
}

/* Repo CTA */
.repo-cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    text-align: center;
    color: white;
}

.repo-cta-inner {
    max-width: 700px;
    margin: 0 auto;
}

.repo-icon {
    font-size: 48px;
    opacity: 0.9;
    margin-bottom: var(--space-4);
    display: block;
}

.repo-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-3);
    color: white;
}

.repo-desc {
    opacity: 0.9;
    margin-bottom: var(--space-6);
    color: white;
}

.flex-center {
    justify-content: center;
}

.btn-white {
    background: white;
    color: var(--primary);
    font-weight: 600;
}

.btn-outline-white {
    border-color: white;
    color: white;
}

.icon-mr {
    margin-right: 8px;
}

.event-banner-dynamic .btn-event {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    animation: pulse-glow 2s ease-in-out infinite;
    transition: transform 0.2s,
        background 0.2s;
}

.event-banner-dynamic .btn-event:hover {
    transform: scale(1.05);
    background: #111827;
}

.event-banner-dynamic .date-box {
    background: linear-gradient(135deg, #0066CC 0%, #004C99 100%);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    text-align: center;
    min-width: 100px;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.4);
    transition: transform 0.3s;
}

.event-banner-dynamic .date-box:hover {
    transform: scale(1.1) rotate(-2deg);
}

.event-banner-dynamic .featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.15) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(0, 0, 0, 0.15) 100%);
    background-size: 200% 100%;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1F2937;
    animation: badge-shine 3s linear infinite;
}

/* Intranet Specific Utility Classes & Refactoring */
.sidebar-link-opacity {
    opacity: 0.6;
}

.badge-upcoming {
    font-size: 0.65rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
}

.btn-logout {
    width: 100%;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

.sidebar-user-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
}

.user-panel-content {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.user-avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
}

.user-info-wrapper {
    flex: 1;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
}

.user-role {
    font-size: 0.7rem;
    opacity: 0.7;
}

/* Dashboard Header & Search */
.search-box-container {
    width: 300px;
}

.search-icon {
    font-size: 18px;
    color: #9CA3AF;
}

.icon-18 {
    font-size: 18px;
}

.icon-20 {
    font-size: 20px;
}

.icon-32 {
    font-size: 32px;
}

.notification-badge {
    padding: 2px 6px;
    font-size: 0.65rem;
}

/* Dashboard Activities */
.min-w-40 {
    min-width: 40px;
}

/* Formacion Page Utilities */
.logo-header {
    height: 40px;
}

.logo-footer-main {
    height: 60px;
}

.logo-footer-sub {
    height: 40px;
}

.search-icon-muted {
    font-size: 18px;
    color: #9CA3AF;
}

.icon-16 {
    font-size: 16px;
}

.hero-formacion {
    min-height: 400px;
    background-image: linear-gradient(to right, rgba(0, 76, 153, 0.95) 0%, rgba(0, 102, 204, 0.7) 100%), url('https://images.unsplash.com/photo-1524178232363-1fb2b075b655?w=1920&q=80');
}

.btn-white-outline {
    border-color: white;
    color: white;
}

.badge-warning-light {
    background: #FEF3C7;
    color: #92400E;
}

.badge-success-light {
    background: #DCFCE7;
    color: #166534;
}

/* Webinar Thumbs */
.thumb-gamification {
    background-image: url('https://images.unsplash.com/photo-1516321318423-f06f85e504b3?w=400&q=80');
}

.thumb-campus {
    background-image: url('https://images.unsplash.com/photo-1552664730-d307ca884978?w=400&q=80');
}

.thumb-vr {
    background-image: url('https://images.unsplash.com/photo-1531482615713-2afd69097998?w=400&q=80');
}

.thumb-bigdata {
    background-image: url('https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?w=400&q=80');
}

/* Comunidad Page Utilities */
.member-card {
    text-align: center;
    padding: var(--space-6);
}

.member-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto var(--space-4);
    background-size: cover;
    background-position: center;
    border: 3px solid var(--primary);
}

.hero-comunidad {
    min-height: 400px;
    background-image: linear-gradient(to top, rgba(0, 76, 153, 0.9) 0%, rgba(0, 102, 204, 0.5) 100%), url('https://images.unsplash.com/photo-1529156069898-49953e39b3ac?w=1920&q=80');
}

.icon-48 {
    font-size: 48px;
}

.icon-12 {
    font-size: 12px;
}

.card-link-block {
    text-decoration: none;
    display: block;
    transition: transform 0.2s, box-shadow 0.2s;
}

.badge-event-highlight {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: linear-gradient(135deg, #F7B500, #FFD700);
    color: #1F2937;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    font-weight: 700;
}

/* Member Avatars */
.avatar-1 {
    background-image: url('https://i.pravatar.cc/80?img=1');
}

.avatar-3 {
    background-image: url('https://i.pravatar.cc/80?img=3');
}

.avatar-5 {
    background-image: url('https://i.pravatar.cc/80?img=5');
}

.avatar-8 {
    background-image: url('https://i.pravatar.cc/80?img=8');
}

/* La Red Page Utilities */
.logo-header-lg {
    height: 40px;
}

.logo-footer-canarias {
    height: 70px;
}

.logo-footer-red {
    height: 45px;
}

.search-icon-muted {
    font-size: 18px;
    color: #9CA3AF;
}

.breadcrumbs-nav {
    margin-bottom: var(--space-4);
    opacity: 0.8;
}

.breadcrumbs-home {
    color: white;
}

.breadcrumbs-separator {
    color: rgba(255, 255, 255, 0.6);
}

/* Map Section */
.map-container-rel {
    position: relative;
}

.map-explore-icon {
    font-size: 18px;
}

.results-title {
    margin: 0;
    font-size: 1.1rem;
}

.results-list {
    max-height: 400px;
    overflow-y: auto;
}

.sidebar-icon-18 {
    font-size: 18px;
}

.sidebar-link-accent {
    color: var(--accent);
}

.doc-btn-centered {
    justify-content: center;
}

.priority-section-margin {
    margin-top: var(--space-6);
}

.priority-item-margin {
    margin-bottom: var(--space-3);
}

.icon-20 {
    font-size: 20px;
}

.spacer-16 {
    height: var(--space-16);
}

/* Filters Panel */
.filters-panel-margin {
    margin-top: var(--space-4);
}

/* Ateca Page Styles */
.tech-card {
    background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-light) 100%);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    text-align: center;
    transition: all var(--transition-base);
}

.tech-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.tech-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-4);
    color: white;
}

.aula-card {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    height: 280px;
    background-size: cover;
    background-position: center;
}

.aula-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
}

.aula-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-6);
    color: white;
    z-index: 10;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.aula-card-content h3,
.aula-card-content p {
    color: white !important;
}

.aula-card-label {
    background: var(--primary);
    color: white !important;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: var(--space-2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.collab-form {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-2xl);
    padding: var(--space-10);
    color: white;
}

.collab-form h2,
.collab-form p,
.collab-form label {
    color: white !important;
}

.collab-form input,
.collab-form textarea,
.collab-form select {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    width: 100%;
}

.collab-form input::placeholder,
.collab-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.8) !important;
}

.collab-form input:focus,
.collab-form select:focus,
.collab-form textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    background: rgba(255, 255, 255, 0.25);
}

/* Ateca Utilities */
.hero-ateca {
    min-height: 480px;
    background-image: linear-gradient(to top, rgba(0, 76, 153, 0.95) 0%, rgba(0, 102, 204, 0.6) 100%), url('https://images.unsplash.com/photo-1581091226825-a6a2a5aee158?w=1920&q=80');
}

.btn-icon-mr {
    margin-right: 8px;
}

.btn-white-outline {
    border-color: white;
    color: white;
}

.map-card-container {
    height: 500px;
    border-radius: var(--radius-xl);
}

.iframe-border-0 {
    border: 0;
}

.families-section {
    background: var(--bg-light);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-16);
}

.card-icon-flex {
    margin-bottom: 0;
    flex-shrink: 0;
}

.address-normal {
    font-style: normal;
}

.btn-full-width-mt {
    width: 100%;
    margin-top: var(--space-4);
}

.logo-footer-gobierno {
    height: 60px;
}

/* Ateca Background Images */
.bg-aula-simancas {
    background-image: url('https://images.unsplash.com/photo-1581092160562-40aa08e78837?w=800&q=80');
}

.bg-aula-rincon {
    background-image: url('https://images.unsplash.com/photo-1593508512255-86ab42a8e620?w=800&q=80');
}

.bg-aula-felo {
    background-image: url('https://images.unsplash.com/photo-1531746790731-6c087fecd65a?w=800&q=80');
}

.bg-aula-politecnico {
    background-image: url('https://images.unsplash.com/photo-1504384764586-bb4cdc1707b0?w=800&q=80');
}

.bg-aula-ingenio {
    background-image: url('https://images.unsplash.com/photo-1581092335397-9583eb92d232?w=800&q=80');
}

.bg-aula-cristobal {
    background-image: url('https://images.unsplash.com/photo-1628126235206-5260b9ea6441?w=800&q=80');
}

.section-recursos {
    background-color: var(--bg-light);
    margin: 0 auto;
    border-radius: var(--radius-xl);
}

.icon-48 {
    font-size: 48px !important;
}

.icon-32 {
    font-size: 32px !important;
}

.icon-16 {
    font-size: 16px !important;
}

/* Innovacion Page Specifics */
.opacity-75 {
    opacity: 0.75;
}

.empty-state-container {
    display: none;
    text-align: center;
    padding: 3rem;
}

.empty-state-icon {
    font-size: 48px !important;
    color: var(--text-muted);
    display: block;
    margin: 0 auto 1rem;
}

/* Innovacion Page Internal Styles */
.page-hero {
    background: linear-gradient(135deg, #0066CC 0%, #004C99 100%);
    color: white;
    padding: var(--space-16) 0;
    margin-bottom: var(--space-8);
}

.page-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--space-4);
    color: white;
}

.page-hero p {
    font-size: 1.1rem;
    opacity: 0.95;
    max-width: 700px;
    color: white;
}

/* Estilos breadcrumbs sobre fondo azul */
.page-hero .breadcrumbs {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.875rem;
}

.page-hero .breadcrumbs a {
    color: #ffffff;
    text-decoration: none;
}

.page-hero .breadcrumbs a:hover {
    color: #F7B500;
}

.page-hero .breadcrumbs span {
    color: #ffffff;
}

/* Filtros */
.filters-section {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    margin-bottom: var(--space-8);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
}

@media (max-width: 1024px) {
    .filters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .filters-grid {
        grid-template-columns: 1fr;
    }
}

.filter-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: var(--space-2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.results-count {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--space-4);
}

.results-count strong {
    color: var(--text-primary);
}

/* Cards de convocatoria */
.conv-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    transition: all var(--transition-base);
    position: relative;
}

.conv-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.conv-card.hidden {
    display: none;
}

.conv-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.conv-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.conv-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.conv-status.open {
    background: #DCFCE7;
    color: #166534;
}

.conv-status.soon {
    background: #FEF9C3;
    color: #854D0E;
}

.conv-status.closed {
    background: #F3F4F6;
    color: #4B5563;
}

.origin-badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--border-light);
}

.origin-badge.gobierno {
    background: rgba(0, 102, 204, 0.05);
    color: var(--primary);
    border-color: rgba(0, 102, 204, 0.2);
}

.origin-badge.ministerio {
    background: rgba(220, 38, 38, 0.05);
    color: #DC2626;
    border-color: rgba(220, 38, 38, 0.2);
}

.origin-badge.privado {
    background: rgba(247, 181, 0, 0.05);
    color: #D97706;
    border-color: rgba(247, 181, 0, 0.2);
}

.conv-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
}

.conv-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: var(--space-4);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.conv-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.conv-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Secci&oacute;n Investigaci&oacute;n (Estilos adicionales) */
.stats-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: var(--space-16) 0;
    margin-top: var(--space-8);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-8);
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    color: var(--accent);
    margin-bottom: var(--space-2);
}

.stat-label {
    font-size: 1.125rem;
    opacity: 0.9;
}

/* Legal Page Utilities */
.legal-card {
    max-width: 900px;
    margin: 0 auto;
}

.legal-text {
    line-height: 1.8;
}

.legal-divider {
    margin: var(--space-8) 0;
    border-color: var(--border-light);
}

.legal-info-box {
    margin-top: var(--space-10);
    padding: var(--space-6);
    background: var(--bg-light);
    border-radius: var(--radius-lg);
}

.h-40 {
    height: 40px;
}

.h-50 {
    height: 50px;
}

.h-60 {
    height: 60px;
}

.h-80 {
    height: 80px;
}

/* Difusion Page Utilities */
.news-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.news-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.bg-news-1 {
    background-image: url('https://images.unsplash.com/photo-1540575467063-178a50c2df87?w=600&q=80');
}

.bg-news-2 {
    background-image: url('https://images.unsplash.com/photo-1581091226825-a6a2a5aee158?w=600&q=80');
}

.bg-news-3 {
    background-image: url('https://images.unsplash.com/photo-1522202176988-66273c2fd55f?w=600&q=80');
}

.news-content {
    padding: var(--space-6);
}

.news-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.event-date-box {
    text-align: center;
    min-width: 60px;
}

.bg-section-materials {
    background: var(--bg-light);
    border-radius: var(--radius-xl);
}

.icon-14 {
    font-size: 14px !important;
}

/* Index Page Inline Fixes */
.featured-project-bg {
    background-image: url('https://images.unsplash.com/photo-1542601906990-b4d3fb778b09?w=800&q=80');
}

.parallax-innovation-bg {
    background-image: url('https://images.unsplash.com/photo-1522071820081-009f0129c71c?w=1920&q=80');
}

.badge-sustainability {
    background: #DCFCE7;
    color: #16A34A;
}

.icon-sustainability {
    background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
    color: white;
}

.text-secondary-var {
    color: var(--text-secondary);
}

.flip-card-see-more {
    color: var(--primary);
    margin-top: auto;
    padding-top: var(--space-3);
}

.icon-touch-sm {
    font-size: 16px;
    vertical-align: middle;
}


/* Admin and Login Fixes */
.admin-sidebar-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-item-disabled {
    opacity: 0.6;
}

.badge-upcoming-sidebar {
    font-size: 0.6rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
}

.nav-item-logout {
    cursor: pointer;
}

.admin-user-panel {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
}

.admin-user-avatar {
    background: rgba(255, 255, 255, 0.2);
}

.admin-user-role {
    opacity: 0.7;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 var(--space-2) 0;
    color: var(--text-primary);
}

.login-subtitle {
    color: var(--text-muted);
    margin: 0 0 var(--space-6) 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.icon-error {
    font-size: 20px;
}

/* Contacto Page Fixes */
.address-reset {
    font-style: normal;
}

.icon-middle {
    vertical-align: middle;
}

.container-padding-8 {
    padding: 0 var(--space-8);
}

.logo-footer-govt {
    height: 70px;
}

.logo-footer-red-sm {
    height: 45px;
}


/* Missing Utility Classes */
.h-40 {
    height: 40px;
}

.icon-32 {
    font-size: 32px;
}

.icon-18 {
    font-size: 18px;
}

.spacer-16 {
    height: var(--space-16);
}

.breadcrumbs-nav {
    margin-bottom: var(--space-4);
    opacity: 0.8;
}

.breadcrumbs-home {
    color: white;
}

.breadcrumbs-separator {
    color: rgba(255, 255, 255, 0.6);
}


/* Formacion Page Fixes */
.icon-16 {
    font-size: 16px;
}

/* Eventos Page Fixes */
.event-description {
    max-width: 600px;
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: var(--space-8);
}

.project-list {
    margin-top: var(--space-2);
    padding-left: var(--space-4);
}

.logo-footer-large {
    height: 60px;
}

.countdown-finished {
    grid-column: 1/-1;
    text-align: center;
    font-weight: bold;
}

.countdown-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Intranet Fixes */
.avatar-admin {
    background-image: url('https://i.pravatar.cc/40?img=12');
}


/* Observatorio Page Fixes */
.icon-search-muted {
    font-size: 18px;
    color: #9CA3AF;
}

.badge-internacional {
    background: #E0E7FF;
    color: #4338CA;
}

/* Project Placeholders */
.bg-project-1 {
    background-image: url('https://images.unsplash.com/photo-1542601906990-b4d3fb778b09?w=600&q=80');
}

.bg-project-2 {
    background-image: url('https://images.unsplash.com/photo-1485827404703-89b55fcc595e?w=600&q=80');
}

.bg-project-3 {
    background-image: url('https://images.unsplash.com/photo-1559136555-9303baea8ebd?w=600&q=80');
}

.bg-project-4 {
    background-image: url('https://images.unsplash.com/photo-1576091160550-2173dba999ef?w=600&q=80');
}

.bg-project-5 {
    background-image: url('https://images.unsplash.com/photo-1526470608268-f674ce90ebd4?w=600&q=80');
}

.bg-project-6 {
    background-image: url('https://images.unsplash.com/photo-1518770660439-4636190af475?w=600&q=80');
}


/* Utility Class for JS Toggle */
.hidden {
    display: none !important;
}

/* Enhanced Filter Panel Styles */
.filters-panel-enhanced {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    margin-top: var(--space-6);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: box-shadow var(--transition-base);
}

.filters-panel-enhanced:hover {
    box-shadow: var(--shadow-md);
}

.filters-title-enhanced {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--text-primary);
    border-bottom: 2px solid var(--bg-light);
    padding-bottom: var(--space-4);
}

.filters-title-enhanced .material-symbols-outlined {
    background: var(--bg-light);
    padding: 8px;
    border-radius: var(--radius-lg);
    color: var(--primary);
}

.filter-group-enhanced label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.filter-input-enhanced {
    width: 100%;
    padding: var(--space-3);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    background-color: var(--bg-light);
    font-size: 0.95rem;
    transition: all var(--transition-base);
    color: var(--text-primary);
}

.filter-input-enhanced:focus {
    background-color: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    outline: none;
}

.filter-input-enhanced:hover {
    border-color: #cbd5e1;
    /* slate-300 */
}


/* ===================================
   MAP & PRINT ENHANCEMENTS
   =================================== */

/* Map Navigation Overlay - Premium Glass Effect */
.map-container-rel {
    position: relative;
    height: 600px;
    /* Slightly taller for better visibility */
    background: #f1f5f9;
}

#map {
    height: 100%;
    width: 100%;
    z-index: 1;
}

/* Force visibility of controls on screen */
.leaflet-control-container .leaflet-control {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.leaflet-top,
.leaflet-bottom {
    z-index: 1100 !important;
}

/* Pulsing Halo Effect */
.blinking-halo-container {
    pointer-events: none;
}

.blinking-halo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.4);
    /* Green */
    border: 2px solid #22c55e;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.6);
    animation: pulsedHalo 2s infinite ease-out;
}

@keyframes pulsedHalo {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.map-navigation-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 25, 35, 0.6);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    transition: all 0.5s ease;
}

.overlay-card {
    background: white;
    padding: var(--space-8);
    border-radius: var(--radius-2xl);
    text-align: center;
    max-width: 400px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInScale 0.4s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.overlay-icon {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: var(--space-4);
}

.overlay-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.overlay-text {
    color: var(--text-muted);
    margin-bottom: var(--space-6);
    line-height: 1.6;
}

/* Print Layout & Carátula */
.print-header {
    display: none;
    background: white;
    padding: 20px;
    border-bottom: 2px solid var(--primary);
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
    align-items: center;
    justify-content: space-between;
}

.print-logos {
    display: flex;
    gap: 20px;
    align-items: center;
}

.print-logo-img {
    height: 60px;
    object-fit: contain;
}

.print-content {
    flex: 1;
    margin-left: 30px;
    text-align: right;
}

.print-title {
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--primary);
    margin: 0;
    text-transform: uppercase;
}

.print-subtitle {
    font-size: 1rem;
    color: #444;
    font-weight: 600;
    margin: 5px 0 15px 0;
}

.print-data-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    text-align: left;
    background: #f8fafc;
    padding: 10px;
    border-radius: 8px;
}

.print-data-item {
    font-size: 0.85rem;
    color: #334155;
}

.print-data-item strong {
    color: var(--primary);
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
}

@media print {
    @page {
        size: landscape;
        margin: 0.5cm;
    }

    body {
        background: white !important;
        color: black !important;
    }

    /* Target all elements to hide by default */
    header,
    footer,
    nav,
    .filters-panel,
    .filters-panel-enhanced,
    .breadcrumbs,
    .page-description,
    .map-navigation-overlay,
    .skip-link,
    .float-btn,
    .mobile-menu,
    .header-container,
    .priority-section,
    .priority-item,
    .container>h1,
    .page-header,
    .stats-section,
    .mb-12,
    .gap-8,
    .grid,
    .spacer-16,
    .leaflet-control-container {
        display: none !important;
    }

    /* Expose print elements */
    .print-header {
        display: flex !important;
    }

    .map-section,
    .container,
    main {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
    }

    .map-container-rel {
        height: auto !important;
        width: 100% !important;
        position: static !important;
    }

    #map {
        height: 18cm !important;
        /* Fixed physical height for A4 landscape */
        width: 100% !important;
        border: 2px solid #000 !important;
        z-index: 1 !important;
        position: relative !important;
    }
}

/* Skip link for accessibility (duplicate guard) */
.skip-link { position: absolute; top: -40px; left: 0; background: var(--primary); color: white; padding: 8px 16px; z-index: 10000; text-decoration: none; font-weight: 600; }
.skip-link:focus { top: 0; }

/* ============================================================
   === Responsive fixes === (auditor&iacute;a mobile-first)
   Breakpoints del proyecto: 640 / 768 / 1024 / 1280
   Se a&ntilde;aden reglas m&iacute;nimas sin duplicar estilos ya existentes.
   ============================================================ */

/* Seguridad b&aacute;sica: evitar que elementos media se salgan del viewport.
   NO aplicamos overflow-x:hidden a html/body para no romper el
   position:sticky del .header. */
html, body { max-width: 100%; }
img, video, iframe, svg { max-width: 100%; }

/* Tablas: fallback defensivo.
   .table-container ya maneja overflow-x por s&iacute; mismo. Para tablas
   fuera de contenedor a&ntilde;adimos un max-width protector. */
table { max-width: 100%; }

/* Breadcrumbs: evitar que el texto largo desborde */
.breadcrumbs { flex-wrap: wrap; row-gap: var(--space-1); }

/* Formularios: asegurar que inputs/textarea/select no desborden */
input, textarea, select { max-width: 100%; }
.form-input, .form-textarea, .form-select { max-width: 100%; }

/* ---- M&oacute;vil muy peque&ntilde;o (<480px) --------------------------- */
@media (max-width: 479px) {
    /* Grids fijos de 3/4 columnas: demasiado apretados en pantallas
       peque&ntilde;as. Mantenemos grid-cols-2 para iconos/tiles peque&ntilde;os. */
    .grid-cols-3,
    .grid-cols-4 { grid-template-columns: 1fr; }

    /* Botones largos: permitir wrap de texto y que ocupen el ancho */
    .btn { white-space: normal; text-align: center; }
    .btn-lg { font-size: 0.95rem; padding: var(--space-3) var(--space-5); }

    /* Hero m&oacute;vil: reducir altura m&iacute;nima para no dejar demasiado vac&iacute;o */
    .hero { min-height: 380px; padding: var(--space-6); }

    /* Heroes con imagen de fondo */
    .hero-formacion,
    .hero-comunidad { min-height: 360px; }
    .hero-ateca { min-height: 400px; }

    /* Tipograf&iacute;a page-hero */
    .page-hero { padding: var(--space-10) 0; }
    .page-hero h1 { font-size: clamp(2rem, 9vw, 2.5rem); }
    .page-hero p { font-size: 1rem; }

    /* Mapa Leaflet: adaptativo */
    .map-container-rel { height: 360px; }
    .map-card-container { height: 320px; }
    .map-container { height: 300px; }

    /* 404 glitch: evitar 8rem fijos */
    .error-code-glitch { font-size: clamp(4rem, 18vw, 6rem); letter-spacing: -2px; }

    /* Stats counter grid en parallax: 1 columna cuando es muy estrecho */
    .parallax-section .stats-grid { grid-template-columns: 1fr !important; }
    .parallax-content { padding: var(--space-8) var(--space-4); }

    /* Banner evento din&aacute;mico: permitir que el t&iacute;tulo haga wrap */
    .event-banner-dynamic .btn-event { white-space: normal; }
    .event-banner-dynamic .date-box { min-width: 80px; padding: 0.5rem 1rem; }
    .event-title { font-size: 1.2rem; }

    /* Footer logos: evitar overflow */
    .footer-logos { gap: var(--space-4); flex-wrap: wrap; justify-content: center; }
}

/* ---- M&oacute;vil est&aacute;ndar (<768px) ------------------------------ */
@media (max-width: 767px) {
    /* Hero h1 de p&aacute;gina interior: tama&ntilde;o m&aacute;s legible (32-40px target) */
    .page-hero h1 { font-size: clamp(2rem, 6vw, 2.5rem); }

    /* Mapa Leaflet: que no ocupe 600px en m&oacute;vil */
    .map-container-rel { height: 420px; }
    .map-card-container { height: 380px; }

    /* Contacto/ateca formularios: evitar 2 columnas apretadas */
    form .grid.grid-cols-2 { grid-template-columns: 1fr; }

    /* Featured project image: altura moderada en m&oacute;vil */
    .featured-image { height: 220px; }

    /* Footer grid de 3-4 columnas - aseg&uacute;rate 1 col <768 (por si acaso) */
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { text-align: center; }

    /* Dashboard / intranet header wrap robusto */
    .intranet-header { justify-content: center; }

    /* Results list no demasiado alto */
    .results-list { max-height: 320px; }
}

/* ---- Tablet (<1024px) ----------------------------------- */
@media (max-width: 1023px) {
    /* Asegurar que la navegaci&oacute;n desktop se oculte completamente */
    .desktop-menu { display: none !important; }

    /* Stats parallax: 2 columnas en tablet (ya definido, refuerzo defensivo) */
    .parallax-section .stats-grid { grid-template-columns: repeat(2, 1fr); }

    /* Mapa p&oacute;ster (la-red): altura intermedia */
    .map-container-rel { height: 480px; }
}

/* ---- Fixes para inline-styles problem&aacute;ticos en HTML --------- */
/* Normalizar .search-box con width inline (usado en intranet) para que
   no se salga del viewport en m&oacute;vil */
@media (max-width: 767px) {
    .search-box[style*="width"] { width: 100% !important; max-width: 100%; }
    .search-box-container { width: 100% !important; }
}

/* A11y widget bottom-left: ajustes en m&oacute;vil para no colisionar con chatbot */
@media (max-width: 479px) {
    .a11y-widget { bottom: 12px; left: 12px; }
    .a11y-menu { width: calc(100vw - 40px); max-width: 280px; }
}

/* La secci&oacute;n .stats-section usa clamp en .stat-number, pero forzamos
   un wrap c&oacute;modo del label largo */
.stat-label { overflow-wrap: anywhere; }

/* === fin Responsive fixes === */

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .float-element, .particles-container, .parallax-section {
        animation: none !important;
        transform: none !important;
    }
    .reveal-on-scroll {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* === Contact form: honeypot + server error === */
.hp-field {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
.form-server-error {
    margin-top: var(--space-4);
    padding: var(--space-4) var(--space-5);
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #dc2626;
    border-radius: var(--radius-md);
    color: #991b1b;
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    font-size: 0.9rem;
    line-height: 1.5;
}
/* IMPORTANTE: el atributo HTML `hidden` da display:none, pero la regla
   .form-server-error con display:flex tiene mayor especificidad que el
   user-agent y la sobreescribe. Esta regla restaura el comportamiento
   correcto: si el elemento tiene atributo `hidden`, no se muestra. */
.form-server-error[hidden] {
    display: none !important;
}
.form-server-error .material-symbols-outlined {
    color: #dc2626;
    flex-shrink: 0;
    font-size: 1.4rem;
    margin-top: 1px;
}
.form-server-error-body { min-width: 0; flex: 1; }
.form-server-error-body p { margin: 0; }
.form-server-error-body p + p { margin-top: 6px; }
.form-server-error-fallback {
    font-size: 0.82rem;
    color: #7f1d1d;
}
.form-server-error-fallback a {
    color: #991b1b;
    font-weight: 600;
    text-decoration: underline;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.form-server-error-fallback a:hover { color: #dc2626; }

/* Botón fallback "Abrir mi cliente de correo" */
.mailto-fallback-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 18px;
    background: #dc2626;
    color: #fff !important;
    text-decoration: none;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.88rem;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}
.mailto-fallback-btn:hover,
.mailto-fallback-btn:focus-visible {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(220, 38, 38, 0.4);
    text-decoration: none !important;
}
.mailto-fallback-btn:focus-visible {
    outline: 3px solid #FCD34D;
    outline-offset: 3px;
}
.mailto-fallback-btn .material-symbols-outlined { font-size: 1.1rem; }
.submit-btn[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}
@media (prefers-color-scheme: dark) {
    .dark .form-server-error {
        background: rgba(220, 38, 38, 0.1);
        border-color: rgba(220, 38, 38, 0.4);
        color: #fca5a5;
    }
}

/* =====================================================================
   Page-hero dinámico — efecto Aurora (blobs animados + grid sutil)
   Aplicar añadiendo la clase .page-hero-dynamic al <section class="page-hero">
   ===================================================================== */
.page-hero-dynamic {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/* El contenido vive sobre los efectos */
.page-hero-dynamic > * {
    position: relative;
    z-index: 2;
}

/* Capa 1: rejilla sutil con máscara radial para que se desvanezca en los bordes */
.page-hero-dynamic::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 50%, black 35%, transparent 95%);
    mask-image: radial-gradient(ellipse 75% 65% at 50% 50%, black 35%, transparent 95%);
    z-index: 0;
    pointer-events: none;
    opacity: 0.9;
}

/* Capa 2: blobs de color con blur y animación lenta tipo aurora */
.page-hero-dynamic::after {
    content: '';
    position: absolute;
    inset: -25%;
    background:
        radial-gradient(circle at 18% 28%, rgba(247, 181, 0, 0.40) 0%, transparent 38%),
        radial-gradient(circle at 78% 32%, rgba(0, 168, 232, 0.45) 0%, transparent 40%),
        radial-gradient(circle at 35% 78%, rgba(255, 100, 150, 0.30) 0%, transparent 35%),
        radial-gradient(circle at 82% 82%, rgba(126, 230, 255, 0.30) 0%, transparent 35%);
    filter: blur(48px);
    will-change: transform, opacity;
    animation: hero-aurora 28s ease-in-out infinite alternate;
    z-index: 0;
    pointer-events: none;
    opacity: 0.85;
}

@keyframes hero-aurora {
    0%   { transform: translate3d(0, 0, 0) scale(1);       opacity: 0.80; }
    25%  { transform: translate3d(3%, -2%, 0) scale(1.06); opacity: 0.95; }
    50%  { transform: translate3d(-2%, 2%, 0) scale(0.98); opacity: 0.78; }
    75%  { transform: translate3d(2%, 3%, 0) scale(1.04);  opacity: 0.92; }
    100% { transform: translate3d(-3%, -1%, 0) scale(1.02); opacity: 0.85; }
}

/* Capa 3 opcional: brillo orbital (un punto brillante que recorre el borde superior) */
.page-hero-dynamic .hero-shine {
    position: absolute;
    top: 0;
    left: 0;
    width: 220px;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.18) 50%,
        transparent 100%);
    transform: skewX(-20deg);
    animation: hero-shine 9s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes hero-shine {
    0%, 100% { transform: translateX(-30%) skewX(-20deg); opacity: 0; }
    40%      { opacity: 0.9; }
    50%      { transform: translateX(120%) skewX(-20deg); opacity: 0.9; }
    60%      { opacity: 0; }
}

/* Refuerzo de contraste para el contenido por encima del efecto */
.page-hero-dynamic h1,
.page-hero-dynamic p,
.page-hero-dynamic .breadcrumbs {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

/* Modo oscuro: blobs más sutiles para no saturar */
.dark .page-hero-dynamic::after {
    opacity: 0.65;
    filter: blur(56px);
}

/* Móvil: reducir intensidad por rendimiento y legibilidad */
@media (max-width: 640px) {
    .page-hero-dynamic::before { background-size: 36px 36px; }
    .page-hero-dynamic::after { filter: blur(36px); inset: -15%; }
    .page-hero-dynamic .hero-shine { width: 140px; }
}

/* Respeto a usuarios con reduced motion: congelamos animaciones */
@media (prefers-reduced-motion: reduce) {
    .page-hero-dynamic::after,
    .page-hero-dynamic .hero-shine {
        animation: none !important;
    }
    .page-hero-dynamic .hero-shine {
        opacity: 0;
    }
}

/* =====================================================================
   HOME — Ejes de Acción (rediseño premium)
   ===================================================================== */
.section-header-inline {
    text-align: center;
    max-width: 760px;
    margin: 0 auto var(--space-10);
}
.eyebrow-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--primary);
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.12) 0%, rgba(247, 181, 0, 0.12) 100%);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-3);
}
.eyebrow-chip .material-symbols-outlined { font-size: 1rem; }
.ejes-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--primary) 0%, #7C3AED 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: var(--space-3);
}
.ejes-subtitle {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 auto;
}
.ejes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
}
@media (max-width: 900px) { .ejes-grid { grid-template-columns: 1fr; } }

.eje-card {
    position: relative;
    padding: var(--space-6);
    min-height: 320px;
    border-radius: var(--radius-xl);
    background: white;
    border: 1.5px solid var(--border-light);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    isolation: isolate;
    transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.eje-glow {
    position: absolute;
    inset: -50% -30% auto auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--eje-color, var(--primary)) 0%, transparent 65%);
    opacity: 0.22;
    filter: blur(30px);
    transition: all 0.6s ease;
    z-index: 0;
}
.eje-card:hover .eje-glow {
    inset: -35% -20% auto auto;
    opacity: 0.45;
    transform: scale(1.15);
}
.eje-card:hover {
    transform: translateY(-6px);
    border-color: var(--eje-color, var(--primary));
    box-shadow: 0 20px 40px -8px color-mix(in srgb, var(--eje-color, var(--primary)) 30%, transparent);
}
.eje-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--eje-color, var(--primary)) 0%, var(--eje-color-2, var(--secondary)) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}
.eje-card:hover::after { transform: scaleX(1); }

.eje-number {
    position: absolute;
    top: var(--space-5);
    right: var(--space-6);
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, var(--eje-color, var(--primary)) 0%, var(--eje-color-2, var(--secondary)) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0.18;
    letter-spacing: -0.05em;
    transition: opacity 0.35s, transform 0.35s;
    z-index: 1;
}
.eje-card:hover .eje-number { opacity: 0.35; transform: scale(1.08); }

.eje-icon {
    position: relative;
    z-index: 2;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--eje-color, var(--primary)) 0%, var(--eje-color-2, var(--secondary)) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px color-mix(in srgb, var(--eje-color, var(--primary)) 40%, transparent);
    margin-bottom: var(--space-4);
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.eje-icon .material-symbols-outlined { font-size: 34px; }
.eje-card:hover .eje-icon { transform: scale(1.1) rotate(-6deg); }

.eje-name {
    position: relative;
    z-index: 2;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: var(--space-3);
    color: var(--text-primary);
}
.eje-desc {
    position: relative;
    z-index: 2;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text-secondary);
    flex: 1;
    margin-bottom: var(--space-5);
}
.eje-footer {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-light);
}
.eje-tag {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--eje-color, var(--primary));
    background: color-mix(in srgb, var(--eje-color, var(--primary)) 14%, transparent);
    padding: 4px 10px;
    border-radius: var(--radius-full);
}
.eje-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-light);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.eje-card:hover .eje-arrow {
    background: var(--eje-color, var(--primary));
    color: white;
    transform: translateX(4px);
}
.eje-arrow .material-symbols-outlined { font-size: 20px; }

.eje-blue   { --eje-color: #0066CC; --eje-color-2: #2563EB; }
.eje-amber  { --eje-color: #F59E0B; --eje-color-2: #D97706; }
.eje-purple { --eje-color: #7C3AED; --eje-color-2: #5B21B6; }

.dark .eje-card { background: var(--bg-card); }
.dark .eje-arrow { background: rgba(255,255,255,0.06); }

/* =====================================================================
   HOME — Dashboard I+D+i Canarias (rediseño espectacular con datos reales)
   ===================================================================== */
.idi-dashboard {
    position: relative;
    padding: clamp(3.5rem, 8vw, 6rem) 0;
    background:
        radial-gradient(ellipse at 20% 0%, #0F2D5F 0%, #061734 60%, #03102A 100%);
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}

/* ----- Capa 1: rejilla animada de fondo ----- */
.idi-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 50%, black 30%, transparent 100%);
    mask-image: radial-gradient(ellipse 75% 70% at 50% 50%, black 30%, transparent 100%);
    z-index: 0;
    pointer-events: none;
    animation: idi-grid-pan 80s linear infinite;
}
@keyframes idi-grid-pan {
    from { background-position: 0 0; }
    to   { background-position: 56px 56px; }
}

/* ----- Capa 2: mesh gradient con blobs animados ----- */
.idi-bg-mesh {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
.idi-mesh-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.55;
    will-change: transform, opacity;
    animation: idi-blob-float 22s ease-in-out infinite alternate;
}
.idi-mesh-1 {
    width: 460px; height: 460px;
    top: -120px; left: -120px;
    background: radial-gradient(circle, #2563EB 0%, transparent 70%);
}
.idi-mesh-2 {
    width: 520px; height: 520px;
    top: 30%; right: -150px;
    background: radial-gradient(circle, #F59E0B 0%, transparent 70%);
    animation-delay: -7s; animation-duration: 26s;
    opacity: 0.45;
}
.idi-mesh-3 {
    width: 380px; height: 380px;
    bottom: -100px; left: 25%;
    background: radial-gradient(circle, #EC4899 0%, transparent 70%);
    animation-delay: -14s; animation-duration: 30s;
    opacity: 0.4;
}
.idi-mesh-4 {
    width: 340px; height: 340px;
    bottom: 10%; right: 30%;
    background: radial-gradient(circle, #10B981 0%, transparent 70%);
    animation-delay: -3s; animation-duration: 24s;
    opacity: 0.35;
}
@keyframes idi-blob-float {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(40px, -30px) scale(1.12); }
    100% { transform: translate(-30px, 35px) scale(0.95); }
}

/* ----- Capa 3: partículas flotantes ----- */
.idi-particles {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.idi-particles span {
    position: absolute;
    width: 4px; height: 4px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
    animation: idi-particle-rise 18s linear infinite;
}
.idi-particles span:nth-child(1)  { left:  5%; animation-delay:  0s;  animation-duration: 20s; width: 3px; height: 3px; }
.idi-particles span:nth-child(2)  { left: 12%; animation-delay: -2s;  animation-duration: 22s; width: 5px; height: 5px; }
.idi-particles span:nth-child(3)  { left: 21%; animation-delay: -8s;  animation-duration: 18s; }
.idi-particles span:nth-child(4)  { left: 30%; animation-delay: -4s;  animation-duration: 24s; width: 3px; height: 3px; }
.idi-particles span:nth-child(5)  { left: 38%; animation-delay: -10s; animation-duration: 21s; width: 6px; height: 6px; }
.idi-particles span:nth-child(6)  { left: 47%; animation-delay: -14s; animation-duration: 19s; }
.idi-particles span:nth-child(7)  { left: 55%; animation-delay: -6s;  animation-duration: 25s; width: 3px; height: 3px; }
.idi-particles span:nth-child(8)  { left: 63%; animation-delay: -1s;  animation-duration: 23s; width: 5px; height: 5px; }
.idi-particles span:nth-child(9)  { left: 70%; animation-delay: -12s; animation-duration: 17s; }
.idi-particles span:nth-child(10) { left: 78%; animation-delay: -3s;  animation-duration: 26s; width: 4px; height: 4px; }
.idi-particles span:nth-child(11) { left: 85%; animation-delay: -7s;  animation-duration: 20s; width: 6px; height: 6px; }
.idi-particles span:nth-child(12) { left: 91%; animation-delay: -11s; animation-duration: 22s; }
.idi-particles span:nth-child(13) { left: 17%; animation-delay: -15s; animation-duration: 24s; width: 5px; height: 5px; }
.idi-particles span:nth-child(14) { left: 50%; animation-delay: -9s;  animation-duration: 19s; width: 3px; height: 3px; }
.idi-particles span:nth-child(15) { left: 73%; animation-delay: -13s; animation-duration: 27s; }
@keyframes idi-particle-rise {
    0%   { bottom: -20px; opacity: 0; transform: translateX(0); }
    10%  { opacity: 1; }
    90%  { opacity: 0.8; }
    100% { bottom: 110%; opacity: 0; transform: translateX(40px); }
}

/* ----- Inner container ----- */
.idi-inner { position: relative; z-index: 2; }

/* ----- Header ----- */
.idi-header {
    text-align: center;
    max-width: 820px;
    margin: 0 auto var(--space-12);
}
.idi-eyebrow-new {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #FCD34D;
    background: rgba(252, 211, 77, 0.1);
    border: 1px solid rgba(252, 211, 77, 0.3);
    padding: 7px 16px;
    border-radius: 999px;
    margin-bottom: var(--space-4);
    backdrop-filter: blur(8px);
}
.idi-eyebrow-dot {
    width: 8px; height: 8px;
    background: #FCD34D;
    border-radius: 50%;
    box-shadow: 0 0 12px #FCD34D;
    animation: idi-pulse 2s ease-in-out infinite;
}
@keyframes idi-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(0.85); }
}
.idi-title-new {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: #fff;
    margin: 0 0 var(--space-4);
}
.idi-grad-text {
    background: linear-gradient(135deg, #FCD34D 0%, #FB923C 50%, #EC4899 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.idi-subtitle-new {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    line-height: 1.65;
    max-width: 720px;
    margin: 0 auto;
}

/* ----- Hero stat (cifra estrella) ----- */
.idi-hero-stat {
    text-align: center;
    margin: 0 auto var(--space-12);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    max-width: 640px;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}
.idi-hero-stat::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, transparent, rgba(252, 211, 77, 0.4), transparent);
    border-radius: 28px;
    z-index: -1;
    opacity: 0;
    animation: idi-hero-shine 8s ease-in-out infinite;
}
@keyframes idi-hero-shine {
    0%, 100% { opacity: 0; }
    50%      { opacity: 1; }
}
.idi-hero-stat-amount {
    font-size: clamp(3rem, 9vw, 5.5rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #FCD34D 0%, #FB923C 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-variant-numeric: tabular-nums;
    margin-bottom: var(--space-3);
    text-shadow: 0 0 60px rgba(252, 211, 77, 0.4);
    display: inline-flex;
    align-items: baseline;
    gap: 0.2em;
}
.idi-hero-currency {
    font-size: 0.55em;
    opacity: 0.85;
}
.idi-hero-stat-label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    line-height: 1.55;
    margin: 0 0 var(--space-2);
}
.idi-hero-stat-label strong { color: #FCD34D; font-weight: 700; }
.idi-hero-stat-source {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    margin: 0;
    font-style: italic;
}

/* ----- Grid de KPIs ----- */
.idi-kpis-new {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-12);
}
@media (max-width: 900px) { .idi-kpis-new { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .idi-kpis-new { grid-template-columns: 1fr; } }

.idi-kpi-new {
    position: relative;
    padding: var(--space-5);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    isolation: isolate;
}
.idi-kpi-new::before {
    content: '';
    position: absolute;
    inset: -50% -30% auto auto;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--kpi-color, #3B82F6) 0%, transparent 65%);
    opacity: 0;
    filter: blur(30px);
    transition: opacity 0.5s, transform 0.6s;
    z-index: 0;
}
.idi-kpi-new:hover::before { opacity: 0.4; transform: scale(1.2); }
.idi-kpi-new:hover {
    transform: translateY(-6px);
    border-color: var(--kpi-color, #3B82F6);
    box-shadow: 0 20px 50px -12px color-mix(in srgb, var(--kpi-color, #3B82F6) 35%, transparent);
}
.idi-kpi-new > * { position: relative; z-index: 1; }

.idi-kpi-icon-new {
    width: 50px; height: 50px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--kpi-color, #3B82F6), var(--kpi-color-2, #1D4ED8));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px -4px color-mix(in srgb, var(--kpi-color, #3B82F6) 50%, transparent);
    margin-bottom: var(--space-3);
}
.idi-kpi-icon-new .material-symbols-outlined { font-size: 26px; }

.idi-kpi-value {
    font-size: clamp(2.25rem, 4.5vw, 3rem);
    font-weight: 900;
    line-height: 1;
    color: #fff;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    margin-bottom: var(--space-2);
}
.idi-kpi-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 4px;
}
.idi-kpi-detail {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: var(--space-3);
}
.idi-kpi-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}
.idi-kpi-bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--kpi-color, #3B82F6), var(--kpi-color-2, #1D4ED8));
    transition: width 1.6s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}
.idi-kpi-new.in-view .idi-kpi-bar span { width: var(--w, 70%); }

/* ----- Bloque de gráficos ----- */
.idi-charts {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: var(--space-5);
    margin-bottom: var(--space-10);
}
@media (max-width: 900px) { .idi-charts { grid-template-columns: 1fr; } }

.idi-chart-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: var(--space-6);
}
.idi-chart-head { margin-bottom: var(--space-5); }
.idi-chart-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 4px;
    letter-spacing: -0.01em;
}
.idi-chart-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
}
.idi-chart-foot {
    margin-top: var(--space-4);
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

/* ----- Bar chart ----- */
.idi-bars { display: flex; flex-direction: column; gap: var(--space-4); }
.idi-bar-row {
    display: grid;
    grid-template-columns: 110px 1fr 90px;
    gap: var(--space-3);
    align-items: center;
}
.idi-bar-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    line-height: 1.1;
}
.idi-bar-badge {
    display: inline-block;
    background: #FCD34D;
    color: #061734;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.2;
    box-shadow: 0 1px 4px rgba(252, 211, 77, 0.4);
    white-space: nowrap;
}
.idi-bar-track {
    height: 14px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}
.idi-bar-fill {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--bar-color, #60A5FA), color-mix(in srgb, var(--bar-color, #60A5FA) 70%, white));
    border-radius: 999px;
    box-shadow: 0 0 12px color-mix(in srgb, var(--bar-color, #60A5FA) 60%, transparent);
    transition: width 1.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s;
}
.idi-chart-card.in-view .idi-bar-fill { width: var(--bar-w, 50%); }
.idi-bar-amount {
    font-size: 0.92rem;
    font-weight: 800;
    color: #fff;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.idi-bar-current .idi-bar-amount { color: #FCD34D; }
.idi-bar-current .idi-bar-track {
    box-shadow: 0 0 0 1px rgba(252, 211, 77, 0.4);
}

@media (max-width: 480px) {
    .idi-bar-row { grid-template-columns: 90px 1fr 75px; gap: 10px; }
    .idi-bar-label, .idi-bar-amount { font-size: 0.78rem; }
    .idi-bar-badge { font-size: 0.55rem; padding: 1px 6px; }
}

/* ----- Donut chart ----- */
.idi-donut-wrap {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-5);
    align-items: center;
}
@media (max-width: 520px) {
    .idi-donut-wrap { grid-template-columns: 1fr; justify-items: center; }
}
.idi-donut {
    width: 180px;
    height: 180px;
    transform: rotate(-90deg);
    flex-shrink: 0;
}
.idi-donut-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 22;
}
.idi-donut-seg {
    fill: none;
    stroke-width: 22;
    stroke-linecap: butt;
    transition: stroke-dasharray 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0.3s, stroke-width 0.3s;
    stroke-dasharray: 0 502.65 !important;
}
/* Distribución modalidades 2026/27 (1.000.000 €):
   M1 320 K€ = 32% → 160.85   |   M2 260 K€ = 26% → 130.69
   M3 320 K€ = 32% → 160.85   |   MR 100 K€ = 10% →  50.27
   Suma = 502.66 ≈ 502.65 (2π·80) ✓ */
.idi-chart-card.in-view .idi-donut-m1 { stroke-dasharray: 160.85 502.65 !important; }
.idi-chart-card.in-view .idi-donut-m2 { stroke-dasharray: 130.69 502.65 !important; }
.idi-chart-card.in-view .idi-donut-m3 { stroke-dasharray: 160.85 502.65 !important; }
.idi-chart-card.in-view .idi-donut-mr { stroke-dasharray:  50.27 502.65 !important; }
.idi-donut-m1 { stroke: url(#none) #3B82F6; stroke: #3B82F6; }
.idi-donut-m2 { stroke: #10B981; }
.idi-donut-m3 { stroke: #F59E0B; }
.idi-donut-mr { stroke: #A78BFA; }
.idi-donut-seg:hover { stroke-width: 26; cursor: pointer; }
.idi-donut-num {
    font-size: 28px;
    font-weight: 900;
    fill: #fff;
    transform: rotate(90deg);
    transform-origin: 100px 100px;
}
.idi-donut-cap {
    font-size: 12px;
    fill: rgba(255, 255, 255, 0.6);
    transform: rotate(90deg);
    transform-origin: 100px 100px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.idi-donut-legend {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.idi-donut-legend li {
    display: grid;
    grid-template-columns: 14px 1fr auto;
    gap: 10px;
    align-items: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
}
.idi-leg-dot {
    width: 14px; height: 14px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.idi-leg-name { font-weight: 600; }
.idi-leg-val { font-weight: 800; color: #FCD34D; font-variant-numeric: tabular-nums; }

/* ----- Footer ----- */
.idi-footer-new {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-4);
    padding-top: var(--space-6);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.idi-footer-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 600;
}
.idi-footer-label .material-symbols-outlined {
    font-size: 1.1rem;
    color: #34D399;
}
.idi-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.idi-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #FCD34D;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.82rem;
    padding: 7px 14px;
    border: 1px solid rgba(252, 211, 77, 0.3);
    border-radius: 999px;
    transition: all 0.25s;
    background: rgba(252, 211, 77, 0.05);
}
.idi-footer-link:hover {
    background: rgba(252, 211, 77, 0.15);
    border-color: #FCD34D;
    transform: translateY(-1px);
}
.idi-footer-link .material-symbols-outlined { font-size: 1rem; }

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
    .idi-bg-grid, .idi-mesh-blob, .idi-particles span, .idi-eyebrow-dot, .idi-hero-stat::before {
        animation: none !important;
    }
    .idi-kpi-new, .idi-bar-fill, .idi-donut-seg, .idi-kpi-bar span, .idi-footer-link, .idi-eyebrow-dot {
        transition: none !important;
    }
    .idi-kpi-new:hover { transform: none !important; }
    /* Mostrar valores finales sin animación */
    .idi-bar-fill { width: var(--bar-w, 50%) !important; }
    .idi-kpi-bar span { width: var(--w, 70%) !important; }
    .idi-donut-m1 { stroke-dasharray: 301.59 502.65 !important; }
    .idi-donut-m2 { stroke-dasharray: 90.48 502.65 !important; }
    .idi-donut-m3 { stroke-dasharray: 80.42 502.65 !important; }
    .idi-donut-mr { stroke-dasharray: 30.16 502.65 !important; }
}

/* =====================================================================
   HOME — Temáticas de Innovación
   ===================================================================== */
.tematicas-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}
@media (max-width: 1024px) { .tematicas-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .tematicas-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .tematicas-grid { grid-template-columns: 1fr; } }

.tematica-card {
    position: relative;
    padding: var(--space-5);
    background: white;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-xl);
    overflow: hidden;
    isolation: isolate;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-height: 260px;
}
.tematica-glow {
    position: absolute;
    inset: -40% auto auto -30%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--t-color, var(--primary)) 0%, transparent 65%);
    opacity: 0;
    filter: blur(25px);
    transition: opacity 0.45s, transform 0.6s;
    z-index: 0;
    pointer-events: none;
}
.tematica-card:hover .tematica-glow { opacity: 0.3; transform: scale(1.25); }
.tematica-card:hover,
.tematica-card:focus-visible {
    transform: translateY(-4px);
    border-color: var(--t-color, var(--primary));
    box-shadow: 0 14px 36px -6px color-mix(in srgb, var(--t-color, var(--primary)) 25%, transparent);
    outline: none;
}

.tematica-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--space-3);
    position: relative;
    z-index: 1;
}
.tematica-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--t-color, var(--primary)) 0%, var(--t-color-2, var(--secondary)) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--t-color, var(--primary)) 40%, transparent);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tematica-card:hover .tematica-icon { transform: rotate(-6deg) scale(1.08); }
.tematica-icon .material-symbols-outlined { font-size: 24px; }
.tematica-modality {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--t-color, var(--primary));
    background: color-mix(in srgb, var(--t-color, var(--primary)) 14%, transparent);
    padding: 3px 8px;
    border-radius: var(--radius-full);
}
.tematica-name {
    position: relative;
    z-index: 1;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
    line-height: 1.3;
}
.tematica-desc {
    position: relative;
    z-index: 1;
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--text-secondary);
    flex: 1;
    margin-bottom: var(--space-4);
}
.tematica-foot {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--t-color, var(--primary));
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-light);
}
.tematica-foot .material-symbols-outlined {
    font-size: 18px;
    transition: transform 0.3s;
}
.tematica-card:hover .tematica-foot .material-symbols-outlined { transform: translateX(3px); }

.tematica-card.theme-indigo { --t-color: #4F46E5; --t-color-2: #6366F1; }
.tematica-card.theme-green  { --t-color: #059669; --t-color-2: #10B981; }
.tematica-card.theme-purple { --t-color: #7C3AED; --t-color-2: #A78BFA; }
.tematica-card.theme-blue   { --t-color: #0066CC; --t-color-2: #2563EB; }
.tematica-card.theme-rose   { --t-color: #E11D48; --t-color-2: #F43F5E; }
.tematica-card.theme-teal   { --t-color: #0D9488; --t-color-2: #14B8A6; }
.tematica-card.theme-amber  { --t-color: #D97706; --t-color-2: #F59E0B; }
.tematica-card.theme-cyan   { --t-color: #0891B2; --t-color-2: #22D3EE; }

.dark .tematica-card { background: var(--bg-card); }

@keyframes tematica-rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
.tematica-card { animation: tematica-rise 0.5s ease-out backwards; }
.tematica-card:nth-child(1) { animation-delay: 0.05s; }
.tematica-card:nth-child(2) { animation-delay: 0.10s; }
.tematica-card:nth-child(3) { animation-delay: 0.15s; }
.tematica-card:nth-child(4) { animation-delay: 0.20s; }
.tematica-card:nth-child(5) { animation-delay: 0.25s; }
.tematica-card:nth-child(6) { animation-delay: 0.30s; }
.tematica-card:nth-child(7) { animation-delay: 0.35s; }
.tematica-card:nth-child(8) { animation-delay: 0.40s; }

@media (prefers-reduced-motion: reduce) {
    .tematica-card {
        animation: none !important;
        transition: none !important;
    }
    .tematica-icon { transition: none !important; }
}

/* =====================================================================
   Convocatorias — acciones apiladas (varios botones por tarjeta)
   ===================================================================== */
.conv-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
    align-items: stretch;
    min-width: 170px;
}
.conv-actions .btn {
    justify-content: center;
    white-space: nowrap;
}
@media (max-width: 640px) {
    .conv-actions {
        min-width: 0;
        width: 100%;
    }
}

/* =====================================================================
   Hero — fila de CTAs (Descubre la Red + Web FP Canarias)
   ===================================================================== */
.hero-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
    margin-top: var(--space-2);
}
.hero-cta-row .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.hero-cta-row .btn .material-symbols-outlined {
    font-size: 1.15rem;
}

/* CTA secundario del hero — blanco translúcido sobre la imagen del hero
   con borde dorado. Contrasta con el .btn-accent (amarillo sólido) y
   se mantiene legible sobre el fondo oscuro del hero. */
.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF !important;
    border: 2px solid rgba(247, 181, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px -6px rgba(0, 0, 0, 0.3);
}
.btn-hero-secondary:hover,
.btn-hero-secondary:focus-visible {
    background: #F7B500;
    color: #0A1F44 !important;
    border-color: #F7B500;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -6px rgba(247, 181, 0, 0.55);
}
.btn-hero-secondary:focus-visible {
    outline: 3px solid #FFFFFF;
    outline-offset: 3px;
}

@media (max-width: 540px) {
    .hero-cta-row {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-3);
    }
    .hero-cta-row .btn {
        justify-content: center;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn-hero-secondary {
        transition: none !important;
    }
    .btn-hero-secondary:hover,
    .btn-hero-secondary:focus-visible {
        transform: none !important;
    }
}

