:root {
  --font-base: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html, body { height: 100%; }

body {
  font-family: var(--font-base);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.page-main{
  flex: 1 0 auto;            /* crece y empuja el footer abajo */
  display: flex;
  flex-direction: column;
}

/* ===== PROYECTOS ===== */
.proyectos-section {
  background: #fafcfb;
}

.proyectos-section {
  flex: 1;
}

.project-card {
  background: #fff;
  border-radius: .6rem;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
}

/* Imagen con overlay */
.project-img {
  position: relative;
  overflow: hidden;
  height: 220px;
}
.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.project-card:hover img {
  transform: scale(1.05);
}

.project-card:hover {
  opacity: 1;
}

/* Texto debajo */
.project-body {
  padding: 1rem 1.25rem 1.25rem;
}
.project-body h5 {
  color: #016B38;
  margin-bottom: .4rem;
}
.project-meta i {
  color: #016B38;
}
.badge.bg-success-subtle {
  background: #e5f6ea !important;
  color: #016B38 !important;
  border-radius: 6px;
  font-size: .85rem;
}

/* ===== Toolbar de filtros ===== */
.projects-toolbar{
  display:flex;
  align-items:center;
  gap:12px;
  justify-content:center;        /* centrado general */
  margin: 0 0 1.25rem 0;
  flex-wrap: wrap;
}

.filter-label{
  display:flex;
  align-items:center;
  gap:.5rem;
  font-weight:700;
  color:#196d3c;
  white-space:nowrap;
}

.filter-label .bi{ font-size:1.1rem; }

.filters-inline{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.filters-inline .form-select{
  min-width:260px;
}

/* En móviles que los selects pasen a ancho completo si hace falta */
@media (max-width: 576px){
  .filters-inline .form-select{
    min-width: 200px;
    flex: 1 1 100%;
  }
}

/* ===== FILTROS ===== */
.filter-bar {
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.filter-bar select {
  min-width: 230px;
  max-width: 280px;
  border-radius: 8px;
  border: 1px solid #d8e3dc;
}

.filter-bar i {
  color: var(--brand-green, #017A3F);
}

.filter-bar span {
  color: var(--brand-green, #017A3F);
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* En pantallas grandes los filtros se mantienen en línea */
@media (min-width: 768px) {
  .filter-bar {
    flex-wrap: nowrap;
  }
}

/* ===== Estado vacío (sin resultados) ===== */
.empty-state{
  background: #f3f8f5;
  border: 1px dashed #cfe9da;
  border-radius: 12px;
  padding: 2rem 1.25rem;
  text-align: center;
  box-shadow: 0 6px 16px rgba(0,0,0,.04);;
}
.empty-state .icon{
  display: inline-block;
  font-size: 2.25rem;
  color: #01953F;
  margin-bottom: .4rem;
  line-height: 1;
}
.empty-state h5{
  color: #1f2d22;
  font-weight: 700;
}
.empty-state p{
  color: #6b7e72;
  margin: 0;
}

/* Ajuste responsivo sutil */
@media (max-width: 576px){
  .empty-state{
    padding: 1.5rem 1rem;
  }
  .empty-state .icon{ font-size: 2rem; }
}

.spin {
  display: inline-block;
  animation: spin 1.4s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.pagination {
  --bs-pagination-color: #017A3F;
  --bs-pagination-hover-bg: #e5f6ea;
  --bs-pagination-hover-color: #016B38; 
  --bs-pagination-active-bg: #017A3F;  
  --bs-pagination-active-border-color: #017A3F;   
  --bs-pagination-disabled-color: #aaa;
  --bs-pagination-border-radius: .5rem;

  --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(1, 122, 63, 0.25);
  
  --bs-pagination-focus-color: #017A3F;
  
  --bs-pagination-active-color: #fff;
}

.page-item {
  margin: 0 2px;
}

.page-link {
  transition: background-color 0.15s ease-out, color 0.15s ease-out;
  border-radius: var(--bs-pagination-border-radius) !important;
}

.page-link:visited {
  color: var(--bs-pagination-color);
}

.page-item.active .page-link {
  font-weight: 600;
}