/* ========================================
   DISEÑO DE SECCIÓN FIANZAS
   ======================================== */

/* Contenedor de la Sección */
.section.fianzas-grid-home {
  padding: 80px 20px;
  min-height: 100vh; /* Asegura altura mínima */
  display: flex;
  justify-content: center;

  position: relative; /* Para contener elementos posicionados */
  z-index: 1; /* Evita superposición */
  margin-bottom: 60px; /* Separación del contenido siguiente */
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Header Centrado */
.intro-header.cc-subpage {
  width: 100%;
  max-width: 1400px;
  background-color: #5957b8;
  color: #ffffff;
  border-radius: 12px;
  padding: 40px 20px;
  margin-bottom: 50px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(89, 87, 184, 0.15); /* Sombra sutil */
}

.heading-jumbo {
  font-size: 36px;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

/* Grid de Fianzas */
.projects-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px; /* Este gap aplica tanto horizontal como vertical */
  row-gap: 40px; /* AGREGADO: Espacio específico entre filas */
  column-gap: 30px; /* Espacio específico entre columnas */
  align-items: stretch;
  padding-bottom: 40px; /* Espacio al final del grid */
}

/* Estilo de la Card (Botón Completo) */
.project-card {
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border-radius: 12px;
  text-decoration: none;
  color: #1a1b1f;
  overflow: hidden;
  border: 1px solid #eeeeee;
  transition: all 0.3s ease;
  height: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); /* Sombra base */
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 24px rgba(89, 87, 184, 0.15); /* Sombra más pronunciada al hover */
  border-color: #5957b8;
}

/* Contenedor de Imagen */
.project-image-container {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background-color: #f0f0f0;
  flex-shrink: 0; /* Evita que se comprima */
}

.project-cover-pic {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-cover-pic {
  transform: scale(1.1);
}

/* Contenedor de Título */
.project-name-wrap {
  padding: 25px 15px;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 80px; /* Altura mínima para consistencia */
}

.project-name-link {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  color: #1a1b1f;
  transition: color 0.3s ease;
}

.project-card:hover .project-name-link {
  color: #5957b8;
}

/* ========================================
   RESPONSIVE (ADAPTACIÓN A MÓVILES)
   ======================================== */

@media screen and (max-width: 991px) {
  .section.fianzas-grid-home {
    padding: 60px 20px;
    min-height: auto; /* Más flexible en tablets */
  }
  
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    row-gap: 35px;
  }
  
  .intro-header.cc-subpage {
    margin-bottom: 40px;
  }
}

@media screen and (max-width: 600px) {

  .intro-header.cc-subpage {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    color: #1a1b1f;
    border-radius: 18px;
    padding: 25px 15px;
    
    box-shadow: 
      0 10px 25px rgba(0, 0, 0, 0.08),
      0 4px 10px rgba(0, 0, 0, 0.05);

    border: 1px solid #eeeeee;

    width: 92%;
    margin: 0 auto 30px auto; /* Centrado real */
  }

  .heading-jumbo {
    font-size: 24px;
  }

}