/* ============================================================
   VARIABLES Y CONFIG GLOBAL
============================================================ */
:root {
  /* Variables base (Tema claro) */
  --bg: #f5fbf5;
  --bg-soft: rgba(255, 255, 255, 0.65);
  --bg-hero: transparent;
  --text: #111827;
  --text-soft: #4b5563;
  --accent: #6366f1;
  --accent-soft: rgba(83, 86, 255, 0.308);
  --border-soft: rgba(0, 0, 0, 0.1);
  --shadow-soft: 0 10px 30px #0f172a14;
  
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 999px;
  --container-width: 1180px;
  --max-width: 1180px; 

  --transition-fast: 0.25s ease;
  --transition-med: 0.35s ease;
  --transition: 0.25s ease; 

  /* Sistemas listos overlay */
  --systems-overlay-from: #000000e0;
  --systems-overlay-to: rgba(255, 255, 255, 0);
}

/* Overrides para modo oscuro */
html[data-theme="dark"] {
  --bg: #020617;
  --bg-soft: rgba(15, 23, 42, 0.8);
  --bg-hero: transparent;
  --text: #f9fafb;
  --text-soft: #94a3b8;
  --accent: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.18);
  --border-soft: rgba(255, 255, 255, 0.15);
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.8);

  /* Sistemas listos overlay dark */
  --systems-overlay-to: #00000000;
}

/* ============================================================
   RESET Y ESTILOS GLOBALES
============================================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  scroll-behavior: smooth; 
}

/* Transición suave para el tema */
html, body, .header, section, footer, .hero, .card, 
.nav__links a, .theme-btn, button, input, select, textarea {
  transition: background-color 0.35s ease, color 0.35s ease, 
    border-color 0.35s ease, box-shadow 0.35s ease, filter 0.35s ease;
  transition-duration: 0.5s;
}

/* Fondo radial */
.background-gradient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

html[data-theme="light"] .background-gradient {
  background: radial-gradient(130% 130% at 50% 10%, #ffffff 40%, #6366f1 100%);
}

html[data-theme="dark"] .background-gradient {
  background: radial-gradient(130% 130% at 50% 90%, #000 40%, #0d1a36 100%);
}

/* Contenedor */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px; 
}

/* Hitbox más grande en botones */
button, .btn, a.btn, .theme-btn, .menu-toggle {
    min-height: 46px; 
    padding: 10px !important;
}

/* ============================================================
   NAVBAR & HEADER
============================================================ */
.header {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100; 
  backdrop-filter: blur(14px); 
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.92), 
    rgba(255, 255, 255, 0.65),
    transparent
  );
  padding: 12px 0; 
  border-bottom: 1px solid var(--border-soft);
}

html[data-theme="dark"] .header {
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.92), 
    rgba(15, 23, 42, 0.6),
    transparent
  );
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px; 
}

/* Logo */
.logo {
  display: flex; 
  align-items: center; 
  gap: 10px; 
  font-weight: 900; 
  font-size: 1.6rem; 
  letter-spacing: 0.08em;
  padding-left: 4px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  transition: opacity .3s ease, transform .3s ease;
}

.logo:hover .logo-icon {
  transform: scale(1.1);
  opacity: 0.85;
}

/* Nav Links */
.nav__links {
  list-style: none;
  display: flex;
  gap: 28px; 
}

.nav__links a {
  text-decoration: none;
  color: var(--text-soft);
  font-weight: 600;
  font-size: 1.05rem; 
  position: relative;
  padding: 10px 6px; 
  transition: color var(--transition-fast);
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  border-radius: 999px;
  transition: width var(--transition-fast);
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--text);
}

.nav__links a:hover::after,
.nav__links a.active::after {
  width: 100%;
}

/* Botón Tema */
.theme-btn {
  width: 44px; 
  height: 44px; 
  border-radius: 999px;
  border: none;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 10px;
  font-size: 1.2rem; 
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.theme-btn:hover {
  transform: translateY(-2px); 
  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.4);
}

/* Botón Hamburguesa */
.menu-toggle {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  transition: transform .25s ease, opacity .25s ease;
}

.menu-toggle span.rotate {
  transform: rotate(180deg); 
}

/* Nav links panel (Mobile) */
@media (max-width: 820px) {
    .nav__links {
        display: none;
        position: absolute;
        top: 100%;
        right: 16px;
        background: var(--bg-soft);
        padding: 20px;
        width: 260px;
        border-radius: 16px;
        border: 1px solid var(--border-soft);
        box-shadow: var(--shadow-soft);
        flex-direction: column;
        gap: 18px;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
        transition: opacity .25s ease, transform .25s ease;
        z-index: 110;
    }

    .nav__links.open {
        display: flex;
        opacity: 1;
        pointer-events: all;
        transform: translateY(0);
    }
    
    .menu-toggle { display: flex; }
    
    .nav__links a { font-size: 1.1rem; }
}

/* Fix: Mostrar menú hamburguesa SOLO en móvil */
@media (min-width: 821px) { 
    .menu-toggle { display: none !important; } 
    /* Fix para desktop que fue afectado por reglas móviles */
    .nav__links { 
        display: flex !important; 
        position: static !important; 
        opacity: 1 !important; 
        transform: none !important;
        background: transparent !important;
        box-shadow: none !important;
    }
}

/* ============================================================
   SECCIONES Y CONTENIDOS (Consolidado espaciado premium)
============================================================ */
section {
  padding-top: 100px; 
  padding-bottom: 100px;
  scroll-margin-top: 90px;
}

section h2 {
  font-size: 1.9rem;
  margin: 0 0 32px 0;
  text-align: center; 
}

.h2c { text-align: center; } 

/* Grids más sueltos */
.sistemas__grid, .portfolio__grid, .beneficios__grid, .testimonios__grid, .clientes__grid {
    gap: 34px;
}

/* ============================================================
   HERO 
============================================================ */
.hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
  gap: 40px;
  padding: 120px 0 90px; 
}

.hero__text h2 {
  font-size: clamp(2.1rem, 3vw, 2.7rem);
  font-weight: 800;
  margin: 0 0 16px 0; 
  text-align: left; 
}

.hero__text p {
  margin-top: 0;
  font-size: 1.02rem;
  color: var(--text-soft);
}

.hero__buttons {
  margin-top: 24px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast),
    box-shadow var(--transition-fast), transform var(--transition-fast),
    border-color var(--transition-fast);
}

.btn.primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 15px 35px rgba(79, 70, 229, 0.45);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(79, 70, 229, 0.55);
}

.btn.secondary {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(99, 102, 241, 0.2);
}

.btn.secondary:hover {
  background: rgba(129, 140, 248, 0.22);
}

/* ============================================================
   HERO - CONTENEDORES VISUALES (DUAL PC/MOBILE)
============================================================ */

/* Contenedor ESCRITORIO (para Spline) */
.robot-desktop {
    position: relative;
    overflow: hidden;
    min-height: 320px;
    
    /* Eliminar el fondo, sombra, y bordes del contenedor */
    background: transparent !important; 
    box-shadow: none !important;      
    border-radius: 0;                 
    
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Estilos de VISUALIZACIÓN del Spline (PC) */
.robot-desktop spline-viewer {
    width: 130%; 
    height: 130%; 
    /* Posicionamiento y escala deseada para PC */
    transform: translate(30%, 12%) scale(1.7); 
    transform-origin: center;
    pointer-events: none; /* Bloqueo de mouse */
}

/* Contenedor MÓVIL/VIDEO (para Video/Canvas) */
.robot-mobile {
    position: relative;
    overflow: hidden;
    min-height: 320px;
    
    /* Eliminar el fondo, sombra, y bordes del contenedor */
    background: transparent !important; 
    box-shadow: none !important;      
    border-radius: 0;                 
    
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Estilos específicos para el CANVAS (Chroma Key) en el contenedor móvil */
.robot-mobile canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.22); 
    pointer-events: none; /* Bloqueo de mouse */
}


/* ============================================================
   SECCIÓN SERVICIOS (CARRUSEL)
============================================================ */
.servicios {
  padding: 80px 0; 
}

.servicios h2 {
  margin-bottom: 32px;
}

/* Carrusel contenedor */
.carousel {
  position: relative;
  margin-top: 22px;
  overflow: hidden;
}

/* Track visible */
.carousel__track-container {
  overflow: hidden;
}

/* Lista de slides */
.carousel__track {
  display: flex;
  align-items: stretch;
  gap: 18px;
  padding: 10px 2px 20px;
  will-change: transform;
}

/* Slide individual */
.carousel__slide {
  min-width: 210px;
  max-width: 260px;
  flex: 0 0 auto;
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-soft);
  padding: 18px 18px 16px;
  text-align: center;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.carousel__slide:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.22);
}

/* Iconos de servicio */
.material-symbols-sharp.service-icon {
    font-size: 64px;
    color: var(--accent);
    margin-bottom: 12px;
    display: inline-flex;
    transition: transform .25s ease, color .25s ease;
}

.carousel__slide:hover .service-icon {
    transform: scale(1.12);
    color: #7a7dff;
}

/* Botones de navegación */
.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  width: 44px; 
  height: 44px; 
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.12);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.carousel__btn:hover {
  background: rgba(15, 23, 42, 0.2);
  transform: translateY(-50%) scale(1.03);
}

.carousel__btn.prev {
  left: 0;
}

.carousel__btn.next {
  right: 0;
}

/* Service Info Box (Tooltip) */
.service-info-box {
    position: absolute;
    background: var(--bg-soft);
    border: 1px solid var(--border-soft);
    padding: 14px 18px;
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
    font-size: 0.92rem;
    max-width: 260px;
    z-index: 100;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
}

.service-info-box.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ============================================================
   SECCIÓN SISTEMAS LISTOS
============================================================ */
.systems-ready {
  padding: 80px 0;
}

.systems-shell {
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 0.9fr);
  gap: 26px;
}

/* Bloque Principal */
.systems-main-visual {
    width: 100%;
    height: 420px; 
    max-height: 420px;
    position: relative;
    border-radius: 26px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 24px 55px rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
}

.systems-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transform: scale(1.02);
    transition: opacity 0.45s ease, transform 0.45s ease;
}
.systems-main-img.fade-out { opacity: 0; transform: scale(1.05) translateY(4px); }

/* Degradado */
.systems-main-visual::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 55%;
  background: linear-gradient(to top, var(--systems-overlay-from), var(--systems-overlay-to));
  z-index: 1;
  pointer-events: none;
}

/* Texto Overlay */
.systems-main-overlay-text {
  position: absolute;
  left: 32px;
  bottom: 32px;
  z-index: 2;
  max-width: 60%;
  color: #ffffff;
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.systems-main-overlay-text.fade-out { opacity: 0; transform: translateY(8px); }

.systems-main-overlay-text h3 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.systems-main-overlay-text p {
  font-size: 0.98rem;
  margin-bottom: 16px;
  opacity: 0.9;
}

/* Dots */
.systems-main-dots {
  position: absolute;
  right: 26px;
  bottom: 26px;
  z-index: 2;
  display: flex;
  gap: 8px;
  color: #ffffff;
}

.system-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  background: transparent;
  cursor: pointer;
  padding: 0;
  outline: none;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
  opacity: 0.7;
  color: #ffffff;
}

.system-dot.active {
  background: #ffffff;
  border-color: #ffffff;
  transform: scale(1.2);
  opacity: 1;
}

html[data-theme="light"] .system-dot { border-color: rgba(226, 226, 226, 0.45); }
html[data-theme="light"] .system-dot.active { background: #ffffff; border-color: #e6e6e6; }

/* Miniaturas */
.systems-thumbs {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 16px;
}

.system-thumb {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  height: 100px;
  cursor: pointer;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.45);
  transition: transform 0.35s ease, box-shadow 0.35s ease, opacity 0.35s ease, border-color 0.35s ease;
  border: 2px solid transparent;
}

.system-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.system-thumb-label {
  position: absolute;
  left: 10px;
  bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.85);
  color: #e5e7eb;
}

html[data-theme="light"] .system-thumb-label {
  background: rgba(218, 218, 218, 0.61);
  color: #020617;
}

.system-thumb.active {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.65);
  border-color: rgba(99, 102, 241, 0.9);
}

@media (hover: hover) {
  .system-thumb:hover:not(.active) {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55);
  }
}

/* ============================================================
   BENEFICIOS, TESTIMONIOS, PORTFOLIO
============================================================ */
.beneficios { padding: 80px 0; }

.beneficios__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 34px;
    margin: 10px;
    margin-top: 24px;
    margin-bottom: 24px;
}

.beneficio__card {
    background: var(--bg-soft);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    padding: 26px 24px;
    box-shadow: var(--shadow-soft);
    transition: transform .25s ease, box-shadow .25s ease;
}

.beneficio__card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.beneficio__icon {
    font-size: 50px;
    color: var(--accent);
    margin-bottom: 14px;
    display: inline-block;
}

.beneficio__card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.beneficio__card p {
    color: var(--text-soft);
    font-size: 0.98rem;
}

.testimonios { padding: 80px 0; }
.testimonios__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 34px;
}

.testimonio {
  padding: 20px;
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}

.portfolio { padding: 80px 0; }
.portfolio__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 34px;
}

.portfolio__item {
  height: 180px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(56, 189, 248, 0.1));
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}

/* ============================================================
   CONTACTO Y MODAL
============================================================ */
.contacto {
  padding: 80px 0 60px;
}

.contacto__form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  max-width: 540px;
  margin: 0 auto;
}

.contacto__form input,
.contacto__form select,
.contacto__form textarea {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  padding: 11px 13px;
  font: inherit;
  background: var(--bg-soft);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.contacto__form input:focus,
.contacto__form select:focus,
.contacto__form textarea:focus {
  border-color: rgba(99, 102, 241, 0.8);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.25);
}

.contacto__form textarea {
  resize: vertical;
  min-height: 150px;
}

/* MODAL DE ÉXITO */
.modal-success {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease;
    z-index: 2000;
}

.modal-success.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-success .modal-content {
    background: var(--bg-soft);
    padding: 32px 26px;
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 20px 45px rgba(0,0,0,0.35);
    animation: modalPop .35s ease;
}

@keyframes modalPop {
    from { transform: scale(.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-success h3 {
    font-size: 1.6rem;
    margin-bottom: 10px;
    font-weight: 800;
}

.modal-success p {
    color: var(--text-soft);
    margin-bottom: 18px;
}

/* ============================================================
   FOOTER 
============================================================ */
.footer {
  margin-top: 90px; 
  background: var(--bg-soft);
  padding: 70px 0 35px; 
  border-top: 1px solid var(--border-soft);
  backdrop-filter: blur(14px);
}

html[data-theme="dark"] .footer {
  background: rgba(15, 23, 42, 0.7);
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}


.footer__links ul,
.footer__contact ul { list-style: none; }

.footer__links a,
.footer__contact a {
    display: inline-block; 
    text-decoration: none;
    color: var(--text-soft);
    transition: var(--transition);
    padding: 8px 4px; 
    font-size: 1.05rem; 
}

.footer__links a:hover { color: var(--accent); }

/* Redes sociales */
.footer__socials {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.footer__socials a {
  width: 48px; 
  height: 48px; 
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--accent);
  border-radius: 999px;
  font-size: 1.3rem; 
  transition: var(--transition);
  padding: 8px;
}

.footer__socials a:hover {

  color: white;
  transform: translateY(-3px);
}

/* Bottom */
.footer__bottom {
  text-align: center;
  border-top: 1px solid var(--border-soft);
  padding-top: 18px;
  color: var(--text-soft);
  font-size: 0.9rem;
}


/* ============================================================
   RESPONSIVE Y MÓVIL 
============================================================ */

/* Mobile general */
@media (max-width: 760px) {
    /* Header Spacing */
    .header .nav {
        padding: 12px 18px;
        gap: 10px;
    }
    .logo { margin-left: 4px; }
    
    /* Hero */
    .hero {
        display: flex;
        flex-direction: column;
        text-align: left;
        gap: 10px;
        padding: 10px;
        padding-top: 50px !important; 
        padding-bottom: 30px !important;

    }
    .hero__text { order: 1; }
    .hero__text h2 { 
        font-size: 1.9rem !important; 
        line-height: 1.25; 
        margin-bottom: 14px;
        text-align: left;
    }
    .hero__text p { font-size: 0.95rem; margin-bottom: 18px; }
    .hero__buttons .btn { width: 100%; padding: 12px; font-size: 1rem; }
    
    /* Robot Visual (Canvas/Video) */
   .robot-mobile { 
    order: 2;
    /* 🔥 Reducimos el tamaño aquí: de 75% a 60% */
    width: 60%; 
    /* 🔥 Reducimos el límite máximo */
    max-width: 230px; 
    margin: 0 auto;
    margin-top: 10px;
    min-height: 180px !important;
    transform: translateX(20px); /* Mantener el desplazamiento a la derecha */
}
.robot-mobile canvas {
    /* Mantenemos el escalado interno para que el bot no tenga bordes verdes */
    transform: translate(-49%, -49%) scale(.55); 
}
.testimonio {
  margin: 10px;
}
    /* Títulos */
    section h2 { font-size: 1.6rem; }
    
    /* Sistemas */
    .systems-thumbs {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 6px;
    }

    .system-thumb {
        flex: 0 0 48%;
        min-width: 160px;
        height: 90px;
    }
    .contacto__form { padding: 0 10px; }
    .footer__socials { justify-content: center; }
}

/* Tablet / Menor a 900px */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        padding-top: 60px;
        text-align: left;
    }
    /* En tablet, usamos el contenedor móvil */
    .robot-mobile { order: -1; margin-bottom: 20px; min-height: 200px; }

    .systems-shell { grid-template-columns: 1fr; }

    .systems-main-overlay-text {
        max-width: 80%;
        left: 20px;
        bottom: 22px;
    }

    .systems-main-overlay-text h3 { font-size: 1.7rem; }
}

/* ============================================================
   ANIMACIONES Y UTILIDADES
============================================================ */
/* ANIMACIONES SCROLL (para JS) */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--transition-med), transform var(--transition-med);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Símbolos Material */
.material-symbols-sharp {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  font-size: 22px;
}
.material-symbols-sharp.outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Utilidad: Ocultar video sin detener reproducción */
.hidden-video {
    position: absolute; 
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}

/* ============================================================
   LÓGICA RESPONSIVE FINAL (Display Control)
============================================================ */
/* Reglas base (Mobile First): Spline Oculto, Video Visible */
.robot-desktop {
    display: none;
}
.robot-mobile {
    display: flex; /* Visible por defecto */
}

/* Escritorio (PC) - Punto de quiebre para Spline */
@media (min-width: 901px) {
    /* 1. MOSTRAR SPLINE (robot-desktop) */
    .robot-desktop { 
        display: flex !important; /* Mostrar Spline */
    } 

    /* 2. OCULTAR VIDEO/CANVAS (robot-mobile) */
    .robot-mobile { 
        display: none !important; /* Ocultar Video/Canvas */
    } 
}
/* 🟢 PC / ESCRITORIO (>= 901px) */
@media (min-width: 901px) {
    /* 1. LAYOUT HERO: Vuelve a 2 columnas (El bot va a la columna 2) */
    .hero {
        grid-template-columns: 1.3fr 1fr; /* Estructura original de dos columnas */
        grid-template-rows: auto; /* Vuelve a 1 fila */
        gap: 40px; 
        padding-bottom: 90px !important; /* Mantenemos el padding original */
    }

    /* Mueve el TEXTO a la columna 1 */
    .hero__text {
        grid-column: 1 / 2; /* Primera columna */
        grid-row: 1 / 2;    /* Primera fila */
        margin-bottom: 0; /* Elimina el margen inferior innecesario */
    }
    
    /* Mueve el VISUAL (Bot de Spline) a la columna 2 */
    .robot-desktop { 
        grid-column: 2 / 3;  /* 🔥 Segunda columna */
        grid-row: 1 / 2;     /* Primera fila (Arriba) */
        min-height: 320px; /* Tamaño original */
        margin-top: 0; 
        display: flex !important; /* Mostrar Spline */
    } 

    /* Ocultar Video/Canvas en PC */
    .robot-mobile { 
        display: none !important; 
    }
}
/* Estilos de VISUALIZACIÓN del Spline (PC) */
.robot-desktop spline-viewer {
    width: 130%; 
    height: 130%; 
    /* 🔥 RESTAURAR ESCALA Y POSICIÓN PARA QUE SE VEA BIEN EN COLUMNA */
    transform: translate(17%, 3%) scale(1.8); /* Usando scale(1.0) o menos de 1.2 */
    transform-origin: center;
    pointer-events: none; 
}
html{
  scroll-behavior: smooth;
}
/* style.css (Añade o reemplaza la sección de control de color) */

/* ------------------------------------------- */
/* --- Control de Color del SVG (GitHub ONLY) --- */
/* ------------------------------------------- */

/* Tema Claro (Por defecto): Negro */
.footer__socials a.social-github svg path {
    fill: var(--text); 
    transition: fill 0.35s ease;
}

/* Tema Oscuro: Blanco */
html[data-theme="dark"] .footer__socials a.social-github svg path {
    fill: var(--text);
}