/* -------------------------------------
   1. RESETEO Y VARIABLES DE COLOR
------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Ajusta estos colores según tu diseño */
  --main-bg: #ffffff;         /* Fondo principal */
  --secondary-bg: #f8f9fa;    /* Fondo secundario/gris claro */
  --text-color: #333333;      /* Color principal de texto */
  --accent-color: #ff9151;    /* Color de acento (botones, detalles) */
  --card-shadow: rgba(0, 0, 0, 0.05); /* Sombra sutil para tarjetas */
  --border-radius: 12px;
  --font-family: 'Poppins', sans-serif;
}

/* -------------------------------------
   2. ESTILOS BASE
------------------------------------- */
html {
  font-size: 16px;
}

body {
  background-color: var(--secondary-bg);
  color: var(--text-color);
  font-family: var(--font-family);
  line-height: 1.5;
}

/* Contenedor genérico para secciones */
.section {
  width: 100%;
  max-width: 1366px;    /* Ajusta el ancho máximo de tu layout */
  margin: 0 auto;       /* Centra horizontalmente */
  padding: 60px 20px;   /* Espaciado interno */
}

/* Título centrado para secciones */
.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 40px;
  color: var(--text-color);
}

/* -------------------------------------
   3. ESTILO PARA CARDS (3 EN FILA)
------------------------------------- */
.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center; /* Centra las tarjetas en la fila */
  padding: 50px;
}

.card {
  flex: 1 1 calc(33.333% - 20px);
  max-width: 350px;
  min-width: 250px;
  max-height: 350px;
  min-height: 250px;
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px var(--card-shadow);
  text-align: left;
  transition: transform 0.3s ease;
  overflow: hidden;
  padding: 50px;
}

/* Pequeña animación de hover */
.card:hover {
  transform: translateY(-4px);
}

.card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #1a1a1a;
}

.card p {
  font-size: 1rem;
  line-height: 1.4;
  color: var(--text-color);
}

.card-image {
  flex: 1 1 calc(33.333% - 20px);
  max-width: 250px;
  min-width: 250px;
  max-height: 250px;
  min-height: 250px;
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px var(--card-shadow);
  text-align: left;
  transition: transform 0.3s ease;
  overflow: hidden;
  margin-bottom: 1rem; 
}

.card-image:hover {
  transform: scale(1.05);
}

.card-image img {
  display: block;    /* Removes extra whitespace below the image */
  width: 100%;       /* Matches the container (and thus the card) width */
  height: auto;      /* Maintains aspect ratio */
  object-fit:contain; /* Ensures the image covers the container area if needed */
  transition: transform 0.3s ease;
}

.card:hover .card-image img {
  transform: scale(1.2);
}

/* -------------------------------------
   4. SECCIÓN "AI" (Texto + Imagen)
------------------------------------- */
/* Contenedor con texto a la izquierda e imagen a la derecha */
.ai-section {
  background-color: var(--secondary-bg); /* Puedes dejarlo blanco si prefieres */
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 40px 20px;
  flex-wrap: wrap; /* Permite que se ajuste en pantallas pequeñas */
}

/* Contenedor de texto */
.ai-text {
  flex: 1 1 400px;
}

.ai-badge {
  display: inline-block;
  background-color: #ffe5d2; /* Un tono claro de naranja */
  color: var(--accent-color);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 9999px; /* Forma de píldora */
  margin-bottom: 10px;
}

.ai-text h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.ai-text p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 10px;
  color: var(--text-color);
}

.ai-highlight {
  font-weight: 600;
  color: var(--accent-color);
}

/* Contenedor de imagen */
.ai-image {
  flex: 1 1 400px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ai-image img {
  width: 100%;
  max-width: 500px;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px var(--card-shadow);
}

/* -------------------------------------
   5. RESPONSIVIDAD
------------------------------------- */
@media (max-width: 992px) {
  .card {
    flex: 1 1 calc(50% - 20px);
  }
}

@media (max-width: 576px) {
  .cards {
    flex-direction: column;
    align-items: center;
  }

  .card {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .ai-section {
    flex-direction: column;
    text-align: center;
  }

  .ai-text,
  .ai-image {
    flex: 1 1 100%;
  }
}


.container {
  max-width: 1366px;
  padding-left: 50px;
  padding-right: 50px;
  margin: auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}



/* -- LISTS -- */
/* Container that holds all the list items (cards) */
.list-container {
  display: flex;
  flex: 2;
  flex-wrap: wrap;
  gap: 20px;               /* Space between cards */
  justify-content: center; /* Centers the cards horizontally */
  padding: 40px;           /* Optional spacing around the container */
  background-color: #f9f9f9; /* Example background color */
}

/* Each individual item (card) */
.list-item {
  background-color: #fff;  
  border-radius: 12px;     
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow */
  /*width: 260px;            /* Fixed width or use max-width instead */
  max-width: 350px;
  min-width: 250px;
  text-align: center;      /* Centered text */
  padding: 20px;
  overflow: hidden;        /* Ensures child elements don’t overflow */
  display: flex;
  flex-direction: column;  /* So image, tag, and info stack vertically */
  justify-content: flex-start;

  margin-bottom: 20px;
}

.list-item:hover {
  transform: translateY(-4px);
}

/* Image at the top of each item */
.list-item img {
  width: 100%;
  height: auto;            /* Maintains aspect ratio */
  object-fit: cover;       /* Or “contain” if you want to see the whole image */
  border-radius: 8px;      /* Rounded corners for the image */
  margin-bottom: 15px;     /* Space below the image */
  display: block;
}

/* A small “tag” line, e.g. “★ Licitaciones en Plazo” */
.list-item .tag {
  font-size: 0.9rem;
  font-weight: 500;
  color: #666666;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The star icon if you want to style it separately */
.list-item .star-icon {
  color: #0d6efd; /* Adjust the color to your preference */
  margin-right: 6px;
}

/* Main info line, e.g. “+380 Licitaciones Activas…” */
.list-item .info {
  font-size: 1.5rem;
  font-weight: 600;
  color: #333333;
  line-height: 1.4;
}

.list-item a,
.list-container a {
  text-decoration: none;
}

/* Responsive behavior */
@media (max-width: 768px) {
  .list-container {
    flex-direction: column;
    align-items: center;
    padding: 20px;
  }

  .list-item {
    width: 100%;
    max-width: 400px; /* Keeps cards from stretching too wide on mobile */
    margin-bottom: 20px;
  }

/* Estilos de paginación */
.pagination {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.pagination-item {
  padding: 0.5rem 1rem;
  margin: 0 0.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.25rem;
  color: #4a5568;
  text-decoration: none;
  transition: all 0.2s;
}

.pagination-item:hover {
  background-color: #f7fafc;
  color: #2b6cb0;
}

.pagination-active {
  background-color: #3182ce;
  color: white;
  border-color: #3182ce;
}

.pagination-disabled {
  color: #cbd5e0;
  cursor: not-allowed;
}

}
