/* ✅ Fuentes optimizadas */
@font-face {
  font-family: 'Gilam';
  src: url('fonts/GilamHeavy.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
}

@font-face {
  font-family: 'Gilam';
  src: url('fonts/GilamBold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: 'Gilam';
  src: url('fonts/GilamBook.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
}

/* ✅ Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.carousel {
  position: relative;
  margin-top: 1.5%;
}

body {
  font-family: 'Gilam', sans-serif;
  background-color: #ffffff;
  text-align: center;
}

/* ✅ Título principal */
.section-title {
  font-size: 2rem;
  font-weight: bold;
  color: #0b3b59;
  margin-bottom: 20px;
}

/* ✅ Contenedor principal */
.secciones-grid {
    display: flex;
    justify-content: space-evenly;
    margin-top: 5%;
    align-items: center;

}

/* ✅ Estilo de cada sección */
.seccion {
  position: relative;
  width: 250px;
  height: auto;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease-in-out;
  text-decoration: none;
  display: block;
}

.seccion:hover {
  transform: scale(1.05);
}

.seccion img {
  width: 90%;
  height: auto;
  object-fit: cover;
  object-position: center;
  border-radius: 8px; /* Si quieres bordes redondeados */
}

/* ✅ Overlay oscuro */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ✅ Texto dentro del enlace */
.seccion h3 {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  width: 100%;
}

/* Diseño para tablets y pantallas pequeñas */
@media (max-width: 768px) {
  .secciones-grid {
    grid-template-columns: repeat(2, 1fr);
    /* 2 columnas */
  }

  .seccion {
    width: 140px;
    height: 140px;
  }
}

/* ✅ Diseño responsivo en móviles (celulares) */
@media (max-width: 200px) {
  .secciones-grid {
    grid-template-columns: repeat(3, 1fr);
    /* 3 columnas en móviles */
    gap: 8px;
    /* Puedes ajustar el espacio entre iconos */
  }

  .seccion {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    /* Mantiene forma cuadrada */
    max-width: none;
    /* Asegura que ocupe su fracción en la grilla */
  }
}

/* ✅ Contenedor de la cuadrícula */
.grid-empresas {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  /* 4 columnas en pantallas grandes */
  gap: 20px;
  justify-content: center;
  padding: 20px;
}

/* ✅ Tarjetas de empresa */
.empresa-card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  padding: 15px;
  transition: transform 0.3s ease-in-out;
  width: 95%;
}

.empresa-card:hover {
  transform: scale(1.05);
}

/* ✅ Imágenes */
.empresa-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 5px;
}


/* ✅ Textos dentro de las tarjetas */
.empresa-card h4 {
  margin-top: 10px;
  font-size: 18px;
  font-weight: bold;
  color: #003366;
}

.empresa-card p {
  color: gray;
  font-size: 14px;
  margin: 5px 0;
}

/* ✅ Botón "Ver Tienda" */
.btn-ver-catalogo {
  display: inline-block;
  background-color: #28a745;
  color: white;
  padding: 10px 15px;
  text-decoration: none;
  border-radius: 5px;
  margin-top: 10px;
  transition: background-color 0.3s ease-in-out;
}

.btn-ver-catalogo:hover {
  background-color: #218838;
}

@media (max-width: 768px) {
  .empresa-img {
    height: 140px;
  }

  .empresa-info h4 {
    font-size: 1rem;
  }

  .empresa-info p {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .empresa-img {
    height: 100px;
  }

  .empresa-info h4 {
    font-size: 0.95rem;
  }

  .empresa-info p {
    font-size: 0.8rem;
  }
}

/* ✅ Diseño responsivo */
/* 3 columnas cuando la pantalla es menor a 1200px */
@media (max-width: 1200px) {
  .grid-empresas {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 2 columnas cuando la pantalla es menor a 992px */
@media (max-width: 992px) {
  .grid-empresas {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 1 columna cuando la pantalla es menor a 600px */
@media (max-width: 600px) {
  .grid-empresas {
    grid-template-columns: repeat(2, 1fr);
  }

}


.botones-card {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.btn-ver,
.btn-contactar {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 6px;
  text-align: center;
  text-decoration: none;
  font-weight: bold;
  color: white;
  transition: background 0.3s;
}

.btn-ver {
  background-color: #007bff;
}

.btn-ver:hover {
  background-color: #0056b3;
}

.btn-contactar {
  background-color: #28a745;
}

.btn-contactar:hover {
  background-color: #1e7e34;
}

@media screen and (max-width: 768px) {
  .tienda-card {
    width: 90%;
    margin: 0 auto;
  }

  .botones-card {
    flex-direction: column;
    align-items: center;
  }

  .btn-ver,
  .btn-contactar {
    width: 60%;
  }
}


.container {
  background: #fefefe;
  border-radius: 20px;
  padding: 3%;
}


#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #bce6f7;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#gif-cargando {
  max-width: 120px;
  width: 100%;
  height: auto;
}

/* Ocultar el body mientras no se haya cargado */
body:not(.loaded)>*:not(#preloader) {
  display: none !important;
}

.empresa-card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  /* número de líneas */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 3.2em;
  /* ajusta según el tamaño de fuente */
}

.carrusel-img {
  width: 100%;
  aspect-ratio: 5 / 3;
  /* Equivale a 1000x600 */
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
}

@media (max-width: 768px) {
  .carrusel-img {
    aspect-ratio: 5 / 3;
    max-height: 300px;
  }
}

/* Fondo difuminado para el modal */
.modal-backdrop.show {
  background-color: rgba(0, 0, 0, 0.8);
}

/* Estilo general del modal */
.modal-content {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  border: none;
}

/* Encabezado del modal */
.modal-header {
  background: linear-gradient(to right, #0056b3, #00bcd4);
  color: white;
  padding: 1rem 1.5rem;
  font-weight: bold;
  font-size: 1.2rem;
  border-bottom: none;
}

/* Botón de cierre */
.modal-header .btn-close {
  filter: invert(1);
}

/* Cuerpo del modal */
.modal-body {
  padding: 0;
  background-color: #f9f9f9;
}

/* Imagenes del carrusel */
.carrusel-img {
  width: 100%;
  aspect-ratio: 5 / 3;
  object-fit: cover;
  object-position: center;
}

/* Footer del modal */
.modal-footer {
  display: flex;
  justify-content: space-between;
  background-color: #fff;
  border-top: 1px solid #eee;
  padding: 1rem;
}

/* Botones del footer */
.modal-footer .btn {
  border-radius: 30px;
  padding: 10px 20px;
  font-weight: 500;
}

.modal-footer .btn-primary {
  background-color: #0073e6;
  border: none;
}

.modal-footer .btn-primary:hover {
  background-color: #005bb5;
}

.modal-footer .btn-secondary {
  background-color: #e0e0e0;
  color: #333;
  border: none;
}

.modal-footer .btn-secondary:hover {
  background-color: #c2c2c2;
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  border-radius: 8px;
}

.card-link:hover {
  transform: scale(1.02);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.card-link img {
  width: 100%;
  border-radius: 8px 8px 0 0;
}

.card-link h4 {
  margin: 10px 0;
  font-size: 18px;
}

.card-link p {
  font-size: 14px;
  color: #555;
  margin-bottom: 10px;
}