/* ============================================= */
/*                 SERVICIOS.CSS                 */
/* ============================================= */

/* HERO GENERAL */
#hero-servicios {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white-color);
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero-video.mobile { display: none; }

@media (max-width: 767px) {
  .hero-video:not(.mobile) { display: none; }
  .hero-video.mobile { display: block; }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 2rem;
}


#titulo-hero-servicios {
  font-family: var(--font-family-heading);
  font-size: clamp(2rem, 3vw, 2.6rem);
  color: var(--white-color);
  margin-bottom: 1rem;
}

/* Palabra destacada en otra línea */
#titulo-hero-servicios span {
  font-family: var(--font-family-heading);
  font-size: clamp(2rem, 3vw, 2.6rem);
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.servicio-titulo {
font-family: var(--font-family-heading);
  font-size: clamp(2rem, 3vw, 2.6rem);
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.titulo-escritorio {
  display: block;
}

.titulo-movil {
  display: none;
}

@media (max-width: 768px) {
  .titulo-escritorio {
    display: none;
  }

  .titulo-movil {
    display: block;
    font-size: 1.5rem;
    line-height: 1.4;
    text-align: left;
  }
}

.hero-content h1 span {
  color: var(--black-color);
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  line-height: 1.5;
  display: block;
  margin-top: 0.4rem;
}

.hero-content p {
  font-family: var(--font-family-main);
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  max-width: 900px;
  margin: 0 auto 3rem;
  color: var(--white-color);
  padding: 0 1rem;
}

/* SECCIONES FULL */
.servicio-full {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  padding: 5vw;
  align-items: center;
  gap: 4rem;
  background-color: var(--white-color);
  border-bottom: 1px solid #eee;
}

.servicio-content {
  max-width: 600px;
}

.servicio-content h2 {
  font-family: var(--font-family-heading);
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.servicio-content h3 {
  color: var(--black-color);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1.5;
  display: block;
  margin-top: 0.4rem;
}

.servicio-content p {
  font-family: var(--font-family-main);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--black-color);
  margin-bottom: 2rem;
}

/* VIDEO CATEGORÍA */
.servicio-video {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.servicio-video video {
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
  object-fit: cover;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s ease forwards;
  animation-delay: 0.3s;
}

.video-sound-toggle {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.1rem;
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  z-index: 10;
  backdrop-filter: blur(4px);
  transition: background 0.3s ease, transform 0.3s ease;
}

.video-sound-toggle:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .video-sound-toggle {
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
    bottom: 0.75rem;
    right: 0.75rem;
  }
}

.servicio-video video.mobile { display: none; }

@media (max-width: 991px) {
  .hero-nosotros-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }

  .hero-description {
    margin: 0 auto;
  }

  .servicio-video video.desktop { display: none; }
  .servicio-video video.mobile { display: block; }
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.servicio-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* NUEVO LAYOUT AGRUPADO */
.servicios-grid-wrapper {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  padding: 5vw;
  align-items: center;
  min-height: 100vh;
}

.servicios-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.servicio-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.servicio-card h2 {
  font-family: var(--font-family-heading);
  font-size: 1.6rem;
  color: var(--primary-color);
}

.servicio-card h3 {
  font-size: 1.1rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  color: #000000;
}

.servicio-card p {
  font-size: 1rem;
  color: var(--black-color);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

@media (max-width: 991px) {
  .servicios-grid-wrapper {
    grid-template-columns: 1fr;
  }

  .servicios-grid {
    grid-template-columns: 1fr;
  }

  .servicio-video {
    display: none;
  }
}


/* Control de visibilidad por dispositivo */
.servicio-video video.mobile { display: none; }

@media (max-width: 991px) {
  .servicio-video {
    display: block;
    margin-top: 2rem; /* opcional */
  }

  .servicio-video video.desktop {
    display: none;
  }

  .servicio-video video.mobile {
    display: block;
  }
}


/* Animación de aparición suave */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* BOTONES */
.servicio-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* PANEL CORPORATIVO AVANZADO */
.tab-lateral.premium {
  position: fixed;
  top: 7.5%;
  right: -100%;
  width: 70vw;
  height: 85%;
  background: #fff;
  z-index: 1000;
  border-radius: 16px 0 0 16px;
  box-shadow: -16px 0 32px rgba(0, 0, 0, 0.15);
  transition: right 0.4s ease;
  overflow: hidden;
}

/* Animación suave al abrir panel */
.tab-lateral.premium.open {
  right: 0;
  animation: slideInRight 0.4s ease forwards;
}

@keyframes slideInRight {
  from {
    right: -100%;
    opacity: 0;
  }
  to {
    right: 0;
    opacity: 1;
  }
}

/* WRAPPER INTERNO */
.tab-content-wrapper {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  height: 100%;
}

/* PANEL IZQUIERDO */
.tab-video-box {
  padding: 2rem 2.5rem;
  background-color: #fcfcfc;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  overflow-y: auto;
}

/* Texto del servicio */
#servicio-titulo {
  font-family: var(--font-family-heading);
  font-size: 1.2rem;
  color: var(--primary-color);
}

#servicio-descripcion {
  font-size: 1rem;
  color: #000000;
  padding-right: 1rem;
}

#servicio-que-es {
  font-size: 1rem;
  color: #000000;
  padding-right: 1rem;
}

#servicio-para-que-sirve {
  font-size: 1rem;
  color: #000000;
  padding-right: 1rem;
}

#servicio-potencial {
  font-size: 1rem;
  color: #000000;
  padding-right: 1rem;
}

#servicio-ejemplo {
  font-size: 1rem;
  color: #000000;
  padding-right: 1rem;
}


/* PANEL DERECHO */
.tab-servicios-box {
  padding: 2rem 1.5rem;
  background-color: #fff;
  overflow-y: auto;
  border-left: 1px solid #eee;
  display: flex;
  flex-direction: column;
}

/* Encabezado */
.tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #eee;
}

.tab-header h2 {
  font-family: var(--font-family-heading);
  font-size: 1.2rem;
  color: var(--primary-color);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Cierre */
#tab-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #000000;
  transition: color 0.3s ease;
}

#tab-close:hover {
  color: var(--primary-color);
}

/* Lista */
#tab-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-family-main);
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

#tab-list li {
  padding: 0.75rem 1.2rem 0.75rem 1.8rem;
  border-radius: 8px;
  transition: all 0.25s ease;
  cursor: pointer;
  color: var(--black-color);
  font-weight: 500;
  position: relative;
  background: transparent;
}

#tab-list li::before {
  content: "›";
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--primary-color);
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

#tab-list li:hover {
  background-color: #f8f8f8;
  padding-left: 2rem;
}

#tab-list li:hover::before {
  opacity: 1;
}

/* Activo */
#tab-list li.active {
  background-color: var(--primary-color);
  color: #fff;
  font-weight: 600;
  border-left: 4px solid #fff;
  padding-left: 2.2rem;
}

#tab-list li.active::before {
  color: #fff;
  opacity: 1;
}

/* RESPONSIVE */
@media (max-width: 767px) {
  .tab-lateral.premium {
    width: 100%;
    height: 100vh;
    top: 0;
    border-radius: 0;
  }

  .tab-content-wrapper {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    height: 100%;
    overflow-y: auto;
  }

  .tab-video-box, .tab-servicios-box {
    padding: 1.5rem;
  }

  #servicio-video {
    height: auto;
    aspect-ratio: 16/9;
  }
}

/* ============================================= */
/*                  CTA FINAL                    */
/* ============================================= */

#cta-servicios {
  background-color: var(--white-color);
  padding: clamp(5rem, 8vw, 9rem) 10vw;
  min-height: 90vh;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 10;
}

.cta-servicios-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

/* Frase principal */
.cta-frase {
  font-family: var(--font-family-heading);
  font-size: clamp(2rem, 3vw, 2.6rem);
  color: var(--primary-color);
  margin-bottom: 0.8rem;
  line-height: 1.2;
}

/* Palabra destacada */
.cta-frase .cta-destacado {
  color: var(--black-color);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  display: block;
  margin-top: 0.4rem;
}
.cta-frase {
  font-family: var(--font-family-heading);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  text-align: center;
  line-height: 1.3;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  padding: 0 1.5rem;
}

.cta-destacado {
  color: var(--black-color);
  display: block;
  margin-top: 0.5rem;
}

.cta-frase-escritorio {
  display: block;
}

.cta-frase-movil {
  display: none;
}

@media (max-width: 768px) {
  .cta-frase-escritorio {
    display: none;
  }

  .cta-frase-movil {
    display: block;
    font-size: 1.8rem;
    line-height: 1.4;
    padding: 0 1.2rem;
  }
}


.subtexto-escritorio {
  display: block;
}

.subtexto-movil {
  display: none;
}

@media (max-width: 768px) {
  .subtexto-escritorio {
    display: none;
  }

  .subtexto-movil {
    display: block;
    font-size: 1rem;
    line-height: 1.6;
    text-align: center;
    margin-top: 1rem;
  }
}


/* Botones de acción */
.cta-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
  margin-bottom: 4rem;
}

