/* Definición de variables globales para escalabilidad y mantenimiento */
:root {
    --primary-blue: #0a192f;
    --navy-deep: #03045E;
    --cyan-accent: #00B4D8;
    --accent-purple: #7c3aed;
    --natural-green: #10b981;
    --text-light: #f8fafc;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --bg-white: #ffffff;
    --bg-grid: #f4f7fb;
    --transition: all 0.3s ease-in-out;
    --container-width: 1200px;
    --shadow-card: 0 12px 40px rgba(3, 4, 94, 0.08);
}

/* Reset básico de estilos */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Evita que anclas queden ocultas bajo el header fijo (escritorio y móvil) */
    scroll-padding-top: clamp(68px, 14vw, 92px);
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

/* Contenedor global */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Solo la barra principal del sitio (no otros <header> del documento, p. ej. tarjetas de proyectos) */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

/* Clase que se aplicará mediante JS al hacer scroll */
.header-scrolled {
    background-color: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(10px);
    padding: 10px 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
    text-decoration: none;
    letter-spacing: -1px;
}

.logo span {
    color: var(--natural-green);
}

/* Navegación */
nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

nav ul li a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

nav ul li a:hover {
    color: var(--accent-purple);
}

.btn-cta-nav {
    background-color: var(--accent-purple);
    padding: 10px 20px;
    border-radius: 5px;
}

/* Sección Hero */
.hero-section {
    height: 100vh;
    background: linear-gradient(135deg, var(--primary-blue) 0%, #112240 100%);
    display: flex;
    align-items: center;
    color: var(--text-light);
    padding-top: 80px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.highlight {
    color: var(--natural-green);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Botones */
.btn-primary {
    display: inline-block;
    background-color: var(--accent-purple);
    color: white;
    padding: 15px 35px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    margin-right: 15px;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.3);
}

.btn-secondary {
    display: inline-block;
    border: 2px solid var(--natural-green);
    color: var(--natural-green);
    padding: 13px 35px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

/* Sección Destacada (Imagen Izquierda - Texto Derecha) */
.featured-section {
    padding: 100px 0;
    background-color: var(--bg-white);
}

.featured-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center; /* Centra verticalmente la imagen y el texto */
}

.featured-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1); /* Sombra suave para profundidad */
}

.featured-content h2 {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
    line-height: 1.2;
}

/* Sección Servicios */
.services-section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    padding: 40px;
    background: #f8fafc;
    border-radius: 15px;
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    border-bottom: 4px solid var(--accent-purple);
}

.service-card h3 {
    margin: 20px 0;
}

/* Footer */
.main-footer {
    background-color: #020c1b; /* Tono más oscuro para profundidad */
    color: #8892b0; /* Texto gris azulado suave para lectura */
    padding: 80px 0 0;
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr; /* Estructura asimétrica moderna */
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h4 {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 25px;
    font-weight: 600;
}

.brand-col p {
    margin-top: 20px;
    line-height: 1.6;
    max-width: 320px;
}

/* Estilos específicos para navegación del footer (Sobrescribe nav global) */
.footer-nav ul {
    display: flex;
    flex-direction: column; /* Alineación vertical */
    align-items: flex-start;
    gap: 12px;
}

.footer-nav ul li a {
    color: #8892b0;
    font-weight: 400;
    font-size: 0.95rem;
}

.footer-nav ul li a:hover {
    color: var(--natural-green);
    padding-left: 5px; /* Pequeña animación de desplazamiento */
}

.contact-col address {
    font-style: normal;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-col address a {
    color: #8892b0;
    text-decoration: none;
    transition: var(--transition);
}

.contact-col address a:hover {
    color: var(--natural-green);
}

.footer-bottom {
    background-color: #051021;
    padding: 25px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.social-text a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    margin: 0 5px;
    transition: var(--transition);
}

.social-text a:hover {
    color: var(--accent-purple);
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .featured-grid { grid-template-columns: 1fr; text-align: center; } /* Adaptable a móvil */
    
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; } /* Footer tableta */
    .bottom-flex { flex-direction: column; gap: 15px; text-align: center; }
    
    .nav-menu { display: none; } /* Implementar menú hamburguesa en JS */
    
    .hero-actions {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    .btn-primary { margin-right: 0; }
}

@media (max-width: 576px) {
    .footer-grid { grid-template-columns: 1fr; } /* Footer móvil */
}

/* ——— Fondo cuadrícula (estilo blueprint) ——— */
.grid-bg {
    background-color: var(--bg-grid);
    background-image:
        linear-gradient(rgba(0, 180, 216, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 180, 216, 0.06) 1px, transparent 1px);
    background-size: 24px 24px;
}

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

/* ——— Páginas internas: header siempre sólido ——— */
.header-inner {
    background-color: rgba(10, 25, 47, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    padding: 14px 0;
}

.header-inner.header-scrolled {
    padding: 8px 0;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.page-inner .main-inner {
    /* Espacio bajo el header fijo (evita que el contenido quede “debajo” del menú o parezca flotante) */
    padding-top: clamp(88px, 5.5rem + 2.5vw, 120px);
}

.main-inner--projects {
    display: block;
}

.nav-current {
    color: var(--cyan-accent) !important;
}

.logo--footer a {
    color: var(--text-light);
}

.logo--footer span {
    color: var(--cyan-accent);
}

/* ——— Menú móvil ——— */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1002;
}

.mobile-menu-toggle .bar {
    width: 26px;
    height: 3px;
    background: var(--text-light);
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-menu-toggle.toggle-active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-toggle.toggle-active .bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.toggle-active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    #nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: min(300px, 88vw);
        height: 100vh;
        background: rgba(10, 25, 47, 0.98);
        padding: 88px 28px 28px;
        transform: translateX(100%);
        transition: transform 0.35s ease;
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.25);
    }

    #nav-menu.nav-active {
        transform: translateX(0);
    }

    #nav-menu ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    #nav-menu ul li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    #nav-menu ul li a {
        display: block;
        padding: 16px 0;
    }

    #nav-menu .btn-cta-nav {
        margin-top: 12px;
        text-align: center;
        border-radius: 8px;
    }
}

.services-more-wrap {
    text-align: center;
    margin-top: 36px;
}

.link-services-all {
    color: var(--navy-deep);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid var(--cyan-accent);
    padding-bottom: 2px;
    transition: var(--transition);
}

.link-services-all:hover {
    color: var(--cyan-accent);
}

/* ——— Página Servicios ——— */
.page-hero {
    padding: 100px 0 64px;
    border-bottom: 1px solid rgba(0, 180, 216, 0.15);
}

.eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--cyan-accent);
    margin-bottom: 12px;
}

.page-hero-title {
    font-size: clamp(1.85rem, 4vw, 2.75rem);
    color: var(--navy-deep);
    line-height: 1.15;
    max-width: 720px;
    margin-bottom: 16px;
}

.page-hero-lead {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 560px;
}

.svc-block {
    padding: 80px 0;
}

.svc-block--alt {
    background: linear-gradient(180deg, #fff 0%, #f0f9ff 100%);
}

.svc-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(32px, 5vw, 56px);
    align-items: start;
}

.svc-split--reverse .svc-copy {
    order: 2;
}

.svc-split--reverse .svc-visual {
    order: 1;
}

.svc-copy h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--navy-deep);
    margin-bottom: 16px;
    line-height: 1.25;
}

.svc-intro {
    color: var(--text-muted);
    margin-bottom: 28px;
    font-size: 1.05rem;
}

.svc-cards-mini {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mini-card {
    background: var(--bg-white);
    padding: 20px 22px;
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(3, 4, 94, 0.06);
    text-align: left;
}

.mini-card h3 {
    font-size: 1rem;
    color: var(--navy-deep);
    margin-bottom: 8px;
}

.mini-card p {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.svc-visual--figure {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 4vw, 32px);
    min-height: 240px;
    overflow: visible;
}

.svc-split .svc-visual--figure {
    min-height: 260px;
}

.iso-illustration {
    width: 100%;
    max-width: min(420px, 100%);
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 14px 36px rgba(3, 4, 94, 0.1));
}

.iso-illustration--web {
    aspect-ratio: 400 / 280;
    max-height: 300px;
}

.iso-illustration--cloud {
    aspect-ratio: 420 / 260;
    max-height: 280px;
}

.svc-section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 48px;
}

.svc-section-head h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--navy-deep);
    margin-bottom: 12px;
}

.svc-section-head p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.flow-pipeline-wrap {
    max-width: 880px;
    margin: 0 auto 28px;
    padding: 0 12px;
}

.flow-pipeline-svg {
    width: 100%;
    height: auto;
    min-height: 36px;
    max-height: 56px;
    display: block;
}

.flow-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(16px, 3vw, 28px);
    position: relative;
}

.flow-step {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 20px 16px;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0, 180, 216, 0.2);
}

.flow-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy-deep);
}

.flow-icon--wa {
    background: linear-gradient(145deg, #e0f7ff, #b8e8f5);
    color: #128c7e;
}

.flow-icon--chip {
    background: linear-gradient(145deg, #fff, #e8f4fc);
    border: 2px solid var(--cyan-accent);
}

.flow-icon--db {
    background: linear-gradient(145deg, #f0f9ff, #dbeafe);
}

.flow-step h3 {
    font-size: 1rem;
    color: var(--navy-deep);
    margin-bottom: 10px;
}

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

.spec-title {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--cyan-accent);
    margin: 24px 0 14px;
}

.spec-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.spec-list li {
    padding: 14px 0;
    border-bottom: 1px solid rgba(3, 4, 94, 0.08);
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.55;
}

.spec-list li strong {
    color: var(--navy-deep);
    display: block;
    margin-bottom: 4px;
}

.lms-hub {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
}

.lms-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

@media (min-width: 960px) {
    .lms-hub {
        grid-template-columns: 200px 1fr;
        align-items: start;
        max-width: 1000px;
    }

    .lms-center {
        position: sticky;
        top: 100px;
    }
}

.lms-hub-svg {
    width: min(200px, 72vw);
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 12px 28px rgba(3, 4, 94, 0.1));
}

.lms-hub-tagline {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 14px;
    max-width: 240px;
    line-height: 1.45;
}

.lms-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.lms-card {
    background: var(--bg-white);
    padding: 22px;
    border-radius: 14px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(3, 4, 94, 0.06);
    position: relative;
}

.lms-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 3px;
    background: linear-gradient(180deg, var(--cyan-accent), transparent);
    border-radius: 0 2px 2px 0;
    opacity: 0.9;
}

.lms-card h3 {
    font-size: 1rem;
    color: var(--navy-deep);
    margin: 0 0 8px 8px;
}

.lms-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 0 8px;
    line-height: 1.5;
}

.svc-cta {
    padding: 72px 0 100px;
    text-align: center;
}

.svc-cta-inner h2 {
    color: var(--navy-deep);
    font-size: 1.75rem;
    margin-bottom: 12px;
}

.svc-cta-inner p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

@media (max-width: 900px) {
    .svc-split {
        grid-template-columns: 1fr;
    }

    .svc-split--reverse .svc-copy,
    .svc-split--reverse .svc-visual {
        order: unset !important;
    }

    .flow-steps {
        grid-template-columns: 1fr;
    }

    .flow-pipeline-wrap {
        display: none;
    }
}

/* ——— Contacto ——— */
.contact-main {
    min-height: 60vh;
}

.contact-hero {
    padding: 56px 0 40px;
    text-align: center;
}

.contact-title {
    font-size: clamp(1.65rem, 4vw, 2.35rem);
    color: var(--navy-deep);
    max-width: 720px;
    margin: 0 auto 16px;
    line-height: 1.2;
}

.contact-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.6;
}

.contact-body {
    padding-bottom: clamp(64px, 10vw, 96px);
}

.container--narrow {
    max-width: 720px;
}

.container--contact {
    max-width: 1120px;
}

.contact-panels {
    display: flex;
    flex-direction: column;
    gap: clamp(2.25rem, 5vw, 3.5rem);
    align-items: stretch;
}

@media (min-width: 992px) {
    .contact-panels {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 3rem 3.5rem;
        align-items: start;
    }
}

.contact-panel {
    min-width: 0;
}

.contact-panel-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navy-deep);
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
}

@media (min-width: 992px) {
    .contact-panel-title {
        margin-bottom: 1.15rem;
    }
}

.contact-card {
    background: var(--bg-white);
    border-radius: 16px;
    border: 1px solid rgba(3, 4, 94, 0.12);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.contact-card-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0;
    align-items: stretch;
}

@media (max-width: 720px) {
    .contact-card-split {
        grid-template-columns: 1fr;
    }
}

.contact-info-col {
    padding: clamp(24px, 4vw, 36px) clamp(20px, 4vw, 32px);
}

.contact-qr-col {
    padding: clamp(24px, 4vw, 32px) clamp(20px, 4vw, 36px);
    border-left: 1px solid rgba(3, 4, 94, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #fafdff 0%, #fff 100%);
    min-width: 0;
}

@media (max-width: 720px) {
    .contact-qr-col {
        border-left: none;
        border-top: 1px solid rgba(3, 4, 94, 0.1);
    }
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-list li {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.contact-list li:last-child {
    margin-bottom: 0;
}

.contact-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(0, 180, 216, 0.12);
    color: var(--navy-deep);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.contact-list a {
    color: var(--navy-deep);
    font-weight: 600;
    text-decoration: none;
}

.contact-list a:hover {
    color: var(--cyan-accent);
}

.contact-address {
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.5;
}

.address-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: normal;
}

.qr-frame {
    position: relative;
    padding: 12px;
    background: var(--bg-white);
    border-radius: 12px;
    border: 2px solid var(--cyan-accent);
    box-shadow: 0 0 24px rgba(0, 180, 216, 0.35);
}

.qr-glow {
    position: absolute;
    inset: -4px;
    border-radius: 14px;
    border: 2px solid rgba(0, 180, 216, 0.4);
    pointer-events: none;
    animation: pulse-glow 2.5s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.qr-frame img {
    display: block;
    border-radius: 6px;
}

.qr-caption {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

.contact-form-card {
    background: var(--bg-white);
    border-radius: 16px;
    border: 1px solid rgba(3, 4, 94, 0.1);
    box-shadow: var(--shadow-card);
    padding: clamp(24px, 4vw, 36px) clamp(20px, 4vw, 32px);
}

.form-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 22px;
    line-height: 1.5;
}

.contact-form {
    position: relative;
}

.contact-form .form-row {
    margin-bottom: 18px;
}

.contact-form label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--navy-deep);
    margin-bottom: 6px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(3, 4, 94, 0.15);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--cyan-accent);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.2);
}

.btn-submit {
    width: 100%;
    border: none;
    cursor: pointer;
    margin-top: 8px;
    font-size: 1rem;
}

.btn-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.form-message {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 0.95rem;
}

.form-message--ok {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.form-message--err {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.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;
}

.contact-deco {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px 40px;
    opacity: 0.7;
}

.contact-deco-svg {
    width: 100%;
    height: auto;
    max-height: 100px;
}

.contact-form-card .btn-primary {
    background: linear-gradient(135deg, var(--cyan-accent), #0096c7);
}

.contact-form-card .btn-primary:hover {
    box-shadow: 0 10px 24px rgba(0, 180, 216, 0.35);
}

.svc-cta .btn-primary {
    background: linear-gradient(135deg, var(--cyan-accent), #0096c7);
}

.svc-cta .btn-primary:hover {
    box-shadow: 0 10px 24px rgba(0, 180, 216, 0.35);
}

/* Animación al scroll (página servicios y similares) */
.mini-card,
.flow-step,
.lms-card {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-in-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* ——— Página Proyectos (timeline / árbol) ——— */
.inline-code {
    font-size: 0.88em;
    font-family: ui-monospace, monospace;
    background: rgba(3, 4, 94, 0.06);
    padding: 0.12em 0.35em;
    border-radius: 4px;
}

.breadcrumb {
    margin-bottom: 1.25rem;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.breadcrumb li:not(:last-child)::after {
    content: "/";
    margin-left: 0.65rem;
    opacity: 0.45;
}

.breadcrumb a {
    color: var(--navy-deep);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    color: var(--cyan-accent);
}

/* ——— Proyectos: diseño plano (árbol / timeline sin animaciones ni JS) ——— */
.projects-hero {
    position: relative;
    width: 100%;
    margin: 0;
    padding: clamp(20px, 3vw, 28px) 0 clamp(24px, 4vw, 36px);
    border-bottom: 1px solid #e2e8f0;
    box-sizing: border-box;
    background: #f8fafc;
}

.projects-page {
    margin: 0;
    padding-bottom: 0;
    background: #fff;
}

.projects-hero__title {
    font-size: clamp(1.65rem, 4vw, 2.35rem);
    color: var(--navy-deep);
    line-height: 1.2;
    margin-bottom: 0.85rem;
    font-weight: 700;
}

.projects-hero__lead {
    font-size: 1.02rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 800px;
}

.projects-hero__lead strong {
    color: var(--text-dark);
    font-weight: 600;
}

.projects-hero__note {
    margin-top: 1.1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    max-width: 800px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left: 3px solid var(--cyan-accent);
    border-radius: 6px;
}

/* Árbol: línea vertical centrada + tarjetas a ambos lados (escritorio) */
.portfolio-wrap {
    position: relative;
    padding: clamp(32px, 5vw, 56px) 0 48px;
}

/* Línea del eje (mitad del contenedor) */
.portfolio-wrap::before {
    content: "";
    display: none;
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    margin-left: -1.5px;
    background: var(--cyan-accent);
    z-index: 0;
    border-radius: 2px;
}

@media (min-width: 880px) {
    .portfolio-wrap::before {
        display: block;
    }
}

.portfolio-tree {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 1080px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.portfolio-item {
    margin: 0 0 clamp(2rem, 4vw, 2.75rem);
    padding: 0;
    position: relative;
}

.portfolio-item:last-child {
    margin-bottom: 0;
}

/* Nodo sobre la línea central (escritorio) */
.portfolio-item::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 1.35rem;
    width: 14px;
    height: 14px;
    margin-left: -7px;
    background: #fff;
    border: 3px solid var(--navy-deep);
    box-sizing: border-box;
    border-radius: 50%;
    z-index: 2;
    display: none;
}

@media (min-width: 880px) {
    .portfolio-item::before {
        display: block;
    }
}

@media (max-width: 879px) {
    .portfolio-item::before {
        display: none;
    }
}

.portfolio-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    z-index: 1;
}

@media (min-width: 880px) {
    .portfolio-item .portfolio-card {
        width: calc(50% - 32px);
        max-width: 500px;
    }

    .portfolio-card--media-end {
        margin-right: auto;
        margin-left: 0;
    }

    .portfolio-card--media-start {
        margin-left: auto;
        margin-right: 0;
    }
}

.portfolio-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}

.portfolio-card__step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2rem;
    padding: 0 10px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fff;
    background: var(--navy-deep);
    border-radius: 4px;
}

.portfolio-card__title {
    margin: 0;
    font-size: clamp(1.05rem, 2.2vw, 1.2rem);
    font-weight: 600;
    color: var(--navy-deep);
    line-height: 1.3;
}

.portfolio-card__grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

@media (min-width: 880px) {
    .portfolio-card__grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
        align-items: stretch;
    }

    .portfolio-card--media-end .portfolio-card__grid .portfolio-card__copy {
        order: 1;
        border-right: 1px solid #e2e8f0;
    }

    .portfolio-card--media-end .portfolio-card__grid .portfolio-card__media {
        order: 2;
        border-right: none;
    }

    .portfolio-card--media-start .portfolio-card__grid .portfolio-card__copy {
        order: 2;
    }

    .portfolio-card--media-start .portfolio-card__grid .portfolio-card__media {
        order: 1;
        border-right: 1px solid #e2e8f0;
    }
}

.portfolio-card__copy {
    padding: 18px 20px 22px;
}

.portfolio-card__lead {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-muted);
}

.portfolio-card__media {
    background: #f8fafc;
    padding: 16px;
    border-top: 1px solid #e2e8f0;
}

@media (min-width: 880px) {
    .portfolio-card__media {
        border-top: none;
    }
}

.portfolio-card__imgbox {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    line-height: 0;
}

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

.portfolio-card__caption {
    margin: 12px 0 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.portfolio-card__caption strong {
    display: block;
    color: var(--navy-deep);
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.projects-cta {
    padding: 48px 0 72px;
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
}

.projects-cta__inner {
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
}

.projects-cta__inner h2 {
    font-size: 1.5rem;
    color: var(--navy-deep);
    margin-bottom: 10px;
}

.projects-cta__inner p {
    color: var(--text-muted);
    margin-bottom: 22px;
}

.projects-cta .btn-primary {
    background: var(--cyan-accent);
}

.projects-cta .btn-primary:hover {
    background: #0096c7;
    box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

.projects-teaser {
    padding: 80px 0;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border-top: 1px solid rgba(3, 4, 94, 0.06);
}

.projects-teaser h2 {
    font-size: 2rem;
    color: var(--primary-blue);
    margin-bottom: 14px;
}

.projects-teaser p {
    color: var(--text-muted);
    max-width: 560px;
    margin-bottom: 22px;
    line-height: 1.65;
}

.projects-teaser .btn-primary {
    display: inline-block;
}