/* ===== CSS VARIABLES & RESET ===== */
:root {
    /* Color Palette - Radical Black & Magenta */
    --primary-color: #000000;
    --primary-light: #1a1a1a;
    --secondary-color: #111111;
 
    /* Magenta Accents */
    --accent-color: #ff00ff;
    --accent-light: #ff66ff;
    --accent-dark: #cc00cc;

    /* Status Colors */
    --success-color: #00ff99;
    --warning-color: #ffcc00;
    --danger-color: #ff3333;

    /* Neutral Colors (Dark Theme) */
    --white: #ffffff;
    --black: #000000;

    /* Backgrounds */
    --bg-body: #000000;
    --bg-card: #111111;
    --bg-secondary: #0a0a0a;
    --bg-input: #1a1a1a;

    /* Text */
    --text-main: #ffffff;
    --text-muted: #a0aec0;
    --text-dark: #000000;

    /* Borders */
    --border-color: #3f3f3f;
    --border-strong: #4a4a4a;
    --border-accent: #ff00ff;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    --space-5xl: 8rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 15px rgba(255, 0, 255, 0.3);
    /* Z-Index Layers */
    --z-dropdown: 1000;
    --z-fixed: 1100;
    --z-modal: 1200;
    --z-tooltip: 1300;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

body {
    font-family: var(--font-primary);
    color: var(--text-main);
    background-color: var(--bg-body);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography Scale */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
    margin-bottom: var(--space-md);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

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

h5 {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
}

h6 {
    font-size: clamp(1rem, 1.5vw, 1.125rem);
}

p {
    margin-bottom: var(--space-md);
    line-height: 1.7;
    color: var(--text-muted);
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: all var(--transition-fast);
}

a:hover,
a:focus {
    color: var(--accent-light);
    text-shadow: 0 0 8px rgba(255, 0, 255, 0.5);
    outline: none;
}

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

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* Utility Extensions (added to replace former inline styles) */
.bg-secondary { background: var(--bg-secondary); }
.bg-body { background: var(--bg-body); }
.text-main { color: var(--text-main); }
.mt-4xl { margin-top: var(--space-4xl); }
.max-w-800 { max-width: 800px; }
.center-block { margin-left: auto; margin-right: auto; }
.architecture-overview { max-width:800px; margin:0 auto; color:var(--text-muted); }
.section-compact { padding: var(--space-3xl) 0; }

/* KPI Tab Panels visibility (moved from inline styles) */
.kpi-tab-panels { position: relative; }
.kpi-tab-panel { display: none; }
.kpi-tab-panel.active { display: block; }

.section {
    padding: var(--space-5xl) 0;
}

.section-sm {
    padding: var(--space-4xl) 0;
}

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

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

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

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== HEADER & NAVIGATION ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    background: rgba(0, 0, 0, 0.8);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px); /* Safari/iOS support */
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.header.scrolled {
    background: rgba(0, 0, 0, 0.95);
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--accent-color);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) 0;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--space-xl);
    align-items: center;
}

.nav-link {
    color: var(--text-muted);
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width var(--transition-fast);
    box-shadow: 0 0 5px var(--accent-color);
}

.nav-link:hover::after {
    width: 100%;
}

/* Dropdown Menu Styles */
.nav-item-dropdown {
    position: relative;
}

.nav-item-dropdown .nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    cursor: pointer;
}

.nav-item-dropdown .nav-link::after {
    content: '▼';
    font-size: 0.7rem;
    position: static;
    width: auto;
    height: auto;
    background: transparent;
    margin-left: var(--space-xs);
    transition: transform var(--transition-fast);
}

.nav-item-dropdown:hover .nav-link::after {
    width: auto;
    transform: rotate(180deg);
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
    margin-top: var(--space-sm);
    z-index: var(--z-dropdown);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.nav-item-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Show dropdown via JS toggle on touch/click */
.nav-item-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: var(--space-md) var(--space-lg);
    color: var(--text-muted);
    text-decoration: none;
    transition: all var(--transition-fast);
    border-bottom: 1px solid var(--border-color);
}

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

.dropdown-item:hover {
    background: var(--bg-secondary);
    color: var(--accent-color);
    padding-left: var(--space-xl);
}

.dropdown-item-icon {
    display: inline-block;
    margin-right: var(--space-sm);
    width: 20px;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent-color);
    font-family: 'Arial', sans-serif;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: var(--accent-color);
    color: var(--black);
    border-radius: var(--radius-md);
    font-weight: 700;
    transition: all var(--transition-fast);
    border: none;
    cursor: pointer;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cta-button:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
    color: var(--black);
}

.cta-button-secondary {
    background: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.cta-button-secondary:hover {
    background: var(--accent-color);
    color: var(--black);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

/* Canvas de partículas global, ocupando todo el viewport */
#hero-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Sutil overlay para dar profundidad; las partículas van en el canvas */
    background: radial-gradient(circle at top, rgba(255, 0, 255, 0.18) 0, transparent 60%);
    opacity: 0.4;
}

.hero::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(255, 0, 255, 0.1) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

/* Logo centrado como elemento principal */
.hero-logo {
    margin-bottom: var(--space-xl);
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.5s forwards;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Fondo blanco para que el logo en video no se vea transparente sobre el gradiente */
    background-color: #ffffff;
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    /* Un solo marco: dejamos el borde y glow en el contenedor, no en el video */
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.2);
    border: 1px solid rgba(255, 0, 255, 0.2);
    overflow: hidden;
}

.hero-logo video {
    width: 400px;
    height: auto;
    /* El video sin bordes ni sombra para evitar doble marco */
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
    border: none;
}

.hero-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: var(--space-lg);
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.7s forwards;
    color: var(--white);
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-cta {
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.9s forwards;
}

.hero-cta-button {
    background: rgba(0, 0, 0, 0.5);
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    font-size: 1rem;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-lg);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    -webkit-backdrop-filter: blur(10px); /* Safari/iOS support */
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
}

.hero-cta-button:hover {
    background: var(--accent-color);
    color: var(--black);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.6);
}

.scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--accent-color);
    opacity: 0.7;
    animation: bounce 2s infinite;
    text-shadow: 0 0 5px var(--accent-color);
}

/* ===== SERVICES SECTION ===== */
.services {
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-4xl);
}

.section-subtitle {
    color: var(--accent-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.875rem;
    margin-bottom: var(--space-sm);
    text-shadow: 0 0 5px rgba(255, 0, 255, 0.3);
}

.section-title {
    margin-bottom: var(--space-lg);
    color: var(--white);
}

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

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-2xl);
    margin-top: var(--space-4xl);
}

.service-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-dark));
    opacity: 0.5;
    transition: opacity var(--transition-normal);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow);
    border-color: var(--accent-color);
}

.service-card:hover::before {
    opacity: 1;
    height: 4px;
}

.service-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 0, 255, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--accent-color);
    letter-spacing: 0;
    font-family: 'Arial', sans-serif;
    box-shadow: inset 0 0 10px rgba(255, 0, 255, 0.2);
    border: 1px solid rgba(255, 0, 255, 0.2);
}

.service-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
    color: var(--white);
}

.service-description {
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
    line-height: 1.7;
}

.service-features {
    list-style: none;
    margin-bottom: var(--space-lg);
}

.service-features li {
    padding: var(--space-xs) 0;
    color: var(--text-muted);
    position: relative;
    padding-left: var(--space-lg);
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

/* ===== STRATEGIC CTAs SECTION ===== */
.strategic-ctas {
    background: var(--bg-body);
}

.cta-scenarios {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    margin-top: var(--space-4xl);
}

.cta-scenario {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    min-height: 120px; /* fallback for Firefox, avoid 'auto' */
    border: 1px solid var(--border-color);
}

.cta-scenario:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
    border-color: var(--accent-color);
}

.cta-scenario-primary {
    background: linear-gradient(135deg, #1a001a, #000000);
    border-left: 4px solid var(--accent-color);
}

.cta-scenario-secondary {
    background: linear-gradient(135deg, #111111, #000000);
    border-left: 4px solid var(--text-muted);
}

.scenario-content {
    flex: 1;
    margin-right: var(--space-xl);
}

.scenario-content h3 {
    font-size: 1.125rem;
    margin-bottom: var(--space-md);
    color: var(--white);
    font-weight: 700;
    line-height: 1.3;
}

.scenario-content p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0;
    color: var(--text-muted);
}

.scenario-cta {
    flex-shrink: 0;
}

.cta-scenario-button {
    display: inline-block;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: all var(--transition-fast);
    min-width: 200px;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

.cta-scenario-button small {
    font-size: 0.75rem;
    opacity: 0.8;
    display: block;
    margin-top: 4px;
    font-weight: 600;
    color: inherit;
}

.cta-primary {
    background: var(--accent-color);
    color: var(--black);
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
}

.cta-primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.6);
}

.cta-secondary {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--text-muted);
}

.cta-secondary:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* ===== EXPERTISE SECTION ===== */
.expertise {
    background: var(--bg-secondary);
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-2xl);
    margin-top: var(--space-4xl);
}

.expertise-card {
    text-align: center;
    padding: var(--space-2xl);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.expertise-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-glow);
}

.expertise-icon {
    width: 100px;
    height: 100px;
    background: rgba(255, 0, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    font-size: 3rem;
    font-weight: 300;
    color: var(--accent-color);
    letter-spacing: 0;
    font-family: 'Arial', sans-serif;
    border: 1px solid rgba(255, 0, 255, 0.2);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.1);
}

.expertise-title {
    font-size: 1.25rem;
    margin-bottom: var(--space-md);
    color: var(--white);
}

.expertise-description {
    color: var(--text-muted);
    line-height: 1.7;
}

/* ===== PARTNERS SECTION ===== */
.partners {
    background: var(--bg-body);
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-2xl);
    margin-top: var(--space-4xl);
}

.partner-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border-color);
}

.partner-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
    border-color: var(--accent-color);
}

.partner-logo {
    width: 300px;
    height: 200px;
    object-fit: contain;
    margin: 0 auto var(--space-lg);
    filter: grayscale(100%) brightness(1.2);
    transition: all var(--transition-normal);
}

.partner-card:hover .partner-logo {
    filter: grayscale(0%) brightness(1);
}

.partner-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--white);
}

/* ===== CTA SECTION ===== */
.cta-section {
    background: linear-gradient(135deg, #330033, #000000);
    color: var(--white);
    text-align: center;
    border-top: 1px solid var(--accent-color);
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.cta-title {
    color: var(--white);
    margin-bottom: var(--space-lg);
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

.cta-description {
    font-size: 1.125rem;
    margin-bottom: var(--space-2xl);
    opacity: 0.9;
    color: var(--text-muted);
}

.cta-actions {
    display: flex;
    gap: var(--space-lg);
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== FOOTER ===== */
.footer {
    background: #000000;
    color: var(--text-muted);
    padding: var(--space-md) 0;
    border-top: 1px solid var(--border-color);
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
}

.footer-bottom a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-bottom a:hover {
    color: var(--accent-color);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero-logo video {
        width: 200px;
    }

    .hero {
        padding-top: 70px;
        padding-bottom: 50px;
    }

    .scroll-indicator {
        bottom: 60px;
    }

    .cta-scenario {
        flex-direction: column;
        text-align: center;
        gap: var(--space-lg);
    }

    .scenario-content {
        margin-right: 0;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .expertise-grid {
        grid-template-columns: 1fr;
    }

    .partners-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .cta-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-md);
    }

    .section {
        padding: var(--space-3xl) 0;
    }

    .hero-logo video {
        width: 180px;
    }

    .hero {
        padding-top: 60px;
        padding-bottom: 40px;
    }

    .scroll-indicator {
        bottom: 50px;
    }

    .cta-scenario {
        padding: var(--space-lg);
        min-height: 120px;
    }

    .cta-scenario-button {
        min-width: 160px;
        font-size: 0.9rem;
    }

    .service-card,
    .expertise-card,
    .partner-card {
        padding: var(--space-lg);
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {

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

/* Focus styles for keyboard navigation */
.cta-button:focus,
.nav-link:focus,
.partner-card:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-muted: #ffffff;
        --border-color: #ffffff;
    }
}

/* Metrics & KPI Table Styles */
#metricas-kpi table tbody tr:hover {
    background: var(--bg-secondary);
    cursor: default;
}

#metricas-kpi table {
    font-size: 0.95rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    #metricas-kpi table {
        font-size: 0.875rem;
    }

    #metricas-kpi table th,
    #metricas-kpi table td {
        padding: var(--space-md) var(--space-sm);
    }
}

/* Arquitectura de Integración - Responsive */
#arquitectura-metricas svg {
    overflow: visible;
}

@media (max-width: 1024px) {
    #arquitectura-metricas svg text {
        font-size: 14px !important;
    }
    /* Removed empty ruleset for #arquitectura-metricas svg rect (rx/ry must be SVG attributes, not CSS properties). */
}

@media (max-width: 768px) {
    #arquitectura-metricas svg {
        max-width: 100%;
    }

    #arquitectura-metricas svg text {
        font-size: 12px !important;
    }

    #arquitectura-metricas svg text[text-anchor="middle"] {
        font-size: 14px !important;
    }

    #arquitectura-metricas svg rect {
        stroke-width: 1.5;
    }

    #arquitectura-metricas svg line {
        stroke-width: 1.5;
    }
}

@media (max-width: 480px) {
    #arquitectura-metricas svg text {
        font-size: 10px !important;
    }

    #arquitectura-metricas svg text[text-anchor="middle"] {
        font-size: 12px !important;
    }
}

/* KPI Tabs Styles */
.kpi-tabs {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: var(--space-2xl);
    border: 1px solid var(--border-color);
}

.kpi-tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    justify-content: flex-start;
}

.kpi-tab {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    outline: none;
}

.kpi-tab:hover {
    color: var(--accent-color);
    background: var(--bg-input);
}

.kpi-tab.active,
.kpi-tab:focus {
    background: var(--accent-color);
    color: var(--black);
    border-color: var(--accent-color);
}

.kpi-tab-panel {
    animation: fadeInTab 0.4s;
    color: var(--text-muted);
}

.kpi-tab-panel h3 {
    color: var(--white);
}

.kpi-tab-panel strong {
    color: var(--accent-color);
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

@media (max-width: 768px) {
    .kpi-tab-list {
        flex-direction: column;
        gap: var(--space-xs);
    }

    .kpi-tab {
        width: 100%;
        text-align: left;
    }
}

/* SVG Layer Styles */
.layer-title {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 18px;
    font-weight: 600;
}

.layer-text {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {

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

/* Focus styles for keyboard navigation */
.cta-button:focus,
.nav-link:focus,
.partner-card:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-muted: #ffffff;
        --border-color: #ffffff;
    }
}

/* Metrics & KPI Table Styles */
#metricas-kpi table tbody tr:hover {
    background: var(--bg-secondary);
    cursor: default;
}

#metricas-kpi table {
    font-size: 0.95rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    #metricas-kpi table {
        font-size: 0.875rem;
    }

    #metricas-kpi table th,
    #metricas-kpi table td {
        padding: var(--space-md) var(--space-sm);
    }
}

/* Arquitectura de Integración - Responsive */
#arquitectura-metricas svg {
    overflow: visible;
}

@media (max-width: 1024px) {
    #arquitectura-metricas svg text {
        font-size: 14px !important;
    }
    /* Rounded corners for SVG <rect> must be applied via rx/ry attributes in the SVG markup.
       Removed unsupported CSS properties (rx/ry) to improve Safari compatibility. */
}

@media (max-width: 768px) {
    #arquitectura-metricas svg {
        max-width: 100%;
    }

    #arquitectura-metricas svg text {
        font-size: 12px !important;
    }

    #arquitectura-metricas svg text[text-anchor="middle"] {
        font-size: 14px !important;
    }

    #arquitectura-metricas svg rect {
        stroke-width: 1.5;
    }

    #arquitectura-metricas svg line {
        stroke-width: 1.5;
    }
}

@media (max-width: 480px) {
    #arquitectura-metricas svg text {
        font-size: 10px !important;
    }

    #arquitectura-metricas svg text[text-anchor="middle"] {
        font-size: 12px !important;
    }
}

/* KPI Tabs Styles */
.kpi-tabs {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: var(--space-2xl);
    border: 1px solid var(--border-color);
}

.kpi-tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    justify-content: flex-start;
}

.kpi-tab {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    outline: none;
}

.kpi-tab:hover {
    color: var(--accent-color);
    background: var(--bg-input);
}

.kpi-tab.active,
.kpi-tab:focus {
    background: var(--accent-color);
    color: var(--black);
    border-color: var(--accent-color);
}

.kpi-tab-panel {
    animation: fadeInTab 0.4s;
    color: var(--text-muted);
}

.kpi-tab-panel h3 {
    color: var(--white);
}

.kpi-tab-panel strong {
    color: var(--accent-color);
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

@media (max-width: 768px) {
    .kpi-tab-list {
        flex-direction: column;
        gap: var(--space-xs);
    }

    .kpi-tab {
        width: 100%;
        text-align: left;
    }
}

/* SVG Layer Styles */
.layer-title {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 18px;
    font-weight: 600;
}

.layer-text {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px;
}

/* Keyboard Navigation */
.keyboard-navigation *:focus {
    outline: 2px solid var(--accent-color) !important;
    outline-offset: 2px !important;
}

/* =========================================
   THEME TOGGLE & LIGHT MODE
   ========================================= */

/* Light Mode Variables */
body.light-mode {
    --primary-color: #ffffff;
    --primary-light: #f0f0f0;
    --secondary-color: #f8f9fa;

    --accent-color: #d900d9;
    --accent-light: #ff33ff;
    --accent-dark: #b300b3;

    --white: #000000;
    --black: #ffffff;

    --bg-body: #ffffff;
    --bg-card: #f8f9fa;
    --bg-secondary: #f1f2f4;
    --bg-input: #e2e8f0;

    --text-main: #1a202c;
    --text-muted: #4a5568;
    --text-dark: #ffffff;

    --border-color: #e2e8f0;
    --border-strong: #cbd5e1;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 15px rgba(217, 0, 217, 0.3);
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    /* SVG <rect> rounded corners: Always set rx/ry via SVG attributes, not CSS. See ".github/copilot-instructions.md" for project guidance. */
}

@media (max-width: 768px) {
    #arquitectura-metricas svg {
        max-width: 100%;
    }

    #arquitectura-metricas svg text {
        font-size: 12px !important;
    }

    #arquitectura-metricas svg text[text-anchor="middle"] {
        font-size: 14px !important;
    }

    #arquitectura-metricas svg rect {
        stroke-width: 1.5;
    }

    #arquitectura-metricas svg line {
        stroke-width: 1.5;
    }
}

@media (max-width: 480px) {
    #arquitectura-metricas svg text {
        font-size: 10px !important;
    }

    #arquitectura-metricas svg text[text-anchor="middle"] {
        font-size: 12px !important;
    }
}

/* KPI Tabs Styles */
.kpi-tabs {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: var(--space-2xl);
    border: 1px solid var(--border-color);
}

.kpi-tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    justify-content: flex-start;
}

.kpi-tab {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    outline: none;
}

.kpi-tab:hover {
    color: var(--accent-color);
    background: var(--bg-input);
}

.kpi-tab.active,
.kpi-tab:focus {
    background: var(--accent-color);
    color: var(--black);
    border-color: var(--accent-color);
}

.kpi-tab-panel {
    animation: fadeInTab 0.4s;
    color: var(--text-muted);
}

.kpi-tab-panel h3 {
    color: var(--white);
}

.kpi-tab-panel strong {
    color: var(--accent-color);
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

@media (max-width: 768px) {
    .kpi-tab-list {
        flex-direction: column;
        gap: var(--space-xs);
    }

    .kpi-tab {
        width: 100%;
        text-align: left;
    }
}

/* SVG Layer Styles */
.layer-title {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 18px;
    font-weight: 600;
}

.layer-text {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px;
}

/* Keyboard Navigation */
.keyboard-navigation *:focus {
    outline: 2px solid var(--accent-color) !important;
    outline-offset: 2px !important;
}

/* =========================================
   THEME TOGGLE & LIGHT MODE
   ========================================= */

/* Light Mode Variables */
body.light-mode {
    --primary-color: #ffffff;
    --primary-light: #f0f0f0;
    --secondary-color: #f8f9fa;

    --accent-color: #d900d9;
    --accent-light: #ff33ff;
    --accent-dark: #b300b3;

    --white: #000000;
    --black: #ffffff;

    --bg-body: #ffffff;
    --bg-card: #f8f9fa;
    --bg-secondary: #f1f2f4;
    --bg-input: #e2e8f0;

    --text-main: #1a202c;
    --text-muted: #4a5568;
    --text-dark: #ffffff;

    --border-color: #e2e8f0;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 15px rgba(217, 0, 217, 0.3);
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-size: 1.2rem;
    margin-left: var(--space-sm);
}

.theme-toggle:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
    background: var(--bg-secondary);
}

/* Show/Hide icons based on theme */
.theme-icon-sun {
    display: block;
}

.theme-icon-moon {
    display: none;
}

@media (max-width: 768px) {
    #arquitectura-metricas svg {
        max-width: 100%;
    }

    #arquitectura-metricas svg text {
        font-size: 12px !important;
    }

    #arquitectura-metricas svg text[text-anchor="middle"] {
        font-size: 14px !important;
    }

    #arquitectura-metricas svg rect {
        stroke-width: 1.5;
    }

    #arquitectura-metricas svg line {
        stroke-width: 1.5;
    }
}

@media (max-width: 480px) {
    #arquitectura-metricas svg text {
        font-size: 10px !important;
    }

    #arquitectura-metricas svg text[text-anchor="middle"] {
        font-size: 12px !important;
    }
}

/* KPI Tabs Styles */
.kpi-tabs {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: var(--space-2xl);
    border: 1px solid var(--border-color);
}

.kpi-tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    justify-content: flex-start;
}

.kpi-tab {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    outline: none;
}

.kpi-tab:hover {
    color: var(--accent-color);
    background: var(--bg-input);
}

.kpi-tab.active,
.kpi-tab:focus {
    background: var(--accent-color);
    color: var(--black);
    border-color: var(--accent-color);
}

.kpi-tab-panel {
    animation: fadeInTab 0.4s;
    color: var(--text-muted);
}

.kpi-tab-panel h3 {
    color: var(--white);
}

.kpi-tab-panel strong {
    color: var(--accent-color);
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

@media (max-width: 768px) {
    .kpi-tab-list {
        flex-direction: column;
        gap: var(--space-xs);
    }

    .kpi-tab {
        width: 100%;
        text-align: left;
    }
}

/* SVG Layer Styles */
.layer-title {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 18px;
    font-weight: 600;
}

.layer-text {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px;
}

/* Keyboard Navigation */
.keyboard-navigation *:focus {
    outline: 2px solid var(--accent-color) !important;
    outline-offset: 2px !important;
}

/* =========================================
   THEME TOGGLE & LIGHT MODE
   ========================================= */

/* Light Mode Variables */
body.light-mode {
    --primary-color: #ffffff;
    --primary-light: #f0f0f0;
    --secondary-color: #f8f9fa;

    --accent-color: #d900d9;
    --accent-light: #ff33ff;
    --accent-dark: #b300b3;

    --white: #000000;
    --black: #ffffff;

    --bg-body: #ffffff;
    --bg-card: #f8f9fa;
    --bg-secondary: #f1f2f4;
    --bg-input: #e2e8f0;

    --text-main: #1a202c;
    --text-muted: #4a5568;
    --text-dark: #ffffff;

    --border-color: #e2e8f0;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 15px rgba(217, 0, 217, 0.3);
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-size: 1.2rem;
    margin-left: var(--space-sm);
}

.theme-toggle:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
    background: var(--bg-secondary);
}

/* Show/Hide icons based on theme */
.theme-icon-sun {
    display: block;
}

.theme-icon-moon {
    display: none;
}

body.light-mode .theme-icon-sun {
    display: none;
}

body.light-mode .theme-icon-moon {
    display: block;
}

/* Light mode adjustments for partner logos */
body.light-mode .partner-logo {
    filter: grayscale(0%) brightness(0.8);
}

body.light-mode .partner-card:hover .partner-logo {
    filter: grayscale(0%) brightness(1);
}/* Navigation Brand Logo Styles */
.nav-brand {
    display: flex !important;
    align-items: center !important;
    gap: var(--space-sm) !important;
    transition: all var(--transition-normal) !important;
}

.nav-brand:hover {
    transform: translateY(-1px) !important;
    color: var(--white) !important;
    text-shadow: none !important;
}

.nav-brand-logo {
    width: 50px !important;
    height: 50px !important;
    object-fit: contain !important;
    border-radius: var(--radius-sm) !important;
    /* Fondo blanco para que el logo mantenga fondo sólido en todas las transiciones/temas */
    background-color: #ffffff !important;
    transition: all var(--transition-normal) !important;
}

.nav-brand:hover .nav-brand-logo {
    transform: scale(1.05) !important;
    filter: drop-shadow(0 0 8px rgba(255, 0, 255, 0.4)) !important;
}

.nav-brand-text {
    display: inline-block !important;
}

/* ===== THEME BORDER CONTRAST IMPROVEMENTS ===== */
/* Usar un color de borde con mayor contraste en ambas temáticas */
.header,
.footer,
.partner-card,
.service-card,
.expertise-card,
.cta-scenario,
.kpi-tabs,
.kpi-tab,
.dropdown-menu {
    border-color: var(--border-strong);
}
