/* ===============================
   FUENTE – RALEWAY (LOCAL)
=============================== */

@font-face {
  font-family: 'Raleway';
  src: url('./assets/fonts/Raleway-Light.ttf') format('truetype');
  font-weight: 300;
}

@font-face {
  font-family: 'Raleway';
  src: url('./assets/fonts/Raleway-Regular.ttf') format('truetype');
  font-weight: 400;
}

@font-face {
  font-family: 'Raleway';
  src: url('./assets/fonts/Raleway-Medium.ttf') format('truetype');
  font-weight: 500;
}

@font-face {
  font-family: 'Raleway';
  src: url('./assets/fonts/Raleway-SemiBold.ttf') format('truetype');
  font-weight: 600;
}

@font-face {
  font-family: 'Raleway';
  src: url('./assets/fonts/Raleway-Bold.ttf') format('truetype');
  font-weight: 700;
}

@font-face {
  font-family: 'Raleway';
  src: url('./assets/fonts/Raleway-ExtraBold.ttf') format('truetype');
  font-weight: 800;
}

@font-face {
  font-family: 'Raleway';
  src: url('./assets/fonts/Raleway-Heavy.ttf') format('truetype');
  font-weight: 900;
}


/* ===============================
   RESET
=============================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Raleway', sans-serif;
}

.desktop-only {
  display: block;
}

.mobile-only-header,
.mobile-header-v2,
.mobile-nav-v2,
.panel1-main-container {
  display: none;
}

/* ===============================
   SCROLL HORIZONTAL
=============================== */

#horizontal-wrapper {
  width: 100vw;
  height: 100vh;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  inset: 0;

  scrollbar-gutter: stable both-edges;
}

#horizontal-track {
  display: flex;
  width: calc(100vw * 6);
  height: 100vh;
  background: none;
  /* removed will-change: transform to avoid creating a containing block
     that can affect position:fixed elements in some browsers */
}

/* Scrollbar */
#horizontal-wrapper::-webkit-scrollbar {
  height: 12px;
}

#horizontal-wrapper::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.18);
  border-radius: 10px;
}

#horizontal-wrapper {
  scrollbar-width: auto;
  scrollbar-color: rgba(0, 0, 0, 0.18) transparent;
}




/* ===============================
   PANEL BASE
=============================== */

.panel {
  width: 100vw;
  height: 100vh;
  flex: none;
  position: relative;
  scroll-snap-align: start;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  display: flex;
  justify-content: center;
  align-items: center;
}

/* ===============================
   FONDOS POR PANEL
=============================== */

#panel1 {
  background-image: url("./assets/images/FONDOS/Mesa-de-trabajo-1.webp");
}

#panel2 {
  background-image: url("./assets/images/FONDOS/Mesa-de-trabajo-4.webp");
}

#panel3 {
  background-image: none;
}

#panel4 {
  background-image: url("./assets/images/FONDOS/Mesa-de-trabajo-6.webp");
}

#panel5 {
  background-image: url("./assets/images/FONDOS/Mesa-de-trabajo-7.webp");
  position: relative;
  overflow: visible;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding-left: 200px;
}

#panel6 {
  background-image: url("./assets/images/FONDOS/Mesa-de-trabajo-8.webp");
}

/* ======================================================
   PANEL 1 – HOME (BASE DESKTOP)
====================================================== */
#panel1 {
  justify-content: flex-start;
  align-items: flex-start;
  padding: 120px 80px;
  color: #013d52;
  overflow: hidden;
}

/* ===============================
   MENÚ DESKTOP
=============================== */
.menu {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  width: 80%;
}

.menu ul {
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
}

.logo {
  width: 100px;
}

.menu li {
  font-size: 1.1rem;
  font-weight: 600;
  color: #013d52;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}

.menu li:not(.logo-item)::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background-color: #6ed5c5;
  transform: translateX(-50%) scaleX(0);
  transition: transform 0.3s ease;
}

.menu li:not(.logo-item):hover::after {
  transform: translateX(-50%) scaleX(1);
}

/* ===============================
   BOTÓN PORTAL – DESKTOP
=============================== */
#portal-btn {
  position: absolute;
  top: 90px;
  left: 80%;
  transform: translateX(-50%);
  z-index: 30;

  /* Estilos de botón */
  background-color: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  transition: transform 0.1s ease;
  display: inline-flex;
}

#portal-btn:hover {
  transform: translateX(-50%) scale(1.02);
}

#portal-btn:active {
  transform: translateX(-50%) scale(0.98);
}

#portal-btn .portal-img {
  width: 180px;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
  transition: transform 0.15s ease, filter 0.2s ease;
}

#portal-btn:hover .portal-img {
  transform: scale(1.04);
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
}

#portal-btn:active .portal-img {
  transform: scale(0.98);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

/* ===============================
   HERO
=============================== */
.hero {
  margin-top: 0;
  width: 100vw;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(calc(-50% - 40%));
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 80px;
  box-sizing: border-box;
}

.hero-logo-img {
  width: 300px;
  position: relative;
  top: 0;
  margin: 0 auto 20px;
  display: block;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1.1;
  color: #fff7d6;
  padding: 2px 40px;
  margin-top: 20px;
  margin-bottom: 35px;
  text-align: left;
  align-self: flex-start;
  margin-left: -80px;
  transform: translateY(170%);
}

.hero-subtext {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.45;
  margin-top: 30px;
  margin-left: 80px;
  text-align: left;
  align-self: flex-start;
  transform: translateY(180%);
}

/* ===============================
   CONTACTO – ABAJO IZQUIERDA
=============================== */

.contacto-home {
  position: absolute;
  bottom: 100px;
  left: 140px;
}

/* Contacto en Panel 1 (Home) - abajo izquierda */
.contacto-home-panel1 {
  bottom: 40px;
  left: 80px;
}

.contacto-home-contacto {
  bottom: 60px;
  left: auto;
  right: 80px;
}

.contact-icons {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 10px;
}

/* ICONOS */
.contact-icon {
  width: 80px;
  transition: all 0.5s ease;
  cursor: pointer;
}

.contact-icon:hover {
  transform: rotate(360deg);
  box-shadow: 0 0 15px 15px #004860;
  border-radius: 50%;
}

/* TEXTO */
.contact-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: #4fa395;
  margin-left: 30px;
  /* centra visual con iconos */
}

.divider {
  width: 12px;
  height: 100px;

  background: linear-gradient(to right,
      rgba(111, 191, 176, 0.35) 0%,
      rgba(79, 163, 149, 0.45) 60%,
      rgba(59, 143, 132, 0.55) 100%);

  border-radius: 0 100px 100px 0;
}


/* ===============================
   RESONADOR (DESKTOP)
=============================== */
.resonador-box {
  position: absolute;
  top: 50%;
  transform: translateY(-45%) scale(1.15);
  right: 0;
  width: 500px;
  text-align: right;
  z-index: 5;
  padding-right: 40px;
  transition: transform 0.3s ease;
}

.resonador-img {
  width: 100%;
  height: auto;
  filter: grayscale(100%) brightness(1.05) drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
  animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {

  0%,
  100% {
    filter: grayscale(100%) brightness(1.05) drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
  }

  50% {
    filter: grayscale(100%) brightness(1.15) drop-shadow(0 15px 40px rgba(110, 213, 197, 0.4));
  }
}

.barra-container {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(calc(-50% + 250px));
  z-index: 4;
}

.barra-img {
  height: 220px;
  /* un poco más baja para que no compita con el resonador */
  width: auto;
  animation: bajarSubir 2.5s ease-in-out infinite;
}

@keyframes bajarSubir {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(20px);
  }
}

.resonador-texto {
  margin-top: -20px;
  /* lo acerca sin romper */
  line-height: 1.25;
  text-align: right;
  color: #013d52;
  padding-right: 24px;
  margin-left: 70px;
  transform: translateX(-30%);
}

.text-bar-wrapper-mobile,
.titulo-mobile,
.destacado-mobile {
  display: none;
}

/* TITULO */
.resonador-texto .res-titulo {
  font-weight: 800;
  font-style: italic;
  font-size: 1.15rem;
  display: block;
}

/* TEXTO MEDIO */
.resonador-texto .res-descripcion {
  font-weight: 400;
  font-style: italic;
  font-size: 1rem;
  margin-top: 6px;
  display: block;
}

/* DESTACADO FINAL */
.resonador-texto .res-destacado {
  font-weight: 700;
  font-style: italic;
  font-size: 1.05rem;
  margin-top: 6px;
  display: block;
}


/* ===============================
   FLECHAS
=============================== */
.flechas-deslizar {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(250px, calc(-50% - 20px));
  width: 120px;
}

.flechas-img {
  width: 100%;
  animation: moverFlecha 1.6s infinite;
}

@keyframes moverFlecha {
  0% {
    transform: translateX(0);
    opacity: 0.3;
  }

  50% {
    transform: translateX(12px);
    opacity: 1;
  }

  100% {
    transform: translateX(0);
    opacity: 0.3;
  }
}

/* ===============================
   PANEL 2 – SERVICIOS
=============================== */

/* Panel base */
#panel2 {
  position: relative;
  z-index: 5;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding-top: 0;
  overflow-y: auto;

  /* opcional – debug visual */
  /* border-right: 1px solid rgba(0,0,0,0.08); */
}

/* ===============================
   HEADER "SERVICIOS"
=============================== */

.servicios-header {
  position: absolute;
  top: 10px;
  left: 80px;
  z-index: 10;
}

.servicios-header-img {
  width: 550px;
  height: auto;
  display: block;
}

/* ===============================
   GRID DE SERVICIOS
=============================== */

.contenedor-servicios {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* 3 columnas */
  grid-auto-rows: auto;
  gap: 30px;
  /* Reducir gap para que entren bien */
  margin-top: 60px;
  width: 95%;
  /* Usar más ancho de pantalla */
  max-width: 1400px;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  justify-content: center;
  justify-items: stretch;
  /* Estirar items para ocupar columna */
  padding: 20px;
  background-color: transparent;
}

/* Item individual - SERVICIOS */
.contenedor-servicios .item {
  width: 100%;
  min-height: 280px;
  border-radius: 40px;
  overflow: hidden;
  background: transparent;
  border: none;
}

.service-card-header {
  display: none;
  /* Ocultar titulo */
}



.service-card-body {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
  border-radius: 10px;
  z-index: 10;
}


.service-card-body img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 0;
}

/* Ensure flip-card fronts match the new structure */
.flip-card-front {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: transparent;
}

/* ===============================
   FLIP CARD EFFECT
=============================== */
.flip-card {
  perspective: 1000px;
  cursor: pointer;
  width: 100%;
  min-height: 280px;
  position: relative;

}

.flip-card-inner {
  position: relative;
  width: 100%;
  min-height: 280px;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  border-radius: 40px;
}

.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 280px;
  backface-visibility: hidden;
  border-radius: 0px;
  background-color: transparent;
}

.flip-card-front {
  background-color: transparent;
  color: black;
}

.flip-card-back {
  background-color: transparent;
  color: #013d52;
  transform: rotateY(180deg);
  padding: 30px 40px;
  /* Increased padding due to radius */
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
  font-size: 0.85rem;
  line-height: 1.4;
}

.flip-card-back h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  text-align: left;
}

.flip-card-back p {
  font-size: 0.75rem;
  margin: 0 0 8px 0;
  text-align: left;
}

.flip-card-back ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.flip-card-back li {
  font-size: 0.7rem;
  margin-bottom: 6px;
  line-height: 1.2;
}

/* ===============================
   RESPONSIVE
=============================== */

@media (max-width: 1280px) {
  #panel2 {
    padding-top: 0;
  }

  .servicios-header {
    left: 60px;
  }

  .servicios-header-img {
    width: 380px;
  }

  .contenedor-servicios {
    width: 85%;
    grid-template-columns: repeat(2, minmax(80px, 1fr));
    gap: 28px;
    max-height: calc(100vh - 200px);
    margin-top: 0;
  }

  .item {
    max-height: 280px;
  }
}

/* Hero positioning fixed - no responsive changes */



/* ============================
      PANEL 3 – NOSOTROS
============================ */

#panel3 {
  position: relative;
  display: block;
}

/* Ocultar versión mobile en desktop */
.nosotros-mobile {
  display: none;
}

.nosotros-desktop {
  display: block;
}

#panel3 .panel-bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% center;
  z-index: 0;
  pointer-events: none;
}

/* HEADER NOSOTROS */
.nosotros-header {
  position: absolute;
  top: 10px;
  left: 80px;
  z-index: 20;
}

.nosotros-header-img {
  width: 550px;
}


/* DOCTOR — ABAJO IZQUIERDA */
.doctor-img {
  position: absolute;
  bottom: 0;
  left: 40px;
  height: 60%;
  z-index: 1;
  display: block;
  object-fit: contain;
}


/* BLOQUE DE TEXTO */
.nosotros-texto {
  position: absolute;
  top: 165px;
  left: 700px;
  right: 80px;
  width: auto;
  color: #013d52;
  z-index: 5;
  text-align: left;
}


/* COMILLAS  */
.comillas {
  position: absolute;
  left: 40px;
  top: 160px;
  width: 138px;
  z-index: 6;
}


/* TEXTO PRINCIPAL */
.texto-principal {
  font-size: 2.6rem;
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 25px;
  max-width: 620px;
  margin-left: auto;
  margin-right: 0;
  text-align: left;
}

.italic {
  font-style: italic;
  font-weight: 400;
}

.bold {
  font-weight: 700;
}

.bold.italic {
  font-weight: 700;
  font-style: italic;
}


/* TEXTO SECUNDARIO */
.texto-secundario {
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.4;
  margin-top: 24px;
  max-width: 520px;
  margin-left: auto;
  margin-right: 0;
  text-align: left;
}


/* CUADRADITOS DECORATIVOS */
.cuadritos {
  position: absolute;
  bottom: 24px;
  left: 40px;
  width: 300px;
  opacity: 0.9;
  z-index: 6;
}

/* ===============================
   RESPONSIVE NOSOTROS
=============================== */
@media (max-width: 1280px) {

  .nosotros-header {
    left: 60px;
  }

  .nosotros-header-img {
    width: 380px;
  }

  .doctor-img {
    left: 30px;
    height: 55%;
    object-fit: contain;
  }

  .nosotros-texto {
    left: 300px;
    width: 760px;
  }

  .texto-principal {
    font-size: 2.3rem;
  }

  .texto-secundario {
    font-size: 1.45rem;
  }

  .comillas {
    left: 150px;
    width: 120px;
  }
}





/* ===============================
   PANEL 4 – TECNOLOGÍA 
=============================== */

#panel4 {
  position: relative;
  width: 100vw;
  height: 100vh;

  padding: 120px 80px 40px;
  box-sizing: border-box;

  overflow: hidden;
}

/* Header (imagen Tecnología) */
.tecnologia-header {
  position: absolute;
  top: 10px;
  left: 80px;
  z-index: 10;
}

.tecnologia-header-img {
  width: 550px;
}

/* GRUPO DE 6 ITEMS */
.tecnologia-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, 1fr);
  column-gap: 180px;
  row-gap: 30px;

  height: calc(100vh - 140px);
  align-content: start;
  margin-top: 20px;

  max-width: 1100px;
  margin: 30px auto 0;

  grid-template-columns: 1fr 1fr;
  column-gap: 30px;
}


/* ===============================
   TARJETA TECNOLOGÍA BASE
=============================== */

.tec-item {
  display: flex;
  flex-direction: column;
  gap: 0px;
}

/* Número + Título + Cuadritos */
.tec-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Número */
.tec-num {
  font-size: 2.2rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1;

  color: transparent;
  -webkit-text-stroke: 1px #013d52;
}

/* Título */
.tec-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #013d52;
  white-space: nowrap;
}

/* Cuadritos */
.cuadritos-tec {
  height: 40px;
  margin-left: 8px;
}

/* Cuerpo: Imagen + Texto (desktop: imagen al lado de la descripción) */
.tec-body {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  align-items: start;
}

/* Descriptions are visible by default */


/* Imagen - Lado Izquierdo  */
.tec-item.left-column {
  margin-left: 0;
}


/* Imagen */
.tec-img {
  max-width: 260px;
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.tec-img:hover {
  transform: scale(1.06);
  z-index: 10;
}


/* Texto de la descripción */
.tec-desc {
  font-size: 0.85rem;
  line-height: 1.45;
  color: #013d52;
  font-weight: 500;
  font-style: normal;
  text-align: left;
}


.tec-item.right-column .tec-desc {
  padding-right: 15px;
}

/* ===============================
   RESPONSIVE TECNOLOGÍA
=============================== */
@media (max-width: 1280px) {

  /* PANEL */
  #panel4 {
    padding: 150px 60px 30px;
    /* baja más el contenido */
  }

  /* HEADER */
  .tecnologia-header {
    left: 60px;
  }

  .tecnologia-header-img {
    width: 340px;
    /* un poco más chico */
  }

  /* GRID */
  .tecnologia-grid {
    margin-top: -25px;
    max-width: 900px;
    column-gap: 28px;
    row-gap: 20px;
    height: auto;
  }

  /* HEADER DE CADA ITEM */
  .tec-num {
    font-size: 1.6rem;
  }

  .tec-title {
    font-size: 0.95rem;
  }

  .cuadritos-tec {
    height: 26px;
  }

  /* CUERPO */
  .tec-item .tec-body {
    gap: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .tec-img {
    max-width: 120px;
  }

  .tec-desc {
    font-size: 0.8rem;
    line-height: 1.35;
  }
}

/* (TABLET) */
@media (max-width: 1024px) {

  #panel4 {
    padding: 100px 40px 30px;
  }

  .tecnologia-header {
    left: 40px;
  }

  .tecnologia-header-img {
    width: 340px;
  }

  .tecnologia-grid {
    max-width: 900px;
    column-gap: 30px;
    row-gap: 22px;
    height: auto;
  }

  .tec-item .tec-body {
    gap: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .tec-num {
    font-size: 1.8rem;
  }

  .tec-title {
    font-size: 1rem;
    white-space: normal;
  }

  .tec-desc {
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .cuadritos-tec {
    height: 32px;
  }
}


/* ===============================
   PANEL 5 – PERSONAL
=============================== */

/* Header */
.personal-header {
  position: absolute;
  top: 10px;
  left: 80px;
  z-index: 10;
}

.personal-header-img {
  width: 550px;
}

/* ===============================
   GRID DE PERSONAL
=============================== */

.contenedor-personal {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  flex: 1;
  max-width: 600px;
  margin-top: -8vh;
  align-content: flex-start;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

@media (min-width: 1400px) {
  .contenedor-personal {
    max-width: 1000px;
  }
}

@media (min-width: 1800px) {
  .contenedor-personal {
    max-width: 1500px;
  }
}


/* Item individual - (3 columnas, 2 filas) */
.item.personal-card {
  width: calc(30% - 6px);
  overflow: visible;
  border-radius: 8px;
  background: transparent;
  position: relative;
  box-shadow: none;
}

/* Items grandes - (2 por fila) */
.item.personal-card.item-grande {
  width: calc(40% - 4px);
}

/* Texto de descripción en Personal */
.personal-text-item {
  width: 450px;
  flex-shrink: 0;
  z-index: 10;
  padding: 10px 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 16px;
  margin-top: 0;
  order: -1;
  margin-left: -200px;
}

.personal-text-item p {
  font-family: 'Raleway', sans-serif;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #013d52;
  font-weight: 500;
  text-align: left;
  margin: 0;
  font-style: italic;
}

@media (min-width: 1400px) {
  .personal-text-item {
    width: 600px; /* Aumenta ancho contenedor texto */
  }
  .personal-text-item p {
    font-size: 1.15rem; /* Aumenta tamaño texto */
  }
}

@media (min-width: 1800px) {
  .personal-text-item {
    width: 750px;
  }
  .personal-text-item p {
    font-size: 1.35rem; 
  }
}


/* Personal card image */
.personal-card img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 15px;
}

/* Imágenes pequeñas (3, 4, 5, 6, 7, 8) más chicas */
.item.personal-card:not(.item-grande) img {
  width: 100%;
  margin: 0 auto;
}

/* Personal info overlay - OCULTO */
.personal-info {
  display: none;
}

.p-nombre {
  font-family: 'Raleway', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #013d52;
}

.p-cargo {
  font-family: 'Raleway', sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  color: #013d52;
}

/* Items destacados (más grandes) */
.contenedor-personal .item-grande {
  grid-column: span 2;
  grid-row: span 2;
  max-height: none;
  /* Dejar que el aspect-ratio defina la altura */
}

/* Forzar cover en items grandes para evitar desajustes visuales */
.contenedor-personal .item-grande img {
  object-fit: cover !important;
  object-position: center 5% !important;
}

/* Animación en cascada para Personal - DESACTIVADA */
.contenedor-personal .item {
  opacity: 1;
  transform: scale(1) translateY(0);
  transition: none;
}

.contenedor-personal.animate .item {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* ===============================
   RESPONSIVE PERSONAL
=============================== */
@media (max-width: 1280px) {

  .personal-header-img {
    width: 360px;
  }

  .contenedor-personal {
    grid-template-columns: repeat(4, minmax(210px, 1fr));
    width: 92%;
    gap: 28px;
    margin-top: -80px;
  }

  .item {
    max-height: 220px;
  }

  .contenedor-personal .item-grande {
    max-height: none;
  }

  .item img {
    object-fit: contain;
    object-position: center center;
  }

  /* Hover / Click effect: scale up slightly and add subtle shadow */
  .item:hover img,
  .flip-card-front:hover img {
    transform: scale(1.06);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  }

  /* ===============================
   MOBILE OPTIMIZATIONS (<=600px)
   Reduce spacing, stack grids, and center titles/images
=============================== */
  @media (max-width: 600px) {

    /* Panels: reduce overall padding so sections queden más compactas */
    .panel {
      padding: 30px 14px;
      align-items: flex-start;
      justify-content: flex-start;
    }

    /* Force specific panel behavior for stacking */
    #panel1 {
      flex-direction: column !important;
      align-items: center !important;
      justify-content: flex-start !important;
      padding-top: 80px !important;
      /* Spacing for fixed menu */
      height: auto !important;
      min-height: 100vh !important;
      overflow: visible !important;
      padding-bottom: 40px !important;
      gap: 20px !important;
      /* Add gap between flex items */
    }

    #panel5 {
      flex-direction: column;
      align-items: center;
    }

    /* Header/menu adjustments */
    .menu {
      width: 96%;
      top: 12px;
      left: 50%;
      transform: translateX(-50%);
    }

    #panel2 {
      justify-content: flex-start;
    }

    /* HERO: center and simplify layout on small screens */
    .hero {
      position: static !important;
      width: 100% !important;
      height: auto !important;
      transform: none !important;
      padding: 20px 12px !important;
      margin: 0 !important;
      display: flex !important;
      flex-direction: column !important;
      align-items: center !important;
      gap: 15px !important;
    }

    .hero-logo-img {
      position: static !important;
      width: 180px !important;
      margin: 0 0 10px 0 !important;
      transform: none !important;
    }

    .hero-title {
      position: static !important;
      font-size: 1.6rem !important;
      text-align: center !important;
      align-self: center !important;
      margin: 0 !important;
      transform: none !important;
      line-height: 1.2 !important;
    }

    .hero-subtext {
      position: static !important;
      font-size: 1rem !important;
      text-align: center !important;
      align-self: center !important;
      margin: 0 !important;
      transform: none !important;
      line-height: 1.4 !important;
    }

    /* Tecnología descriptios centering */
    .tec-desc {
      text-align: left !important;
    }

    /* Nosotros mobile centering */
    .nosotros-m-title p,
    .nosotros-m-text {
      text-align: left !important;
    }

    /* Tecnología: apilar por número — imagen debajo del título */
    .tecnologia-grid {
      grid-template-columns: 1fr;
      max-width: 94%;
      column-gap: 12px;
      row-gap: 18px;
      margin-top: 12px;
      height: auto;
    }

    .tec-item {
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 8px;
    }

    .tec-header {
      justify-content: center;
      gap: 8px;
      width: 100%;
    }

    .tec-title {
      white-space: normal;
      font-size: 1rem;
    }

    .tec-img {
      max-width: 320px;
      width: 100%;
      height: auto;
      margin-top: 6px;
    }

    /* Servicios: stack to single column, smaller header */
    .servicios-header {
      position: relative;
      top: auto;
      left: auto;
      margin: 6px 0 12px;
      display: flex;
      justify-content: center;
    }

    .servicios-header-img {
      width: 220px;
    }

    .contenedor-servicios {
      grid-template-columns: 1fr;
      width: 94%;
      gap: 16px;
      margin-top: 8px;
      max-height: none;
    }

    .flip-card {
      height: auto;
    }

    .item {
      aspect-ratio: 16/9;
      max-height: 220px;
      overflow: hidden;
    }

    .item img,
    .flip-card-front img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center center;
    }

    /* Personal: smaller header and 2-column grid */
    .personal-header {
      position: relative;
      margin: 6px 0 8px;
      display: flex;
      justify-content: center;
      top: auto;
      left: auto;
    }

    .personal-text-item {
      position: static !important;
      width: 90% !important;
      margin: 10px auto 30px !important;
      text-align: left !important;
      /* Changed from center to follow previous desktop logic */
      padding: 0 10px !important;
      order: 2 !important;
      /* Move before grid */
      transform: none !important;
    }

    .personal-header {
      order: 1 !important;
    }

    .contenedor_personal {
      order: 3 !important;
    }

    .personal-header-img {
      width: 220px;
    }

    .contenedor-personal {
      grid-template-columns: 1fr !important;
      width: 90% !important;
      gap: 20px !important;
      margin-top: 10px !important;
    }

    .contenedor-personal .item {
      max-height: 180px;
    }

    .contenedor-personal .item-grande {
      max-height: none;
    }

    /* Reduce spacing for contacto y footer */
    .contacto-home {
      bottom: 18px;
      left: 14px;
    }

    .dev-credit,
    .copyright-credit {
      font-size: 0.8rem;
    }

  }

  .item:active img,
  .flip-card-front:active img {
    transform: scale(1.02);
    transition-duration: 120ms;
  }

  /* Keep pointer cursor for interactive cards */
  .item,
  .flip-card {
    cursor: pointer;
  }
}

/* For very large screens (e.g., 2560x1440) avoid aggressive cropping
   by fitting the whole image inside the card while keeping it centered. */
@media (min-width: 1400px) {

  /* Expandir contenedor y columnas en pantallas grandes */
  .contenedor-personal {
    max-width: 1000px;
    grid-template-columns: repeat(4, minmax(200px, 1fr));
  }

  /* Asegurar que las imágenes llenen el espacio y no se vean chicas */
  .contenedor-personal .item img {
    object-fit: cover;
    object-position: center 15%;
    background-color: transparent;
  }
}


/* ===============================
   CONTACTO – PANEL 6
=============================== */

#panel6 {
  justify-content: flex-start;
  align-items: flex-start;
  padding: 120px 80px;
  color: #013d52;
}

/* ===============================
   HEADER CONTACTO
=============================== */

.contacto-header {
  position: absolute;
  top: 10px;
  left: 80px;
  z-index: 10;
}

.contacto-header-img {
  width: 550px;
}

/* ===============================
   BLOQUE DE INFORMACIÓN
=============================== */

.contactos-bloque {
  display: flex;
  flex-direction: column;
  gap: 28px;
  transform: translate(20%, 20%);
}

/* ===============================
   ITEM INDIVIDUAL
=============================== */

.contacto-item p {
  margin: 0;
  font-family: 'Raleway', sans-serif;
  font-size: 1.35rem;
  line-height: 1.25;
  font-weight: 600;
  font-style: normal;
  color: #013d52;
  text-align: start;
}

/* ===============================
   ICONOS
=============================== */

.contacto-icono {
  width: 42px;
  margin-bottom: 4px;

  /* ===============================
   LINK DE UBICACIÓN
=============================== */

  .contacto-link {
    display: inline-block;
    cursor: pointer;
    transition: transform 0.3s ease;
  }

  .contacto-link:hover {
    transform: scale(1.15);
  }

  .contacto-link:hover .contacto-icono {
    filter: drop-shadow(0 0 8px rgba(1, 61, 82, 0.6));
  }
}

/* ===============================
   TEXTO CONTACTO
=============================== */

.contacto-texto {
  font-family: 'Raleway', sans-serif;
  font-size: 1.4rem;
  line-height: 1.25;
  font-weight: 600;
  color: #013d52;
  margin: 0;
}

/* ===============================
   DÍAS (BOLD + ITALIC)
=============================== */


/* ===============================
   DEV CREDIT
=============================== */
.dev-credit {
  position: absolute;
  bottom: 24px;
  left: 80px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 6;
}

.dev-credit span {
  font-size: 0.9rem;
  font-weight: 600;
  color: #013d52;
  font-family: 'Raleway', sans-serif;
  text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
}

.dev-credit img {
  height: 100px;
  width: auto;
  opacity: 1;
  filter: invert(0.1) brightness(0.9);
  transition: transform 0.3s ease, filter 0.3s ease;
}

.dev-credit:hover img {
  transform: scale(1.1);
}

/* ===============================
   COPYRIGHT
=============================== */
.copyright-credit {
  position: absolute;
  bottom: 24px;
  right: 80px;
  z-index: 6;
}

.copyright-credit p {
  font-size: 0.85rem;
  font-weight: 500;
  color: #013d52;
  font-family: 'Raleway', sans-serif;
  margin: 0;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
  text-align: right;
}

.barra-mobile {
  display: none;
}

#panel1 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero {
  margin-bottom: 20px;
  /* espacio entre título y CTA */
}

.home-cta {
  position: static;
  /* vuelve al flujo */
  margin-left: 40px;
  /* alinea con el texto */
}

:root {
  --alto-header-mobile: 170px;
}

.hamburger,
.mobile-nav {
  display: none;
}

@media (max-width: 1024px) {

  html,
  body {
    height: auto !important;
    overflow-y: visible !important; /* Cambiado de auto a visible para probar sticky behavior más puro */
    overflow-x: clip !important; /* Clip es mejor que hidden para sticky moderno */
  }

  /* Fondo único para toda la web en mobile */
  body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("./assets/images/FONDOS/fondo_mobile.jpg") !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    z-index: -1; /* Colocarlo detrás de todo el contenido */
  }

  body {
    background-color: #E6F0F5 !important; /* Un color de fondo suave por si acaso */
  }

  /* Asegurar que el html sea transparente */
  html {
    background: transparent !important;
  }

  /* Reset backgrounds for all panels explícitamente */
  #panel1, #panel2, #panel3, #panel4, #panel5, #panel6, #panel7 {
      background: transparent !important;
      background-image: none !important;
      background-color: transparent !important;
      box-shadow: none !important;
  }

  #horizontal-wrapper {
    width: 100%;
    height: auto !important;
    overflow: visible !important; /* IMPORTANTE: Visible en ambos ejes para que el sticky funcione con el scroll del body */
    scroll-snap-type: none !important;
  }

  html { 
    scroll-behavior: smooth; 
  }

  #horizontal-track {
    width: 100% !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    transform: none !important; /* Asegurar que no haya transform que rompa sticky */
    overflow: visible !important;
  }

  .panel {
    width: 100% !important;
    height: auto !important;
    min-height: 100vh;
    background: transparent !important; /* Asegura transparencia para ver el body */
    background-image: none !important; /* Quita imagen desktop por si acaso */
    background-color: transparent !important; /* Refuerza transparencia */
    scroll-snap-align: none !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  .desktop-only {
    display: none !important;
  }

  /* Ocultar menú desktop en mobile */
  .menu {
    display: none !important;
  }

  /* OCULTAR ELEMENTOS DESKTOP DEL HOME */
  .hero-content,
  .hero-logo-img,
  .hero-title,
  .hero-subtext,
  .resonador-box,
  .barra-container,
  .contacto-home-panel1 {
    display: none !important;
  }

  /* NUEVO PANEL 1 (HOME) MOBILE V2 */
  #panel1 {
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    height: 100vh !important;
    justify-content: space-between !important;
    overflow: hidden !important;
    position: relative;
  }

  /* Header Mobile V2 - Logo a la izquierda, burger derecha */
  .mobile-header-v2 {
    display: flex !important;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 200; /* Por encima de todo */
    justify-content: space-between; /* Separar logo y burger */
    align-items: center;
    padding: 0 25px;
    background: transparent;
    pointer-events: none; /* Permitir clicks debajo */
  }

  .mobile-logo-v2 {
    display: block; /* Mostrar logo */
    height: 45px; /* Altura ajustada */
    width: auto;
    pointer-events: auto;
  }

  .hamburger-v2 {
    pointer-events: auto; /* Habilitar click en botón */
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    z-index: 201;
  }

  .hamburger-v2 span {
    display: block;
    width: 35px;
    height: 3px;
    background-color: #013d52;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  /* Animación Hamburger al abrir (aria-expanded="true") */
  .hamburger-v2[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
    background-color: white; /* Cambiar a blanco sobre el menú oscuro */
  }
  .hamburger-v2[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }
  .hamburger-v2[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
    background-color: white;
  }


  /* MENÚ DESPLEGABLE MOBILE */
  .mobile-nav-v2 {
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(1, 61, 82, 0.98); /* Fondo oscuro */
    z-index: 150; /* Entre header y contenido */
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    
    /* Estado Oculto */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .mobile-nav-v2[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .mobile-nav-v2 ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 30px;
  }

  .mobile-nav-v2 li {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
    font-family: 'Raleway', sans-serif;
    transition: color 0.2s;
  }

  .mobile-nav-v2 li:hover {
     color: #4fa395;
  }

  .mobile-logo-v2 {
    width: 160px;
    height: auto;
  }

  .hamburger-v2 {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 5px;
  }

  .hamburger-v2 span {
    display: block;
    width: 32px;
    height: 4px;
    background: #013d52;
    border-radius: 2px;
  }

  /* Contenedor Principal Panel 1 */
  .panel1-main-container {
    display: flex !important;
    flex-direction: column;
    width: 100%;
    flex-grow: 1;
    justify-content: flex-start;
    padding-top: 20vh; /* Subimos un 5% respecto al 25vh anterior */
    padding-bottom: 10px;
  }

  /* Sección Hero Superior */
  .hero-top-v2 {
    display: flex;
    align-items: center;
    padding: 0 25px;
    position: relative;
    margin-bottom: 25px;
  }

  .hero-text-side {
    flex: 1.3;
    z-index: 2;
    padding-top: 100px; /* Bajar texto + flechas aún más */
  }

  .mobile-decorator-line {
    width: 70%;
    height: 3px;
    background: #013d52;
    margin-bottom: 15px;
    position: relative;
  }

  .mobile-decorator-line::after {
    content: "";
    position: absolute;
    right: -4px;
    top: -3px;
    width: 8px;
    height: 8px;
    background: #013d52;
    border-radius: 50%;
  }

  .hero-title-v2 {
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 1.35rem; /* Reducido para que entre en una linea */
    white-space: nowrap;
    color: #013d52;
    line-height: 1.1;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    font-style: italic;
  }

  .hero-desc-v2 {
    font-family: 'Raleway', sans-serif;
    font-size: 1.1rem;
    color: #4fa395;
    line-height: 1.3;
    font-style: italic;
    font-weight: 600;
    margin: 0;
  }

  .hero-img-side-v2 {
    flex: 1;
    display: flex;
    justify-content: flex-end;
  }

  .hero-img-side-v2 img {
    width: 90% !important;
    max-width: 320px !important;
    margin-right: 0 !important;
    transform: translateY(0%) !important; /* Subir imagen del resonador */
    /* Efecto igual a Desktop: Grayscale + PulseGlow */
    filter: grayscale(100%) brightness(1.05) drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
    animation: pulseGlow 3s ease-in-out infinite;
  }

  /* Barra de Portal (Gradiente) */
  .portal-bar-v2 {
    width: 100%;
    height: auto;
    min-height: 80px;
    background: linear-gradient(to right, #013d52 0%, #a8c8c4 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 25px;
    margin-top: 30px;
  }

  .portal-link-v2 {
    border: 1px solid white;
    color: white;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    white-space: nowrap;
  }

  .portal-subtext-v2 {
    color: #013d52;
    font-family: 'Raleway', sans-serif;
    font-weight: 800;
    font-size: 0.85rem;
    text-align: right;
    line-height: 1.2;
    padding-left: 15px;
    max-width: 200px;
    text-transform: uppercase;
  }

  /* Footer de Contacto (Panel 1) */
  .contact-footer-v2 {
    padding: 15px 0 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: transparent;
  }

  .contact-icons-v2 {
    display: flex;
    align-items: center;
    gap: 20px;
  }

  .contact-icons-v2 img {
    width: 55px;
    height: auto;
    /* Filtro para convertir a color #013d52 */
    filter: brightness(0) saturate(100%) invert(18%) sepia(34%) saturate(3786%) hue-rotate(175deg) brightness(96%) contrast(101%);
  }

/* ======= CONTACTO - BOTONES DESKTOP (COLOR #004860) ======= */
@media (min-width: 1025px) {
  #panel6 .contact-icons-v2 a {
    background: #004860 !important;
    border-radius: 50% !important;
    padding: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.15s ease, transform 0.08s ease !important;
  }

  #panel6 .contact-icons-v2 a:hover {
    background: #003948 !important;
  }

  #panel6 .contact-icons-v2 a:active {
    transform: scale(0.96) !important;
  }

  #panel6 .contact-icons-v2 a img {
    /* Aplicar filtro para colorear el ícono a #004860 */
    filter: brightness(0) saturate(100%) invert(17%) sepia(99%) saturate(1000%) hue-rotate(170deg) brightness(90%) contrast(100%) !important;
    width: 28px !important;
    height: auto !important;
    mix-blend-mode: normal !important;
  }
}

  .v-divider-v2 {
    width: 2px;
    height: 50px;
    background: #cbd9d7;
  }

  .contact-footer-v2 p {
    font-family: 'Raleway', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    color: #013d52;
    margin: 5px 0 0 0;
    text-transform: none;
    font-style: italic;
  }

  /* Decorador de flechas (Imagen animada) */
  .arrows-mobile-img {
    width: 60px;
    height: auto;
    margin-top: 15px;
    animation: moverFlecha 1.6s infinite;
  }
  
  /* Nuevo logotipo en Home Mobile */
  .mobile-logo-container-v2 {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 25px 20px 25px; /* Espacio antes del contenido */
  }

  .mobile-logo-img-v2 {
    width: 80%;
    max-width: 280px;
    height: auto;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
  }

  /* ===============================
     RESTO DE SECCIONES (ESTRUCTURA BASE)
     =============================== */
  #panel2,
  #panel3,
  #panel4,
  #panel5,
  #panel6 {
    padding-top: 0 !important;
    padding-bottom: 60px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    height: auto !important; /* Permitir que crezca con el contenido */
    min-height: 100vh;
    overflow: visible !important; /* Eliminar scroll interno trap */
    scroll-snap-align: start;
    scroll-margin-top: 0px; 
  }

  /* Headers de sección Sticky */
  .servicios-header,
  .tecnologia-header,
  .personal-header,
  .contacto-header,
  .nosotros-m-header {
    position: sticky !important;
    top: 0;
    margin-bottom: 20px !important;
    transform: none !important;
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    z-index: 100;
    /* Fondo semi-transparente difuminado para que se lea al pasar por encima del contenido */
    background: rgba(230, 240, 245, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 15px 0 15px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  }

  .servicios-header-img,
  .tecnologia-header-img,
  .personal-header-img,
  .contacto-header-img {
    width: 85% !important;
    max-width: 300px !important;
    height: auto !important;
  }

  /* Grid de Servicios */
  .contenedor-servicios {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
    padding: 0 20px !important;
    width: 100% !important;
    margin-top: 40px !important;
    max-height: none !important;
    overflow-y: visible !important;
  }

  .item {
    aspect-ratio: auto !important;
    border-radius: 30px !important;
  }

  .service-card-header h3 {
    font-size: 1.25rem !important;
    padding: 10px 15px !important;
  }

  .service-card-body {
    height: 200px !important;
  }

  /* Nosotros */
  .nosotros-desktop {
    display: none !important;
  }

  /* Nosotros Mobile Container */
  .nosotros-mobile {
    display: block !important;
    padding: 0 25px !important;
    position: relative;
    /* Background handled by body */
  }

  /* Header Nosotros Mobile Ajustado */
  .nosotros-m-header {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000;
    /* Romper el padding del padre (.nosotros-mobile) para ocupar todo el ancho */
    width: calc(100% + 50px) !important;
    margin-left: -25px !important;
    margin-bottom: 20px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
    /* Padding interno para alinear el contenido visualmente */
    padding: 15px 0 15px 50px !important; /* 25px (compensar margin) + 25px (padding deseado) */
    display: flex !important;
    justify-content: flex-start !important;
  }

  .nosotros-m-header img {
    width: 70%;
    max-width: 300px;
    height: auto;
  }

  /* Título Principal Mobile */
  .nosotros-m-title {
    text-align: left; /* Alineado a la derecha como en mockup */
    margin-bottom: 15px;
    padding-right: 15px;
    position: relative;
    z-index: 5;
  }

  .nosotros-m-title p {
    font-size: 1.35rem; /* Aumentado de 1.1rem */
    color: #013d52;
    line-height: 1.25;
    margin: 0;
  }
  
  /* Comillas Mobile */
  .comillas-mobile {
    position: absolute;
    top: 180px;
    right: 10px;
    width: 80px; /* Aumentado de 60px */
    z-index: 4;
    opacity: 0.6;
  }
  
  .comillas-mobile img {
    width: 100%;
  }
}

/* ===============================
   PERSONAL MOBILE GRID
=============================== */
.contenedor-personal-grid-mobile {
  display: none;
}

.personal-m-img {
  max-width: 320px;
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  display: block;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  /* Ocultar grid desktop */
  .contenedor-personal {
    display: none !important;
  }
  
  /* Mostrar grid mobile simple (solo imágenes) */
  .contenedor-personal-grid-mobile {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px !important;
    width: 100%;
    padding: 0 25px;
    margin-top: 20px;
    height: auto;
    overflow-y: visible;
  }
}

  /* Texto secundario (caja teal) */
  .nosotros-m-text {
    background: rgba(169, 219, 210, 0.6); 
    border-radius: 20px;
    padding: 25px; /* Aumentado padding */
    font-size: 1.05rem; /* Aumentado de 0.85rem */
    font-style: italic;
    color: #013d52;
    line-height: 1.35;
    margin-left: -20px; /* Superposición ligera */
    position: relative;
    z-index: 2;
    flex: 1; /* Ocupa el espacio restante */
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  }

  /* Imagen Doctor Mobile */
  .nosotros-m-doctor {
    position: relative; /* Ya no absoluta */
    bottom: auto;
    left: auto;
    width: 55%; /* Aumentado de 45% */
    max-width: 220px; /* Aumentado max-width */
    height: auto;
    z-index: 3;
    filter: drop-shadow(5px 5px 10px rgba(0,0,0,0.2));
    margin-left: -10px; /* Ajuste visual */
  }
  
  /* Footer Cuadraditos Mobile */
  .nosotros-m-footer {
    position: absolute;
    bottom: 90px;
    right: 20px;
    width: 180px; /* Aumentado de 150px */
    z-index: 4;
  }
  
  .nosotros-m-footer img {
    width: 100%;
    opacity: 0.8;
  }

/* ===============================
   SERVICIOS MOBILE
=============================== */

.servicios-mobile-container {
  display: none; /* Oculto en desktop */
}

.servicio-m-img {
  max-width: 320px;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 20px; 
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  margin: 0 auto;
}


@media (max-width: 1024px) {
  
  /* GRID DE IMÁGENES MOBILE */
  .servicios-m-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 25px !important; 
    width: 100%;
    max-width: 450px;
    padding: 0 25px 20px 25px !important;
    margin-top: 10px; /* Pequeño margen respecto al título */
    overflow-y: visible !important;
    flex-grow: 1;
    align-content: start;
    height: auto !important;
  }

  /* ASEGURAR OCULTAR VERSION DESKTOP */
  .contenedor-servicios {
    display: none !important;
  }

  /* AJUSTES DEL TÍTULO DE SECCIÓN EN MOBILE */
  .servicios-header {
    display: flex !important;
    position: -webkit-sticky !important; /* Safari compatibility */
    position: sticky !important;
    top: 0 !important;
    left: 0 !important; /* Asegurar left 0 */
    align-self: flex-start !important; /* Evitar que flexbox lo estire o desubique */
    margin-bottom: 0 !important;
    justify-content: flex-start !important; /* Forzar alineación izquierda */
    padding-left: 25px !important;
    width: 100%;
    z-index: 1000; /* Subir z-index por si acaso */
    /* Fondo semi-transparente para legibilidad */
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
    padding-top: 15px;
    padding-bottom: 15px;
    transition: all 0.3s ease; /* Suavizar cambios si los hubiera */
  }

  .servicios-header-img {
    width: 70% !important; /* Ajustar tamaño título */
    max-width: 300px;
    height: auto;
  }

  /* AJUSTE DEL PANEL PARA ALINEAR TODO ARRIBA */
  #panel2 {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
    padding-top: 0 !important; 
    min-height: 100vh;
    height: auto !important;
    overflow: visible !important;
    padding-bottom: 20px !important;
  }
  


  /* ===============================
     AJUSTE GLOBAL DE PANELES 3, 4, 5, 6 MOBILE
     =============================== */

  /* PANEL 3 - NOSOTROS */
  #panel3 {
    padding: 0 !important;
    height: auto !important;
    min-height: 100vh;
    overflow: visible !important;
  }

  /* PANEL 4 - TECNOLOGÍA */
  #panel4 {
    height: auto !important;
    min-height: 100vh;
    padding-top: 0 !important; 
    padding-bottom: 20px !important;
    overflow: visible !important;
    justify-content: flex-start !important;
  }

  #panel4 .tecnologia-header {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000;
    width: 100%;
    margin-bottom: 20px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
    padding: 15px 0 15px 25px !important;
    display: flex !important;
    justify-content: flex-start !important;
  }

  #panel4 .tecnologia-header-img {
    width: 70% !important;
    max-width: 300px;
    height: auto;
  }

  /* Grid en columna para mobile */
  #panel4 .tecnologia-grid {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    margin-top: 10px !important;
    padding: 0 20px !important;
    overflow-y: visible !important; /* Eliminar Scroll interno trap */
    height: auto !important;
    gap: 25px !important;
  }

  #panel4 .tec-item {
    margin-bottom: 0 !important;
    width: 100% !important;
  }

  /* Ocultar elementos desktop extraños en mobile */
  #panel4 .cuadritos-tec {
     display: none;
  }
  
  #panel4 .tec-header {
    margin-bottom: 5px;
  }

  #panel4 .tec-desc {
    font-size: 0.9rem;
  }


  /* PANEL 5 - PERSONAL */
  #panel5 {
    height: auto !important;
    min-height: 100vh;
    padding-top: 0 !important;
    padding-bottom: 20px !important;
    overflow: visible !important;
    justify-content: flex-start !important;
    padding-left: 0 !important; /* Reset padding desktop */
    align-items: center !important;
  }
}

/* ===============================
   PERSONAL MOBILE GRID
=============================== */
.personal-mobile-container {
  display: none;
}
.personal-desktop-container {
  display: flex;
  width: 100%;
  height: 100%;
  padding: 120px 80px 40px;
  box-sizing: border-box;
  gap: 40px;
  align-items: flex-start;
}

.personal-m-img {
  max-width: 320px;
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  display: block;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  
  /* MOSTRAR MOBILE CONTAINER */
  .personal-mobile-container {
      display: flex;
      flex-direction: column;
      width: 100%;
      height: auto !important; /* Permitir que crezca */
      overflow: visible !important;
  }
  
  /* OCULTAR DESKTOP */
  .personal-desktop-container {
    display: none !important;
  }

  /* HEADER MOBILE STICKY */
  .personal-m-header {
      position: -webkit-sticky !important;
      position: sticky !important;
      top: 0 !important;
      z-index: 1000;
      width: 100%;
      margin-bottom: 20px !important;
      background: rgba(255, 255, 255, 0.9) !important;
      backdrop-filter: blur(10px) !important;
      -webkit-backdrop-filter: blur(10px) !important;
      box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
      padding: 15px 0 15px 25px !important;
      display: flex !important;
      justify-content: flex-start !important; /* Alinear a la izquierda */
  }
  .personal-m-header img {
      width: 70%;
      max-width: 300px;
      height: auto;
  }

  /* TEXT MOBILE */
  .personal-m-text {
      padding: 0 25px;
      margin-bottom: 20px;
      flex-shrink: 0;
  }
  .personal-m-text p {
      font-size: 0.95rem;
      color: #013d52;
      line-height: 1.4;
      text-align: left;
      margin: 0;
  }

  /* GRID IMAGES MOBILE */
  .personal-m-grid {
      display: flex !important;
      flex-direction: column !important;
      gap: 25px !important;
      width: 100% !important;
      padding: 0 25px 20px 25px !important;
      overflow-y: visible !important; /* Eliminar scroll interno trap */
      height: auto !important;
      align-content: start;
  }
  
  /* OCULTAR ELEMENTOS FLOTANTES EN MOBILE */
  .fixed-contact {
    display: none !important;
  }
}


/* ===============================
   AJUSTES PANEL 6 CONTACTO MOBILE (SEGURO)
=============================== */
@media (max-width: 1024px) {
  #panel6 {
    height: auto !important; /* Permitir scroll fluido */
    min-height: 100vh;
    padding-top: 0 !important; /* Reset padding para que el sticky header empiece arriba */
    padding-bottom: 20px !important;
    overflow: visible !important;
    justify-content: flex-start !important;
  }

  /* Imagen de fondo solo para tablets (no móviles) */
  @media (min-width: 769px) {
    #panel6 {
      background-image: url('assets/images/FONDOS/Mesa-de-trabajo-8.webp') !important;
      background-size: cover !important;
      background-position: center !important;
      background-repeat: no-repeat !important;
    }

    /* AJUSTES HOME PARA TABLET - Subir imagen y textos */
    .panel1-main-container {
      padding-top: 0vh !important; /* Subir todo el contenido */
    }

    .hero-text-side {
      padding-top: 0px !important; /* Reducir padding para subir textos */
    }

    .hero-img-side-v2 img {
      transform: translateY(0%) !important;
      width: 90% !important;
      max-width: 320px !important;
      margin-right: 0 !important;
    }

    /* OCULTAR LOGO HOME EN TABLET */
    .mobile-logo-container-v2 {
      display: none !important;
    }
  }

  /* Header Sticky Estilo Servicios */
  #panel6 .contacto-header {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000;
    width: 100%;
    margin-bottom:  20px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
    padding: 15px 0 15px 25px !important;
    display: flex !important;
    justify-content: flex-start !important; /* Alinear a la izquierda */
  }

  #panel6 .contacto-header-img {
     width: 70% !important; /* Agrandar titulo consistente con otros */
     max-width: 300px;
     height: auto;
  }
  
  /* Restaurar tamaño y flujo de textos */
  #panel6 .contactos-bloque {
    flex-direction: column !important;
    gap: 30px !important; /* Más espacio entre items */
    overflow-y: visible !important;
    height: auto !important;
    justify-content: flex-start !important;
    padding-top: 10px;
    width: 100%;
    padding-left: 25px;
    padding-right: 25px;
    transform: none !important;
  }
  
  /* Agrandar textos e iconos ahora que hay scroll */
  .contacto-item p {
      font-size: 1.2rem !important; /* Fuente más grande y legible */
      line-height: 1.4 !important;
  }
  
  .contacto-icono {
      width: 45px !important; /* Iconos más grandes */
      margin-bottom: 5px !important;
  }

  #panel6 .dev-credit {
    position: relative !important;
    bottom: auto !important;
    left: auto !important; /* Reset desktop left positioning */
    right: auto !important;
    margin-top: 40px; /* Separación final */
    align-self: flex-start;
    margin-left: 25px;
    flex-shrink: 0;
    transform: none !important; /* Tamaño normal */
  }

  #panel6 .copyright-credit {
    position: relative !important;
    bottom: auto !important;
    right: auto !important; /* Reset desktop right positioning */
    left: auto !important;
    margin-top: 15px;
    align-self: flex-start; /* Alineado a la izquierda */
    margin-left: 25px !important; /* Margen consistente con el resto */
    padding-left: 0 !important;
    text-align: left !important;
    margin-bottom: 40px; /* Un poco más de aire al final */
    width: auto;
  }

  #panel6 .copyright-credit p {
    font-size: 0.9rem !important; /* Reducir un poco para que entre en una línea */
    text-align: left !important;
    line-height: 1.3;
    white-space: nowrap !important; /* Forzar una sola línea */
  }
  
  /* Ocultar botones de contacto del panel */
  #panel6 .contacto-home-contacto {
    display: none !important;
  }
}

/* CONTACTO DESKTOP BUTTON COLOR */
@media (min-width: 1025px) {
  #panel6 .contact-icons-v2 a {
    background: #004860 !important;
    border-radius: 50%;
    padding: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
  }
  #panel6 .contact-icons-v2 a:hover {
    background: #02608a !important;
  }
}

/* CONTACTO DESKTOP ICON COLOR AJUSTADO */
@media (min-width: 1025px) {
  #panel6 .contact-icons-v2 img {
    filter: brightness(0) saturate(100%) invert(17%) sepia(99%) saturate(1000%) hue-rotate(170deg) brightness(90%) contrast(100%) !important;
  }
}