/* =========================================================
   EDIKIO BLOG
   Archivo: /css/blog.css

   Estilos compartidos por:
   - /blog/index.html
   - Todas las entradas del blog
========================================================= */

/* =========================================================
   VARIABLES
========================================================= */

:root {
  --edikio-red: #ef3038;
  --edikio-red-dark: #d9222b;

  --edikio-black: #161616;
  --edikio-dark: #262421;

  --edikio-gold: #c7a35a;
  --edikio-green: #4f6f46;

  --edikio-cream: #f5f1e8;
  --edikio-cream-dark: #ebe4d7;

  --edikio-white: #ffffff;

  --text: #292724;
  --text-soft: #67625b;

  --border: #ddd5c7;

  --container: 1180px;

  --shadow: 0 12px 35px rgba(0, 0, 0, 0.08);
}

/* =========================================================
   RESET
========================================================= */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;

  font-family: Arial, Helvetica, sans-serif;

  background: var(--edikio-cream);

  color: var(--text);

  line-height: 1.6;

  -webkit-font-smoothing: antialiased;

  overflow-x: hidden;
}

img {
  display: block;

  max-width: 100%;

  height: auto;
}

a {
  color: inherit;

  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

/* =========================================================
   ACCESIBILIDAD
========================================================= */

.skip-link {
  position: absolute;

  top: -100px;
  left: 20px;

  z-index: 9999;

  padding: 12px 18px;

  background: var(--edikio-black);

  color: var(--edikio-white);

  border-radius: 0 0 8px 8px;
}

.skip-link:focus {
  top: 0;
}

a:focus-visible {
  outline: 3px solid var(--edikio-red);

  outline-offset: 4px;
}

/* =========================================================
   CONTENEDOR
========================================================= */

.container {
  width: min(calc(100% - 40px), var(--container));

  margin-inline: auto;
}

/* =========================================================
   HEADER
========================================================= */

.blog-header {
  position: relative;

  z-index: 100;

  width: 100%;

  background: var(--edikio-black);

  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.blog-header-inner {
  width: min(calc(100% - 40px), var(--container));

  min-height: 100px;

  margin-inline: auto;

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 40px;
}

/* =========================================================
   LOGOTIPO
========================================================= */

.blog-logo {
  display: block;

  flex-shrink: 0;
}

.blog-logo img {
  width: 115px;

  height: auto;
}

/* =========================================================
   NAVEGACIÓN
========================================================= */

.blog-nav {
  display: flex;

  align-items: center;

  gap: 12px;
}

.blog-nav a {
  display: flex;

  align-items: center;

  justify-content: center;

  min-height: 46px;

  padding: 0 21px;

  border-radius: 10px;

  color: var(--edikio-white);

  font-size: 15px;

  font-weight: 700;

  letter-spacing: 0.4px;

  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.blog-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.blog-nav .active {
  background: var(--edikio-red);
}

.blog-nav .active:hover {
  background: var(--edikio-red-dark);
}

.blog-nav .contact-link {
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* =========================================================
   HERO DEL ÍNDICE DEL BLOG
========================================================= */

.blog-hero {
  position: relative;

  overflow: hidden;

  padding: 95px 0 90px;

  background: linear-gradient(135deg, #1d1c1a 0%, #34302a 100%);

  color: var(--edikio-white);
}

.blog-hero::after {
  content: "";

  position: absolute;

  width: 460px;
  height: 460px;

  right: -150px;
  top: -220px;

  border-radius: 50%;

  border: 80px solid rgba(199, 163, 90, 0.08);

  pointer-events: none;
}

.blog-hero-content {
  position: relative;

  z-index: 2;

  max-width: 800px;
}

.eyebrow {
  display: inline-block;

  margin-bottom: 18px;

  color: var(--edikio-gold);

  font-size: 14px;

  font-weight: 800;

  letter-spacing: 2px;

  text-transform: uppercase;
}

.blog-hero h1 {
  max-width: 760px;

  margin-bottom: 22px;

  font-size: clamp(40px, 6vw, 72px);

  line-height: 0.98;

  letter-spacing: -2px;
}

.blog-hero p {
  max-width: 680px;

  color: rgba(255, 255, 255, 0.82);

  font-size: clamp(18px, 2vw, 22px);

  line-height: 1.6;
}

/* =========================================================
   INTRO BLOG
========================================================= */

.blog-intro {
  padding: 75px 0 30px;
}

.section-heading {
  max-width: 760px;

  margin-bottom: 45px;
}

.section-heading h2 {
  margin-bottom: 15px;

  color: var(--edikio-black);

  font-size: clamp(30px, 4vw, 45px);

  line-height: 1.1;
}

.section-heading p {
  color: var(--text-soft);

  font-size: 18px;
}

/* =========================================================
   GRID DE ARTÍCULOS
========================================================= */

.posts-section {
  padding: 20px 0 100px;
}

.posts-grid {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 35px;
}

/* =========================================================
   TARJETA DE ARTÍCULO
========================================================= */

.post-card {
  overflow: hidden;

  display: flex;

  flex-direction: column;

  min-height: 100%;

  background: var(--edikio-white);

  border: 1px solid var(--border);

  border-radius: 18px;

  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.post-card:hover {
  transform: translateY(-5px);

  box-shadow: var(--shadow);
}

.post-card-image {
  position: relative;

  overflow: hidden;

  aspect-ratio: 16 / 9;

  background: var(--edikio-cream-dark);
}

.post-card-image img {
  width: 100%;
  height: 100%;

  object-fit: cover;

  transition: transform 0.4s ease;
}

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

/* =========================================================
   CATEGORÍA
========================================================= */

.post-category {
  position: absolute;

  left: 18px;
  bottom: 18px;

  display: inline-flex;

  align-items: center;

  min-height: 32px;

  padding: 5px 12px;

  background: rgba(22, 22, 22, 0.92);

  border-radius: 30px;

  color: var(--edikio-white);

  font-size: 12px;

  font-weight: 800;

  letter-spacing: 1px;

  text-transform: uppercase;
}

/* =========================================================
   CONTENIDO DE TARJETA
========================================================= */

.post-card-content {
  flex: 1;

  display: flex;

  flex-direction: column;

  padding: 28px;
}

.post-card h2 {
  margin-bottom: 14px;

  color: var(--edikio-black);

  font-size: clamp(23px, 2.5vw, 30px);

  line-height: 1.18;
}

.post-card p {
  margin-bottom: 25px;

  color: var(--text-soft);

  font-size: 16px;

  line-height: 1.7;
}

.post-card-link {
  margin-top: auto;

  display: inline-flex;

  align-items: center;

  gap: 8px;

  width: fit-content;

  color: var(--edikio-red);

  font-weight: 800;
}

.post-card-link::after {
  content: "→";

  transition: transform 0.2s ease;
}

.post-card-link:hover::after {
  transform: translateX(4px);
}

/* =========================================================
   HERO DE ARTÍCULO
========================================================= */

.article-hero {
  padding: 75px 0 60px;

  background: var(--edikio-dark);

  color: var(--edikio-white);
}

.article-hero-inner {
  max-width: 920px;
}

.article-category {
  display: inline-block;

  margin-bottom: 18px;

  color: var(--edikio-gold);

  font-size: 13px;

  font-weight: 800;

  letter-spacing: 1.8px;

  text-transform: uppercase;
}

.article-hero h1 {
  margin-bottom: 22px;

  max-width: 900px;

  font-size: clamp(38px, 5vw, 64px);

  line-height: 1.04;

  letter-spacing: -1.5px;
}

.article-lead {
  max-width: 760px;

  color: rgba(255, 255, 255, 0.82);

  font-size: clamp(18px, 2vw, 22px);

  line-height: 1.65;
}

/* =========================================================
   BREADCRUMBS
========================================================= */

.breadcrumbs {
  margin-bottom: 28px;

  color: rgba(255, 255, 255, 0.64);

  font-size: 14px;
}

.breadcrumbs a {
  color: rgba(255, 255, 255, 0.85);
}

.breadcrumbs a:hover {
  color: var(--edikio-white);
}

.breadcrumbs span {
  margin: 0 8px;
}

/* =========================================================
   IMAGEN PRINCIPAL ARTÍCULO
========================================================= */

.article-cover-wrap {
  padding-top: 55px;
}

.article-cover {
  overflow: hidden;

  width: min(calc(100% - 40px), 1100px);

  margin-inline: auto;

  aspect-ratio: 16 / 8;

  border-radius: 22px;

  background: var(--edikio-cream-dark);

  box-shadow: var(--shadow);
}

.article-cover img {
  width: 100%;
  height: 100%;

  object-fit: cover;
}

/* =========================================================
   CUERPO DEL ARTÍCULO
========================================================= */

.article-body {
  width: min(calc(100% - 40px), 820px);

  margin-inline: auto;

  padding: 70px 0 90px;
}

.article-body p,
.article-body li {
  color: #44403b;

  font-size: 18px;

  line-height: 1.85;
}

.article-body p {
  margin-bottom: 25px;
}

.article-body h2 {
  margin: 60px 0 22px;

  color: var(--edikio-black);

  font-size: clamp(29px, 4vw, 40px);

  line-height: 1.15;
}

.article-body h3 {
  margin: 38px 0 15px;

  color: var(--edikio-black);

  font-size: clamp(22px, 3vw, 28px);

  line-height: 1.2;
}

.article-body ul,
.article-body ol {
  margin: 0 0 30px 25px;
}

.article-body li {
  margin-bottom: 12px;
}

.article-body strong {
  color: var(--edikio-black);
}

.article-body a {
  color: var(--edikio-red);

  text-decoration: underline;

  text-decoration-thickness: 1px;

  text-underline-offset: 3px;
}

/* =========================================================
   IMÁGENES INTERNAS
========================================================= */

.article-image {
  margin: 45px 0;

  overflow: hidden;

  border-radius: 18px;

  background: var(--edikio-cream-dark);
}

.article-image img {
  width: 100%;

  max-height: 580px;

  object-fit: cover;
}

.image-caption {
  padding: 12px 16px;

  background: var(--edikio-white);

  color: var(--text-soft);

  font-size: 13px;
}

/* =========================================================
   BLOQUE DESTACADO
========================================================= */

.highlight-box {
  margin: 45px 0;

  padding: 30px 32px;

  border-left: 5px solid var(--edikio-gold);

  border-radius: 0 14px 14px 0;

  background: #eee8dc;
}

.highlight-box p:last-child {
  margin-bottom: 0;
}

/* =========================================================
   BENEFICIOS
========================================================= */

.benefits-grid {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 18px;

  margin: 35px 0 45px;
}

.benefit {
  padding: 25px;

  background: var(--edikio-white);

  border: 1px solid var(--border);

  border-radius: 14px;
}

.benefit h3 {
  margin: 0 0 10px;

  font-size: 20px;
}

.benefit p {
  margin: 0;

  font-size: 16px;
}

/* =========================================================
   PASOS
========================================================= */

.steps {
  counter-reset: edikio-step;

  margin: 35px 0 50px;
}

.step {
  position: relative;

  counter-increment: edikio-step;

  margin-bottom: 18px;

  padding: 25px 25px 25px 78px;

  background: var(--edikio-white);

  border: 1px solid var(--border);

  border-radius: 14px;
}

.step::before {
  content: counter(edikio-step);

  position: absolute;

  left: 22px;
  top: 23px;

  width: 38px;
  height: 38px;

  display: flex;

  align-items: center;

  justify-content: center;

  border-radius: 50%;

  background: var(--edikio-red);

  color: var(--edikio-white);

  font-weight: 800;
}

.step h3 {
  margin: 0 0 8px;

  font-size: 20px;
}

.step p {
  margin: 0;

  font-size: 16px;
}

/* =========================================================
   FAQ
========================================================= */

.faq {
  margin-top: 55px;
}

.faq-item {
  padding: 25px 0;

  border-bottom: 1px solid var(--border);
}

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-item h3 {
  margin: 0 0 10px;

  font-size: 20px;
}

.faq-item p {
  margin: 0;
}

/* =========================================================
   CTA ARTÍCULO
========================================================= */

.article-cta {
  margin-top: 65px;

  padding: 42px;

  background: var(--edikio-black);

  border-radius: 20px;

  color: var(--edikio-white);

  text-align: center;
}

.article-cta h2 {
  margin: 0 0 15px;

  color: var(--edikio-white);

  font-size: clamp(27px, 4vw, 38px);
}

.article-cta p {
  max-width: 600px;

  margin: 0 auto 25px;

  color: rgba(255, 255, 255, 0.76);
}

.cta-button {
  display: inline-flex;

  align-items: center;

  justify-content: center;

  min-height: 52px;

  padding: 0 27px;

  background: var(--edikio-red);

  border-radius: 10px;

  color: var(--edikio-white) !important;

  text-decoration: none !important;

  font-weight: 800;

  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.cta-button:hover {
  background: var(--edikio-red-dark);

  transform: translateY(-2px);
}

/* =========================================================
   ARTÍCULOS RELACIONADOS
========================================================= */

.related-posts {
  padding: 70px 0 90px;

  background: var(--edikio-cream-dark);
}

.related-posts h2 {
  margin-bottom: 30px;

  color: var(--edikio-black);

  font-size: clamp(28px, 4vw, 40px);
}

.related-grid {
  display: grid;

  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 22px;
}

.related-card {
  overflow: hidden;

  background: var(--edikio-white);

  border: 1px solid var(--border);

  border-radius: 14px;
}

.related-card img {
  width: 100%;

  aspect-ratio: 16 / 9;

  object-fit: cover;
}

.related-card-content {
  padding: 20px;
}

.related-card h3 {
  margin-bottom: 10px;

  color: var(--edikio-black);

  font-size: 19px;

  line-height: 1.3;
}

.related-card a {
  color: var(--edikio-red);

  font-size: 14px;

  font-weight: 800;
}

/* =========================================================
   FOOTER
========================================================= */

.blog-footer {
  padding: 55px 0 30px;

  background: var(--edikio-black);

  color: var(--edikio-white);
}

.footer-grid {
  display: grid;

  grid-template-columns: 1.5fr 1fr 1fr;

  gap: 50px;

  padding-bottom: 40px;
}

.footer-brand img {
  width: 110px;

  margin-bottom: 18px;
}

.footer-brand p {
  max-width: 400px;

  color: rgba(255, 255, 255, 0.65);

  font-size: 14px;
}

.footer-column h2 {
  margin-bottom: 16px;

  font-size: 16px;

  letter-spacing: 0.5px;
}

.footer-column a {
  display: block;

  width: fit-content;

  margin-bottom: 10px;

  color: rgba(255, 255, 255, 0.68);

  font-size: 14px;
}

.footer-column a:hover {
  color: var(--edikio-white);
}

.footer-bottom {
  padding-top: 25px;

  border-top: 1px solid rgba(255, 255, 255, 0.1);

  color: rgba(255, 255, 255, 0.5);

  font-size: 13px;

  text-align: center;
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {
  .blog-header-inner {
    min-height: 90px;

    gap: 20px;
  }

  .blog-logo img {
    width: 100px;
  }

  .blog-nav {
    gap: 6px;
  }

  .blog-nav a {
    min-height: 42px;

    padding: 0 13px;

    font-size: 13px;
  }

  .blog-hero {
    padding: 75px 0;
  }

  .posts-grid {
    gap: 25px;
  }

  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* =========================================================
   MÓVIL
========================================================= */

@media (max-width: 700px) {
  .container {
    width: min(calc(100% - 30px), var(--container));
  }

  .blog-header-inner {
    width: calc(100% - 30px);

    padding: 18px 0;

    flex-direction: column;

    gap: 15px;
  }

  .blog-logo img {
    width: 95px;
  }

  .blog-nav {
    width: 100%;

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 7px;
  }

  .blog-nav a {
    width: 100%;

    padding: 0 7px;

    font-size: 12px;

    text-align: center;
  }

  .blog-hero {
    padding: 65px 0;
  }

  .blog-hero h1 {
    font-size: clamp(37px, 12vw, 55px);

    letter-spacing: -1px;
  }

  .blog-intro {
    padding: 55px 0 20px;
  }

  .section-heading {
    margin-bottom: 30px;
  }

  .posts-section {
    padding-bottom: 70px;
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }

  .post-card-content {
    padding: 23px;
  }

  .article-hero {
    padding: 55px 0 45px;
  }

  .article-hero h1 {
    font-size: clamp(34px, 10vw, 48px);
  }

  .article-cover-wrap {
    padding-top: 30px;
  }

  .article-cover {
    width: calc(100% - 30px);

    aspect-ratio: 4 / 3;

    border-radius: 15px;
  }

  .article-body {
    width: calc(100% - 30px);

    padding: 50px 0 65px;
  }

  .article-body p,
  .article-body li {
    font-size: 17px;
  }

  .article-body h2 {
    margin-top: 48px;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .highlight-box {
    padding: 24px;
  }

  .step {
    padding: 22px 20px 22px 70px;
  }

  .step::before {
    left: 18px;

    top: 20px;
  }

  .article-cta {
    padding: 32px 22px;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;

    gap: 30px;
  }
}

/* =========================================================
   MÓVIL PEQUEÑO
========================================================= */

@media (max-width: 400px) {
  .blog-nav a {
    min-height: 40px;

    font-size: 11px;
  }

  .blog-hero h1 {
    font-size: 36px;
  }

  .article-hero h1 {
    font-size: 33px;
  }

  .post-card h2 {
    font-size: 23px;
  }
}

/* =========================================================
   REDUCIR ANIMACIONES
========================================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .post-card,
  .post-card-image img,
  .post-card-link::after,
  .blog-nav a,
  .cta-button {
    transition: none;
  }
}

/* ==========================================================
   GALERÍAS DE IMÁGENES PARA ARTÍCULOS
   ========================================================== */

/*
   Estas clases permiten utilizar varias imágenes dentro
   de cada entrada del blog sin crear CSS diferente
   para cada artículo.
*/

/* ==========================================================
   IMAGEN DESTACADA INTERNA
   ========================================================== */

.article-featured-image {
  width: 100%;
  margin: 48px 0;
}

.article-featured-image img {
  display: block;

  width: 100%;
  height: auto;

  max-height: 600px;

  object-fit: cover;

  border-radius: 18px;
}

.article-featured-image figcaption {
  margin-top: 10px;

  font-size: 14px;
  line-height: 1.5;

  color: #777;

  text-align: center;
}

/* ==========================================================
   GALERÍA BASE
   ========================================================== */

.article-gallery {
  width: 100%;

  display: grid;

  gap: 18px;

  margin: 48px 0;
}

/* ==========================================================
   GALERÍA DE 2 IMÁGENES
   ========================================================== */

.article-gallery--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.article-gallery--2 figure {
  min-width: 0;
  margin: 0;
}

.article-gallery--2 img {
  display: block;

  width: 100%;
  height: 340px;

  object-fit: cover;

  border-radius: 16px;
}

/* ==========================================================
   GALERÍA DE 3 IMÁGENES
   ========================================================== */

.article-gallery--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.article-gallery--3 figure {
  min-width: 0;
  margin: 0;
}

.article-gallery--3 img {
  display: block;

  width: 100%;
  height: 280px;

  object-fit: cover;

  border-radius: 16px;
}

/* ==========================================================
   PIE DE FOTO PARA GALERÍAS
   ========================================================== */

.article-gallery figcaption {
  margin-top: 9px;

  padding: 0 4px;

  font-size: 14px;
  line-height: 1.45;

  color: #777;
}

/* ==========================================================
   GALERÍA EDITORIAL
   ========================================================== */

/*
   Diseño:

   ┌──────────────────────┬─────────────┐
   │                      │   imagen 2  │
   │      imagen 1        ├─────────────┤
   │                      │   imagen 3  │
   └──────────────────────┴─────────────┘
*/

.article-gallery--editorial {
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);

  grid-template-rows: repeat(2, 220px);

  gap: 16px;
}

.article-gallery--editorial figure {
  min-width: 0;
  min-height: 0;

  margin: 0;

  overflow: hidden;

  border-radius: 18px;
}

.article-gallery--editorial figure:first-child {
  grid-row: 1 / 3;
}

.article-gallery--editorial img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;

  transition: transform 0.35s ease;
}

/* ==========================================================
   EFECTO SUTIL EN ESCRITORIO
   ========================================================== */

@media (hover: hover) {
  .article-gallery--editorial figure:hover img {
    transform: scale(1.025);
  }
}

/* ==========================================================
   IMAGEN PANORÁMICA
   ========================================================== */

.article-wide-image {
  position: relative;

  width: 100%;

  margin: 55px 0;

  overflow: hidden;

  border-radius: 20px;
}

.article-wide-image img {
  display: block;

  width: 100%;
  height: clamp(320px, 42vw, 540px);

  object-fit: cover;
}

.article-wide-image figcaption {
  position: absolute;

  left: 20px;
  right: 20px;
  bottom: 20px;

  width: fit-content;
  max-width: calc(100% - 40px);

  padding: 10px 16px;

  border-radius: 10px;

  background: rgba(0, 0, 0, 0.72);

  color: #fff;

  font-size: 14px;
  line-height: 1.4;

  backdrop-filter: blur(5px);
}

/* ==========================================================
   BLOQUE IMAGEN + TEXTO
   ========================================================== */

/*
   Nos servirá para evitar que todos los artículos
   tengan únicamente imágenes centradas.
*/

.article-media {
  display: grid;

  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);

  align-items: center;

  gap: 45px;

  margin: 55px 0;
}

.article-media-image {
  min-width: 0;
}

.article-media-image img {
  display: block;

  width: 100%;
  height: 420px;

  object-fit: cover;

  border-radius: 18px;
}

.article-media-content {
  min-width: 0;
}

.article-media-content h2,
.article-media-content h3 {
  margin-top: 0;
}

.article-media-content p:last-child {
  margin-bottom: 0;
}

/* ==========================================================
   IMAGEN A LA DERECHA
   ========================================================== */

.article-media--reverse .article-media-image {
  order: 2;
}

.article-media--reverse .article-media-content {
  order: 1;
}

/* ==========================================================
   MOSAICO DE 4 IMÁGENES
   ========================================================== */

.article-gallery--4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.article-gallery--4 figure {
  min-width: 0;

  margin: 0;
}

.article-gallery--4 img {
  display: block;

  width: 100%;
  height: 300px;

  object-fit: cover;

  border-radius: 16px;
}

/* ==========================================================
   EVITAR SALTOS DE CONTENIDO
   ========================================================== */

.article-gallery img,
.article-featured-image img,
.article-wide-image img,
.article-media-image img {
  background: #f1f1f1;
}

/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 900px) {
  .article-gallery--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-gallery--3 figure:last-child {
    grid-column: 1 / -1;
  }

  .article-gallery--3 figure:last-child img {
    height: 340px;
  }

  /* IMAGEN + TEXTO */

  .article-media {
    gap: 30px;
  }

  .article-media-image img {
    height: 350px;
  }

  /* GALERÍA EDITORIAL */

  .article-gallery--editorial {
    grid-template-rows: repeat(2, 190px);
  }
}

/* ==========================================================
   MÓVIL
   ========================================================== */

@media (max-width: 700px) {
  /*
       Todas las galerías pasan a una columna.
       Esto evita imágenes demasiado pequeñas.
    */

  .article-gallery {
    gap: 22px;

    margin: 36px 0;
  }

  /* DOS IMÁGENES */

  .article-gallery--2 {
    grid-template-columns: 1fr;
  }

  .article-gallery--2 img {
    height: auto;

    aspect-ratio: 4 / 3;
  }

  /* TRES IMÁGENES */

  .article-gallery--3 {
    grid-template-columns: 1fr;
  }

  .article-gallery--3 figure:last-child {
    grid-column: auto;
  }

  .article-gallery--3 img,
  .article-gallery--3 figure:last-child img {
    height: auto;

    aspect-ratio: 4 / 3;
  }

  /* CUATRO IMÁGENES */

  .article-gallery--4 {
    grid-template-columns: 1fr;
  }

  .article-gallery--4 img {
    height: auto;

    aspect-ratio: 4 / 3;
  }

  /* GALERÍA EDITORIAL */

  .article-gallery--editorial {
    display: grid;

    grid-template-columns: 1fr;
    grid-template-rows: none;

    gap: 14px;
  }

  .article-gallery--editorial figure,
  .article-gallery--editorial figure:first-child {
    grid-column: auto;
    grid-row: auto;

    height: auto;
  }

  .article-gallery--editorial img {
    height: auto;

    aspect-ratio: 4 / 3;
  }

  /* IMAGEN DESTACADA */

  .article-featured-image {
    margin: 36px 0;
  }

  .article-featured-image img {
    max-height: none;

    aspect-ratio: 4 / 3;
  }

  /* IMAGEN PANORÁMICA */

  .article-wide-image {
    margin: 40px 0;

    border-radius: 15px;
  }

  .article-wide-image img {
    height: auto;

    aspect-ratio: 4 / 3;
  }

  .article-wide-image figcaption {
    position: static;

    width: 100%;
    max-width: none;

    margin: 0;

    padding: 10px 4px 0;

    border-radius: 0;

    background: transparent;

    color: #777;

    backdrop-filter: none;
  }

  /* IMAGEN + TEXTO */

  .article-media,
  .article-media--reverse {
    grid-template-columns: 1fr;

    gap: 25px;

    margin: 40px 0;
  }

  .article-media-image,
  .article-media-content,
  .article-media--reverse .article-media-image,
  .article-media--reverse .article-media-content {
    order: initial;
  }

  .article-media-image img {
    height: auto;

    aspect-ratio: 4 / 3;
  }
}

/* ==========================================================
   MÓVIL PEQUEÑO
   ========================================================== */

@media (max-width: 480px) {
  .article-gallery,
  .article-featured-image,
  .article-wide-image,
  .article-media {
    margin-top: 30px;
    margin-bottom: 30px;
  }

  .article-gallery--2 img,
  .article-gallery--3 img,
  .article-gallery--4 img,
  .article-gallery--editorial img,
  .article-featured-image img,
  .article-wide-image img,
  .article-media-image img {
    border-radius: 12px;
  }
}

/* ==========================================================
   REDUCIR MOVIMIENTO
   ========================================================== */

@media (prefers-reduced-motion: reduce) {
  .article-gallery--editorial img {
    transition: none;
  }
}


/* =========================================================
   INFOGRAFÍA / IMAGEN VERTICAL COMPLETA
========================================================= */

.article-infographic {
  margin: 50px 0;
  padding: 14px;
  background: var(--edikio-white);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.article-infographic img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.article-infographic figcaption {
  margin-top: 12px;
  color: #777;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}
