/* ============================================================
   Nativa Consulting — Public Site CSS
   Mobile First · IBM Plex Sans · Paleta Azul Corporativo
   ============================================================ */

/* @import Google Fonts eliminado — ya lo carga el <link> en el layout head */

:root {
    --primary:        #003B8E;
    --primary-dark:   #002a6a;
    --accent:         #0078BF;
    --accent-hover:   #006aaa;
    --bg:             #F8FAFF;
    --bg-alt:         #EEF3FB;
    --white:          #FFFFFF;
    --text:           #1a2340;
    --text-muted:     #5a6a8a;
    --border:         #D8E2F3;
    --shadow-sm:      0 2px 8px rgba(0,59,142,.07);
    --shadow-md:      0 6px 24px rgba(0,59,142,.10);
    --shadow-lg:      0 16px 48px rgba(0,59,142,.14);
    --radius-sm:      6px;
    --radius-md:      12px;
    --radius-lg:      20px;
    --nav-h:          68px;
    --transition:     .2s ease;
    --font:           'IBM Plex Sans', system-ui, sans-serif;

    /* ── GLASSMORPHISM — E6 ──────────────────────────────── */
    --glass-bg:           rgba(255, 255, 255, 0.08);
    --glass-border:       rgba(255, 255, 255, 0.16);
    --glass-blur:         12px;
    --glass-shadow:       0 4px 24px rgba(0, 0, 0, 0.28);
    --glass-bg-strong:    rgba(255, 255, 255, 0.13);
    --glass-border-strong:rgba(255, 255, 255, 0.24);
}

/* ── DARK MODE — E7 ─────────────────────────────────────── */
[data-theme="dark"] {
    --bg:         #080f20;
    --bg-alt:     #0d1830;
    --white:      #111e38;
    --text:       #dde9f8;
    --text-muted: #7a95c0;
    --border:     rgba(255,255,255,.10);
    --shadow-sm:  0 2px 8px rgba(0,0,0,.5);
    --shadow-md:  0 6px 24px rgba(0,0,0,.55);
    --shadow-lg:  0 16px 48px rgba(0,0,0,.65);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); font-size: 16px; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ── TYPOGRAPHY ─────────────────────────────────────────────── */
h1, h2, h3, h4 { line-height: 1.22; font-weight: 700; color: var(--text); }
em { font-style: normal; color: var(--accent); }

/* ── UTILITIES ──────────────────────────────────────────────── */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-header { text-align: center; margin-bottom: 48px; }
.section-title { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: .6rem; }
.section-subtitle { color: var(--text-muted); font-size: 1rem; max-width: 540px; margin: 0 auto; }

/* ── GLASSMORPHISM ───────────────────────────────────────────── */
.card-glass {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
}
.card-glass-strong {
    background: var(--glass-bg-strong);
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
}
/* Fallback sin WebGL: fondo sólido azul */
.no-webgl .card-glass,
.no-webgl .card-glass-strong {
    background: rgba(0, 59, 142, 0.82);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
/* prefers-reduced-motion: ocultar canvas Vanta */
@media (prefers-reduced-motion: reduce) {
    #inicio canvas { display: none !important; }
}

/* ── NAV ─────────────────────────────────────────────────────── */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    height: var(--nav-h);
    /* background on ::before so backdrop-filter doesn't become containing block for .nav-links */
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.nav::before {
    content: ''; position: absolute; inset: 0;
    background: rgba(255,255,255,.92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    z-index: -1;
}
.nav.scrolled { border-color: var(--border); box-shadow: var(--shadow-sm); }
.nav-container {
    display: flex; align-items: center; justify-content: space-between;
    height: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px;
}
.nav-brand { display: flex; align-items: center; flex-shrink: 0; }
.nav-logo { height: 36px; }
.nav-logo-text { font-size: 1.1rem; font-weight: 700; color: var(--primary); letter-spacing: -.01em; }
.nav-logo-text em { color: var(--accent); }

.nav-links { display: none; list-style: none; margin: 0; padding: 0; }
.nav-link {
    font-size: .88rem; font-weight: 500; color: var(--text-muted);
    padding: 6px 12px; border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: var(--accent); background: rgba(0,120,191,.06); }
.nav-link-icon { display: none; }
.nav-link-talent {
    background: var(--accent); color: #fff !important;
    padding: 6px 14px; border-radius: 99px; font-size: .82rem;
}
.nav-link-talent:hover { background: var(--accent-hover); }

/* Dark mode nav */
[data-theme="dark"] .nav::before { background: rgba(8,15,32,.93); }

/* Dark mode toggle button */
.btn-theme {
    background: none; border: none; cursor: pointer;
    padding: 6px; color: var(--text-muted); border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    transition: color var(--transition), background var(--transition);
    flex-shrink: 0;
}
.btn-theme:hover { color: var(--accent); background: rgba(0,120,191,.08); }
.btn-theme svg { width: 18px; height: 18px; }
.theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark  { display: flex; }

/* Drawer header + close — ocultos en desktop */
.nav-drawer-header { display: none; }

.nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 36px; height: 36px; background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-toggle span {
    display: block; width: 100%; height: 2px; background: var(--text);
    border-radius: 99px; transition: transform .25s, opacity .25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 999; }
.nav-overlay.visible { display: block; }

/* ── HERO ────────────────────────────────────────────────────── */
.hero { position: relative; width: 100%; overflow: hidden; }
/* Canvas Vanta — detrás de TODO el contenido */
.hero > canvas { position: absolute !important; inset: 0; z-index: 0 !important; pointer-events: none; }
.hero-slider { position: relative; overflow: hidden; }
.hero-slide {
    display: none; position: relative;
    min-height: 100svh;
    background: transparent;          /* sin background → Vanta visible */
    align-items: center; justify-content: center;
}
.hero-slide.active { display: flex; }
/* Fallback sin Vanta */
.no-webgl .hero-slide { background: var(--primary-dark) center/cover no-repeat; }
.hero-default {
    display: flex;
    /* Fallback gradient — se oculta si Vanta activo */
    background: linear-gradient(135deg, var(--primary-dark) 0%, #001f5c 60%, #0056a0 100%);
}
body.vanta-active .hero-default  { background: transparent; }

/* Imagen hero CMS como elemento real (no background-image) */
.hero-bg-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover; object-position: center;
    z-index: 1; display: block;
}
.hero-overlay { z-index: 2; }
.hero-content  { z-index: 3; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(0,20,60,.75) 0%, rgba(0,59,142,.45) 100%); }
.hero-content {
    position: relative; z-index: 2;
    max-width: 760px; padding: 100px 24px 80px;
    text-align: center; margin: 0 auto;
}
.hero-title {
    font-size: clamp(2rem, 6vw, 3.6rem);
    color: #fff; font-weight: 700; line-height: 1.12; margin-bottom: 1rem;
}
.hero-subtitle { font-size: clamp(1rem, 2.5vw, 1.25rem); color: rgba(255,255,255,.85); margin-bottom: .75rem; }
.hero-desc { font-size: .95rem; color: rgba(255,255,255,.65); margin-bottom: 2rem; }
.btn-hero {
    display: inline-block;
    background: var(--accent); color: #fff;
    padding: 14px 36px; border-radius: 99px;
    font-weight: 600; font-size: 1rem;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 4px 20px rgba(0,120,191,.4);
}
.btn-hero:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,120,191,.5); }

.hero-nav { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.hero-dot {
    width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.4);
    border: none; cursor: pointer; transition: background .2s, transform .2s;
}
.hero-dot.active { background: #fff; transform: scale(1.2); }

/* ── CONTADORES ─────────────────────────────────────────────── */
.section-contadores {
    padding: 48px 0;
    /* Gradiente claro animado — corte visual entre hero oscuro y servicios oscuro */
    background: linear-gradient(135deg, #f0f7ff, #e2eeff, #f5f9ff, #e2eeff, #f0f7ff);
    background-size: 400% 400%;
    animation: contadorGradient 8s ease infinite;
}
@keyframes contadorGradient {
    0%   { background-position: 0%   50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0%   50%; }
}
@media (prefers-reduced-motion: reduce) {
    .section-contadores { animation: none; background: #f0f7ff; }
    #servicios     { animation: none; background: #062048; }
    #especialistas { animation: none; background: #051840; }
}
.contadores-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; text-align: center; }
.contador-item {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 28px 20px; border-radius: var(--radius-md);
    background: var(--white);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: border-color .3s, transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s;
    cursor: default;
}
.contador-item:hover {
    border-color: var(--accent);
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}
.contador-icon svg, .contador-icon i { width: 28px; height: 28px; color: var(--accent); }
.contador-num { font-size: 2.8rem; font-weight: 700; color: var(--primary); line-height: 1; }
.contador-sufijo { font-size: 1.8rem; font-weight: 700; color: var(--accent); display: inline; margin-left: -4px; }
.contador-label { font-size: .82rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }

/* ── SERVICIOS — Flip Card ──────────────────────────────── */
.services-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.service-card {
    perspective: 1000px;
    cursor: pointer;
    background: transparent; border: none; box-shadow: none; padding: 0;
}
.service-card-inner {
    position: relative;
    transform-style: preserve-3d;
    transition: transform .65s cubic-bezier(.4,.2,.2,1);
    min-height: 200px;
}
.service-card:not(.is-flipped):hover .service-card-inner { transform: rotateY(8deg); }
.service-card.is-flipped .service-card-inner { transform: rotateY(180deg); }
.service-card-front,
.service-card-back {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: var(--radius-md);
    padding: 28px 24px;
}
.service-card-front {
    background: var(--white); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), border-color var(--transition);
}
.service-card:not(.is-flipped):hover .service-card-front {
    box-shadow: var(--shadow-md); border-color: var(--accent);
}
.service-card-back {
    position: absolute; inset: 0;
    transform: rotateY(180deg);
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    color: #fff;
    display: flex; flex-direction: column; gap: 12px; overflow: hidden;
}
.service-card-back .service-name { color: #fff; margin-bottom: 0; }
.service-back-desc {
    font-size: .88rem; line-height: 1.7; opacity: .92; flex: 1; overflow-y: auto;
}
.service-close {
    align-self: flex-end;
    background: rgba(255,255,255,.2); border: none; color: #fff;
    width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
    font-size: .75rem; line-height: 1; flex-shrink: 0;
    transition: background .2s;
}
.service-close:hover { background: rgba(255,255,255,.38); }
.service-icon { margin-bottom: 16px; }
.service-icon i, .service-icon svg { width: 32px; height: 32px; color: var(--accent); }
.service-name { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.service-desc { color: var(--text-muted); font-size: .9rem; line-height: 1.6; }

/* Servicios — Dark glass override */
#servicios {
    background: linear-gradient(135deg, #020e30, #062048, #0d3070, #062048, #020e30);
    background-size: 400% 400%;
    animation: contadorGradient 6s ease infinite;
}
#servicios .section-title { color: #fff; }
#servicios .section-title em { color: var(--accent); }
#servicios .section-subtitle { color: rgba(255,255,255,.65); }
#servicios .service-card-front {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow: var(--glass-shadow);
}
#servicios .service-card:not(.is-flipped):hover .service-card-front {
    border-color: var(--glass-border-strong);
    box-shadow: 0 12px 36px rgba(0,0,0,.45);
}
#servicios .service-card-back { background: linear-gradient(135deg, #0a60a0 0%, var(--primary-dark) 100%); }
#servicios .service-icon i,
#servicios .service-icon svg { color: #7ec8ff; }
#servicios .service-name { color: #fff; }
#servicios .service-card-front .service-desc { color: rgba(255,255,255,.65); }

/* ── TECNOLOGÍAS ────────────────────────────────────────────── */
.tech-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.tech-item {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md);
    border-top: 3px solid var(--card-color, var(--border));
    padding: 20px 16px; text-align: center;
    transition: box-shadow var(--transition), transform var(--transition);
}
.tech-item:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.tech-item img { height: 40px; width: auto; max-width: 100%; object-fit: contain; filter: grayscale(.3); transition: filter .2s; }
.tech-item:hover img { filter: grayscale(0); }
.tech-name { font-size: .9rem; font-weight: 600; color: var(--accent); }
.tech-label { font-size: .75rem; color: var(--text-muted); font-weight: 500; }

/* ── PORTFOLIO (3D Tilt) ────────────────────────────────────── */
.portfolio-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.tilt-card {
    perspective: 1000px;
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform .08s linear, box-shadow var(--transition);
}
.portfolio-card-inner {
    background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md);
    overflow: hidden; box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
    transform-style: preserve-3d;
}
.tilt-card:hover .portfolio-card-inner { box-shadow: var(--shadow-lg); }
.portfolio-img { aspect-ratio: 16/9; overflow: hidden; }
.portfolio-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.tilt-card:hover .portfolio-img img { transform: scale(1.04); }
.portfolio-body { padding: 20px; }
.portfolio-cat {
    display: inline-block; font-size: .72rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .08em; background: rgba(0,120,191,.1); color: var(--accent);
    padding: 3px 10px; border-radius: 99px; margin-bottom: 10px;
}
.portfolio-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; line-height: 1.3; }
.portfolio-cliente { font-size: .8rem; color: var(--text-muted); margin-bottom: 8px; }
.portfolio-desc { font-size: .88rem; color: var(--text-muted); line-height: 1.55; }

/* ── ESPECIALISTAS ──────────────────────────────────────────── */
.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.team-card {
    background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: 24px 20px; text-align: center; box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}
.team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.team-photo { margin-bottom: 14px; }
.team-photo img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin: 0 auto; border: 3px solid var(--border); }
.team-avatar {
    width: 80px; height: 80px; border-radius: 50%; background: var(--accent);
    color: #fff; font-size: 1.5rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center; margin: 0 auto;
}
.team-name { font-size: .95rem; font-weight: 600; margin-bottom: 4px; }
.team-rol { font-size: .8rem; color: var(--text-muted); margin-bottom: 12px; }
.team-skill { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.skill-bar { flex: 1; height: 5px; background: var(--border); border-radius: 99px; overflow: hidden; }
.skill-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #00a8e8); border-radius: 99px; }
.team-skill span { font-size: .75rem; color: var(--text-muted); flex-shrink: 0; }
.team-linkedin { display: inline-flex; color: var(--accent); opacity: .6; transition: opacity .2s; }
.team-linkedin:hover { opacity: 1; }

/* Especialistas — Dark glass override */
#especialistas {
    background: linear-gradient(135deg, #020b28, #051840, #0a2260, #051840, #020b28);
    background-size: 400% 400%;
    animation: contadorGradient 6s ease infinite;
}
#especialistas .section-title { color: #fff; }
#especialistas .section-title em { color: var(--accent); }
#especialistas .section-subtitle { color: rgba(255,255,255,.65); }
#especialistas .team-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow: var(--glass-shadow);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
#especialistas .team-card:hover {
    transform: translateY(-4px);
    border-color: var(--glass-border-strong);
    box-shadow: 0 12px 36px rgba(0,0,0,0.45);
}
#especialistas .team-name { color: #fff; }
#especialistas .team-rol { color: rgba(255,255,255,.65); }
#especialistas .skill-bar { background: rgba(255,255,255,.15); }
#especialistas .team-skill span { color: rgba(255,255,255,.55); }
#especialistas .team-photo img { border-color: var(--glass-border-strong); }
#especialistas .team-linkedin { color: #7ec8ff; opacity: .8; }

/* ── CLIENTES ───────────────────────────────────────────────── */
.section-clientes { padding: 40px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.clientes-label { text-align: center; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); font-weight: 600; margin-bottom: 24px; }
.clientes-strip { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: center; }
.cliente-item { opacity: .55; transition: opacity .2s; }
.cliente-item:hover { opacity: 1; }
.cliente-item img { height: 36px; width: auto; max-width: 100%; object-fit: contain; filter: grayscale(1); transition: filter .2s; }
.cliente-item:hover img { filter: grayscale(0); }
.cliente-nombre { font-size: .85rem; font-weight: 600; color: var(--text-muted); }

/* ── TESTIMONIOS ────────────────────────────────────────────── */
.testimonios-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.testimonio-card {
    background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: 28px 24px; box-shadow: var(--shadow-sm); position: relative;
}
.testimonio-card::before { content: ''; }
.testimonio-text { font-size: .93rem; color: var(--text); line-height: 1.7; margin-bottom: 20px; font-style: italic; padding-top: 8px; }
.testimonio-autor { display: flex; align-items: center; gap: 12px; }
.testimonio-foto { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.testimonio-avatar {
    width: 44px; height: 44px; border-radius: 50%; background: var(--accent);
    color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.testimonio-nombre { font-weight: 600; font-size: .88rem; }
.testimonio-cargo { font-size: .78rem; color: var(--text-muted); }

/* ── BLOG HOME CARDS ────────────────────────────────────────── */
.blog-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.blog-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform var(--transition), box-shadow var(--transition); }
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.blog-img-wrap { display: block; aspect-ratio: 16/9; overflow: hidden; }
.blog-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.blog-card:hover .blog-img-wrap img { transform: scale(1.03); }
.blog-body { padding: 20px; }
.blog-cat { display: inline-block; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); background: rgba(0,120,191,.08); padding: 2px 9px; border-radius: 99px; margin-bottom: 8px; }
.blog-title { display: block; font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 8px; line-height: 1.35; transition: color .15s; }
.blog-title:hover { color: var(--accent); }
.blog-excerpt { font-size: .86rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 12px; }
.blog-meta { display: flex; align-items: center; justify-content: space-between; font-size: .78rem; color: var(--text-muted); }
.blog-link { color: var(--accent); font-weight: 500; }

/* ── BLOG FILTERS ───────────────────────────────────────────── */
.blog-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.blog-filter-tag {
    padding: 6px 14px; border-radius: 99px; font-size: .82rem; font-weight: 500;
    border: 1px solid var(--border); color: var(--text-muted); background: var(--white);
    transition: all .15s;
}
.blog-filter-tag:hover, .blog-filter-tag.active {
    background: var(--accent); color: #fff; border-color: var(--accent);
}

/* ── CONTACTO FORM ──────────────────────────────────────────── */
.contact-wrap { max-width: 680px; margin: 0 auto; }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 16px; }
.contact-form .form-group { display: flex; flex-direction: column; gap: 6px; }
.contact-form label { font-size: .84rem; font-weight: 500; color: var(--text); }
.contact-form label span { color: #E74C3C; }
.contact-form input,
.contact-form textarea {
    width: 100%; padding: 11px 14px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-family: var(--font); font-size: .9rem; color: var(--text); background: var(--white);
    transition: border-color .15s, box-shadow .15s; outline: none;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,120,191,.12); }
.btn-submit {
    background: var(--accent); color: #fff;
    border: none; padding: 13px 32px; border-radius: 99px;
    font-size: .95rem; font-weight: 600; cursor: pointer; font-family: var(--font);
    transition: background var(--transition), transform var(--transition);
    align-self: flex-start;
}
.btn-submit:hover { background: var(--accent-hover); transform: translateY(-1px); }
.form-alert { padding: 14px 18px; border-radius: var(--radius-sm); font-size: .92rem; font-weight: 500; margin-bottom: 16px; border-left: 4px solid; }
.form-alert-ok,
.form-alert-success { background: #DCFCE7; color: #14532D; border-color: #16A34A; }
.form-alert-error   { background: #FEF2F2; color: #991B1B; border-color: #DC2626; }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn-outline {
    display: inline-block; padding: 11px 28px; border-radius: 99px;
    border: 2px solid var(--accent); color: var(--accent);
    font-weight: 600; font-size: .92rem;
    transition: background var(--transition), color var(--transition);
}
.btn-outline:hover { background: var(--accent); color: #fff; }

/* ── PAGE HERO (blog/paginas) ───────────────────────────────── */
.page-hero {
    padding: calc(var(--nav-h) + 48px) 0 48px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    text-align: center;
}
.page-hero-title { color: #fff; font-size: clamp(1.8rem, 5vw, 2.8rem); margin-bottom: .5rem; }
.page-hero-sub { color: rgba(255,255,255,.7); font-size: 1rem; }

/* ── ARTICLE ─────────────────────────────────────────────────── */
.article-wrap { padding-top: var(--nav-h); }
.article-header { padding: 48px 0 0; background: var(--bg-alt); }
.article-header-inner { max-width: 100%; }
.article-cat { display: inline-block; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); background: rgba(0,120,191,.1); padding: 3px 10px; border-radius: 99px; margin-bottom: 12px; }
.article-title { font-size: clamp(1.5rem, 4vw, 2.2rem); margin-bottom: 12px; max-width: 760px; }
.article-meta { font-size: .82rem; color: var(--text-muted); margin-bottom: 24px; }
.article-hero-img { margin-top: 24px; }
.article-hero-img img { width: 100%; max-height: 420px; object-fit: cover; }
.article-layout { display: grid; grid-template-columns: 1fr; gap: 32px; padding-top: 40px; padding-bottom: 60px; }
.article-content { min-width: 0; overflow: hidden; }
.article-sidebar { align-self: start; min-width: 0; }

/* Prose styles */
.prose h2 { font-size: 1.4rem; margin: 1.8rem 0 .7rem; color: var(--primary); }
.prose h3 { font-size: 1.15rem; margin: 1.4rem 0 .5rem; }
.prose p  { margin-bottom: 1.1rem; font-size: .96rem; line-height: 1.75; }
.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.prose li { margin-bottom: .4rem; font-size: .96rem; }
.prose blockquote { border-left: 4px solid var(--accent); padding: 12px 20px; margin: 1.5rem 0; background: rgba(0,120,191,.06); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text-muted); font-style: italic; }
.prose code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: .88em; font-family: 'Courier New', monospace; }
.prose pre { background: #1e293b; color: #e2e8f0; padding: 16px 20px; border-radius: var(--radius-sm); overflow-x: auto; margin-bottom: 1.2rem; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose img { border-radius: var(--radius-sm); margin: 1.2rem 0; }
.article-content .prose > img:first-child { margin-top: 0; }
.prose a { color: var(--accent); text-decoration: underline; }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 1.2rem; font-size: .9rem; }
.prose th, .prose td { padding: 8px 12px; border: 1px solid var(--border); text-align: left; }
.prose th { background: var(--bg-alt); font-weight: 600; }

/* ── ASIDE SIDEBAR ──────────────────────────────────────────── */
.aside-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; margin-bottom: 20px; }
.aside-card h4 { font-size: .88rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 14px; }
.aside-search { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .88rem; font-family: var(--font); color: var(--text); outline: none; }
.aside-search:focus { border-color: var(--accent); }
.aside-cats li { border-bottom: 1px solid var(--border); }
.aside-cats li:last-child { border-bottom: none; }
.aside-cats a { display: block; padding: 8px 0; font-size: .88rem; color: var(--text-muted); transition: color .15s; }
.aside-cats a:hover { color: var(--accent); }
.aside-related { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .84rem; color: var(--text); transition: color .15s; }
.aside-related:last-child { border-bottom: none; }
.aside-related:hover { color: var(--accent); }
.aside-related img { width: 48px; height: 36px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }

/* ── ARTICLE COMMENTS ───────────────────────────────────────── */
.article-comments { margin-top: 48px; padding-top: 36px; border-top: 1px solid var(--border); }
.article-comments h3 { font-size: 1.2rem; margin-bottom: 1.5rem; }

/* ── COMENTARIOS ────────────────────────────────────────────── */
.comentarios-list { margin-bottom: 32px; }
.comentario { background: var(--bg-alt); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 12px; }
.comentario-autor { font-weight: 600; font-size: .88rem; }
.comentario-fecha { font-size: .75rem; color: var(--text-muted); margin-bottom: 8px; }
.comentario-texto { font-size: .88rem; line-height: 1.6; }
.comment-form { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.comment-form .form-group { display: flex; flex-direction: column; gap: 5px; }
.comment-form label { font-size: .82rem; font-weight: 500; }
.comment-form input, .comment-form textarea {
    padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-family: var(--font); font-size: .88rem; outline: none;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--accent); }

/* ── BUSCADOR ───────────────────────────────────────────────── */
.search-box { max-width: 560px; margin: 0 auto 40px; }
.search-input-wrap { display: flex; gap: 8px; }
.search-input-wrap input { flex: 1; padding: 12px 16px; border: 2px solid var(--border); border-radius: 99px; font-size: .95rem; font-family: var(--font); outline: none; }
.search-input-wrap input:focus { border-color: var(--accent); }
.search-input-wrap button { padding: 12px 24px; background: var(--accent); color: #fff; border: none; border-radius: 99px; font-size: .9rem; font-weight: 600; cursor: pointer; font-family: var(--font); }
.search-result { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px 24px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.search-result-type { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin-bottom: 6px; }
.search-result-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.search-result-title a { color: var(--text); transition: color .15s; }
.search-result-title a:hover { color: var(--accent); }
.search-result-excerpt { font-size: .86rem; color: var(--text-muted); line-height: 1.55; }

/* ── PAGINA ESTÁTICA ────────────────────────────────────────── */
.pagina-wrap { padding-top: var(--nav-h); }
.pagina-content { max-width: 800px; margin: 0 auto; padding: 48px 20px; }

/* ── PAGINATION ─────────────────────────────────────────────── */
.pagination { display: flex; gap: 4px; align-items: center; }
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: var(--radius-sm); font-size: .84rem;
    text-decoration: none; color: var(--text-muted); border: 1px solid var(--border);
    transition: all .15s;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── FOOTER ─────────────────────────────────────────────────── */
.footer { background: var(--primary-dark); color: rgba(255,255,255,.7); padding: 56px 0 24px; margin-top: auto; }
.footer-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 36px; margin-bottom: 48px; }
.footer-brand { flex: 0 0 100%; }
.footer-col   { flex: 1 1 140px; }
.footer-logo-text { font-size: 1.2rem; font-weight: 700; color: #fff; margin-bottom: 12px; }
.footer-logo-text em { color: var(--accent); }
.footer-tagline { font-size: .88rem; line-height: 1.6; margin-bottom: 20px; max-width: 260px; }
.footer-social { display: flex; gap: 12px; }
.footer-social a { color: rgba(255,255,255,.4); transition: color .15s; }
.footer-social a:hover { color: #fff; }
.footer-col h4 { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.35); margin-bottom: 14px; }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-size: .88rem; color: rgba(255,255,255,.55); transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.07); padding-top: 20px; font-size: .78rem; color: rgba(255,255,255,.25); }
.footer-extra { margin-top: 4px; }

/* ── RESPONSIVE MD ──────────────────────────────────────────── */
@media (min-width: 640px) {
    .services-grid   { grid-template-columns: repeat(2, 1fr); }
    .testimonios-grid{ grid-template-columns: repeat(2, 1fr); }
    .blog-grid       { grid-template-columns: repeat(2, 1fr); }
    .portfolio-grid  { grid-template-columns: repeat(2, 1fr); }
    .tech-grid       { grid-template-columns: repeat(4, 1fr); }
    .form-row        { grid-template-columns: 1fr 1fr; }
    .contadores-grid { grid-template-columns: repeat(4, 1fr); }
    .team-grid       { grid-template-columns: repeat(3, 1fr); }
    .footer-brand { flex: 0 0 100%; }
    .footer-col   { flex: 1 1 calc(50% - 18px); }
}

@media (min-width: 768px) {
    .nav-links { display: flex; align-items: center; gap: 2px; }
    .nav-toggle { display: none; }
    .portfolio-grid  { grid-template-columns: repeat(3, 1fr); }
    .blog-grid       { grid-template-columns: repeat(3, 1fr); }
    .article-layout  { grid-template-columns: minmax(0, 760px) 280px; }
    .article-header-inner { max-width: min(calc(100% - 312px), 760px); }
    .footer-brand { flex: 0 0 220px; }
    .footer-col   { flex: 1 1 0; min-width: 0; }
}

@media (min-width: 1024px) {
    .services-grid   { grid-template-columns: repeat(3, 1fr); }
    .testimonios-grid{ grid-template-columns: repeat(3, 1fr); }
    .tech-grid       { grid-template-columns: repeat(6, 1fr); }
    .team-grid       { grid-template-columns: repeat(4, 1fr); }
}

/* Mobile nav drawer — estilo panel admin */
@media (max-width: 767px) {
    .nav-links {
        display: flex; flex-direction: column; align-items: stretch; gap: 0;
        position: fixed; top: 0; right: -300px; bottom: 0; width: 80%; max-width: 300px;
        background: #fff; box-shadow: -4px 0 32px rgba(0,0,0,.18); z-index: 1001;
        padding: 0;
        transition: right .28s cubic-bezier(.4,0,.2,1);
        overflow-y: auto;
    }
    .nav-links.open { right: 0; }

    /* ── Encabezado del drawer */
    .nav-drawer-header {
        display: flex; align-items: center; justify-content: space-between;
        padding: 0 20px; height: 64px; min-height: 64px;
        background: var(--primary); flex-shrink: 0;
    }
    .nav-drawer-brand {
        font-size: .95rem; font-weight: 700; color: #fff; letter-spacing: -.01em;
    }
    .nav-drawer-brand em { color: rgba(255,255,255,.6); font-style: normal; }
    .nav-drawer-logo { height: 28px; filter: brightness(0) invert(1); }
    .nav-drawer-close {
        display: flex; align-items: center; justify-content: center;
        width: 34px; height: 34px; border-radius: 8px;
        border: none; background: rgba(255,255,255,.18); color: #fff; cursor: pointer;
        transition: background .2s;
        flex-shrink: 0;
    }
    .nav-drawer-close:hover { background: rgba(255,255,255,.30); }

    /* ── Ítems de navegación */
    .nav-links > li:not(.nav-drawer-header):not(.nav-talent-li) {
        border-bottom: 1px solid rgba(0,0,0,.06);
    }
    .nav-link {
        display: flex; align-items: center; gap: 12px;
        width: 100%; padding: 15px 20px;
        font-size: .9rem; font-weight: 500;
        color: var(--text) !important;
        border-radius: 0 !important;
        transition: background .15s, color .15s;
    }
    .nav-link:hover { background: var(--secondary); color: var(--primary) !important; }
    .nav-link-icon { display: flex; width: 18px; height: 18px; flex-shrink: 0; color: var(--accent); }

    /* ── Talento CTA al pie del drawer */
    .nav-talent-li { margin-top: auto; padding: 16px 20px; border-top: 1px solid var(--border); }
    .nav-link-talent {
        display: flex !important; justify-content: center; align-items: center; gap: 8px;
        background: var(--primary) !important; color: #fff !important;
        border-radius: 8px !important; padding: 13px 20px !important;
        font-size: .88rem; font-weight: 600;
    }
    .nav-link-talent:hover { background: var(--accent) !important; }
    .nav-link-talent .nav-link-icon { color: #fff; }

    /* Dark mode — drawer mobile */
    [data-theme="dark"] .nav-links { background: #0d1830; }
    [data-theme="dark"] .nav-link { color: var(--text-muted); }
    [data-theme="dark"] .nav-link:hover { background: rgba(255,255,255,.06); color: var(--text); }
}

/* ── DARK MODE OVERRIDES — E7 ───────────────────────────────── */
[data-theme="dark"] .section-alt { background: var(--bg-alt); }
[data-theme="dark"] .blog-card { background: var(--white); border-color: var(--border); }
[data-theme="dark"] .team-card { background: var(--white); border-color: var(--border); }
[data-theme="dark"] .portfolio-card-inner { background: var(--white); border-color: var(--border); }
[data-theme="dark"] .tech-item { background: var(--white); border-color: var(--border); }
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea { background: var(--white); border-color: var(--border); color: var(--text); }
[data-theme="dark"] .form-group input::placeholder,
[data-theme="dark"] .form-group textarea::placeholder { color: var(--text-muted); }
[data-theme="dark"] .section-contadores { background: #060f28; }
[data-theme="dark"] .pub-toast-ok  { background: #0f3020; color: #6ef0a0; border-color: #1a7040; }
[data-theme="dark"] .pub-toast-err { background: #301010; color: #f08080; border-color: #802020; }

/* ── MOBILE: nuclear GPU reset ───────────────────────────────── */
@media (max-width: 1023px) {
    html { scroll-behavior: auto; }

    /* Matar TODOS los triggers de compositing GPU en un solo selector */
    *, *::before, *::after {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        will-change: auto !important;
        transform-style: flat !important;
        animation: none !important;
        animation-duration: 0.001ms !important;
        filter: none !important;
        perspective: none !important;
    }

    /* Restaurar filter que es funcional (logo blanco en drawer) */
    .nav-drawer-logo { filter: brightness(0) invert(1) !important; }

    /* Nav: fondo sólido sin blur */
    .nav::before { background: rgba(255,255,255,.97) !important; }
    [data-theme="dark"] .nav::before { background: rgba(8,15,32,.97) !important; }

    /* Secciones oscuras: fondo estático */
    #servicios, #especialistas { background: #062048 !important; }
    .section-contadores { background: #f0f7ff !important; }

    /* Flip card en mobile: mostrar sólo frente, sin 3D */
    .service-card-inner { transform: none !important; }
    .service-card-back { display: none !important; }
    .service-card-front { position: static !important; transform: none !important; }

    /* Glass cards en mobile: fondo sólido — backdrop-filter ya está muerto,
       el rgba(.08) queda casi transparente sin blur */
    #servicios .service-card-front,
    #especialistas .team-card {
        background: #193155 !important;
        border-color: rgba(255,255,255,.15) !important;
    }

}

