/* ------------------------ CSS UNIFICADO ------------------------ */

/* RESET Y ROOT VARIABLES */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
}
:root {
  --rojo: #e60026;
  --azul: #0056b3;
  --gris-claro: #f0f6ff;
  --gris-oscuro: #444;
  --blanco: #ffffff;
  --gris-sombra: rgba(0, 0, 0, 0.1);
  --separador-color: #0056b3;
}

/* BOX-SIZING GLOBAL */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* BODY */
body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--gris-claro);
  color: var(--gris-oscuro);
  line-height: 1.6;
}

/* HEADER */
header {
  background: var(--azul);
  padding: 10px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 10px var(--gris-sombra);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.logo {
  height: 80px;
  width: auto;
  filter: drop-shadow(0 0 5px var(--blanco));
  transform: scale(2.2);
  transform-origin: left center;
}
.header-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--blanco);
}
nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}
nav ul li a {
  text-decoration: none;
  color: var(--blanco);
  padding: 6px 10px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}
nav ul li a:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* HERO CAROUSEL */
.hero-carousel {
  position: relative;
  height: 70vh;
  overflow: hidden;
  border-radius: 0 !important;
}
.hero-slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  border-radius: 0 !important;
}
.hero-slide.active {
  opacity: 1;
  z-index: 1;
}
.hero-text {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  color: var(--blanco);
  text-align: center;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
}

/* SECCIONES GENERALES */
section {
  background: linear-gradient(135deg, rgba(0,86,179,0.1), rgba(0,86,179,0.3));
  padding: 60px 20px;
  margin-bottom: 50px;
  border-radius: 15px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
section:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* TITULOS DE SECCIÓN */
.productos-section h2,
.about-section h2,
.ubicaciones-section h2,
.mision-vision-section h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--azul);
  text-align: center;
  position: relative;
  margin-bottom: 20px;
  padding-bottom: 10px;
}
.productos-section h2::after,
.about-section h2::after,
.ubicaciones-section h2::after,
.mision-vision-section h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background-color: var(--rojo);
  border-radius: 5px;
}
@keyframes slideIn {
  0% { width: 0; }
  100% { width: 60px; }
}

/* PRODUCTOS SECTION */
.productos-section {
  background-color: var(--gris-claro);
  color: var(--gris-oscuro);
  text-align: center;
  margin-bottom: 20px;
  border: 5px solid #8B0000;
}
.productos-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  margin-top: 40px;
}
.producto-card {
  background-color: var(--blanco);
  border: 2px solid var(--rojo);
  border-radius: 10px;
  width: 280px;
  padding: 20px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.producto-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}
.producto-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
}
.producto-card h3 {
  color: var(--azul);
  margin: 15px 0 10px;
  font-size: 18px;
}
.producto-card p {
  font-size: 14px;
  color: #555;
}

/* UBICACIONES SECTION */
.ubicaciones-section {
  background-color: var(--gris-claro);
  text-align: center;
  margin-bottom: 20px;
  border: 5px solid #8B0000;
}
.ubicaciones-grid {
  display: flex;
  justify-content: space-around;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 40px;
}
.ubicacion-card {
  background-color: var(--blanco);
  border: 2px solid var(--rojo);
  border-radius: 10px;
  width: 280px;
  padding: 20px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  text-align: center;
}
.ubicacion-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}
.ubicacion-card i {
  font-size: 40px;
  color: var(--azul);
  margin-bottom: 10px;
}
.ubicacion-card h3 {
  color: var(--azul);
  font-size: 20px;
  margin-bottom: 15px;
}
.ubicacion-card p {
  font-size: 14px;
  color: #555;
  margin-bottom: 15px;
}
.ubicacion-card .map-container {
  width: 100%;
  height: 300px;
  border-radius: 10px;
  overflow: hidden;
}
.ubicacion-card iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* MISIÓN & VISIÓN SECTION */
.mision-vision-section {
  background-color: var(--gris-claro);
  padding: 80px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 50px;
  border: 5px solid #8B0000;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.mision-vision-content {
  flex-basis: 50%;
  padding-right: 20px;
}
.mision-vision-content h2 {
  color: var(--azul);
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
}
.mision-vision-content p {
  font-size: 18px;
  color: var(--gris-oscuro);
  margin-bottom: 20px;
}
.btn-mision-vision {
  background-color: var(--rojo);
  color: var(--blanco);
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: 600;
  text-decoration: none;
  margin-right: 20px;
  display: inline-block;
}
.btn-mision-vision:hover {
  background-color: var(--blanco);
  color: var(--azul);
}
.mision-vision-image {
  flex-basis: 40%;
  padding-left: 20px;
  text-align: center;
}
.mision-vision-image img {
  width: 90%;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* ANIMACIONES FADE+ZOOM */
@keyframes fadeInZoom {
  0% { opacity: 0; transform: scale(0.7) translateY(30px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.materiales-section {
  background-color: var(--gris-claro);
  padding: 60px 20px;
  text-align: center;
  margin-bottom: 20px;
  border: 5px solid #8B0000;
  border-radius: 15px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  opacity: 0;
  animation: fadeInZoom 1.5s ease-in-out forwards;
}
.materiales-section h2 {
  color: var(--azul);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 40px;
}
.materiales-grid {
  display: flex;
  justify-content: space-around;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 30px;
}
.material-card {
  background-color: var(--blanco);
  border: 2px solid var(--rojo);
  border-radius: 10px;
  width: 280px;
  padding: 20px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInZoom 1s ease-in-out forwards;
}
.material-card:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
.material-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 20px;
  transition: transform 0.3s ease;
}
.material-card:hover .material-img {
  transform: scale(1.1);
}

/* ESPECIALIDADES SECTION */
.especialidades-section {
  background-color: var(--gris-claro);
  padding: 60px 20px;
  text-align: center;
  margin-bottom: 20px;
  border: 5px solid #8B0000;
  border-radius: 15px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.especialidades-section h2 {
  color: var(--azul);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 40px;
}
.especialidades-grid {
  display: flex;
  justify-content: space-around;
  gap: 30px;
  flex-wrap: wrap;
}
.especialidad-card {
  background-color: var(--blanco);
  border: 2px solid var(--rojo);
  border-radius: 10px;
  width: 280px;
  padding: 20px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}
.especialidad-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}
.especialidad-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 20px;
}
.especialidad-card h3 {
  color: var(--azul);
  font-size: 20px;
  margin-bottom: 10px;
}
.especialidad-card p {
  font-size: 14px;
  color: #555;
}

/* SOCIAL MEDIA FLOAT */
.social-media-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 1000;
}
.social-media-float a {
  background: white;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: transform 0.3s, border 0.3s;
}
.social-media-float a:hover {
  transform: scale(1.1);
  border: 2px solid #e60026;
}
.social-media-float img {
  max-width: 60%;
  height: auto;
}

/* FOOTER */
footer {
  background-color: var(--azul);
  color: var(--blanco);
  padding: 40px 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
footer .contact-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-right: 20px;
}
footer .contact-info h3 {
  margin-left: 30px;
}
footer .contact-info p {
  margin-left: 20px;
}
footer .social-media,
footer .app-buttons {
  display: flex;
  gap: 15px;
}
footer .social-media a,
footer .app-buttons a {
  color: var(--blanco);
  text-decoration: none;
  font-size: 20px;
}
footer .social-media a:hover {
  color: var(--rojo);
}
footer .app-buttons a {
  background-color: var(--blanco);
  color: var(--azul);
  padding: 10px 15px;
  border-radius: 5px;
  transition: background-color 0.3s;
}
footer .app-buttons a:hover {
  background-color: var(--rojo);
  color: var(--blanco);
}
footer p {
  text-align: center;
  width: 100%;
}
footer .conocenos-btn {
  background-color: var(--rojo);
  color: var(--blanco);
  padding: 12px 25px;
  border-radius: 50%;
  text-decoration: none;
  text-align: center;
  font-weight: 600;
  margin-top: 10px;
}
footer .conocenos-btn:hover {
  background-color: var(--azul);
}
footer .footer-main {
  display: flex;
  justify-content: space-between;
  width: 100%;
  align-items: center;
}
footer .footer-main .contact-info {
  flex-basis: 40%;
  position: absolute;
  left: 0;
}
footer .footer-main .conocenos-btn {
  flex-basis: 20%;
  text-align: center;
}
footer .footer-main .social-media {
  flex-basis: 30%;
  justify-content: flex-end;
}

/* CAROUSEL KEYFRAMES */
@keyframes carousel {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ------------------------ FIN DEL CSS UNIFICADO ------------------------ */
/* ---------------- Estilos mejorados de las “cards” de categoría ---------------- */

.category-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  padding: 60px 5%;
  gap: 30px;
  margin: 0;
  background: linear-gradient(135deg, rgba(0,86,179,0.1), rgba(0,86,179,0.3));
  border-radius: 0;
}

/* ---------------------- Cards con borde rojo completo ---------------------- */
.category-box {
  flex: 1 1 22%;
  background: #ffffff;
  border: 3px solid var(--rojo);      /* borde rojo en todo el contorno */
  border-radius: 16px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  padding: 30px 20px;
  text-align: center;
  height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s ease,
              box-shadow 0.4s ease,
              border-color 0.3s ease;
  text-decoration: none;
  color: inherit;
}

/* Quitamos la franja inferior */
.category-box::after {
  display: none;
}

/* Icono más grande */
.category-box img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin-bottom: 20px;
  transition: transform 0.3s ease;
}

/* Tipografía atractiva */
.category-box h3 {
  font-size: 1.4em;
  font-weight: 700;
  font-family: 'Roboto Condensed', sans-serif;
  color: var(--azul);
  margin: 0;
  transition: color 0.3s ease;
}

/* Hover */
.category-box:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
  border-color: #c1001f;  /* rojo más oscuro al hover */
}
.category-box:hover img {
  transform: scale(1.15);
}
.category-box:hover h3 {
  color: var(--rojo);
}
.video-grid-section {
  background-color: var(--gris-claro);
  padding: 60px 40px;
  text-align: center;
  border-radius: 15px;
}

.video-grid-section h2 {
  font-size: 32px;
  color: var(--azul);
  font-weight: 700;
  margin-bottom: 10px;
}

.video-grid-description {
  font-size: 16px;
  color: var(--gris-oscuro);
  margin-bottom: 40px;
}

.video-card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
}

.video-card {
  background-color: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  width: 300px;  /* ajusta si deseas */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.video-card:hover {
  transform: translateY(-5px);
}

.video-card video {
  width: 100%;
  height: 480px;
  object-fit: cover;
  border-radius: 10px;
}


.video-card h3 {
  font-size: 16px;
  color: var(--gris-oscuro);
  font-weight: 600;
}
/* === HAMBURGUESA OCULTA EN DESKTOP === */
.menu-toggle {
  display: none;
}

/* === HEADER POR DEFECTO MÁS ALTO (desktop) === */
header {
  padding: 1.5rem 2.5rem; /* más “alto” verticalmente */
  height: 100px;         /* altura fija */
}

/* ===== TABLETAS (≤1024px) ===== */
@media (max-width: 1024px) {
  /* Mostrar hamburguesa */
  .menu-toggle {
    display: block !important;
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 2.5rem;
    color: #fff;
    z-index: 1002;
    cursor: pointer;
  }
  .menu-toggle i {
    font-size: 2.5rem; /* ajusta tamaño del icono */
    line-height: 1;
  }

  /* Nav deslizable */
  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100%;
    background: var(--azul);
    padding: 4rem 1.5rem;
    transition: right .3s ease;
    z-index: 1001;
  }
  nav.open {
    right: 0;
  }

  /* Menú en columna */
  nav ul {
    flex-direction: column;
    gap: 1.5rem;
  }

  /* Centrar título y escalar logo */
  .header-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
  .logo {
    transform: scale(1.8);
  }
}

/* ===== MÓVIL (≤768px) ===== */
@media (max-width: 768px) {
  /* Header más alto y adaptativo */
  header {
    padding: 2rem 1rem;
    height: auto;
    position: relative;
    justify-content: center;
  }

  /* Logo compacto a la izquierda */
  .logo {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%) scale(1.2);
  }

  /* Título perfectamente centrado */
  .header-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  /* Botón hamburguesa grande y grueso */
  .menu-toggle {
    display: block;
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 2.5rem;
    color: #fff;
    cursor: pointer;
  }
  .menu-toggle i {
    font-size: inherit;
    line-height: 1;
  }

  /* Grid de categorías dos por fila */
  .category-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 1rem;
    padding: 1rem 5%;
  }
  .category-box {
    flex: 1 1 45%;
    max-width: 45%;
    height: auto;
    padding: 1rem;
  }

  /* Footer ocupa su espacio natural */
  footer {
    position: relative !important;
    padding: 1.5rem 1rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
  }
  footer .footer-main,
  footer .footer-main .contact-info {
    position: static !important;
  }

  /* Asegura espacio abajo para barras de gesto en iOS */
  body {
    padding-bottom: calc(20px + env(safe-area-inset-bottom)) !important;
    /* para Safari más antiguo: */
    padding-bottom: calc(20px + constant(safe-area-inset-bottom)) !important;
  }
}
/* ===== HAMBURGUESA SIEMPRE VISIBLE ===== */


/* Asegúrate de que el ícono tenga tamaño apropiado */




