/* ==========================================================================
   Blog: índice editorial, listados por categoría/búsqueda y artículo.
   Medidas de Figma: Blog 733:71216 (índice) y Article 733:71275 (artículo).
   ========================================================================== */

.gt-blog-head { background: var(--gt-surface); padding: 0 var(--gt-gutter) var(--gt-space-32); text-align: center; }
.gt-blog-head h1 { font-size: 32px; line-height: 44px; letter-spacing: 0.04em; text-transform: uppercase; }
.gt-blog-head p { font-size: 14px; line-height: 20px; color: var(--gt-text-subtle); margin: var(--gt-space-8) 0 var(--gt-space-16); }
.gt-blog-head .gt-newsletter { margin-inline: auto; }

.gt-blog { display: flex; flex-direction: column; gap: var(--gt-space-40); padding-block: 0 var(--gt-space-64); }

/* ---------- Pestañas ---------- */
.gt-tabs-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--gt-space-16); padding-top: var(--gt-space-16); }
.gt-tabs { display: flex; gap: var(--gt-space-4); border-bottom: 1px solid var(--gt-border); overflow-x: auto; scrollbar-width: none; }
.gt-tabs::-webkit-scrollbar { display: none; }
.gt-tabs a {
    display: inline-flex; align-items: center; gap: var(--gt-space-8); padding: var(--gt-space-8) var(--gt-space-24);
    font: 400 16px/24px var(--gt-font-body); letter-spacing: 0.01em; color: var(--gt-text-subtle); text-decoration: none; white-space: nowrap;
    border-bottom: 1.5px solid transparent; border-radius: var(--gt-radius-4);
}
.gt-tabs a img { width: 24px; height: 24px; opacity: 0.55; }
.gt-tabs a[aria-current="page"] { font-weight: 600; color: var(--gt-text); border-bottom-color: var(--gt-text); }
.gt-tabs a[aria-current="page"] img { opacity: 1; }
.gt-tabs a:hover { color: var(--gt-text); }

.gt-search { position: relative; }
.gt-search summary { list-style: none; cursor: pointer; display: flex; }
.gt-search summary::-webkit-details-marker { display: none; }
.gt-search summary img { width: 24px; height: 24px; }
.gt-search form {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 5; display: flex; gap: var(--gt-space-8);
    padding: var(--gt-space-8); background: var(--gt-surface); border: 1px solid var(--gt-border-subtle); border-radius: var(--gt-radius-8);
    box-shadow: 0 12px 32px rgba(3, 7, 18, 0.12);
}
.gt-search input[type="search"] { border: 0; background: var(--gt-bg); border-radius: var(--gt-radius-4); padding: var(--gt-space-8) var(--gt-space-12); font: 400 14px/20px var(--gt-font-body); width: 220px; }

/* ---------- Orden ---------- */
.gt-sort { display: inline-flex; align-items: center; gap: var(--gt-space-8); background: var(--gt-surface-elevated); border-radius: var(--gt-radius-8); height: 40px; padding: 0 var(--gt-space-12); font: 700 14px/20px var(--gt-font-body); letter-spacing: 0.04em; }
.gt-sort select { appearance: none; border: 0; background: transparent; font: inherit; color: inherit; cursor: pointer; padding-right: var(--gt-space-4); }

/* ---------- Artículo destacado (hero) ---------- */
.gt-feature { display: flex; flex-direction: column; gap: var(--gt-space-16); }
.gt-feature__hero {
    position: relative; display: flex; align-items: flex-end; min-height: 500px; overflow: hidden;
    background: var(--gt-surface-inverse);
}
.gt-feature__hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gt-feature__panel {
    position: relative; display: flex; align-items: flex-end; gap: var(--gt-space-48); width: 100%;
    padding: var(--gt-space-24) var(--gt-space-48); background: rgba(255, 255, 255, 0.8);
}
.gt-feature__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--gt-space-4); }
.gt-feature__acciones { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; align-self: stretch; gap: var(--gt-space-16); }
.gt-meta { font: 400 14px/24px var(--gt-font-body); color: var(--gt-text-subtle); letter-spacing: 0.12em; text-transform: uppercase; }
.gt-feature__titulo { font-size: 20px; line-height: 28px; letter-spacing: 0.04em; text-transform: uppercase; }
.gt-feature__titulo a { text-decoration: none; }
.gt-feature__extracto { font-size: 14px; line-height: 20px; }

/* ---------- Secciones ---------- */
.gt-seccion { display: flex; flex-direction: column; gap: var(--gt-space-16); }
.gt-seccion__cab { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--gt-space-16); }
.gt-seccion__cab h2 { font-size: 24px; line-height: 32px; letter-spacing: 0.04em; text-transform: uppercase; }
.gt-seccion__ctrl { display: flex; align-items: center; gap: var(--gt-space-16); }

/* ---------- Tarjetas ---------- */
.gt-card { display: flex; flex-direction: column; overflow: hidden; min-width: 0; background: var(--gt-surface); }
.gt-card__img { display: block; height: 250px; overflow: hidden; background: var(--gt-surface-elevated); }
.gt-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gt-card__body {
    flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: var(--gt-space-16);
    padding: var(--gt-space-16) var(--gt-space-24); background: rgba(255, 255, 255, 0.6);
}
.gt-card__info { display: flex; flex-direction: column; gap: var(--gt-space-8); }
.gt-card__titulo { font-size: 20px; line-height: 28px; letter-spacing: 0.04em; text-transform: uppercase; }
.gt-card__titulo a { text-decoration: none; }
.gt-card__pie { display: flex; align-items: center; justify-content: space-between; gap: var(--gt-space-16); }
.gt-card__pie .gt-meta { letter-spacing: 0.06em; }

/* Carrusel "Nuevos": las tarjetas se desplazan con las flechas */
.gt-carrusel { display: flex; gap: var(--gt-space-24); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gt-carrusel::-webkit-scrollbar { display: none; }
.gt-carrusel > .gt-card { flex: 0 0 calc((100% - 48px) / 3); scroll-snap-align: start; }

/* Cuadrícula editorial: la 2.ª tarjeta ocupa dos columnas (como en Figma) */
.gt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gt-space-24); }
.gt-grid--editorial > .gt-card:nth-child(2) { grid-column: span 2; }

.gt-mas { display: flex; }
.gt-mas .gt-btn img { width: 24px; height: 24px; }
.gt-divider { border: 0; border-top: 1px solid var(--gt-border-subtle); margin: 0; width: 100%; }
.gt-vacio { padding: var(--gt-space-48) 0; text-align: center; color: var(--gt-text-subtle); }

/* ---------- Artículo (Figma: Article 733:71279) ---------- */
.gt-article { max-width: 1064px; margin-inline: auto; display: flex; flex-direction: column; gap: var(--gt-space-32); padding-bottom: var(--gt-space-40); }
.gt-article__portada { height: 440px; overflow: hidden; background: var(--gt-surface-elevated); }
.gt-article__portada img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gt-article > .gt-article__tit:first-child { padding-top: var(--gt-space-24); }
.gt-article__tit { display: flex; flex-direction: column; gap: var(--gt-space-24); max-width: 852px; }
.gt-article__tit h1 { font-size: 32px; line-height: 44px; letter-spacing: 0.04em; text-transform: uppercase; }
.gt-article__meta { display: flex; align-items: center; justify-content: space-between; gap: var(--gt-space-16); flex-wrap: wrap; }
.gt-article__datos { display: flex; align-items: center; gap: var(--gt-space-16); }
.gt-article__datos .gt-meta { letter-spacing: 0.06em; }
.gt-article__lectura { display: inline-flex; align-items: center; gap: var(--gt-space-8); }
.gt-article__lectura img { width: 24px; height: 24px; }
.gt-compartir { display: inline-flex; align-items: center; gap: var(--gt-space-8); height: 40px; min-width: 64px; padding: var(--gt-space-8); background: transparent; border: 1px solid var(--gt-border-subtle); border-radius: var(--gt-radius-4); font: 600 16px/24px var(--gt-font-body); letter-spacing: 0.01em; cursor: pointer; color: var(--gt-text); }
.gt-compartir img { width: 24px; height: 24px; }
.gt-article__cuerpo { display: grid; grid-template-columns: minmax(0, 828px) 180px; gap: 56px; align-items: start; }
.gt-article__contenido { font: 400 16px/24px var(--gt-font-body); letter-spacing: 0.01em; display: flex; flex-direction: column; gap: var(--gt-space-24); }
.gt-article__contenido > * { margin: 0; }
.gt-article__contenido h2, .gt-article__contenido h3, .gt-article__contenido h4 { font: 700 18px/24px var(--gt-font-heading); }
.gt-article__contenido img { max-width: 100%; height: auto; display: block; }
.gt-article__contenido figure { margin: 0; }
.gt-article__contenido .gt-galeria { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gt-space-16); }
.gt-article__contenido .gt-galeria img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.gt-article__contenido a { color: var(--gt-tertiary); }
body.gt .gt-article__contenido ul, body.gt .gt-article__contenido ol { padding-left: var(--gt-space-24); list-style: revert; }
.gt-lateral { position: sticky; top: var(--gt-space-24); display: flex; flex-direction: column; }
.gt-lateral a { display: flex; align-items: center; gap: var(--gt-space-8); width: 160px; padding: var(--gt-space-8) var(--gt-space-12); font: 400 16px/24px var(--gt-font-body); letter-spacing: 0.01em; color: var(--gt-text-subtle); text-decoration: none; border-radius: var(--gt-radius-4); }
.gt-lateral a img { width: 24px; height: 24px; opacity: 0.55; }
.gt-lateral a[aria-current="page"] { background: var(--gt-surface-elevated); color: var(--gt-text); font-weight: 600; }
.gt-lateral a[aria-current="page"] img { opacity: 1; }
.gt-article__pie { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--gt-space-16); flex-wrap: wrap; max-width: 848px; padding-top: var(--gt-space-24); }
.gt-autor { display: flex; align-items: center; gap: var(--gt-space-16); padding: var(--gt-space-16); }
.gt-autor img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gt-border); }
.gt-autor strong { display: block; font: 700 18px/24px var(--gt-font-heading); letter-spacing: 0.04em; color: var(--gt-primary-hover); text-decoration: underline; text-transform: uppercase; }
.gt-autor span { font-size: 16px; line-height: 24px; color: var(--gt-text-subtle); }
.gt-relacionados { display: flex; flex-direction: column; gap: var(--gt-space-16); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
    .gt-carrusel > .gt-card { flex-basis: calc((100% - 24px) / 2); }
    .gt-grid { grid-template-columns: repeat(2, 1fr); }
    .gt-grid--editorial > .gt-card:nth-child(2) { grid-column: auto; }
    .gt-feature__panel { padding: var(--gt-space-16) var(--gt-space-24); gap: var(--gt-space-16); }
    .gt-article__cuerpo { grid-template-columns: 1fr; }
    .gt-lateral { display: none; }
}
@media (max-width: 640px) {
    .gt-carrusel > .gt-card { flex-basis: 85%; }
    .gt-grid { grid-template-columns: 1fr; }
    .gt-feature__hero { min-height: 420px; }
    .gt-feature__panel { flex-direction: column; align-items: stretch; }
    .gt-feature__acciones { flex-direction: row; align-items: center; }
    .gt-seccion__ctrl .gt-btn { display: none; }
    .gt-article__tit h1 { font-size: 24px; line-height: 32px; }
    .gt-article__portada { height: 220px; }
}
