/*
Theme Name: Astra Child
Theme URI: https://wpastra.com/
Description: Child theme for Astra
Author: Formate Brown
Template: astra
Version: 1.0.0
Text Domain: astra-child
*/

/* ===========================
   GRID DE FORMACIONES (versión inicial ajustada)
   =========================== */

.formaciones-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 20px;
  width: 100%;
}

.formacion {
  background-color: #fff;
  border: 1px solid #ddd;
  padding: 10px;
  text-align: center;
  border-radius: 10px;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.formacion:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.formacion-thumb {
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 8px;
}

.formacion h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 8px 0 5px;
  color: #0073aa;
  text-transform: uppercase;
}

.formacion p {
  font-size: 14px;
  color: #555;
  line-height: 1.4;
  min-height: 40px;
}

/* Badge "Adaptado a discapacidad" – estilo rojo con sombra */
.badge-adaptado {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #c13701;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* ===========================
   PAGINACIÓN (versión simple)
   =========================== */
.pagination {
  text-align: center;
  margin-top: 20px;
}

.pagination button {
  background: #4e86d0;
  border: 1px solid #ffffff;
  color: #ffffff;
  padding: 5px 10px;
  margin: 0 2px;
  border-radius: 3px;
  cursor: pointer;
}

.pagination button.active {
  background: #0073aa;
  color: #fff;
  border-color: #0073aa;
}

/* ===========================
   FILTROS UNIFICADOS (botones coloridos)
   =========================== */
#form-filtros {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 2rem auto;
  text-transform: uppercase;
  font-weight: bold;
  font-family: inherit;
}

/* Estilo base de los selects */
#form-filtros select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  padding: 12px 40px 12px 16px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  min-width: 220px;
  text-align: center;
  line-height: 1.2;

  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 14px;
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='12' viewBox='0 0 24 24' width='12' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
}

/* Colores por filtro */
#filtro-area {
  background-color: #2675b0;
}
#filtro-area:hover {
  background-color: #145374;
}

#filtro-instituciones {
  background-color: #19968C;
}
#filtro-instituciones:hover {
  background-color: #127368;
}

#filtro-localidad {
  background-color: #F29C38;
}
#filtro-localidad:hover {
  background-color: #D87C12;
}

/* Botón reset tipo pill */
#btn-reset-filtros {
  padding: 10px 20px;
  background: #6E6E6E;
  border: none;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s ease;
  text-transform: uppercase;
}
#btn-reset-filtros:hover {
  background: #5a5a5a;
}

/* ===========================
   RESPONSIVE GRID
   =========================== */
@media (max-width: 1024px) {
  .formaciones-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .formaciones-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .formaciones-grid {
    grid-template-columns: 1fr;
  }
}

/* ======================================================
   ESTILO SINGLE - FORMACIONES
   ====================================================== */

.single-formacion {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 20px;
  color: #1a1a1a;
  line-height: 1.6;
}

/* --- ENCABEZADO --- */
.formacion-container {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 30px;
  margin-bottom: 40px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 25px;
}

.formacion-left {
  flex: 1 1 250px;
  text-align: center;
}

.formacion-right {
  flex: 2 1 500px;
}

.formacion-img img {
  max-width: 250px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  object-fit: cover;
}

/* --- BLOQUE DE SEDES --- */
.sede-card {
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  transition: all 0.2s ease-in-out;
}

.sede-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

/* Separador entre sedes */
.sede-card + .sede-card {
  border-top: 3px solid #2675b0; /* azul institucional */
  padding-top: 30px;
}

.sede-titulo {
  color: #2675b0;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.sede-datos {
  list-style: none;
  padding-left: 0;
  margin: 0 0 15px 0;
}

.sede-datos li {
  margin: 4px 0;
}

.sede-datos strong {
  color: #333;
}

.sede-requisitos {
  background: #f7f9fb;
  border-left: 4px solid #2675b0;
  padding: 10px 15px;
  border-radius: 6px;
  margin-top: 10px;
  font-size: 0.95rem;
}

/* --- MAPA --- */
.sede-mapa {
  margin-top: 15px;
  border-radius: 8px;
  overflow: hidden;
}

.sede-mapa iframe {
  width: 100%;
  height: 300px;
  border: none;
}

/* --- MOBILE --- */
@media (max-width: 768px) {
  .formacion-container {
    flex-direction: column;
    align-items: center;
  }

  .formacion-img img {
    max-width: 200px;
  }

  .sede-mapa iframe {
    height: 220px;
  }
}
