/* ============================================================
   custom.css — TODO el CSS del sitio centralizado aquí.
   Antes estaba repartido en <style> dentro de base.html e
   innovaciones.html; ahora vive en un único archivo para que
   el navegador lo cachee y sea más fácil de mantener.
   ============================================================ */

:root{
  --rother-azul: #006999;
  --rother-gris: #f8f9fa;
  --rother-cyan: #00b4d8;
  --transicion-suave: all 0.3s ease-in-out;
}

html{
  scroll-behavior: smooth;
  scroll-padding-top: 100px; /* para que el navbar fijo no tape el inicio de cada sección */
}

body {
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
}

/* --- Botón de "Iniciar sesión" en la esquina del navbar --- */
.btn-login-corner{
  position: absolute;
  top: 0.75rem;
  right: 1.5rem;
  background-color: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.6);
  padding: 0.4rem 1.1rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transicion-suave);
}
.btn-login-corner:hover{
  background-color: #fff;
  color: var(--rother-azul);
  border-color: #fff;
}
@media (max-width: 576px){
  .btn-login-corner{ position: static; display: inline-block; margin-top: 0.75rem; }
}
    /* Botones flotantes: comparten posición fija en la esquina inferior derecha,
       apilados verticalmente (WhatsApp arriba, volver-arriba justo debajo). */
    .boton-flotante-base{
      position: fixed;
      right: 1.5rem;
      width: 56px;
      height: 56px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 15px rgba(0,0,0,0.25);
      z-index: 1050;
      transition: transform 0.2s ease-in-out, opacity 0.3s ease-in-out;
    }
    .boton-flotante-base:hover{ transform: scale(1.08); }

    #boton-whatsapp{
      bottom: 1.5rem;
      background-color: #25D366;
      color: #fff;
      font-size: 1.6rem;
      text-decoration: none;
    }
    #boton-whatsapp:hover{ color: #fff; }

    #boton-volver-arriba{
      bottom: 6.2rem; /* justo encima del de WhatsApp */
      background-color: var(--rother-azul, #003399);
      color: #fff;
      font-size: 1.4rem;
      border: none;
      cursor: pointer;
      opacity: 0;
      visibility: hidden;
    }
    #boton-volver-arriba.visible{
      opacity: 1;
      visibility: visible;
    }

    @media (max-width: 576px){
      .boton-flotante-base{ width: 48px; height: 48px; right: 1rem; }
      #boton-whatsapp{ bottom: 1rem; }
      #boton-volver-arriba{ bottom: 5.2rem; }
    }

    /* --- Barra de progreso de lectura, arriba del todo --- */
    #barra-progreso{
      position: fixed;
      top: 0;
      left: 0;
      height: 3px;
      width: 0%;
      background: linear-gradient(90deg, #003399, #00b4d8);
      z-index: 1100;
      transition: width 0.1s ease-out;
    }

    /* --- Navbar: se compacta y gana sombra al hacer scroll --- */
    #navbar-principal{
      transition: box-shadow 0.3s ease, padding 0.3s ease;
    }
    #navbar-principal.compacto{
      box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    }
    #navbar-principal.compacto .container{
      padding-top: 0.15rem;
      padding-bottom: 0.15rem;
    }

    /* --- Enlaces de ancla del navbar (scrollspy) --- */
    #navbar-anclas{
      overflow-x: auto;
      flex-wrap: nowrap !important;
      white-space: nowrap;
      scrollbar-width: none;
    }
    #navbar-anclas::-webkit-scrollbar{ display: none; }
    .enlace-ancla{
      color: #0013FF;
      text-decoration: none;
      font-weight: 600;
      font-size: 20px;
      padding-bottom: 2px;
      border-bottom: 2px solid transparent;
      transition: color 0.2s ease, border-color 0.2s ease;
    }
    .enlace-ancla:hover,
    .enlace-ancla.activo{
      color: #dc3545;
      border-color: #00b4d8;
    }

    /* --- Scroll reveal: aparición progresiva al entrar en pantalla --- */
    .reveal{
      opacity: 0;
      transform: translateY(30px);
      transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .reveal.visible{
      opacity: 1;
      transform: translateY(0);
    }

    /* --- Líneas del título CONTACTO: se dibujan al entrar en pantalla --- */
    .titulo-contacto-wrap .linea{
      transform: scaleX(0);
      transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .titulo-contacto-wrap .linea.azul{ transform-origin: left center; }
    .titulo-contacto-wrap .linea.roja{ transform-origin: right center; }
    .titulo-contacto-wrap.visible .linea{ transform: scaleX(1); }

    /* Quien prefiera menos movimiento en su sistema, no ve ninguna animación */
    @media (prefers-reduced-motion: reduce){
      .reveal, .titulo-contacto-wrap .linea, #navbar-principal, #barra-progreso{
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
      }
    }

/* ---------- Estilos de la página Innovaciones (antes en innovaciones.html) ---------- */

  .seccion-py{
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
  @media (max-width: 768px){
    .seccion-py{ padding-top: 2.75rem; padding-bottom: 2.75rem; }
  }

  /* Evita que títulos/textos largos rompan el layout en ventanas muy estrechas */
  h1, h2, h5, h6, p{ overflow-wrap: break-word; }

  /* Bootstrap ya hace las imágenes fluidas con .img-fluid, pero por si acaso: */
  img{ max-width: 100%; height: auto; }

  .texto-azul{ color: var(--rother-azul); }

  /* Bloque A - Hero */
  .hero-innovaciones{
    background: linear-gradient(135deg, #0a0f1e 0%, #1a2540 60%, #003399 100%);
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .hero-innovaciones h1{
    letter-spacing: 3px;
  }

  /* Tarjetas genéricas con hover */
  .tarjeta-hover{
    background-color: #fff;
    border: 1px solid #eef0f3;
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: var(--transicion-suave);
    height: 100%;
  }
  .tarjeta-hover:hover{
    border-color: var(--rother-azul);
    box-shadow: 0 8px 25px rgba(0,51,153,0.15);
    transform: translateY(-4px);
  }

  /* Bloque B - Pilares */
  .badge-numero{
    background-color: var(--rother-azul);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .texto-justificado{ text-align: left; }

  /* Bloque C / H / K - Contenedores tipo "tarjeta grande" */
  .contenedor-modulo{
    background-color: #fff;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    padding: 3rem;
  }
  .badge-modulo{
    background-color: var(--rother-azul);
    color: #fff;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    display: inline-block;
  }
  .badge-modulo.cyan{ background-color: var(--rother-cyan); }

  .caja-grid-2x2{
    background-color: var(--rother-gris);
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    color: var(--rother-azul);
    transition: var(--transicion-suave);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .caja-grid-2x2:hover{
    background-color: var(--rother-azul);
    color: #fff;
  }

  .imagen-con-badge{
    position: relative;
    min-height: 280px;
    background-color: var(--rother-gris);
    border-radius: 1rem;
    overflow: hidden;
  }
  .imagen-con-badge img{
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
  }
  .badge-flotante{
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background-color: var(--rother-cyan);
    color: #fff;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  }
  .badge-flotante.derecha{ left: auto; right: 1rem; }
  .badge-flotante.oscuro{ background-color: #0a0f1e; }

  /* Bloque D - Esquema radial */
.imagen-dispositivo-circular {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 4px solid #003399;
  object-fit: contain;
  background: #ffffff;
  padding: 20px;
  box-sizing: border-box;
}
  .tarjeta-funcion{
    background-color: #fff;
    border: 1px solid #eef0f3;
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    padding: 1rem 1.25rem;
    transition: var(--transicion-suave);
    margin-bottom: 1rem;
  }
  .tarjeta-funcion:hover{
    border-color: var(--rother-azul);
    box-shadow: 0 8px 25px rgba(0,51,153,0.15);
  }

  /* Bloque E - Servicios */
  .servicio-numerado{
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid #eef0f3;
  }
  .servicio-numerado .numero{
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--rother-cyan);
    min-width: 50px;
  }
  .caja-imagen-gris{
    background-color: var(--rother-gris);
    border-radius: 0.75rem;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Bloque F - Beneficios */
  .tarjeta-beneficio{
    background-color: #fff;
    border: 1px solid #eef0f3;
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    padding: 1.5rem;
    height: 100%;
    transition: var(--transicion-suave);
  }
  .tarjeta-beneficio:hover{
    border-color: var(--rother-azul);
    transform: translateY(-4px);
  }
  .tarjeta-beneficio .numero-beneficio{
    color: var(--rother-azul);
    font-weight: 700;
    font-size: 1.5rem;
  }

  /* Bloque M - Cierre */
  .red-social-circular{
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--rother-azul);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transicion-suave);
    margin: 0 0.4rem;
  }
  .red-social-circular:hover{
    background-color: var(--rother-cyan);
    color: #fff;
  }
  .seccion-contacto{
    position: relative;
    background: linear-gradient(135deg, #0a0f1e 0%, #1a2540 60%, #003399 100%);
    color: #fff;
  }

  /* Título CONTACTO con las dos líneas divisorias (azul a la izquierda, roja a la derecha) */
  .titulo-contacto-wrap{
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
  }
  .titulo-contacto-wrap .linea{
    flex: 1;
    height: 3px;
    border-radius: 2px;
  }
  .titulo-contacto-wrap .linea.azul{ background-color: var(--rother-cyan); }
  .titulo-contacto-wrap .linea.roja{ background-color: #dc3545; }
  .titulo-contacto-wrap h2{
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 2px;
    margin: 0;
    white-space: nowrap;
  }

  /* Campos estilo "línea inferior", sin caja, para que se lean sobre la foto */
  .campo-linea{
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.6);
    border-radius: 0;
    color: #fff;
    padding: 0.5rem 0.25rem;
  }
  .campo-linea::placeholder{ color: rgba(255,255,255,0.6); }
  .campo-linea:focus{
    background: transparent;
    color: #fff;
    box-shadow: none;
    border-bottom-color: var(--rother-cyan);
  }
  .seccion-contacto label{
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
  }
  .seccion-contacto .form-check-input:checked{
    background-color: var(--rother-azul);
    border-color: var(--rother-azul);
  }
  .seccion-contacto a{ color: var(--rother-cyan); }
  footer.footer-innovaciones{
    background-color: #1a1f2b;
    color: #d9dce2;
    padding: 3rem 0;
  }
  footer.footer-innovaciones a{
    color: #d9dce2;
    text-decoration: none;
  }
  footer.footer-innovaciones a:hover{ color: #fff; }
