/* --- ESTILOS PERSONALIZADOS --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Raleway:wght@300;400;500;600;700&display=swap');

/* Definimos los colores del Kit de Marca */
:root {
  --brand-color: #2c9e95;
  /* Verde/Turquesa Principal */
  --brand-secondary: #15cafa;
  /* Azul Cian/Celeste */
  --brand-gold: #f6b81d;
  /* Amarillo/Dorado */
  --brand-grey: #95aba9;
  /* Gris */
  --brand-light: #fdfefe;
  /* Blanco Hueso */
}

/* =========================================
   ESTRUCTURA PRINCIPAL (CORRECCIÓN FOOTER)
   ========================================= */
html {
  height: 100%;
}

body {
  /* Tipografía Base: Raleway, Arial */
  font-family: 'Raleway', 'Arial', sans-serif;
  /* FOOTER PEGAJOSO: */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  color: #444;
  background-color: var(--brand-light);
}

h1,
h2,
h3,
h4,
h5,
h6,
.fw-bold {
  font-family: 'Montserrat', 'Arial', sans-serif;
}

/* Enlaces y Botones Link con Color de Marca */
.btn-link,
a {
  color: var(--brand-color);
  text-decoration: none;
  transition: all 0.3s;
}

.btn-link:hover,
a:hover {
  color: var(--brand-gold);
}

/* Hacemos que el contenido principal crezca para empujar el footer */
/* Si tienes un <main> o un div contenedor del contenido, esto ayuda, 
   pero el margin-top: auto en el footer hace el trabajo pesado. */


/* =========================================
   TOP BAR Y NAVBAR
   ========================================= */
.top-bar {
  background-color: #fff;
  color: var(--brand-color);
  padding: 8px 0;
  border-bottom: 1px solid #e0e0e0;
  font-size: 0.95rem;
}

.top-bar a {
  color: var(--brand-color);
  text-decoration: none;
  margin-left: 15px;
  transition: color 0.3s;
}

.top-bar a:hover {
  color: var(--brand-gold);
}

.navbar {
  background-color: #fff;
  padding: 15px 0;
  box-shadow: 0 4px 6px -6px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  display: flex;
  align-items: center;
  line-height: 1.2;
}

.logo-text-small {
  font-size: 0.7rem;
  color: var(--brand-color);
  display: block;
  font-weight: 600;
}

.logo-text-large {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--brand-color);
  letter-spacing: 1px;
}

.nav-link {
  color: var(--brand-color) !important;
  font-weight: 500;
  margin-left: 15px;
  font-size: 1rem;
}

.nav-link:hover {
  color: var(--brand-gold) !important;
}

.navbar-toggler {
  border: none;
  color: var(--brand-color);
}

/* =========================================
   LOGO
   ========================================= */
.logo-img {
  height: 80px;
  width: auto;
  object-fit: contain;
}

.brand-container {
  font-family: 'sans-serif';
  line-height: 1;
}

.ips-text {
  color: #888;
  font-size: 1.2rem;
  font-weight: 700;
  margin-right: 8px;
  margin-top: -4px;
  line-height: 1;
}

.nissi-text {
  color: #26a69a;
  font-size: 2.8rem;
  font-weight: 300;
  line-height: 0.8;
  letter-spacing: 2px;
}

.sas-text {
  color: #26a69a;
  font-size: 0.9rem;
  font-weight: 700;
  margin-left: 5px;
  margin-top: 19px;
}

.subtitle-text {
  color: #888;
  font-size: 0.8rem;
  letter-spacing: 1px;
  font-weight: 600;
  margin-top: 2px;
}

/* =========================================
   CAROUSEL
   ========================================= */
.carousel-img {
  height: 500px;
  /* Unifiqué tus dos reglas de altura */
  object-fit: cover;
}

.carousel-caption {
  background: rgba(0, 0, 0, 0.55);
  padding: 20px 30px;
  border-radius: 12px;
  bottom: 20%;
}

.carousel-caption h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
}

.carousel-caption p {
  margin: 0;
}

.carousel-control-prev,
.carousel-control-next {
  width: 60px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 2.5rem;
  height: 2.5rem;
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  background-size: 60% 60%;
  filter: invert(1);
}

@media (max-width: 768px) {
  .carousel-img {
    height: 300px;
  }

  .carousel-caption {
    font-size: 14px;
    padding: 12px;
  }
}

/* =========================================
   FOOTER (SOLUCIÓN DEFINITIVA)
   ========================================= */

/* El contenedor donde inyectas el footer (id="footer") */
#footer {
  margin-top: auto;
  /* Empuja el footer al fondo */
  width: 100%;
}

/* Aseguramos que la sección azul no tenga margenes externos */
footer section {
  margin-bottom: 0 !important;
  padding-bottom: 20px;
  padding-top: 20px;
}

/* =========================================
   PARCHE FINAL PARA EL FOOTER (ELIMINAR ESPACIO)
   ========================================= */

/* 1. Forzamos a que el contenedor footer no tenga padding abajo */
#footer footer {
  padding-bottom: 0 !important;
}

/* 2. Forzamos a que la sección azul no tenga margen abajo */
#footer section,
#footer section:last-child {
  margin-bottom: 0 !important;
}

/* 3. Aseguramos que la imagen toque el borde si es necesario */
#footer img {
  margin-bottom: 0 !important;
  display: block;
  /* Elimina espacio de línea base */
}

/* =========================================
   SUBMENÚS (CSS AVANZADO)
   ========================================= */

/* Scroll para menús muy largos */
.scrollable-menu {
  height: auto;
  max-height: 400px;
  overflow-x: hidden;
  overflow-y: auto;
}

.dropdown-header {
  font-size: 0.85rem;
  margin-top: 5px;
}

/* Hover verde */
.dropdown-item:hover,
.dropdown-item:focus {
  background-color: #0b6f6b;
  color: #ffffff;
}

/* --- SOLO PC (> 992px) --- */
@media (min-width: 992px) {

  /* Submenú a la derecha */
  .dropdown .dropend:hover>.dropdown-menu {
    display: block;
    position: absolute;
    top: 0;
    left: 100%;
    margin-top: -6px;
  }

  /* Flecha a la derecha */
  .dropend .dropdown-toggle::after {
    float: right;
    margin-top: 8px;
  }
}

/* --- SOLO MÓVIL (< 992px) --- */
@media (max-width: 991px) {

  /* Submenú estático (acordeón) */
  .dropdown-menu .dropdown-menu {
    position: static;
    display: none;
    border: none;
    padding-left: 20px;
    background-color: #f8f9fa;
  }

  /* Mostrar cuando JS agregue la clase .show */
  .dropdown-menu .dropdown-menu.show {
    display: block;
  }

  /* Flecha hacia abajo */
  .dropend .dropdown-toggle::after {
    float: right;
  }
}

/* =========================================
   ESTILOS PÁGINA: NOSOTROS
   ========================================= */

/* --- SECCIÓN QUIÉNES SOMOS --- */
.section-padding {
  padding: 80px 0;
}

.who-title {
  color: var(--brand-color);
  /* Usa el verde de tu marca */
  font-size: 3rem;
  font-weight: 600;
  line-height: 1.2;
}

.who-text {
  max-width: 520px;
  color: #555;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* --- SECCIÓN MISIÓN / VISIÓN --- */
.bg-green {
  background-color: #0b6f6b;
  /* Verde oscuro específico de esta sección */
  color: #fff;
}

.vision-title {
  color: var(--brand-color);
  font-weight: 700;
}

/* --- SECCIÓN VALORES --- */
.values-title {
  color: var(--brand-color);
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 60px;
}

.value-icon {
  font-size: 42px;
  color: var(--brand-gold);
  /* Usa el dorado de tu marca */
  margin-bottom: 15px;
}

.value-item h5 {
  font-weight: 600;
  color: #333;
}

/* --- BROCHURE (Descarga PDF) --- */
.brochure {
  background-color: #0b6f6b;
  color: #fff;
  padding: 40px 0;
}

.brochure h5 {
  margin-bottom: 0;
  font-weight: 600;
}

.brochure a {
  border: 2px solid #fff;
  color: #fff;
  padding: 10px 30px;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
}

.brochure a:hover {
  background-color: #fff;
  color: #0b6f6b;
  transform: translateY(-2px);
}

/* =========================================
   ESTILOS PÁGINA: CONTACTO
   ========================================= */

/* --- Sección Izquierda (Fondo verde con imagen) --- */
.contact-left-col {
  background: linear-gradient(rgba(0, 139, 130, 0.85),
      rgba(0, 150, 136, 0.85)),
    url('../img/consultas_medicas.jpg');
  background-size: cover;
  background-position: center;
  min-height: 500px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem;
}

/* Ajustes en escritorio */
@media (min-width: 992px) {
  .contact-section {
    min-height: calc(100vh - 180px);
    /* Header + footer aprox */
  }

  .contact-left-col {
    height: 100%;
    border-radius: 0;
  }
}

/* --- Sección Derecha (Formulario) --- */
.contact-right-col {
  background-color: #ffffff;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* --- Inputs personalizados --- */
.form-custom {
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 12px 15px;
  font-size: 0.9rem;
  color: #555;
}

.form-custom:focus {
  border-color: var(--brand-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 139, 130, 0.25);
}

/* --- Botón contacto --- */
.btn-contact {
  background-color: #004d40;
  color: #ffffff;
  font-weight: 600;
  padding: 12px 40px;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.btn-contact:hover {
  background-color: #00382e;
  color: #ffffff;
}

/* --- Información de contacto --- */
.contact-info-item {
  color: #555;
  font-size: 0.9rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.contact-info-item i {
  color: var(--brand-color);
  font-size: 1.2rem;
  margin-right: 10px;
  width: 25px;
}

/* ================================================ BANNER INTERNO =========================================================== */

.page-banner {
  position: relative;
  background-size: cover;
  background-position: center;
  height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(11, 111, 107, 0.75);
  /* verde IPS */
}

.page-banner-content {
  position: relative;
  text-align: center;
  color: #fff;
  z-index: 1;
}

.page-banner-content h1 {
  font-size: 3rem;
  font-weight: 600;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.banner-line {
  width: 80px;
  height: 4px;
  background-color: #f4a300;
  margin: 15px auto 0;
}

/* =========================================
   ESTILOS PÁGINAS DE SERVICIO (NUEVO)
   ========================================= */

/* Feature Box (Card con ícono) */
.feature-box {
  background: #fff;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  border-top: 4px solid var(--brand-color);
}

.feature-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon-circle {
  width: 60px;
  height: 60px;
  background-color: rgba(0, 139, 130, 0.1);
  color: var(--brand-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.feature-title {
  color: #333;
  font-weight: 600;
  margin-bottom: 1rem;
}

.feature-text {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Sección de Pasos / Proceso */
.process-step {
  padding: 1.5rem;
  border-left: 2px solid #e0e0e0;
  position: relative;
  margin-left: 1rem;
}

.process-step::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 1.5rem;
  width: 16px;
  height: 16px;
  background-color: var(--brand-gold);
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px #e0e0e0;
}

.process-number {
  color: var(--brand-color);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}

/* CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, var(--brand-color), #004d40);
  color: #fff;
  padding: 4rem 0;
  text-align: center;
}

.cta-btn {
  background-color: var(--brand-gold);
  color: #333;
  font-weight: 700;
  padding: 12px 35px;
  border-radius: 50px;
  text-decoration: none;
  display: inline-block;
  margin-top: 1.5rem;
  transition: transform 0.2s;
}

.cta-btn:hover {
  background-color: #ffc107;
  transform: scale(1.05);
  color: #000;
}

/* Content Layout */
.service-content-main {
  font-size: 1.1rem;
  color: #444;
  line-height: 1.8;
}

.sidebar-box {
  background-color: #f8f9fa;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.sidebar-title {
  color: var(--brand-color);
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #ddd;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.check-list li {
  position: relative;
  padding-left: 1.8rem;
  margin-bottom: 1rem;
  color: #555;
}

.check-list li::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 0;
  color: var(--brand-color);
}

/* =========================================
   ESTILOS TABS (CONTACTO)
   ========================================= */
.nav-pills .nav-link {
  color: var(--brand-color);
  background-color: #f8f9fa;
  margin: 0 5px;
  border: 1px solid #e0e0e0;
  border-radius: 50px;
  /* Bordes redondeados tipo cápsula */
  transition: all 0.3s ease;
}

.nav-pills .nav-link:hover {
  background-color: #e0f2f1;
  color: var(--brand-color);
}

.nav-pills .nav-link.active {
  background-color: var(--brand-color) !important;
  color: #fff !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-color: var(--brand-color);
}
/* =========================================
   UTILIDADES DE MARCA (COLORES UNIFORMES)
   ========================================= */

.text-primary, .text-info, .text-success, .text-danger { color: var(--brand-color) !important; }
.text-warning { color: var(--brand-gold) !important; }
.bg-primary, .bg-info, .bg-success, .bg-danger { background-color: var(--brand-color) !important; }
.bg-warning { background-color: var(--brand-gold) !important; }
.btn-primary { background-color: var(--brand-color) !important; border-color: var(--brand-color) !important; }
.btn-warning { background-color: var(--brand-gold) !important; border-color: var(--brand-gold) !important; color: #fff !important; }
.feature-box i, .service-card i, .icon-box i { color: var(--brand-color) !important; }
.text-brand { color: var(--brand-color) !important; }
.text-brand-gold { color: var(--brand-gold) !important; }
.bg-brand { background-color: var(--brand-color) !important; }
.border-primary { border-color: var(--brand-color) !important; }

.btn-brand { background-color: var(--brand-color); border-color: var(--brand-color); color: #fff; }
.btn-brand:hover { background-color: #238b82; border-color: #238b82; color: #fff; }
.btn-brand-gold { background-color: var(--brand-gold); border-color: var(--brand-gold); color: #fff; }
.btn-brand-gold:hover { background-color: #e0a81b; border-color: #e0a81b; color: #fff; }

.border-brand { border-color: var(--brand-color) !important; }
.border-brand-gold { border-color: var(--brand-gold) !important; }

/* Correccin de botones outline */
.btn-outline-primary { color: var(--brand-color) !important; border-color: var(--brand-color) !important; }
.btn-outline-primary:hover { background-color: var(--brand-color) !important; border-color: var(--brand-color) !important; color: #fff !important; }

/* POSICIONAMIENTO INVERSO DE SUBMENS */
.dropend .dropdown-menu-reverse { left: auto !important; right: 100% !important; margin-left: 0; margin-right: 0.125rem; top: 0; }

/* Evitar que el texto del men se parta y baje la flecha */
.dropdown-menu .dropdown-item { white-space: nowrap; }

/* ARREGLO FINAL FLECHA MENU LATERAL */
.dropdown-menu .dropdown-toggle { display: flex !important; align-items: center !important; justify-content: space-between !important; white-space: nowrap !important; width: 100%; }
.dropdown-menu .dropdown-toggle::after { margin-left: 1rem !important; flex-shrink: 0 !important; align-self: center !important; }

/* CORRECCIN RESPONSIVE CARRUSEL */
@media (max-width: 768px) {
  .carousel-item { min-height: 400px; } /* Altura mnima para que quepa el texto */
  .carousel-item img { height: 400px; object-fit: cover; } /* Imagen cubre el rea sin deformarse */
  .carousel-caption { bottom: 20%; left: 5%; right: 5%; padding: 10px; }
  .carousel-caption h1 { font-size: 1.5rem !important; }
  .carousel-caption p { font-size: 0.9rem !important; }
  .carousel-caption .btn { font-size: 0.8rem !important; padding: 0.5rem 1rem !important; }
}
/ *   - - -   E S T I L O S   M E N U   M O V I L   C E N T R A D O   - - -   * /  
 @ m e d i a   ( m a x - w i d t h :   9 9 1 p x )   {  
         . n a v b a r - c o l l a p s e   {  
                 t e x t - a l i g n :   c e n t e r ;  
         }  
  
         . n a v b a r - n a v   {  
                 m a r g i n - r i g h t :   0   ! i m p o r t a n t ;  
                 w i d t h :   1 0 0 % ;  
                 a l i g n - i t e m s :   c e n t e r ;  
         }  
  
         . n a v - i t e m   {  
                 w i d t h :   1 0 0 % ;  
                 d i s p l a y :   f l e x ;  
                 j u s t i f y - c o n t e n t :   c e n t e r ;  
         }  
  
         . d r o p d o w n - m e n u   {  
                 t e x t - a l i g n :   c e n t e r ;  
                 b a c k g r o u n d - c o l o r :   t r a n s p a r e n t ;  
                 b o r d e r :   n o n e ;  
                 b o x - s h a d o w :   n o n e   ! i m p o r t a n t ;  
         }  
  
         . n a v b a r - n a v   . n a v - l i n k   {  
                 j u s t i f y - c o n t e n t :   c e n t e r ;  
         }  
 }  
 