/* =============================
   MAYAGRAF - Estilos generales
   ============================= */

.mayagraf-buscador {
  margin: 30px auto;
  padding: 20px;
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 8px;
  max-width: 1000px;
  display: block;
}

.buscador-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.mayagraf-buscador input[type="text"],
.mayagraf-buscador select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
}

/* .mayagraf-buscador button {
  grid-column: 1 / -1;
  padding: 10px;
  background: #b30000;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
} */

.mayagraf-buscador button {
    /* grid-column: 1 / -1; */
    padding: 10px;
    /* background: #b30000; */
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 40px;
}

.mayagraf-buscador button:hover {
  background: #8d0000;
}

/* =============================
   Resultados
   ============================= */
.mayagraf-resultados {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.grafito-item {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  transition: box-shadow 0.2s;
}

.grafito-item:hover {
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.grafito-item img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 10px;
}

.grafito-item h3 {
  color: #333;
  font-size: 16px;
  margin: 10px 0 5px 0;
}

.grafito-item p {
  margin: 4px 0;
  font-size: 14px;
}

.grafito-item a {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 10px;
  background: #b30000;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 13px;
}

.grafito-item a:hover {
  background: #8d0000;
}

.grafito-item img {
  width: 100%;
  height: 200px;          /* altura fija */
  object-fit: cover;      /* recorta manteniendo proporción */
  border-radius: 4px;
  background: #f7f7f7;
}


/* =============================
   Detalle
   ============================= */
.grafito-detalle {
  max-width: 950px;
  margin: 40px auto;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 25px;
}

.grafito-header h2 {
  font-size: 26px;
  color: #b30000;
  margin-bottom: 10px;
}

.grafito-header img {
  max-width: 100%;
  height: auto;
  margin-bottom: 20px;
  border-radius: 6px;
}

.grafito-seccion {
  margin-top: 25px;
  padding-top: 15px;
  border-top: 1px solid #ddd;
}

.seccion-titulo {
  color: #b30000;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.grafito-volver {
  text-align: center;
  margin-top: 40px;
}

.grafito-volver a {
  background: #f1f1f1;
  padding: 8px 15px;
  border-radius: 5px;
  color: #000;
  text-decoration: none;
  transition: 0.2s;
}

.grafito-volver a:hover {
  background: #b30000;
  color: #fff;
}

/* para mostrar fotos en detalle */
.galeria-thumb {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #ccc;
  cursor: zoom-in;
  transition: transform 0.2s, box-shadow 0.2s;
}

.galeria-thumb:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* --- Lightbox modal --- */
.mayagraf-lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.9);
}

.mayagraf-lightbox img {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 85%;
  border-radius: 10px;
}

.mayagraf-lightbox .cerrar {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
}

.mayagraf-lightbox .cerrar:hover {
  color: #b30000;
}

.mayagraf-paginacion {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 25px 0;
  font-size: 15px;
}

.mayagraf-paginacion a.page-link,
.mayagraf-paginacion span.page-current,
.mayagraf-paginacion span.page-dots {
  display: inline-block;
  min-width: 30px;
  text-align: center;
  color: #b30000;
  text-decoration: none;
  padding: 6px 10px;
  border: 1px solid #b30000;
  border-radius: 4px;
  transition: all 0.2s;
  line-height: 1.4;
}

.mayagraf-paginacion a.page-link:hover {
  background-color: #b30000;
  color: #fff;
}

.mayagraf-paginacion span.page-current {
  background-color: #b30000;
  color: white;
  font-weight: bold;
  cursor: default;
}

.mayagraf-paginacion span.page-dots {
  border: none;
  color: #666;
  cursor: default;
}

.mayagraf-paginacion a.prev,
.mayagraf-paginacion a.next {
  font-weight: bold;
  border: none;
  background: none;
  padding: 6px 12px;
}

.mayagraf-paginacion a.prev:hover,
.mayagraf-paginacion a.next:hover {
  text-decoration: underline;
}

.mayagraf-paginacion-wrapper {
  width: 100%;
  text-align: center;
  margin-top: 30px;
  display: flex;
  justify-content: center;
}


.mayagraf-count {
  font-size: 14px;
  color: #555;
  text-align: left;
  margin: 15px 0 10px 10px;
}


/* Para tecnicas y categorias */

.mayagraf-listado {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.mayagraf-item {
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}

/* === Imágenes cuadradas uniformes (200x200) === */
.mayagraf-item img {
  width: 200px !important;
  height: 200px !important;
  object-fit: contain !important;
  background-color: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 5px;
  margin: 0 auto 10px auto;
  display: block;
}

.mayagraf-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.mayagraf-titulo {
  text-align: center;
  margin-bottom: 15px;
  color: #a00000;
}

.mayagraf-volver {
  text-align: center;
  margin-top: 30px;
}

.mayagraf-volver a {
  color: #a00000;
  font-weight: bold;
  text-decoration: none;
}


/* Estadisticas */
.mayagraf-estadisticas {
        max-width: 900px;
        margin: 0 auto;
        padding: 20px;
        font-family: system-ui, sans-serif;
    }
    .mayagraf-kpi-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(20px, 1fr)) !important;
        gap: 15px;
        margin-bottom: 30px;
    }
    .kpi-card {
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 10px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        text-align: center;
        padding: 20px;
        transition: transform 0.2s;
    }
    .kpi-card:hover { transform: translateY(-4px); }
    .kpi-card h2 {
        font-size: 2rem;
        color: #b30000;
        margin: 0;
    }
    .kpi-card p {
        font-size: 0.9rem;
        color: #333;
        margin-top: 5px;
    }
    .mayagraf-listado ul {
        list-style: none;
        padding: 0;
        line-height: 1.8;
    }
    .mayagraf-listado li strong {
        color: #b30000;
    }

/* DETALLE */
.grafito-detalle { max-width: 1100px; margin: 0 auto; padding: 20px; }
.grafito-layout { display: flex; gap: 30px; flex-wrap: wrap; }
.grafito-header { flex: 1 1 60%; }
.grafito-media { flex: 1 1 35%; text-align: center; }
.grafito-imagen { width: 100%; height: auto; border-radius: 8px; border: 1px solid #ccc; margin-bottom: 15px; }
.grafito-galeria { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.galeria-thumb { width: 80px; height: 80px; object-fit: cover; cursor: pointer; border: 1px solid #ddd; border-radius: 5px; transition: 0.3s; }
.galeria-thumb:hover { transform: scale(1.05); border-color: #b30000; }
.seccion-titulo { color: #b30000; font-weight: 700; margin-top: 25px; }
.grafito-seccion ul { list-style: none; padding-left: 0; }
.grafito-seccion li { margin-bottom: 4px; }
.grafito-volver { text-align: center; margin-top: 40px; }
.grafito-volver a { text-decoration: none; background: #eee; padding: 6px 12px; border-radius: 5px; color: #000; }
@media (max-width: 768px) {
    .grafito-layout { flex-direction: column; }
}