/* =========================================================
   CIAME INSUMOS - ESTILOS GENERALES / ESCRITORIO
   ========================================================= */

/* Colores CIAME (referencia rápida) */
/* Azul:   #0B62AC | Rosado: #D65197 | Naranja: #ED7455
   Celeste:#7CC8CE | Verde:  #DAE291 */


/* Body de esta sección */

.insumos-body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #23303A;
  background: #fff;
  margin: 0;
}


/* Header azul fijo */

.ins-header-bg {
  background: #0B62AC; /* Celeste AZUL */
  position: fixed;       /* la deja fija */
  top: 0;                /* siempre en la parte superior */
  left: 0;
  width: 100%;           /* ocupa todo el ancho */
  z-index: 999;          /* por encima del contenido */
}


/* Barra naranja */

.ins-nav {
  display: flex;
  justify-content: center;
  padding: 18px 12px;
}

.ins-nav-pill {
  background: #ED7455;            /* Naranja CIAME */
  border-radius: 9999px;          /* extremos redondeados */
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  width: min(1100px, 95%);
}


/* Logo */

.ins-nav-logo img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}


/* =========================
   MENÚ ESCRITORIO
   ========================= */

.ins-nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.ins-nav-menu a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 9999px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ins-nav-menu a:hover {
  background: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}


/* -----------------------------
   DROPDOWN CATÁLOGO (Escritorio)
   ----------------------------- */

.has-dropdown {
  position: relative;
}

.has-dropdown .dropdown {
  position: absolute;
  top: 110%;
  left: 0;
  background: #ED7455;
  border-radius: 14px;
  padding: 8px;
  list-style: none;
  display: none;
  min-width: 170px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.has-dropdown.active .dropdown {
  display: block;
}

.dropdown a {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  color: #fff;
}

.dropdown a:hover {
  background: rgba(255,255,255,0.18);
}


/* Menú hamburguesa oculto en escritorio */

.ins-burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 1001;
}

/* Líneas */
.ins-burger span {
  display: block;
  height: 3px;
  width: 100%;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.28s cubic-bezier(.2,.9,.2,1), opacity .18s;
}

/* X al abrir */
.ins-burger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.ins-burger.active span:nth-child(2) {
  opacity: 0;
}
.ins-burger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}


/* =========================================================
   SECCIONES GENERALES
   ========================================================= */

/* Secciones */

.ins-section {
  padding: 56px 20px 56px; /* añade espacio superior para compensar la barra fija */
}

.container {
  width: min(1100px, 95%);
  margin: 0 auto;
}


/* Títulos y textos */

.ins-title {
  font-size: 2rem;
  color: #0B62AC; /* Azul CIAME */
  margin-bottom: 14px;
}

.ins-text {
  font-size: 1.05rem;
  color: #3f4a56;
  line-height: 1.7;
  max-width: 850px;
}


/* Botón CTA */

.ins-cta {
  display: inline-block;
  margin-top: 18px;
  background: #ED7455; /* Naranja CIAME */
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 9999px;
  transition: transform .2s ease, box-shadow .2s ease;
}

.ins-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}


/* ===========================================
   CARRUSEL HERO CIAME (1100 × 620)
   =========================================== */

.carrusel-hero {
  padding-top: 40px;
  padding-bottom: 40px;
  background: #ffffff;
}

.carrusel-hero .swiper {
  width: 100%;
  max-width: 1100px;
  height: 620px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.carrusel-hero .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Respeta proporción y llena */
  display: block;
}

/* Dots */
.swiper-pagination-bullet {
  background: #ffffff;
  opacity: 0.6;
}

.swiper-pagination-bullet-active {
  background: #ED7455; /* Naranja CIAME */
  opacity: 1;
}

/* Flechas escritorio */
.swiper-button-next,
.swiper-button-prev {
  color: #ffffff;
  text-shadow: 0 0 8px rgba(0,0,0,0.45);
}

@media (max-width: 900px) {
  .carrusel-hero .swiper {
    height: 440px;
  }
  .swiper-button-next,
  .swiper-button-prev {
    display: none;
  }
}

@media (max-width: 600px) {
  .carrusel-hero .swiper {
    width: 100%;
    /*height: 296px;*/
    height: auto;
    max-width: none;
    border-radius: 0;
  }
  .carrusel-hero {
    padding-top: 0;
    padding-bottom: 16px;
  }
  #carrusel-hero.ins-section {
    padding-left: 0;
    padding-right: 0;
  }
  .swiper-button-next,
  .swiper-button-prev {
    display: none;
  }
  #carrusel-hero .container {
    width: 100%;
    margin: 0;
    padding: 0;
  }
}


/* =========================================================
   CATÁLOGO – GRID Y CARDS
   ========================================================= */
   
/* === CATÁLOGO === */

.ins-catalogo {
  background: #0B62AC0D; /* azul muy sutil */
  position: relative;
}

.ins-group-title {
  font-size: 1.6rem;
  color: #0B62AC; /* Azul CIAME */
  /*margin: 12px 0 18px;*/
  margin-top: 60px;   /* espacio arriba del título */
  margin-bottom: 20px; /* espacio debajo del título */
  text-align: center;
}


/* Grid de tarjetas:
   - 4 por fila en escritorio
   - Se centra automáticamente la fila incompleta (5to y 6to) */

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  justify-content: center; /* centra la última fila si no está completa */
  margin-bottom: 100px; /* espacio debajo del bloque de tarjetas */
}


/* Tarjeta */

.card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.14);
}


/* Imagen (placeholder) — luego reemplazar por <img> */

.card-media {
  height: 300px; /* mantiene la altura del contenedor */
  overflow: hidden; /* evita que la imagen se salga del card */
}

.card-media img {
  width: 100%;        /* que se adapte al ancho del card */
  height: 100%;       /* que ocupe toda la altura del contenedor */
  object-fit: cover;  /* recorta proporcionalmente sin deformar */
  display: block;     /* elimina espacios fantasmas debajo de la img */
  border-radius: 8px 8px 0 0; /* opcional, si tus cards tienen esquinas redondeadas */
}


/* Contenido */

.card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;/**/
  padding: 14px 14px 18px;/**/
}

.card-title {
  font-size: 1.05rem;
  color: #0B62AC; /* Azul CIAME */
  margin-bottom: 32px;
}

.card-desc {
  color: #4a5562;
  font-size: 0.95rem;
  margin-bottom: 12px;
}


/* Botón "Más información" */

.btn-info {
  align-self: center; /* centra dentro del card */
  display: inline-flex; /* asegura que el contenido no se rompa */
  justify-content: center; /* centra el texto */
  background: #ED7455; /* Naranja CIAME */
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 12px;
  transition: transform .2s ease, box-shadow .2s ease;
  white-space: nowrap; /* evita salto de línea */
  word-break: keep-all; /* previene que Safari parta palabras */
  min-width: max-content; /* evita que se achique más de lo necesario */
  text-align: center;
}

.btn-info:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}


/* =========================================================
   CONTACTO
   ========================================================= */

.ins-contacto {
  background: #0B62AC;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  gap: 152px;
  justify-content: center;
}

.contact-item h4 {
  color: #fff;
  margin-bottom: 8px;
}

.contact-item a {
  color: #fff;
  text-decoration: none;
}

/* === TELÉFONO === */

.link-telefono {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #0B62AC;
  font-weight: bold;
  transition: 0.3s;
}

.link-telefono i {
  background-color: white;
  color: #0B62AC;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
  transition: 0.3s;
}

.link-telefono:hover {
  color: #ED7455;
}

.link-telefono:hover i{
  background-color: #ED7455;
  color: white;
}


/* ==== WHATSAPP ==== */

.link-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #0B62AC;
  font-weight: bold;
  transition: 0.3s;
}

.link-whatsapp i {
  background-color: white;
  color: #0B62AC;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
  transition: 0.3s;
}

.link-whatsapp:hover {
  color: #ED7455;
}

.link-whatsapp:hover i{
  background-color: #ED7455;
  color: white;
}


/* === REDES === */

.link-facebook {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #0B62AC;
  font-weight: bold;
  transition: 0.3s;
}

.link-facebook i {
  background-color: white;
  color: #0B62AC;
  border-radius: 50%;
  width: 32px;      /* ancho fijo */
  height: 32px;     /* alto fijo */
  display: flex;    /* centra el ícono */
  align-items: center;
  justify-content: center;
  font-size: 16px;  /* tamaño del ícono */
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
  transition: 0.3s;
}

.link-facebook:hover {
  color: #ED7455;
}

.link-facebook:hover i {
  background-color: #ED7455;
  color: white;
}

.link-instagram {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #0B62AC;
  font-weight: bold;
  transition: 0.3s;
}

.link-instagram i {
  background-color: white;
  color: #0B62AC;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
  transition: 0.3s;
}

.link-instagram:hover {
  color: #ED7455;
}

.link-instagram:hover i{
  background-color: #ED7455; /* fondo rosado */
  color: white; /* ícono blanco */
}

.link-tiktok {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #0B62AC;
  font-weight: bold;
  transition: 0.3s;
}

.link-tiktok i {
  background-color: white;
  color: #0B62AC;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
  transition: 0.3s;
}

.link-tiktok:hover {
  color: #ED7455;
}

.link-tiktok:hover i{
  background-color: #ED7455; /* fondo naranja */
  color: white; /* ícono blanco */
}


/* =========================================================
   LIBRO DE RECLAMACIONES
   ========================================================= */

.link-libro {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #0B62AC;               /* Azul CIAME */
  font-weight: bold;
  transition: 0.3s;
  line-height: 1.1;
}

.link-libro i {
  background-color: white;
  color: #0B62AC;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
  transition: 0.3s;
}

.link-libro:hover {
  color: #ED7455;
}

.link-libro:hover i {
  background-color: #ED7455;
  color: white;
}


/* =========================================================
   FOOTER
========================================================= */

.ins-footer {
  background: #0B62AC;   /* Azul CIAME */
  padding: 28px 0px 32px;
  text-align: center;
  position: relative;
}

.ins-footer::before {
  content: "";
  display: block;
  width: 58%;        /* igual al ancho del .container */
  height: 1px;        /* grosor de la línea */
  background: #ffffff;
  margin: 0 auto 44px auto; /* se centra y deja un espacio debajo */
}

.footer-copy {
  color: #ffffff;
  font-size: 0.95rem;
  margin-bottom: 12px;
  font-weight: 500;
}

.footer-links {
  color: #ffffff;
  font-size: 0.9rem;
}

.footer-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  padding: 0 6px;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #ED7455; /* Naranja CIAME */
}


/* =========================================================
   BOTÓN ARRIBA FLOTANTE
   ========================================================= */

.btn-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #ED7455; /* Naranja CIAME */
  color: #fff;
  padding: 12px 18px;
  border-radius: 50px;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, background-color 0.3s ease;
  z-index: 1000;
}

/* Al situar el mouse */
.btn-top:hover {
  background-color: #d26246; /* Tonalidad más oscura del naranja */
}

/* Cuando el botón está visible */
.btn-top.visible {
  opacity: 1;
  pointer-events: auto;
}

main, section {
  scroll-margin-top: 109px; /* Esto arregla los clics de ancla (#seccion) */
}

body {
  padding-top: 109px; /* Este valor debe ser igual a la altura de tu cabecera */
}

[id] {
  scroll-margin-top: 110px; /* Ajusta según la altura real de tu cabecera */
}


/* =========================================================
   MENÚ RESPONSIVE (<=900px)
   ========================================================= */

@media (max-width: 900px) {

  /* Alineación dentro del pill: logo a la izquierda, burger a la derecha */
  .ins-nav-pill {
    /*display: flex;*/
    justify-content: space-between;
    align-items: center;
  }
  .ins-nav-logo { order: 1; }
  .ins-nav-menu { order: 2; }
  .ins-burger { order: 3; margin-left: auto; }

  /* Mostrar hamburguesa */
  .ins-burger {
    display: flex;
    margin-left: auto;
  }

  /* ---------------------------
     MENÚ PRINCIPAL (MÓVIL)
     --------------------------- */
  .ins-nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ED7455;
    flex-direction: column;
    align-items: center;
    padding: 0;
    /*display: none;*/
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.45s ease, opacity 0.45s ease, padding 0.45s ease;
  }

  /* JS añadirá .show */
  .ins-nav-menu.show {
    /*display: flex;*/
    max-height: 550px;
    opacity: 1;
    padding: 18px 0;
  }

  /* Más separación entre items */
  .ins-nav-menu li { 
    margin: 10px 0; 
    width: 100%; 
    display: flex; 
    justify-content: center; 
  }

  .ins-nav-menu a {
    width: 100%;
    padding: 10px 20px;
    text-align: center;
  }


  /* ---------------------------
     SUBMENÚ CATÁLOGO (MÓVIL)
     --------------------------- */

  .has-dropdown {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: static; 
  }

  .has-dropdown > a {
    position: relative;
    width: 100%;
    text-align: center;
    padding: 12px 20px;
    margin: 0;
  }

  /* Submenú tipo acordeón con animación */
  .has-dropdown .dropdown {
    position: static !important;            /* anula position:absolute del escritorio */
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.45s ease, padding 0.65s ease;
    box-shadow:
        inset 0 5px 12px rgba(0,0,0,0.20),
        inset 0 -5px 12px rgba(0,0,0,0.20);
    border-radius: 0;
  }

  .has-dropdown .dropdown a {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px 0;
    color: #fff;
  }

  /* Cuando se activa → se muestra */
  .has-dropdown.active .dropdown {
    max-height: 600px;
    opacity: 1;
  }

  /* Sin margen cuando el submenú está cerrado */
  .has-dropdown .dropdown li {
    width: 100%;
    margin: 0;
  }
}


/* =========================================================
   RESPONSIVE EXTRA
   ========================================================= */

/* Aseguramos que NO exista hover en táctil */
@media (hover: none) and (pointer: coarse) {
  .has-dropdown:hover .dropdown {
    display: none;
  }
}


/* =========================================================
   RESPONSIVIDAD ADICIONAL
   ========================================================= */

/* Laptops/Tablet horizontal: 3 columnas */
@media (max-width: 1200px) {
  .card-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

/* Tablet: 2 columnas */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  /*.contact-grid { grid-template-columns: 1fr 1fr; }*/
  /**/
  .contact-grid { 
    grid-template-columns: repeat(4, max-content);
    justify-content: center;
    gap: 32px; /* reduce si deseas */
  }
}

/* Móvil: 2 columnas */
@media (max-width: 600px) {
  .ins-nav { padding: 14px 10px; }
  .ins-nav-pill { gap: 10px; }
  .ins-nav-logo img { width: 34px; height: 34px; }

  .ins-title { font-size: 1.6rem; }
  .ins-text  { font-size: 1rem; }

  .card-media { height: 160px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .contact-grid { grid-template-columns: 1fr; text-align: center; gap: 20px; }

  .footer-link {
    text-align: center;
    padding: 0;
  }

  body { padding-top: 98px; /* Ajusta este valor hasta que desaparezca el espacio */ }
}

@media (max-width: 350px) {
  .btn-info { font-size: 0.8rem; padding: 7px 12px; letter-spacing: -0.2px; max-width: 90%; }
}