/* ─── Blog Section Title ─── */
.template-blog .blog-section-title {
  font-family: var(--font1);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 600;
  color: var(--color1);
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--color4);
  width: 100%;
  margin-bottom: 1.5rem;
}

.template-blog .blog-section-title--entrevistas { border-bottom-color: var(--blog-entrevistas); }
.template-blog .blog-section-title--mercado     { border-bottom-color: var(--blog-mercado); }
.template-blog .blog-section-title--obras       { border-bottom-color: var(--blog-obras); }
.template-blog .blog-section-title--empresas    { border-bottom-color: var(--blog-empresas); }

/* ─── Evento: Eventos + Ferias con Agenda destacada al costado ─── */
.template-blog .evento-page-row {
  display: grid;
  grid-template-columns: 70fr 30fr;
  gap: 2rem;
  width: 100%;
  align-items: start;
}

@media (max-width: 1100px) {
  .template-blog .evento-page-row {
    grid-template-columns: 1fr;
  }
}

.template-blog .evento-page-main .blog-section-title {
  margin-top: 3rem;
}

.template-blog .evento-page-main > .blog-section-title:first-child {
  margin-top: 0;
}

.template-blog .evento-page-main .blog-more-header {
  margin-top: 3rem;
}

.template-blog .evento-page-sidebar {
  gap: 1.5rem;

  .agenda-item {
    display: block;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(140, 128, 113, 0.2);
  }

  .agenda-item-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
  }

  .item-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--color5);
    color: #fff;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .agenda-item-header h4 {
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    font-weight: 600;
    color: var(--color1);
  }
}

/* ─── Featured Row ─── */
.template-blog .blog-featured-row {
  display: grid !important;
  grid-template-columns: 50fr 50fr !important;
  gap: 3rem !important;
  width: 100%;
  align-items: start;
}

.template-blog .blog-featured-row--single {
  grid-template-columns: 1fr !important;
  gap: 1rem !important;
}

.template-blog .blog-featured-side {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (max-width: 1100px) {
  .template-blog .blog-featured-row {
    grid-template-columns: 1fr !important;
  }
  .template-blog .blog-article-img {
    height: 300px !important;
  }
}

@media (max-width: 767px) {
  .template-blog .blog-article--side {
    grid-template-columns: 1fr !important;
  }
  .template-blog .blog-article-img {
    width: 100% !important;
    height: 220px !important;
  }
}

/* ─── Article base ─── */
.template-blog .blog-article {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  cursor: pointer;

  .blog-article-img {
    width: 100%;
    height: 400px;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    background-color: var(--color5);
    flex-shrink: 0;

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
  }

  h2 {
    font-size: clamp(1.1rem, 1.8vw, 1.5rem);
    font-weight: 600;
    line-height: 1.2;
    color: var(--color1);
    transition: color 0.2s;
  }

  h3 {
    font-size: clamp(0.9rem, 1.3vw, 1.1rem);
    font-weight: 600;
    line-height: 1.25;
    color: var(--color1);
    transition: color 0.2s;
  }

  p {
    font-size: clamp(0.8rem, 1vw, 0.9rem);
    line-height: 1.6;
    color: var(--color1);
  }

  &:is(:hover, :focus-visible, :active) {
    h2,
    h3 {
      color: var(--color3);
    }
  }

  &.blog-article--side {
    display: grid;
    grid-template-columns: 225px 1fr;
    gap: 1rem;
    align-items: start;

    .blog-article-img {
      width: 225px;
      height: 200px;
    }
  }
}

/* Placeholder compartido — usado también en template-article */
:is(.template-blog, .template-article) .blog-img-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color5);
}

:is(.template-blog, .template-article) .blog-img-placeholder span {
  font-family: var(--font2);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

/* ─── Más notas ─── */
.template-blog .blog-more-header {
  width: 100%;
  margin-bottom: 1.5rem;
}

.template-blog .blog-more-title {
  font-family: var(--font2);
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  font-weight: 500;
  color: var(--color1);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(140, 128, 113, 0.3);
}

/* ─── Blog Grid ─── */
.template-blog .blog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  width: 100%;
  align-items: start;
  transition: opacity 0.2s ease;
}

.template-blog .blog-grid.is-fading {
  opacity: 0;
}

.template-blog .blog-card.card-hidden {
  display: none;
}

@media (max-width: 1100px) {
  .template-blog .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .template-blog .blog-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Evento: campos extra (fecha / lugar / web), condicionales ─── */
:is(.template-blog, .template-article) .evento-extra-meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  list-style: none;
  margin-top: 0.4rem;
}

:is(.template-blog, .template-article) .evento-extra-meta li {
  font-family: var(--font2);
  font-size: 0.78rem;
  color: var(--color3);
}

:is(.template-blog, .template-article) .evento-extra-meta-label {
  font-weight: 600;
  color: var(--color1);
}

:is(.template-blog, .template-article) .evento-extra-meta-link a {
  color: var(--color3);
  text-decoration: underline;
  transition: color 0.2s;
}

:is(.template-blog, .template-article) .evento-extra-meta-link a:is(:hover, :focus-visible, :active) {
  color: var(--color4);
}

/* ─── Evento single: título y datos van debajo de la imagen, no encima ─── */
.template-evento .article-header::after {
  display: none;
}

.template-evento section.evento-detail-section {
  padding-top: 25px;
  padding-bottom: 25px;
}

.template-evento .evento-detail {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: flex-start;
  width: 100%;
  gap: 1rem;
}

.template-evento .evento-detail .article-category {
  color: var(--color1);
}

.template-evento .evento-detail .article-meta {
  color: var(--color3);
}

.template-evento .evento-detail .article-meta strong {
  color: var(--color1);
}

.template-evento .evento-detail .article-meta-sep {
  color: var(--color3);
}

.template-evento .evento-detail-title {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.template-evento .evento-detail-title i {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color5);
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.template-evento .evento-detail-title-logo {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
}

.template-evento .evento-detail-title-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.template-evento .evento-detail-title h1 {
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--color1);
}

.template-evento.template-article .article-subtitle {
  color: var(--color3);
}

.template-evento .evento-detail-text {
  font-size: clamp(0.95rem, 1.1vw, 1.05rem);
  line-height: 1.65;
  color: var(--color1);
  max-width: 700px;
}

/* ─── Blog Card ─── */
.template-blog .blog-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem !important;
  cursor: pointer;

  .blog-card-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    background-color: var(--color5);
    flex-shrink: 0;

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
  }

  h4 {
    font-size: clamp(0.95rem, 1.3vw, 1.2rem) !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    color: var(--color1);
    transition: color 0.2s;
  }

  p {
    font-size: clamp(0.8rem, 1vw, 0.9rem) !important;
    line-height: 1.6 !important;
    color: var(--color1);
  }

  &:is(:hover, :focus-visible, :active) h4 {
    color: var(--color3);
  }
}

/* ─── Paginación ─── */
.template-blog .blog-pagination {
  display: none;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-top: 2rem;
}

.template-blog .blog-pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(140, 128, 113, 0.3);
  background: none;
  color: var(--color1);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  font-size: 0.85rem;
}

.template-blog .blog-pagination-btn:is(:hover, :focus-visible, :active) {
  background-color: var(--color4);
  border-color: var(--color4);
  color: #fff;
}
