/* 1. Variables y Estilos Generales */
:root {
  --sg-navy: #081830;
  --sg-teal: #00C8B5;
  --sg-white: #ffffff;
  --sg-light: #F4F8FC;
  --sg-muted: #6B7A8D;
  --sg-border: #DDE5EF;
  --color-topbar: #21264E;
  --color-primary: #00706A;
  --color-secondary: #21264E;
  --color-links-dark: #21264E;
  --color-gray: #f4f4f4;
  --font-family: 'Poppins', sans-serif;
  /* Usando Poppins */
}

body {
  font-family: var(--font-family) !important;
  padding-top: 0;  
  background-color: var(--color-primary) !important;
}
.small{
  font-size:.8em !important;
}
.blue-dark{
  color: var(--color-secondary) !important;
}
.green {
  color: var(--color-primary);
}
.text-justify{
  text-align: justify;
}
p{
  font-weight:lighter;
}

/* ---------------------------------------------------- */
/* ESTILOS DEL SLIDER (HERO SECTION) */
/* ---------------------------------------------------- */
.hero-slider-container {
  width: 100%;
  /* Asegura que el contenido del slider esté visible debajo del header */
  margin-top: -91px;
}
.swiper {
  width: 100%;
}
.swiper-slide {
  position: relative;
  background-size: cover;
  background-position: center;
  height: 900px;
  /* Altura del Hero Swiper */
}
/* Contenedor del contenido y logo para posicionarlos sobre el slider */
.slider-content-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  /* Asegura que el texto esté sobre la imagen */
  color: white;
  padding-top: 150px;
  /* Ajuste para compensar el header */
}
.slider-text {
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}
.word1, .word2 {
  opacity: 0; /* Oculta */
  transform: translateY(20px); /* Desplazada 20px hacia abajo */
  display: inline-block; /* Importante para que transform y opacity funcionen bien en palabras */
}
/* Estilo para el efecto de Zoom-in */
.banner-home img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 4s ease-out;
  /* Transición larga para el zoom */
}

/* Aplica el zoom-in al slide activo */
.banner-home.swiper-slide-active img {
  transform: scale(1.08);
  /* Ligeramente más grande */
}

/* ---------------------------------------------------- */
/* ESTILOS DE LA SECCIÓN 'ABOUT' */
/* ---------------------------------------------------- */
.about-section {
  position: relative;
  padding-bottom: 0;
  background-color: white;
  height: 600px;
  max-height: 700px;
}
.about-contact{
  position: relative;
  padding-bottom: 0;
  background-color: white;
}
.about-section-sol {
  position: relative;
  padding-bottom: 0;
  background-color: white;
}

/* Imagen de fondo a la derecha */
.about-bg-image {
  position: absolute;
  top: 70%;
  right: 0px;
  transform: translateY(-50%);
  max-width: 100%;
  width: 20%;
  height: auto;
  opacity: .9;
  z-index: 10;
  pointer-events: none
}

.about-content-wrapper {
  position: relative;
  z-index: 2;
  /* Asegura que el contenido quede encima de la imagen */
}

/* Bloque del Título con la línea vertical verde */
.about-title-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  border-right: 4px solid var(--color-primary);
  padding-right: 25px;
  height: 274px;
  align-items: flex-end;
}

.about-title {
  font-size: 2.2rem;
  font-weight: 400;
  /* Peso normal para "About" */
  color: var(--color-topbar);
  /* Azul oscuro */
  line-height: 1;
}

.about-title-highlight {
  color: var(--color-primary) !important;
  /* Verde */
  font-size: 3rem !important;
  font-weight: 700 !important;
}

/* Estilos del texto de contenido */
.about-section p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--color-secondary);
}

.about-section .lead {
  font-weight: normal;
  color: var(--color-secondary);
}


/* ---------------------------------------------------- */
/* ESTILOS DE LA SECCIÓN 'NOTICIAS' */
/* ---------------------------------------------------- */
.news-section {
  padding-top: 100px;
  /* Padding superior solo para el carrusel de noticias */
  padding-bottom: 80px;
  /* Ajustado para dar espacio al título del video */
  /* Color de fondo para la parte inferior (Azul Oscuro) */
  background-color: var(--color-secondary);
  background-image: url('/SofgenPharma/media/Images/section-video.webp');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center bottom;
  position: relative;
  z-index: 1;
}

/* Pseudo-elemento para el fondo superior (Blanco) */
.news-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  /* Altura del fondo blanco */
  height: 400px;
  background-color: white;
  z-index: -1;
}

/* Contenedor del título: Alineación en el centro de la página */
.news-title-container {
  max-width: 1320px;
  /* Ancho máximo de contenedor Bootstrap */
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  margin-bottom: 50px;
}

.news-title {
  /* Color del título en Verde para contraste con el fondo BLANCO */
  color: var(--color-primary);
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 0;
}

/* CAROUSEL (Swiper) */
.news-swiper-wrapper {
  overflow: hidden;
  /* Asegura que el carrusel no cause scroll horizontal */
}

.news-swiper {
  width: 100%;
  /* Altura ajustada a los slides */
  height: 450px;
  overflow: visible !important;
  padding-bottom: 0;
}

.news-swiper .swiper-slide {
  height: 450px;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.newsSwiper {
  max-height: 100%;
}

.newsSwiper .swiper-slide {
  height: auto !important;
}

/* Image Slide */
.slide-image img {
  width: 100%;
  height: 100%;
  max-height: 100%; /* puedes ajustar esta altura */
  object-fit: cover; /* recorta sin deformar */
  border-radius: 20px;
}

/* Text Card Slide: Altura ajustada a 450px */
.slide-text-card,
.slide-text-card-blue {
  color: white;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 20px;
  min-height: 280px; /* igual que las imágenes */
  box-sizing: border-box;
}

.slide-text-card {
  background-color: var(--color-primary);
  /* Teal background */
}

.slide-text-card-blue {
  background-color: var(--color-secondary);
  /* Dark Blue background */
}

.slide-text-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 20px;
}

.slide-text-card-blue h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 20px;
}

.slide-text-card a,
.slide-text-card-blue a {
  color: white;
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.3s;
}

.slide-text-card a:hover,
.slide-text-card-blue a:hover {
  color: #f4f4f9;
}

/* Custom Navigation Arrows Styling (Usando los anchors con ID) */
.news-swiper-nav a {
  background-color: transparent;
  border: 2px solid white;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin: 0;
  transition: background-color 0.3s, border-color 0.3s;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
}

.news-swiper-nav a i {
  font-size: 1.2rem;
}

.news-swiper-nav a:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: var(--color-primary);
}

/* Aseguramos que el Swiper Wrapper de noticias también tenga la altura correcta */
.newsSwiper .swiper-wrapper {
  height: 100% !important;
}

/* Eliminamos los botones de navegación por defecto de Swiper ya que usamos los custom */
.news-swiper .swiper-button-next,
.news-swiper .swiper-button-prev {
  display: none !important;
}


/* VIDEO SECTION - ESTILOS CORREGIDOS */
.video-container {
  position: relative;
  /* Usamos padding-top para crear espacio visual entre carrusel y video */
  padding-top: 60px;
  /* Añadimos padding al final del contenedor para el texto inferior */
  padding-bottom: 30px;
  /* Asegura que el texto y el video queden encima del fondo azul de .news-section */
  z-index: 2; 
}

.video-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  /* **CORRECCIÓN 1:** ELIMINAR EL FONDO NEGRO EXPLÍCITO. Dejar que el padre defina el fondo. */
  /* background-color: #000; */ 
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  /* Asegura que la tarjeta no tenga margen superior */
  margin-top: 0;
  
  /* **CORRECCIÓN 2: DEFINIR RELACIÓN DE ASPECTO 16:9** */
  width: 100%;
  height: 0;
  padding-top: 42.25%; /* 9 / 16 * 100 = 56.25% */
}

.video-card img {
  /* Hacer que la imagen sea absoluta y cubra el contenedor definido por padding-top */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  /* Ocupa todo el ancho */
  height: 100%;
  /* Ocupa todo el alto */
  display: block;
  opacity: 0.8;
  transition: opacity 0.3s;
  /* Asegura que la imagen cubra el contenedor redondeado */
  object-fit: cover; 
}

.video-card:hover img {
  opacity: 1;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  z-index: 10;
}

/* El botón también debe ser absoluto y estar centrado para funcionar con la nueva estructura */
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* ... estilos existentes ... */
}

.play-button {
  font-size: 2.5rem;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--color-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.3s, background-color 0.3s;
}

.play-button:hover {
  transform: scale(1.1);
  background-color: #00877a;
}

/* Nuevo estilo para el título debajo del video */
.video-title-bottom-container {
  /* Debe estar fuera del .video-card para simular el diseño */
  text-align: center;
  padding-top: 20px;
  color: white;
}

.video-title-bottom {
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0;
  /* Eliminamos el margen superior que tenía */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}


/* ---------------------------------------------------- */
/* ESTILOS DEL HEADER                                    */
/* ---------------------------------------------------- */

.main-header {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 1030;
  transition: box-shadow 0.3s ease;
}

/* --- Topbar --- */
.topbar {
  background-color: var(--color-topbar);
  color: white;
  padding: 8px 0;
}

.topbar a {
  color: white;
  text-decoration: none;
  transition: color 0.2s ease;
}

/* Botón de contacto (topbar y navbar) */
.topbar-contact {
  background-color: var(--color-primary);
  padding: 8px 15px;
  display: block;
  line-height: 1;
  font-weight: 600;
}

.topbar-contact:hover {
  color: white !important;
  background-color: #00877a;
}

/* --- Navbar principal (blanco) --- */
.main-nav {
  background-color: var(--sg-white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.main-nav .nav-link,
.main-nav .navbar-brand {
  color: var(--color-links-dark) !important;
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: color 0.3s ease;
}

.main-nav .nav-link:hover,
.main-nav .nav-link:focus {
  color: var(--color-primary) !important;
}

/* El botón de contacto conserva texto blanco sobre su fondo verde */
.main-nav .nav-link.topbar-contact {
  color: var(--sg-white) !important;
}

.main-nav .nav-link.topbar-contact:hover,
.main-nav .nav-link.topbar-contact:focus {
  color: var(--sg-white) !important;
  background-color: #00877a;
}

/* --- Logo --- */
.navbar-brand img {
  height: 60px;
}

.logo-color { display: block; }
.logo-white { display: none; }

/* --- Toggler móvil (azul oscuro sobre fondo blanco) --- */
.main-nav .navbar-toggler {
  border-color: rgba(33, 38, 78, 0.25);
}

.main-nav .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(33,38,78,1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.main-nav .navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 166, 156, 0.25);
}

@media (max-width: 991.98px) {
  .main-nav .navbar-collapse {
    background-color: var(--sg-white);
    padding-bottom: 0.5rem;
  }
}

/* --- Distribución del menú alrededor del logo --- */
.navbar-nav-left {
  flex-grow: 1;
  justify-content: flex-end;
}

.navbar-nav-right {
  flex-grow: 1;
  justify-content: flex-start;
}

/* ---------------------------------------------------- */
/* ESTILOS DEL PREFOOTER (ESTADÍSTICAS) */
/* ---------------------------------------------------- */
/* --- Redes sociales --- */
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .25);
  color: #fff;
  font-size: 1.05rem;
  text-decoration: none;
  transition: all .3s ease;
}
.footer-social a:hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}
.prefooter-section {
  background-color: white;
  padding: 80px 0;
  position: relative;
  margin-top: -50px; /* Se superpone a la sección de noticias */
  z-index: 5;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 0;
}

.stat-number {
  font-size: 5rem; /* 80px */
  font-weight: 300;
  line-height: 1;
  color: var(--color-secondary); /* Azul oscuro */
  margin-bottom: 5px;
}

.stat-text-upper {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-secondary); /* Azul oscuro */
  margin-bottom: 0;
}

.stat-text-lower {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-primary); /* Verde primario */
  line-height: 1;
}

.stat-divider {
  height: 120px;
  width: 4px;
  background-color: var(--color-primary);
  margin: 0 auto;
}
/* ---------------------------------------------------- */
/* ESTILOS DEL CORPORATE VALUES */
/* ---------------------------------------------------- */
.bg-values{
  background-image: url('/SofgenPharma/media/Images/bg-section-valores.webp');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  background-attachment: fixed;
}
.bg-card-custom{
  background-color: #f8f9fa !important;
  color: white !important;
  border: solid 1px #d6d9d6 !important;
  height: 250px !important;
}
.card-title{color:var(--color-primary) !important;}
.card-text {color:var(--color-secondary) !important;}

/* ---------------------------------------------------- */
/* ESTILOS DEL BANNER DE PÁGINA INTERIOR (HERO) */
/* ---------------------------------------------------- */
.page-banner {
  position: relative;
  height: 500px;
  /* Altura del banner, puedes ajustarla */
  background-image: url('/SofgenPharma/media/Images/bg-interno-header.webp');
  background-size: cover;
  background-position: center center;
  display: flex;
  align-items: center;
  margin-top: -92px;
  /* Espacio para el header fijo/sticky */
  color: white;
  z-index: 1;
}
/* Contenido del Banner (Título) */
.banner-content {
  position: relative;
  z-index: 2;
  /* Sobre el overlay */
  text-align: left;
  padding-left: 15px; /* Pequeño ajuste para alineación */
}
.banner-title {
  font-size: 4rem;
  /* Título grande */
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0;
  /* Usamos flexbox para apilar las palabras verticalmente */
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.banner-title-2 {
  font-size: 3rem;
  /* Título grande */
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0;
  /* Usamos flexbox para apilar las palabras verticalmente */
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* Línea decorativa verde debajo del título */
.title-underline {
  display: block;
  width: 100%;
  height: 4px;
  background-color: var(--color-primary);
  /* Verde */
  margin-top: 10px;
}
/* ---------------------------------------------------- */
/* ESTILOS DE LA IMAGEN DE DISPLAY DENTRO DEL BANNER */
/* ---------------------------------------------------- */
.banner-display-container {
  position: absolute;
  bottom: 0;
  right: 0;
  height: 351px;
  /* Asegura que ocupe todo el alto del banner */
  width: 58.333333%; /* Ocupa col-7 de 12 (7/12 * 100) */
  z-index: 2; /* Sobre el fondo y el degradado */
  overflow: hidden;
  background-color: white; /* Para el fondo blanco de la imagen */
  border-radius: 30px 30px 0 0;
}

.banner-display-image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Asegura que la imagen cubra el contenedor */
}

/* Estilos específicos para las partes del título */
.banner-title-our {
  color: white;
  line-height: 1;
}

.banner-title-company {
  color: var(--color-primary); /* Color verde */
  line-height: 1;
  font-size: 0.4em; /* Hacer la segunda línea más pequeña */
  font-weight: 400; /* Fuente más delgada para la segunda línea */
}
/* ---------------------------------------------------- */
/* ESTILOS DEL SITE BY REGION */
/* ---------------------------------------------------- */
/* Utilidades de espaciado y estructura basadas en las clases de Bootstrap/Tailwind */
.container-fluid-custom {
  display: flex;
  min-height: 100vh;
}

/* Estilo personalizado para la forma visual izquierda */
.left-visual {
  flex-shrink: 0;
  width: 430px;
  position: relative;
  /* Se ajusta la altura para que la imagen de fondo se vea bien */
  min-height: 100vh; 
  display: none; /* Ocultar por defecto */
}

/* Contenedor de la forma degradada, ahora con la imagen de fondo */
.gradient-shape {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Aplicación de la imagen de fondo */
  background-image: url('/SofgenPharma/media/Images/ico-bg-sp.webp');
  background-size: cover; /* Asegura que cubra el área sin estirarse demasiado */
  background-repeat: no-repeat;
  background-position: left top; /* Alinea la parte superior/izquierda de la imagen */
}

.country-flag {
  width: 30px;
  height: 30px;
  border-radius: 9999px; /* Clase 'rounded-full' de Tailwind */
  object-fit: cover;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Sombra suave */
}
/* ---------------------------------------------------- */
/* LINES TERAPEUTICS */
/* ---------------------------------------------------- */
.lines-section {
  padding-top: 80px;
  /* Padding superior solo para el carrusel de noticias */
  padding-bottom: 80px;
  /* Ajustado para dar espacio al título del video */
  /* Color de fondo para la parte inferior (Azul Oscuro) */
  background-color: var(--color-secondary);
  background-image: url('/SofgenPharma/media/Images/section-video.webp');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center bottom;
  position: relative;
  z-index: 1;
}
/* Imagen de fondo (Respiratoria) */
.bg-image-respi {
  background-image: url('/SofgenPharma/media/Images/Lineas/Respiratoria.webp');
  background-size: cover;
  background-position: center;
  /* Transición suave para el cambio de color */
  transition: background-color 0.3s ease-in-out;
  height:100%;
}
/* Imagen de fondo (Salud Mujer) */
.bg-image-sm {
  background-image: url('/SofgenPharma/media/Images/Lineas/SM.webp');
  background-size: cover;
  background-position: center;
  /* Transición suave para el cambio de color */
  transition: background-color 0.3s ease-in-out;
  height:100%;
}
/* Imagen de fondo (Pedriatria) */
.bg-image-pd {
  background-image: url('/SofgenPharma/media/Images/Lineas/Pediatria.webp');
  background-size: cover;
  background-position: center;
  /* Transición suave para el cambio de color */
  transition: background-color 0.3s ease-in-out;
  height:100%;
}
/* Imagen de fondo (gastro) */
.bg-image-gas {
  background-image: url('/SofgenPharma/media/Images/Lineas/gastro.webp');
  background-size: cover;
  background-position: center;
  /* Transición suave para el cambio de color */
  transition: background-color 0.3s ease-in-out;
  height:100%;
}
/* Imagen de fondo (cardio) */
.bg-image-cardio {
  background-image: url('/SofgenPharma/media/Images/Lineas/cardio.webp');
  background-size: cover;
  background-position: center;
  /* Transición suave para el cambio de color */
  transition: background-color 0.3s ease-in-out;
  height:100%;
}
/* Imagen de fondo (cardio) */
.bg-image-ofta {
  background-image: url('/SofgenPharma/media/Images/Lineas/ofta.webp');
  background-size: cover;
  background-position: center;
  /* Transición suave para el cambio de color */
  transition: background-color 0.3s ease-in-out;
  height:100%;
}

/* Icono superpuesto (pulmones) */
.overlay-icon {
  width: 80px; /* Tamaño del icono */
  /* Transición suave para el cambio de color (filtro) */
  transition: filter 0.3s ease-in-out;
}

/* --- Lógica del efecto Hover --- */
/* Al pasar el mouse sobre el contenedor... */
.image-container{height:200px;}
.image-container:hover .bg-image-respi,
.image-container:hover .bg-image-sm,
.image-container:hover .bg-image-pd,
.image-container:hover .bg-image-gas,
.image-container:hover .bg-image-cardio,
.image-container:hover .bg-image-ofta{
  /* Se oculta la imagen de fondo y se muestra un color verde */
  background-image: none;
  background-color: var(--color-primary); /* Un verde estándar de Bootstrap */
}

.image-container:hover .overlay-icon {
  /* Se invierten los colores del icono para que se vea blanco */
  filter: brightness(0) invert(1);
}
/* ---------------------------------------------------- */
/* ESTILOS DEL NAVPILLS */
/* ---------------------------------------------------- */
/* --- Estilos personalizados para replicar la imagen --- */
.section-nav-pills{
  z-index:12;
}

/* Contenedor principal de las pestañas */
.custom-nav-pills {
  background-color: var(--color-topbar); /* Color de fondo azul oscuro/púrpura */
  border-radius: 0.5rem;      /* Bordes redondeados */
  padding: 0.5rem;
  width: fit-content; /* Ajustar el ancho al contenido */
}

/* Estilo de cada enlace/pestaña */
.custom-nav-pills .nav-link {
  color: #ffffff; /* Color de texto blanco */
  font-weight: 500;
  padding: 0.75rem 1.25rem;
  margin: 0 0.125rem;
  border-radius: 0.375rem; /* Bordes redondeados para cada pestaña */
  transition: background-color 0.2s ease-in-out;
  height: 80px;
}

/* Espacio entre el ícono y el texto */
.custom-nav-pills .nav-link i {
  margin-right: 0.6rem;
}

/* Estilo para la pestaña ACTIVA */
.custom-nav-pills .nav-link.active, 
.custom-nav-pills .show > .nav-link {
  background-color: var(--color-primary) !important; /* Color de fondo verde azulado */
  color: white;
  height: 80px;
}

/* Estilo para las pestañas inactivas al pasar el mouse (opcional, para mejor UX) */
.custom-nav-pills .nav-link:not(.active):hover {
  background-color: var(--color-primary) !important; /* Un tono más claro que el fondo */
  color: white;
}

/* Sección de Equipo */
.management-section {
  padding: 6rem 0;
}

.section-title {
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: 3rem;
}

/* Tarjeta del Miembro (Card) */
.member-card {
  background-color: #fff;
  border: none;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; /* Asegura que todas las tarjetas tengan la misma altura */
  display: flex;
  flex-direction: column;
}

.member-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.member-header {
  background-color: var(--color-primary);
  color: #fff;
  padding: 1.5rem 2rem;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  
  /* Nuevos estilos para la imagen y el texto */
  display: flex; 
  align-items: center;
  gap: 1.5rem; /* Espacio entre la imagen y el texto */
}

.member-header h4 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.member-header p {
  font-size: 1rem;
  font-weight: 400;
  opacity: 0.9;
}

/* Estilo para la imagen circular de perfil */
.profile-img-container {
  width: 80px;
  height: 80px;
  min-width: 80px;
  min-height: 80px;
  border-radius: 50%;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.3);
  border: 3px solid rgba(255, 255, 255, 0.5);
  flex-shrink: 0; /* Evita que se encoja en móvil */
}

.profile-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-body {
  padding: 2rem;
  flex-grow: 1; /* Permite que el cuerpo crezca para igualar la altura */
}

.member-body p {
  line-height: 1.7;
  font-size: 0.95rem;
}

/* Estilo para el enlace de "Leer más" */
.read-more-toggle {
  color: var(--color-primary) !important;
  text-decoration: none !important;
  font-weight: 600 !important;
}

/*----------------------------------------------*/
/* CDMO SECTION */
/*----------------------------------------------*/
.about-cdmo{
  background-color: var(--color-gray);
}
/*----------------------------------------------*/
/* CDMO SECTION */
/*----------------------------------------------*/
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(41,77,97,.8);
  background-image: linear-gradient(to top,rgba(0,0,0,.2) 0%,transparent 100%);
  border-bottom-left-radius: 3rem; 
  border-bottom-right-radius: 3rem;
}
/*----------------------------------------------*/
/* CONTACT */
/*----------------------------------------------*/
.bg-blue-contact{
  background-color: var(--color-secondary); /* Azul oscuro */
  background-image: url('/SofgenPharma/media/Images/bg-footer.webp');
  background-size: cover;
}
/* ---------------------------------------------------- */
/* ESTILOS DEL FOOTER */
/* ---------------------------------------------------- */
.main-footer {
  background-color: var(--color-secondary); /* Azul oscuro */
  background-image: url('/SofgenPharma/media/Images/bg-footer.webp');
  background-size: cover;
  padding-top: 40px;
  padding-bottom: 20px;
  color: white;
  position: relative;
  z-index: 4;
}

.footer-logo img {
  height: 50px;
  width: auto;
  margin-bottom: 20px;
}

/* --- Títulos de columna --- */
.footer-heading {
  color: var(--sg-white);
  text-transform: uppercase;
  letter-spacing: 1.6px;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 26px;
}

.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-nav li { margin-bottom: 16px; }
.footer-nav a {
  color: rgba(255, 255, 255, .85);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 300;
  transition: color .3s ease;
}
.footer-nav a:hover { color: var(--color-primary); }
.footer-about {
  color: rgba(255, 255, 255, .68);
  font-size: .92rem;
  line-height: 1.75;
  font-weight: 300;
  margin: 22px 0 26px;
  max-width: 340px;
}
/* --- Barra inferior --- */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  margin-top: 42px;
  padding-top: 22px;
}
.footer-bottom p,
.footer-bottom .ethics-link {
  font-size: .8rem;
  color: rgba(255, 255, 255, .55);
  margin: 0;
}
.footer-bottom .ethics-link {
  text-decoration: none;
  transition: color .3s ease;
}
.footer-bottom .ethics-link:hover { color: var(--color-primary); }
.footer-social-links {
  text-align: center;
  margin: 20px 0;
}

.footer-social-links a {
  color: white;
  font-size: 1.5rem;
  transition: color 0.3s;
}

.footer-social-links a:hover {
  color: var(--color-primary);
}

.footer-copyright {
  font-size: 0.75rem;
  line-height: 1.4;
  color: #ccc;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mostrar solo en pantallas grandes (equivalente a Bootstrap lg:) */
@media (min-width: 1024px) {
  .left-visual {
    display: block;
  }
}

/* Responsive adjustments for Footer */
@media (max-width: 767.98px) {
  .footer-links-list {
    flex-direction: column;
    gap: 10px;
    text-align: center;
    margin-bottom: 20px;
  }
  .news-swiper .swiper-slide {
    max-width: 90%;
  }
  .news-swiper .slide-text-card,
  .news-swiper .slide-text-card-blue {
    min-height: 220px;
  }
  .bg-card-custom{height: auto !important;}
  .hero-slider-container{
    margin-top: 0px;
  }
  .page-banner{
    margin-top: 0px;
  }
}

/* ----------- Estilos de espaciado solicitados (Desktop > 992px) ----------- */
@media (min-width: 992px) {
  .main-nav .container-fluid {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .navbar-collapse {
    flex-grow: 1;
    /* Permite que el contenedor de los navs se estire */
  }
  
  /* 1. Espaciado de 60px entre opciones del menú */
  .main-nav .nav-item {
    margin-right: 60px;
  }
  
  /* Eliminar el margen en el último elemento de cada grupo para que no afecte el espaciado con el logo */
  .navbar-nav-left .nav-item:last-child {
    margin-right: 0;
  }
  
  .navbar-nav-right .nav-item:last-child {
    margin-right: 0;
  }
  
  /* 2. Espaciado de 90px entre el logo y las opciones del menú */
  .navbar-nav-left {
    padding-right: 60px;
    /* Espacio entre el menú izquierdo y el logo */
  }
  
  .navbar-nav-right {
    padding-left: 60px !important;
    /* Espacio entre el logo y el menú derecho */
  }
}

/* Ajustes de Responsividad para la sección About */
@media (max-width: 991.98px) {
  prefooter-section {
    margin-top: 0; /* No superponer en móvil */
    padding: 50px 0;
    border-radius: 0;
  }
  .stat-divider {
    display: none;
  }
  .stat-item {
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
  }
  .stat-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
  }
  .stat-number {
    font-size: 4rem;
  }
  .about-section {
    height: auto;
  }
  
  .about-title-block {
    border-left: none;
    padding-left: 0;
    margin-bottom: 20px;
    text-align: center;
    height: auto;
    /* Resetear altura en móvil para evitar espacios innecesarios */
    display: block;
    /* Desactivar flexbox en móvil */
  }
  .banner-title,
  .about-title,
  .about-title-highlight {
    font-size: 2.5rem;
  }
  
  /* Ocultar la imagen de fondo en móviles si es demasiado grande o no encaja */
  .about-bg-image {
    display: none;
  }
  
  /* Ajustes para el slider de Noticias en móviles */
  .news-swiper .swiper-slide {
    width: 80%;
    /* Hacer que el slide ocupe un porcentaje de la vista */
  }
  
  .news-swiper .swiper-button-next,
  .news-swiper .swiper-button-prev {
    bottom: -40px;
  }
  
  .news-title {
    text-align: center;
  }
  
  .news-swiper-nav {
    margin-top: 20px;
  }
}

/* -------------------------------------------------------------------------- */