* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: #0e1116;
  color: #e6e9ef;
}

/* --- COVER --- */
.cover {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.cover-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, #020617 0%, #0b1020 45%, #020617 100%);
}

.cover-content {
  position: relative;
  z-index: 2;
  display: flex;
  height: calc(100vh - 70px);
  padding: 4rem;
}

.cover-image {
  flex: 0 0 60%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.cover-image img {
  width: 320px;
  height: 320px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(120,180,255,0.4);
  box-shadow: 0 0 40px rgba(80,140,255,0.25);
}

.cover-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 2rem;
}

.cover-text h1 {
  font-size: 2.2rem;
  font-weight: 600;
}

.cover-text h2 {
  font-size: 1.1rem;
  font-weight: 400;
  color: #7fb3ff;
  margin: 0.5rem 0 1.2rem;
}

.cover-text p {
  max-width: 420px;
  line-height: 1.6;
  color: #cbd3e1;
}

.cover-nav {
  position: sticky;
  bottom: 0;
  z-index: 3;
  height: 70px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  background: rgba(14,17,22,0.6);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,0.05);
}

.cover-nav a {
  color: #e6e9ef;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.cover-nav a:hover {
  color: #7fb3ff;
}

.cover::after {
  content: "";
  position: absolute;
  bottom: -40px;
  left: 0;
  width: 100%;
  height: 200px;
  background: url("img/cubes.svg") no-repeat center bottom;
  background-size: cover;
  z-index: 2;
}

.cover-stars {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: radial-gradient(5px 5px at 12% 18%, rgba(255,255,255,.6), transparent), radial-gradient(6px 6px at 25% 40%, rgba(255,255,255,.8), transparent), radial-gradient(1px 1px at 38% 22%, rgba(255,255,255,.5), transparent), radial-gradient(4.5px 4.5px at 50% 60%, rgba(255,255,255,.7), transparent), radial-gradient(8px 8px at 65% 35%, rgba(255,255,255,.9), transparent), radial-gradient(3px 3px at 78% 70%, rgba(255,255,255,.4), transparent), radial-gradient(9.5px 9.5px at 88% 25%, rgba(255,255,255,.6), transparent);
  opacity: 0.45;
  mask-image: linear-gradient(to bottom, black 0%, black 35%, transparent 80%);
}

.cover-galaxy {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: radial-gradient(600px 400px at 20% 10%, rgba(80,140,255,0.18), transparent 70%), radial-gradient(500px 300px at 80% 25%, rgba(140,90,255,0.15), transparent 70%), radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,.35), transparent), radial-gradient(2px 2px at 65% 15%, rgba(200,220,255,.6), transparent);
  mask-image: linear-gradient(to bottom, black 0%, black 40%, transparent 85%);
}

.cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.35) 100%);
}

.cover-image {
  position: relative;
}

.electric-halo {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  background: radial-gradient(circle, rgba(127,179,255,0.35) 0%, rgba(127,179,255,0.18) 35%, transparent 70%);
  filter: blur(10px);
  animation: haloPulse 6s ease-in-out infinite;
}

.electric-halo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(127,179,255,0.45);
  animation: haloSpin 14s linear infinite;
}

.cover-image picture, .cover-image img {
  position: relative;
  z-index: 2;
}

.cover-text h1 {
  letter-spacing: 0.5px;
}

.cover-text h2 {
  letter-spacing: 0.3px;
}

@keyframes haloPulse {
  0%, 100% { left: 30%; top: 50%; opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50% { left: 30%; top: 50%; opacity: 0.9; transform: translate(-50%, -50%) scale(1.06); }
}

@keyframes haloSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* FOCUS */
.focus {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.focus > h2 {
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 600;
  color: #e5e7eb;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.focus > h2::after {
  content: "";
  display: block;
  width: 72px;
  height: 2px;
  margin-top: 0.75rem;
  background: linear-gradient(90deg, #38bdf8, rgba(56,189,248,0));
}

.focus-panel {
  border-top: 1px solid rgba(148,163,184,0.15);
}

.focus-panel:last-child {
  border-bottom: 1px solid rgba(148,163,184,0.15);
}

.focus-panel summary {
  list-style: none;
  cursor: pointer;
  padding: 1.8rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.focus-panel summary::-webkit-details-marker {
  display: none;
}

.focus-panel h3 {
  font-size: 1.5rem;
  font-weight: 500;
  color: #e5e7eb;
}

.chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
}

.focus-panel[open] .chevron {
  transform: rotate(-135deg);
}

.panel-content {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}

.panel-content.reverse {
  grid-template-columns: 0.8fr 1.2fr;
}

.panel-text p {
  font-size: 1rem;
  line-height: 1.7;
  color: #94a3b8;
  max-width: 520px;
}

.panel-image {
  height: 220px;
  overflow: hidden;
}

.panel-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 900px) {
  .panel-content, .panel-content.reverse {
    grid-template-columns: 1fr;
  }
  .panel-image {
    height: 180px;
  }
}

/* SERVICES */
.services-image {
  flex: 0 0 80%;
  position: relative;
  background-image: url("../img/service-city.webp");
  background-size: cover;
  background-position: center;
  transition: transform 0.45s ease;
  min-height: 300px;
  height: 80%;
  max-width: 100vw;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
}

.services-overlay-content {
  padding-bottom: 60px;
  margin: auto;
  text-align: center;
}

.services-overlay-content h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  color: #e5e7eb;
  text-shadow: 0 2px 10px rgb(0, 0, 0);
}

.services-block {
  box-sizing: border-box;
  overflow: hidden;
  max-width: 100%;
  margin-top: 100px;
  margin-bottom: 100px;
}

.services-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(2,6,23,0.85), rgba(2,6,23,0.25), rgba(2,6,23,0.85));
  z-index: 1;
  transition: opacity 0.45s ease;
}

.services-block:hover .services-image {
  transform: scale(1.02);
}

.services-block:hover .services-image::after {
  opacity: 0.35;
}

.open-services {
  position: relative;
  z-index: 5;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -240%);
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148,163,184,0.35);
  color: #e5e7eb;
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 15px;
  transition: transform 0.3s ease, background 0.3s ease;
}

.open-services:hover {
  transform: translate(-50%, -250%) scale(1.06);
  background: rgba(30, 41, 59, 0.95);
}

.services-content {
  flex: 0 0 20%;
  background: #020617;
}

/* MODAL */
.services-modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.98);
  display: none;
  z-index: 1000;
  
}

.services-modal.active {
  display: block;
}

.close-modal {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2.5rem;
  background: rgba(15, 23, 42, 0.8);
  color: #e5e7eb;
  border: 1px solid rgba(148, 163, 184, 0.3);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.close-modal:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  transform: rotate(90deg);
}

/* CARRUSEL - BASE (Desktop) */
.carousel {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 5rem 2rem 2rem;
  position: relative;
  flex-direction: row;
  overflow-y: hidden;
}

.carousel-viewport {
  width: 70%;
  max-width: 900px;
  overflow: hidden;
  order: 0;
}

.carousel-track {
  display: flex !important; /* Forzamos que sea una fila */
  flex-direction: row;
  transition: transform 0.4s ease;
  width: 100%; 
}

.service-slide {
  flex: 0 0 100%;
  padding: 3rem;
  background: linear-gradient(145deg, #020617, #0f172a);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 16px;
  max-height: 80vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.3) transparent;
  min-width: 100%; /* Refuerzo para asegurar el ancho */
  box-sizing: border-box;
}

.service-slide::-webkit-scrollbar {
  width: 6px;
}

.service-slide::-webkit-scrollbar-track {
  background: transparent;
}

.service-slide::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.3);
  border-radius: 3px;
}

.service-slide h3 {
  color: #38bdf8;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
 
  top: 0;
  background: linear-gradient(145deg, #020617, #0f172a);
  padding: 0.5rem 0;
  z-index: 2;
}

.service-slide p {
  color: #cbd5f5;
  line-height: 1.7;
  margin-bottom: 1.2rem;
  font-size: 1rem;
}

/* Flechas base */
.arrow {
  font-size: 3rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #94a3b8;
  cursor: pointer;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
  order: 0;
}

.arrow:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}



/* MARKETING */
.marketing {
  max-width: 1100px;
  margin: 0 auto 8rem;
  padding: 4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.marketing-header h2 {
  font-size: 2.4rem;
  font-weight: 500;
  color: #e5e7eb;
  margin-bottom: 0.6rem;
}

.marketing-header p {
  max-width: 520px;
  color: #94a3b8;
  line-height: 1.6;
}

.marketing-hero {
  position: relative;
  min-height: 320px;
  background-image: url("../img/marketing.webp");
  background-size: cover;
  background-position: center;
  border-radius: 14px;
  overflow: hidden;
}

.marketing-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(2, 6, 23, 0.733), rgba(2, 6, 23, 0.85));
}

.marketing-hero-overlay {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  padding-top: 50px;
  padding-bottom: 50px;
  align-items: center;
}

.marketing-hero-overlay p {
  max-width: 520px;
  font-size: 25px;
  color: #cbd5f5;
  line-height: 1.6;
  text-align: center;
  text-shadow: 0px 0px 20px #000000;
  margin: auto;
}

.marketing-pillars {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.pillar {
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  padding-top: 2rem;
}

.pillar h3 {
  font-size: 1.2rem;
  font-weight: 500;
  color: #38bdf8;
  margin-bottom: 0.5rem;
}

.pillar p {
  max-width: 520px;
  color: #cbd5f5;
  line-height: 1.6;
}

/* PROJECTS */
.projects {
  padding: 6rem 1.5rem;
  max-width: 100%;
  margin: 0 auto;
  overflow-x: hidden;
}

.projects-header {
  margin-bottom: 4rem;
}

.projects-header h2 {
  font-size: 2.2rem;
  color: #e5e7eb;
}

.projects-header p {
  color: #94a3b8;
  margin-top: 0.5rem;
}

.projects-public h3 {
  margin-bottom: 1.5rem;
  color: #38bdf8;
}

.projects-public {
  padding-left: 50px;
  padding-right: 50px;
}

.projects-row {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scrollbar-width: none;
}

.projects-row::-webkit-scrollbar {
  display: none;
}

.project-thumb {
  position: relative;
  min-width: 320px;
  height: 200px;
  overflow: hidden;
  border-radius: 14px;
  flex-shrink: 0;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(0.7);
  transition: all 0.4s ease;
}

.project-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  color: #e5e7eb;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.projects-wrapper {
  position: relative;
}

/* Flechas de proyectos (diferentes a las del modal) */
.projects-wrapper .arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  font-size: 2rem;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  z-index: 10;
  border-radius: 8px;
}

.projects-wrapper .arrow.left {
  left: -10px;
}

.projects-wrapper .arrow.right {
  right: -10px;
}

.project-thumb:hover img {
  filter: grayscale(0) brightness(1);
  transform: scale(1.05);
}

.project-thumb:hover .project-overlay {
  opacity: 0;
}

.projects-systems {
  margin-top: 6rem;
  padding-left: 50px;
  padding-right: 50px;
}

.projects-systems h3 {
  margin-bottom: 2.5rem;
  color: #38bdf8;
}

.system-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 4rem;
  align-items: center;
}

.system-item.reverse {
  grid-template-columns: 1fr 1fr;
}

.system-text h4 {
  font-size: 1.3rem;
  color: #e5e7eb;
}

.system-text p {
  color: #cbd5f5;
  margin: 0.8rem 0;
  line-height: 1.6;
}

.system-text span {
  color: #94a3b8;
  font-size: 0.9rem;
}

.system-visual img {
  width: 100%;
  border-radius: 12px;
  opacity: 0.9;
}

.projects-confidential {
  margin-top: 6rem;
  margin-bottom: 100px;
  padding-left: 50px;
  padding-right: 50px;
}

.confidential-notice {
  margin-bottom: 2rem;
  padding: 1.5rem;
  border-left: 3px solid #38bdf8;
  color: #cbd5f5;
  background: rgba(15,23,42,0.6);
}

.confidential-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-template-rows: repeat(auto-fit, minmax(300px, 5fr));
  gap: 1.5rem;
}

.confidential-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.confidential-item img {
  width: 100%;
  min-height: 200px;
  max-height: 400px;
  object-fit: cover;
}

.confidential-item span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: black;
  font-size: 20px;
  font-weight: 600;
}

.contact-cta {
  padding: 4rem 1.5rem;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.6) 100%);
  text-align: center;
  width: 100%;
  margin: 0%;
}

.contact-inner {
  max-width: 680px;
  margin: 0 auto;
}

.contact-cta h3 {
  font-size: 1.8rem;
  color: #e5e7eb;
  margin-bottom: 1rem;
}

.contact-cta p {
  color: #9ca3af;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.whatsapp-btn {
  display: inline-block;
  padding: 0.9rem 2.2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #022c22;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.25);
  transition: all 0.3s ease;
}

.whatsapp-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(34, 197, 94, 0.4);
}

.site-footer {
  padding: 2rem 1rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.85rem;
  margin: 0%;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #e6e9ef;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ----------- */


.strategy {
  padding: 80px 10%;
  background: #0f0f14;
}

.strategy-header {
  text-align: center;
  margin-bottom: 60px;
}

.strategy-steps {
  display: grid;
  gap: 40px;
}

.strategy-step h3 {
  margin-bottom: 10px;
  font-weight: 600;
}

.strategy-step p {
  line-height: 1.6;
  opacity: 0.85;
}

/* ==========================================
   SELECTOR DE IDIOMAS PROFESIONAL
   ========================================== */

.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lang-switch select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  color: #e5e7eb;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 2.2rem 0.5rem 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  min-width: 60px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lang-switch select:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.15);
}

.lang-switch select:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

/* Flecha personalizada */
.lang-switch::after {
  content: "⌄";
  position: absolute;
  right: 0.7rem;
  top: 45%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 1.1rem;
  pointer-events: none;
  transition: color 0.3s ease;
}

.lang-switch:hover::after {
  color: #38bdf8;
}

/* Opciones del dropdown (estilizado donde sea soportado) */
.lang-switch select option {
  background: #0f172a;
  color: #e5e7eb;
  padding: 0.5rem;
}


/* -------------- */


@media (max-width: 900px) {
  .focus-card, .focus-card.reverse {
    grid-template-columns: 1fr;
  }
  .focus-card.reverse .focus-text, .focus-card.reverse .focus-image {
    order: initial;
  }
}

@media (max-width: 768px) {
  /* Forzamos el comportamiento de Grid y limpiamos el Flex previo */
  .carousel {
    display: grid !important; 
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(6, auto); 
    width: 95vw; /* Un poco más ancho para aprovechar el móvil */
    margin: 0 auto;
    padding: 0;
    gap: 0;
    min-height: auto; /* Anulamos el 100vh si existiera */
    flex-direction: unset; /* Limpiamos rastro de flex */
    height: 100%;
  }

  /* El viewport ocupa las primeras 5 filas y TODAS las columnas */
  .carousel-viewport {
    grid-row: 1 / 6;
    grid-column: 1 / 5;
    width: 100%;
    margin: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    z-index: 1;
    
  }

  /* Centrado de los contenedores de flechas en la fila 6 */
  .div.arrow.left {
    grid-row: 6 / 7;
    grid-column: 2 / 3;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Esto centra el DIV dentro de la celda del GRID */
    place-self: center; 
    padding: 10px 0;
  }

  .div.arrow.right {
    grid-row: 6 / 7;
    grid-column: 3 / 4;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Esto centra el DIV dentro de la celda del GRID */
    place-self: center;
    padding: 10px 0;
  }

  /* Ajuste de los botones para que no se deformen */
  .arrow button {
    background: #333; /* Color oscuro para que resalte */
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
  }

  /* Ajuste de los slides */
  .service-slide {
    padding: 2rem 1.5rem;
   
    overflow-y: auto;
  }
  
  .service-slide h3 {
    font-size: 1.4rem;
  }
  
  .service-slide p {
    font-size: 0.95rem;
  }
  
  .close-modal {
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    font-size: 2rem;
  } 
  .marketing-hero {
    min-height: 260px;
  }
  .marketing-header h2 {
    font-size: 2rem;
  }
  .system-item {
    display: flex;
    flex-direction: column;
  }
  .menu-toggle {
    display: block;
    position: absolute;
    right: 1rem;
    top: 1rem;
  }
  /* .cover-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(14,17,22,0.95);
    flex-direction: column;
    padding: 1rem;
  } */
  /* .cover-nav.active {
    display: flex;
  } */
}

.menu-toggle {
  /* ... tus estilos existentes ... */
  font-size: 1.5rem; /* Ligeramente más grande para la X */
  line-height: 1;
}

/* Cuando está activo (X) */
.menu-toggle.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.5);
  color: #38bdf8;
}
.mobile-lang-switch option, .mobile-lang-switch select {
  background: #0f172a;
  color: white;
}

.mobile-lang-switch{
    margin-bottom: 50px;
}

/* ==========================================
   SCROLLBAR PERSONALIZADA - MENÚ MÓVIL
   ========================================== */

.mobile-menu {
  /* Scroll suave */
  scroll-behavior: smooth;
  
  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.4) rgba(15, 23, 42, 0.5);
}

/* Webkit (Chrome, Safari, Edge) */
.mobile-menu::-webkit-scrollbar {
  width: 6px;
}

.mobile-menu::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 3px;
  margin: 4px 0;
}

.mobile-menu::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(56, 189, 248, 0.6) 0%,
    rgba(139, 92, 246, 0.6) 100%
  );
  border-radius: 3px;
  border: 1px solid rgba(15, 23, 42, 0.3);
}

.mobile-menu::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    rgba(56, 189, 248, 0.8) 0%,
    rgba(139, 92, 246, 0.8) 100%
  );
}

/* Corner (esquina inferior derecha) */
.mobile-menu::-webkit-scrollbar-corner {
  background: transparent;
}

/* ==========================================
   SCROLLBAR PARA LOS SLIDES DEL MODAL (por si también lo necesitas)
   ========================================== */

.service-slide {
  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.3) transparent;
}

.service-slide::-webkit-scrollbar {
  width: 5px;
}

.service-slide::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.3);
  border-radius: 3px;
}

.service-slide::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.4);
  border-radius: 3px;
}

.service-slide::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.6);
}

/* ==========================================
   SCROLLBAR GLOBAL (opcional - para toda la página)
   ========================================== */

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.3) #020617;
}

body::-webkit-scrollbar {
  width: 8px;
}

body::-webkit-scrollbar-track {
  background: #020617;
}

body::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(56, 189, 248, 0.5) 0%,
    rgba(139, 92, 246, 0.5) 100%
  );
  border-radius: 4px;
  border: 2px solid #020617;
}

body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    rgba(56, 189, 248, 0.7) 0%,
    rgba(139, 92, 246, 0.7) 100%
  );
}

@media (max-width: 700px) {
  .projects, #proyectos {
    margin-left: 0px;
    margin-right: 0px;
  }
  .projects-public {
    padding: 0px 5px;
    margin-right: 0px;
    margin-left: 0px;
  }

  .cover-content{
    flex-direction: column;
    padding: 2rem 1rem;
    gap: 2rem;
    justify-content: center;
  }
  .cover-image{
     max-width: 50%;
    margin: 20px auto;
    overflow: hidden;
    

  }
  .cover-image img{
    box-shadow: 0 0 10px rgba(80, 140, 255, 0.25);
  }
  .cover-image picture, .cover-image img{
    width: 100%;
    height: auto;
    object-fit: cover;
  }
  .electric-halo {
   display: none;
  }
  /* .cover-image picture, .cover-image img{
   
  } */
}

@media (max-width: 600px) {
  .cover-content{
    height: auto;
  }
}
@media (max-width: 550px) {
  #projectsRow{
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }
  .projects-wrapper > button{
    display: none;
  }
}
@media (max-width: 500px) {
  .projects-systems {
    margin-right: 0px;
    margin-left: 0px;
    padding: 0px 5px;
  }
}
@media (max-width: 480px) {
  .cover{
    max-height: max-content;
  }
  .cover-nav{
    min-height: 70px;
    height: auto;
    padding: 15px 5px;
    flex-wrap: wrap;
    gap: 15px;
    text-align: center;
  }
  .cover-nav a {
    min-width: 30%;
  }
  .service-slide {
    padding: 1.2rem;
    max-height: 75vh;
  }
  .service-slide h3 {
    font-size: 1.2rem;
  }
  .service-slide p {
    font-size: 0.9rem;
    line-height: 1.6;
  }
}
/* ==========================================
   FIXES PARA MÓVIL REAL (< 480px)
   ========================================== */

@media (max-width: 480px) {
  
  /* OCULTAR completamente la navegación desktop */
  .cover-nav {
    display: none !important;
  }
  
  /* OCULTAR el selector flotante - solo usar el del menú móvil */
  .lang-switch-floating {
    display: none !important;
  }
  
  /* Mostrar SOLO el menú hamburguesa */
  .menu-toggle {
    display: flex !important;
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1001;
    width: 48px;
    height: 48px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    color: #e5e7eb;
    font-size: 1.4rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  }
  
  /* Menú móvil - inicialmente OCULTO */
  .mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    height: 100dvh; /* Soporte para móviles modernos */
    background: rgba(2, 6, 23, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 5rem 1.5rem 2rem;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid rgba(148, 163, 184, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
    box-sizing: border-box;
  }
  
  /* Menú activo */
  .mobile-menu.active {
    right: 0;
  }
  
  /* Overlay - inicialmente OCULTO */
  .menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: block;
  }
  
  /* Overlay activo */
  .menu-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  
  /* Links del menú móvil */
  .mobile-menu a {
    color: #e5e7eb;
    text-decoration: none;
    font-size: 1.2rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem;
  }
  
  .mobile-menu a:hover,
  .mobile-menu a:active {
    color: #38bdf8;
    padding-left: 0.5rem;
  }
  
  /* Selector de idiomas en menú móvil */
  .mobile-lang-switch {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
  }
  
  .mobile-lang-switch label {
    display: block;
    color: #64748b;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.8rem;
    font-weight: 500;
  }
  
  .mobile-lang-switch select {
    width: 100%;
    padding: 0.9rem 1rem;
    font-size: 1rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 8px;
    color: #e5e7eb;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
  }
  
  /* Botón cerrar */
  .mobile-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    color: #94a3b8;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1002;
  }
  
  .mobile-menu-close:hover {
    color: #e5e7eb;
    background: rgba(30, 41, 59, 0.9);
  }
  
  /* Ajustes del cover para móvil */
  .cover-content {
    padding-top: 6rem; /* Espacio para el botón hamburguesa */
  }
}

/* ==========================================
   OCULTAR ELEMENTOS MÓVILES EN DESKTOP
   ========================================== */

@media (min-width: 481px) {
  .menu-toggle,
  .mobile-menu,
  .menu-overlay,
  .mobile-menu-close,
  .mobile-lang-switch {
    display: none !important;
  }
}
@media (max-width: 400px) {
  .system-item {
    margin-right: 0px;
    margin-left: 0px;
  }
  .projects-confidential {
    padding: 0px 5px;
  }
/* 
  .cover-nav{
   flex-direction: column;
   background-color: #0f172a00;
  }
  .cover-nav a {
    font-size: 18px;
  } */
    /* Ocultar navegación principal */
  .cover-nav {
    display: none;
  }
  
  /* Mostrar menú hamburguesa */
  .menu-toggle {
    display: flex;
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    width: 44px;
    height: 44px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    color: #e5e7eb;
    font-size: 1.3rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
  }
  
  .menu-toggle:hover {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(56, 189, 248, 0.5);
    color: #38bdf8;
  }
  
  /* Menú móvil desplegable */
  .mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: rgba(2, 6, 23, 0.98);
    backdrop-filter: blur(20px);
    z-index: 999;
    padding: 5rem 2rem 2rem;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid rgba(148, 163, 184, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .mobile-menu.active {
    right: 0;
  }
  
  /* Overlay oscuro cuando el menú está abierto */
  .menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .menu-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  
  /* Links del menú móvil */
  .mobile-menu a {
    color: #e5e7eb;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem;
  }
  
  .mobile-menu a:hover {
    color: #38bdf8;
    padding-left: 0.5rem;
  }
  
  /* Selector de idiomas en menú móvil (versión grande) */
  .mobile-lang-switch {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
  }
  
  .mobile-lang-switch label {
    display: block;
    color: #94a3b8;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
  }
  
  .mobile-lang-switch select {
    width: 100%;
    padding: 0.9rem 1rem;
    font-size: 1rem;
    background: rgba(15, 23, 42, 0.8);
  }
  
  /* Botón cerrar menú */
  .mobile-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
  }
  
  .mobile-menu-close:hover {
    color: #e5e7eb;
  }
  
  /* Selector de idiomas flotante (alternativa visible siempre) */
  .lang-switch-floating {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 100;
    display: flex;
  }
  
  .lang-switch-floating select {
    background: rgba(15, 23, 42, 0.9);
    padding: 0.4rem 1.8rem 0.4rem 0.7rem;
    font-size: 0.8rem;
    border-radius: 6px;
  }
}
