/* ============================================
   IFM — Galería de Proyectos
   galeria.css  (complementa styles.css)
   ============================================ */

/* ── HERO DE GALERÍA ── */
.gallery-hero{
  background:linear-gradient(135deg,#0d1b3e 0%,#1a3a6e 60%,#0d1b3e 100%);
  color:#fff;
  padding:60px 5% 70px;
  text-align:center;
}
.gallery-hero h1{
  font-size:clamp(28px,5vw,48px);
  font-weight:800;
  line-height:1.15;
  margin:16px auto 16px;
  max-width:680px;
}
.gallery-hero h1 span{color:#e63946}
.gallery-hero p{
  font-size:clamp(15px,2vw,18px);
  color:#b8c8e8;
  max-width:560px;
  margin:0 auto;
}

/* ── BOTÓN VOLVER ── */
.back-link{
  display:inline-flex;
  align-items:center;
  gap:6px;
  color:#b8c8e8;
  font-size:14px;
  font-weight:500;
  transition:color .2s;
}
.back-link:hover{color:#fff}

/* ── BARRA DE FILTROS ── */
.filter-bar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:center;
  padding:28px 5%;
  background:#fff;
  border-bottom:1px solid #e8ecf2;
  position:sticky;
  top:56px;
  z-index:90;
}
.filter-btn{
  padding:9px 20px;
  border-radius:24px;
  border:1.5px solid #e2e8f0;
  background:#f8f9fc;
  font-size:13px;
  font-weight:600;
  color:#4a5568;
  cursor:pointer;
  transition:all .2s;
  font-family:inherit;
}
.filter-btn:hover{border-color:#e63946;color:#e63946}
.filter-btn.active{background:#e63946;border-color:#e63946;color:#fff}

/* ── SECCIÓN Y GRID ── */
.gallery-section{
  padding:48px 5%;
  background:#f8f9fc;
  min-height:400px;
}
.gallery-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(300px,1fr));
  gap:24px;
}

/* ── TARJETA DE PROYECTO ── */
.project-card{
  background:#fff;
  border-radius:14px;
  border:1px solid #e8ecf2;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  transition:transform .2s,box-shadow .2s;
}
.project-card:hover{
  transform:translateY(-5px);
  box-shadow:0 16px 40px rgba(13,27,62,.12);
}

/* Imagen / placeholder */
.card-img{
  position:relative;
  width:100%;
  aspect-ratio:16/10;
  overflow:hidden;
  background:#e8ecf2;
}
.card-img img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform .35s;
}
.project-card:hover .card-img img{transform:scale(1.04)}

/* Placeholder hasta tener fotos reales */
.img-placeholder{
  width:100%;
  height:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,#e8ecf2 0%,#d1d9e6 100%);
  gap:8px;
}
.ph-icon{font-size:40px;opacity:.5}

/* Badge de categoría */
.cat-badge{
  position:absolute;
  top:12px;left:12px;
  font-size:11px;
  font-weight:700;
  letter-spacing:.5px;
  padding:4px 12px;
  border-radius:20px;
  text-transform:uppercase;
}
.badge-maq{background:#fde8ea;color:#c1121f}
.badge-pai{background:#e8f4fd;color:#185fa5}
.badge-est{background:#e8f8ee;color:#1a6b37}
.badge-epo{background:#fef3e2;color:#854f0b}
.badge-fun{background:#fce8e8;color:#a32d2d}
.badge-lim{background:#f0e8fe;color:#4c2a8e}

/* Cuerpo de tarjeta */
.card-body{
  padding:20px;
  flex:1;
  display:flex;
  flex-direction:column;
}
.card-title{
  font-size:16px;
  font-weight:700;
  color:#0d1b3e;
  margin-bottom:8px;
  line-height:1.3;
}
.card-desc{
  font-size:13px;
  color:#4a5568;
  line-height:1.6;
  flex:1;
}
.card-meta{
  display:flex;
  justify-content:space-between;
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid #f0f2f5;
  font-size:12px;
  color:#9aa5b4;
}

/* ── SIN RESULTADOS ── */
.no-results{
  text-align:center;
  padding:60px 20px;
  color:#6b7280;
}
.no-results span{font-size:36px;display:block;margin-bottom:12px}
.no-results p{font-size:16px;line-height:1.7}
.no-results a{color:#e63946;font-weight:600}
.no-results a:hover{text-decoration:underline}

/* ── CTA INFERIOR ── */
.gallery-cta{
  background:#0d1b3e;
  padding:72px 5%;
  text-align:center;
  color:#fff;
}
.gallery-cta .sec-label{color:#e63946}
.gallery-cta h2{
  font-size:clamp(22px,4vw,36px);
  font-weight:800;
  max-width:640px;
  margin:12px auto 32px;
  line-height:1.25;
}
.cta-btns{
  display:flex;
  gap:14px;
  justify-content:center;
  flex-wrap:wrap;
}

/* ── RESPONSIVE ── */
@media(max-width:600px){
  .filter-bar{gap:8px;padding:18px 4%}
  .filter-btn{font-size:12px;padding:8px 14px}
  .gallery-grid{grid-template-columns:1fr}
  .card-meta{flex-direction:column;gap:4px}
}