/* =========================
   categorias.css
   ========================= */

*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root{
  --blue: #2B5E8F;
  --text: #4D4C4C;
  --card-bg: #F8FBFF;
  --card-border: #D9D9D9;
}

/* =========================
   HERO
   ========================= */
.pub-hero{
  width: 100%;
  height: 491px;
  top: 47px;

  position: relative;
  overflow: hidden;
}

.pub-hero__img{
  width: 100%;
  height: 100%;

  object-fit: cover;
  filter: saturate(0.95);
}

.pub-hero__title{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;

  font-family: "Cardo", serif;
  font-weight: 700;
  font-size: 64px;
  color: #ffffff;

  text-shadow: 0 2px 10px rgba(0,0,0,.35);
}

/* =========================
   CONTENEDOR
   ========================= */
.pub-wrap{
  width: 1220px;
  margin: 0 auto;
  padding-top: 48px;
  padding-bottom: 70px;
}

/* Título "Categorías" */
.pub-title{
  text-align: center;
  font-family: "Cardo", serif;
  font-weight: 400;
  font-size: 48px;
  color: var(--blue);
  margin-bottom: 56px;
  margin-top: 46px;
}

/* listado de cards */
.pub-cards{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 61px;
}

/* =========================
   CARD (medidas exactas)
   ========================= */
.pub-card{
  width: 1175px;
  height: 490px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  box-shadow: 0 1px 6px rgba(0,0,0,.10);
  display: flex;
  align-items: center;
}

/* grid 1x2 interno */
.pub-card__grid{
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 450px 593px;
  justify-content: space-between;

  padding: 20px 66px;
  align-items: center;
}

/* =========================
   Columna izquierda
   ========================= */
.pub-card__imgbox{
  width: 431px;
  height: 431px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pub-card__img{
  width: 431px;
  height: 431px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

/* =========================
   Columna derecha
   ========================= */
.pub-card__content{
  width: 593px;
  height: 431px;
  display: flex;
  flex-direction: column;
}

/* Título */
.pub-card__h3{
  font-family: "Cardo", serif;
  font-weight: 700;
  font-size: 40px;
  color: var(--blue);
  line-height: 1.1;
}

/* Texto */
.pub-card__text{
  margin-top: 110px;
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  font-size: 24px;
  color: var(--text);
  line-height: 1.25;
  max-width: 593px;
}

/* Botón */
.pub-card__btn{
  margin-top: 119px;
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 34px;
  padding: 0 18px;

  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  font-size: 14px;

  color: var(--blue);
  background: transparent;
  border: 1px solid var(--blue);
  border-radius: 999px;
  text-decoration: none;
}

.pub-card__btn:hover{
  background: rgba(43, 94, 143, 0.08);
}

/* =========================
   MOBILE (<=700px)
   Container max 700 + Card en columna
   ========================= */
@media (max-width: 700px){

  .pub-hero{
    top: 0;
    height: 268px;
  }

  .pub-hero__title{
    font-size: 36px;
    padding: 0 16px;
    text-align: center;
  }

  .pub-wrap{
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    padding: 24px 16px 40px;
  }

  .pub-title{
    font-size: 32px;
    margin: 18px 0 22px;
  }

  .pub-cards{
    align-items: stretch;
    gap: 18px;
  }

  .pub-card{
    width: 100%;
    height: auto;
    align-items: stretch;
  }

  .pub-card__grid{
    height: auto;
    grid-template-columns: 1fr;
    justify-content: initial;
    padding: 14px;
    gap: 12px;
    align-items: stretch;
  }

  .pub-card__imgbox{
    width: 100%;
    height: auto;
  }

  .pub-card__img{
    width: 100%;
    height: auto;
    max-height: 240px;
    object-fit: cover;
    border-radius: 10px;
  }

  .pub-card__content{
    width: 100%;
    height: auto;
  }

  .pub-card__h3{
    font-size: 26px;
    line-height: 1.15;
  }

  .pub-card__text{
    margin-top: 10px;
    font-size: 16px;
    line-height: 1.55;
    max-width: none;
  }

  .pub-card__btn{
    margin-top: 14px;
    width: 100%;
    height: 40px;
    font-size: 14px;
    align-self: stretch;
    justify-content: center;
  }
}