/* =========================
   blog.css (MEGA COMPLETO)
   Estilo pergamino/dorado The Silk Road Travel
   - Compatible con TODOS tus artículos largos
   - Basado en Poi Kalon + soporte Chorsu
   - IMÁGENES REDUCIDAS y bien centradas
   ========================= */

/* =========================
   1) VARIABLES
   ========================= */
:root{
  --fondo-pergamino-claro:#fff9f0;
  --fondo-pergamino:#f5efe4;
  --fondo-pergamino-oscuro:#e7dcc6;

  --borde-dorado:#c19a4a;

  --texto-principal:#3b2b18;
  --texto-secundario:#5a4630;

  --enlace:#8a5a11;
  --enlace-hover-bg:rgba(212,185,130,0.18);

  --sombra-suave:rgba(0,0,0,0.12);
  --sombra-fuerte:rgba(0,0,0,0.28);

  /* Control global tamaños imagen (para ajustar rápido) */
  --hero-img-max: 640px;      /* <- BAJADO (antes 760/860) */
  --hero-img-max-h: 420px;    /* <- evita imagen gigante */
  --bloque-img-max: 380px;    /* <- BAJADO (antes 520) */
  --bloque-img-max-h: 300px;  /* <- controla altura */
}

html{ scroll-behavior:smooth; }

/* =========================
   2) BASE
   ========================= */
*{ box-sizing:border-box; }

body{
  margin:0;
  font-family:"Inter",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  background:
    radial-gradient(circle at 15% 0%, rgba(193,154,74,0.10) 0%, rgba(193,154,74,0) 55%),
    linear-gradient(
      to bottom,
      var(--fondo-pergamino-claro) 0%,
      var(--fondo-pergamino) 55%,
      var(--fondo-pergamino-oscuro) 100%
    );
  color:var(--texto-principal);
  line-height:1.6;
}

/* Wrapper */
main.blog-wrapper{
  max-width:1100px;
  margin:0 auto;
  padding:24px 16px 80px;
  position:relative;
  z-index:1;
}

/* Asegura que TODAS las imágenes se comporten bien */
main.blog-wrapper img{
  max-width:100%;
  height:auto;
  display:block;
}

/* Tipografía headings por defecto (por si algún h2/h3 aparece sin clase) */
main.blog-wrapper h2,
main.blog-wrapper h3{
  font-family:"Cormorant Garamond",Georgia,"Times New Roman",serif;
  letter-spacing:.02em;
}

/* =========================
   3) HERO
   ========================= */
.hero-blog{
  background:radial-gradient(circle at 20% 20%, #fffdf8 0%, var(--fondo-pergamino-oscuro) 70%);
  border:2px solid var(--borde-dorado);
  border-radius:20px;
  box-shadow:0 24px 48px var(--sombra-suave), 0 2px 4px rgba(0,0,0,0.06);
  padding:24px 24px 32px;
  margin-bottom:32px;
  text-align:center;
  position:relative;
  overflow:hidden;
}

/* Halo dorado suave */
.hero-blog::before{
  content:"";
  position:absolute;
  top:0;
  left:50%;
  transform:translate(-50%,-55%);
  width:150px;
  height:150px;
  background:radial-gradient(circle at 50% 50%, rgba(193,154,74,0.45) 0%, rgba(193,154,74,0) 70%);
  filter:blur(18px);
  pointer-events:none;
}

.hero-blog h1{
  font-family:"Cormorant Garamond",Georgia,"Times New Roman",serif;
  font-size:clamp(2rem, 1vw + 1.8rem, 2.8rem);
  font-weight:600;
  margin:0 0 10px 0;
  letter-spacing:.03em;
}

.hero-subtitle{
  font-family:"Cormorant Garamond",Georgia,"Times New Roman",serif;
  font-size:1.3rem;
  margin:0 0 18px 0;
  color:var(--texto-secundario);
}

.hero-divider{
  width:120px;
  height:4px;
  border-radius:999px;
  margin:0 auto 18px;
  background:linear-gradient(to right, #b38b4a 0%, #d9c18a 50%, #b38b4a 100%);
  box-shadow:0 0 6px rgba(179,139,74,0.7);
}

/* Intro hero */
.hero-intro{
  max-width:900px;
  margin:0 auto 14px;
  font-size:1rem;
  color:var(--texto-secundario);
}

/* Nota del hero */
.hero-note{
  max-width:900px;
  margin:0 auto 18px;
  font-size:.95rem;
  color:var(--texto-secundario);
  background:#fff;
  border:1px solid rgba(193,154,74,0.5);
  border-left:6px solid var(--borde-dorado);
  border-radius:12px;
  padding:12px 14px;
  box-shadow:0 10px 18px rgba(0,0,0,0.06);
  text-align:left;
}

/* Contenedor imagen hero */
.hero-img-wrapper{
  margin-top:18px;
  display:flex;
  justify-content:center;
}

/* Imagen HERO (control real de tamaño) */
.hero-img{
  width:100%;
  max-width:720px;     /* ⬅ antes 760 / 860 → ahora más equilibrado */
  max-height:420px;    /* ⬅ límite visual */
  height:auto;
  object-fit:contain;  /* NO recorta */
  border-radius:18px;
  border:2px solid var(--borde-dorado);
  box-shadow:0 18px 36px rgba(0,0,0,0.22),0 2px 4px rgba(0,0,0,0.18);
  margin:0 auto;
}

/* Si alguna imagen hero viene vertical, esto evita desastre */
.hero-img.is-portrait{
  aspect-ratio: 4 / 5;
  max-height:520px;
}

/* =========================
   4) ÍNDICE
   ========================= */
.bloque-indice{
  background:radial-gradient(circle at 20% 20%, #fffdf8 0%, var(--fondo-pergamino-oscuro) 70%);
  border:2px solid var(--borde-dorado);
  border-radius:20px;
  box-shadow:0 24px 48px var(--sombra-suave), 0 2px 4px rgba(0,0,0,0.06);
  padding:24px;
  margin-bottom:32px;
}

.indice-titulo{
  font-family:"Cormorant Garamond",Georgia,"Times New Roman",serif;
  font-size:clamp(1.4rem, 0.6vw + 1.1rem, 1.9rem);
  font-weight:600;
  text-align:center;
  margin:0 0 18px;
}

.indice-grid{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  list-style:none;
  padding:0;
  margin:0;
}

.indice-grid a{
  text-decoration:none;
  color:var(--texto-principal);
  flex:1 1 240px;
  min-width:220px;
  background:#fff;
  border:1px solid rgba(193,154,74,0.5);
  border-left:6px solid var(--borde-dorado);
  border-radius:12px;
  padding:12px 14px;
  box-shadow:0 10px 18px rgba(0,0,0,0.06);
  font-size:.95rem;
  display:flex;
  gap:6px;
  align-items:flex-start;
  transition:all .18s ease;
}

.indice-grid a .num{
  font-family:"Cormorant Garamond",serif;
  font-weight:600;
  color:#8a5a11;
  min-width:1.6rem;
}

.indice-grid a:hover{
  background:#fffef6;
  box-shadow:0 14px 24px rgba(0,0,0,0.1);
  transform:translateY(-2px);
}

/* =========================
   5) BLOQUES DE SECCIÓN
   ========================= */
.bloque-seccion{
  background:radial-gradient(circle at 20% 20%, #fffdf8 0%, var(--fondo-pergamino-oscuro) 70%);
  border:2px solid var(--borde-dorado);
  border-radius:20px;
  padding:26px 22px 26px;
  margin-bottom:32px;
  box-shadow:0 24px 48px var(--sombra-suave), 0 2px 4px rgba(0,0,0,0.06);
  position:relative;
  overflow:hidden;
  text-align:center; /* bloque centrado como Poi Kalon */
}

.bloque-seccion::before{
  content:"";
  position:absolute;
  top:0;
  left:50%;
  transform:translate(-50%,-60%);
  width:120px;
  height:120px;
  background:radial-gradient(circle at 50% 50%, rgba(193,154,74,0.5) 0%, rgba(193,154,74,0) 70%);
  filter:blur(18px);
  pointer-events:none;
}

/* Imagen dentro de bloque (control real de tamaño) */
.bloque-img{
  width:100%;
  max-width:480px;     /* ⬅ antes 520 */
  max-height:320px;    /* ⬅ clave */
  height:auto;
  object-fit:contain;  /* NO recorta */
  border-radius:16px;
  border:2px solid var(--borde-dorado);
  box-shadow:0 14px 28px rgba(0,0,0,0.18),0 2px 4px rgba(0,0,0,0.14);
  margin:0 auto 18px;
}

/* Título sección */
.titulo-seccion{
  font-family:"Cormorant Garamond",Georgia,"Times New Roman",serif;
  font-size:clamp(1.6rem, 0.6vw + 1.2rem, 2rem);
  font-weight:600;
  margin:0 0 14px;
  position:relative;
  padding-bottom:10px;
  letter-spacing:.02em;
}

.titulo-seccion::after{
  content:"";
  width:90px;
  height:4px;
  border-radius:999px;
  background:linear-gradient(to right,#b38b4a 0%,#d9c18a 50%,#b38b4a 100%);
  display:block;
  margin:14px auto 0;
  box-shadow:0 0 6px rgba(179,139,74,0.7);
}

/* Texto dentro de bloque (izquierda, ancho controlado) */
.bloque-seccion .texto{
  max-width:900px;
  margin:0 auto;
  text-align:left;
}

.bloque-seccion > p,
.bloque-seccion > ul{
  max-width:900px;
  margin-left:auto;
  margin-right:auto;
  text-align:left;
}

.bloque-seccion p{
  font-size:1rem;
  margin:0 0 1rem 0;
  color:var(--texto-principal);
}

.bloque-seccion ul{
  margin:0 0 1rem 0;
  padding-left:1.2rem;
  font-size:.98rem;
}

.bloque-seccion li{ margin-bottom:.5rem; }

/* =========================
   6) LINKS + TIPOGRAFÍA
   ========================= */
a{
  color:var(--enlace);
  font-weight:500;
  text-decoration:none;
  border-bottom:1px dashed rgba(138,90,17,0.4);
  transition:all .18s ease;
}

a:hover{
  color:#000;
  background-color:var(--enlace-hover-bg);
  border-bottom-color:rgba(138,90,17,0.85);
  box-shadow:0 0 8px rgba(212,185,130,0.7);
  border-radius:4px;
  padding:0 2px;
}

strong{ font-weight:600; color:#2a1c0c; }

/* =========================
   7) SHARE BAR
   ========================= */
.share-bar{
  margin:10px 0 30px;
  padding:16px 18px;
  border-radius:14px;
  border:1px solid rgba(205,162,77,0.5);
  background:radial-gradient(circle at 20% 20%, #fff9f0 0%, #f5efe4 50%, #e7dcc6 100%);
  box-shadow:0 10px 20px rgba(0,0,0,0.08);
  font-size:0.95rem;
}

.share-title{
  display:block;
  margin-bottom:10px;
  font-weight:600;
  color:#3b2b18;
}

.share-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:6px;
}

.share-btn{
  border:none;
  border-radius:999px;
  padding:8px 16px;
  font-size:0.9rem;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-family:inherit;
  transition:transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.share-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 4px 10px rgba(0,0,0,0.2);
  opacity:0.95;
}

.share-facebook{
  background:linear-gradient(135deg, #1877f2, #1452a3);
  color:#fff;
}

.share-copy{
  background:linear-gradient(135deg, #d9c18a, #b38b4a);
  color:#2a1c0c;
}

.share-hint{
  display:block;
  font-size:0.8rem;
  color:#5a4630;
}

/* =========================
   8) REVEAL BASE
   ========================= */
.reveal-base{
  opacity:0;
  transform:translateY(60px);
  filter:blur(6px);
  transition:all .9s ease;
  will-change:opacity,transform,filter;
}

.reveal-visible{
  opacity:1;
  transform:translateY(0);
  filter:blur(0);
}

/* =========================
   9) BOTÓN TOP
   ========================= */
#btnTop{
  position:fixed;
  bottom:24px;
  right:24px;
  z-index:999;
  width:48px;
  height:48px;
  border-radius:50%;
  border:2px solid #2a1c0c;
  background:radial-gradient(circle at 30% 30%,#d9c18a 0%,#b38b4a 60%,#8a5a11 100%);
  color:#2a1c0c;
  cursor:pointer;
  display:none;
  font-size:20px;
  line-height:44px;
  text-align:center;
  font-family:"Cormorant Garamond",serif;
  font-weight:600;
  box-shadow:0 14px 24px var(--sombra-fuerte), 0 2px 3px rgba(0,0,0,0.45);
  transition:transform .25s ease, box-shadow .25s ease;
}

#btnTop:hover{
  transform:scale(1.08) translateY(-2px);
  box-shadow:0 18px 32px rgba(0,0,0,0.5), 0 2px 3px rgba(0,0,0,0.6);
}

/* =========================
   10) EXTRAS (por si aparecen)
   ========================= */

/* Separadores suaves */
hr{
  border:0;
  height:1px;
  background:linear-gradient(to right, rgba(193,154,74,0), rgba(193,154,74,0.55), rgba(193,154,74,0));
  margin:26px auto;
  max-width:920px;
}

/* Quotes */
.quote{
  max-width:900px;
  margin:18px auto;
  padding:14px 16px;
  border-radius:14px;
  background:#fff;
  border:1px solid rgba(193,154,74,0.45);
  border-left:6px solid var(--borde-dorado);
  box-shadow:0 10px 18px rgba(0,0,0,0.06);
  color:var(--texto-secundario);
  font-style:italic;
}

/* Chips si algún día los metes */
.chips{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:center;
  margin-top:10px;
}

.chip{
  background:#fff;
  border:1px solid rgba(193,154,74,0.45);
  border-radius:999px;
  padding:8px 12px;
  font-size:.9rem;
  color:var(--texto-principal);
}

/* =========================
   11) RESPONSIVE
   ========================= */
@media (max-width: 920px){
  :root{
    --hero-img-max: 600px;
    --hero-img-max-h: 380px;
    --bloque-img-max: 360px;
    --bloque-img-max-h: 280px;
  }
}

@media (max-width: 720px){
  main.blog-wrapper{ padding:18px 12px 74px; }
  .hero-blog{ padding:20px 16px 26px; }
  .bloque-seccion{ padding:22px 16px 22px; }
  .indice-grid a{ min-width:180px; }

  /* En móvil: ocupa ancho, pero controla altura */
  :root{
    --hero-img-max: 100%;
    --hero-img-max-h: 320px;
    --bloque-img-max: 100%;
    --bloque-img-max-h: 240px;
  }

  .hero-img{
    border-radius:16px;
    aspect-ratio: 16 / 9;
  }

  .bloque-img{
    border-radius:16px;
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 420px){
  :root{
    --hero-img-max-h: 260px;
    --bloque-img-max-h: 210px;
  }
}
@media (max-width: 720px){
  .hero-img{
    max-width:100%;
    max-height:300px;
  }
  .bloque-img{
    max-width:100%;
    max-height:260px;
  }
}
