/**
 * home.css — refonte homepage estanco365 (2026-05-07)
 * Design system : rouge ES + noir + or, scope .est-home (pas de fuite vers autres pages)
 */

.est-home {
  --eh-rojo:        #C8102E;
  --eh-rojo-dark:   #A00B23;
  --eh-rojo-flag:   #C60B1E;
  --eh-amarillo:    #FFC400;
  --eh-negro:       #1A1A1A;
  --eh-negro2:      #232323;
  --eh-oro:         #C9A959;
  --eh-blanco:      #FFFFFF;
  --eh-bg:          #FAFAFA;
  --eh-line:        #E5E7EB;
  --eh-text:        #111827;
  --eh-text-soft:   #6B7280;
  --eh-radius:      14px;
  --eh-fdisp:       'Playfair Display', Georgia, serif;
  --eh-fbody:       'Inter', system-ui, -apple-system, sans-serif;
  font-family: var(--eh-fbody);
  color: var(--eh-text);
}
.est-home * { box-sizing: border-box; }
.est-home h1, .est-home h2, .est-home h3, .est-home h4 { font-family: var(--eh-fdisp); font-weight: 700; }

/* ============ HERO ============ */
.eh-hero {
  position: relative;
  background: linear-gradient(135deg, #0A0A0A 0%, var(--eh-negro) 100%);
  color: #fff;
  padding: 64px 20px 64px;
  overflow: hidden;
}
.eh-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.eh-hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  filter: saturate(1.05) contrast(1.05);
}
.eh-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,10,10,0.78) 0%, rgba(26,26,26,0.62) 60%, rgba(26,26,26,0.85) 100%);
  z-index: 1;
}
.eh-flag-deco {
  position: absolute;
  right: -6%;
  top: -10%;
  width: 70%;
  height: 130%;
  filter: blur(1px);
  transform: rotate(-8deg);
  opacity: 0.12;
  z-index: 2;
}
.eh-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: center;
}
.eh-hero-copy { max-width: 640px; }

.eh-pill {
  display: inline-block;
  background: var(--eh-rojo);
  color: #fff;
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  margin-bottom: 20px;
}
.eh-pill-or {
  background: rgba(201,169,89,0.18);
  color: var(--eh-oro);
  border: 1px solid rgba(201,169,89,0.45);
}

.eh-h1 {
  color: #fff;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.08;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.eh-h1 em {
  color: var(--eh-oro);
  font-style: italic;
}

.eh-subtitle {
  color: #C9C9C9;
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.55;
  margin: 0 0 30px;
  max-width: 560px;
}
.eh-subtitle strong { color: #fff; font-weight: 700; }

/* Search bar */
.eh-search {
  display: flex;
  background: #fff;
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  margin-bottom: 32px;
  max-width: 560px;
}
.eh-search input {
  flex: 1;
  border: 0;
  outline: 0;
  padding: 14px 16px;
  font-size: 15px;
  color: var(--eh-text);
  font-family: inherit;
  background: transparent;
  min-width: 0;
}
.eh-search input::placeholder { color: var(--eh-text-soft); }
.eh-search button {
  background: var(--eh-rojo);
  color: #fff;
  border: 0;
  padding: 13px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
}
.eh-search button:hover { background: var(--eh-rojo-dark); }

/* Bouton géoloc rapide (option B → redirige vers /tabaco-cerca-de-mi/) */
.eh-geoloc-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(201,169,89,0.10);
  color: var(--eh-oro);
  border: 1.5px solid rgba(201,169,89,0.45);
  border-radius: 999px;
  padding: 12px 22px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 28px;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.eh-geoloc-btn:hover {
  background: rgba(201,169,89,0.18);
  border-color: var(--eh-oro);
  transform: translateY(-1px);
}
.eh-geoloc-btn svg { stroke: var(--eh-oro); flex-shrink: 0; }
.eh-geoloc-btn.is-loading { opacity: 0.7; pointer-events: none; }
.eh-geoloc-btn.is-loading svg { animation: eh-spin 1s linear infinite; }
.eh-geoloc-status { font-size: 12px; opacity: 0.75; margin-left: 6px; }
@keyframes eh-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@media (max-width: 560px) {
  .eh-geoloc-btn { width: 100%; justify-content: center; }
}

.eh-hero-stats {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
}
.eh-hero-stats > div { min-width: 90px; }
.eh-hero-stats .val {
  color: var(--eh-oro);
  font-weight: 700;
  font-size: 26px;
  font-family: var(--eh-fdisp);
}
.eh-hero-stats .lbl {
  color: rgba(255,255,255,.6);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

/* Hero card decorative */
.eh-hero-card {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.10);
  border-top: 4px solid var(--eh-rojo);
  border-radius: var(--eh-radius);
  padding: 24px;
  color: #fff;
  position: relative;
  transform: rotate(2deg);
  transition: transform 0.3s;
}
.eh-hero-card:hover { transform: rotate(0deg); }
.eh-card-top { display: flex; justify-content: space-between; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--eh-oro); font-weight: 700; margin-bottom: 14px; }
.eh-card-pin { color: rgba(255,255,255,0.7); }
.eh-card-title { font-family: var(--eh-fdisp); font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.eh-card-meta { font-size: 13px; color: rgba(255,255,255,0.65); margin-bottom: 16px; }
.eh-card-tags { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.eh-card-tags span { background: rgba(200,16,46,0.18); color: #FECACA; font-size: 11px; padding: 4px 10px; border-radius: 999px; font-weight: 600; }
.eh-card-cta { color: var(--eh-oro); font-weight: 700; font-size: 14px; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 14px; }

/* ============ SECTIONS ============ */
.eh-section { padding: 72px 20px; background: var(--eh-bg); }
.eh-section-inner { max-width: 1200px; margin: 0 auto; }
.eh-section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.eh-section-head .eh-pill { margin-bottom: 16px; }
.eh-h2 {
  font-size: clamp(28px, 3.5vw, 38px);
  margin: 0 0 12px;
  color: var(--eh-text);
  letter-spacing: -0.01em;
}
.eh-h2 em { color: var(--eh-rojo); font-style: italic; }
.eh-h2-dark { color: #fff; }
.eh-h2-dark em { color: var(--eh-oro); }
.eh-section-sub {
  color: var(--eh-text-soft);
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
}
.eh-section-sub-dark { color: rgba(255,255,255,0.75); }

/* ============ SPOTLIGHT TOP 4 ============ */
.eh-spotlight { background: #fff; }
.eh-spotlight-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.eh-spot-card {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--eh-radius);
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  display: block;
  transition: transform 0.25s, box-shadow 0.25s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.eh-spot-card:hover { transform: translateY(-6px); box-shadow: 0 16px 36px rgba(0,0,0,0.18); }
.eh-spot-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 0.5s;
}
.eh-spot-card:hover .eh-spot-img { transform: scale(1.06); }
.eh-spot-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--c1) 0%, var(--c2) 100%);
  mix-blend-mode: multiply;
  opacity: 0.55;
  z-index: 1;
}
.eh-spot-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.85) 100%);
}
.eh-spot-body {
  position: absolute;
  inset: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  z-index: 1;
}
.eh-spot-num {
  font-family: var(--eh-fdisp);
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 2px;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.eh-spot-lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.85;
  margin-bottom: 12px;
}
.eh-spot-name {
  font-family: var(--eh-fdisp);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.eh-spot-cta {
  font-size: 13px;
  font-weight: 700;
  color: var(--eh-oro);
  letter-spacing: 0.02em;
}

/* ============ TODAS LAS COMUNIDADES ============ */
.eh-all-regions { background: var(--eh-bg); }
.eh-regions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.eh-rcard {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--eh-line);
  border-radius: 12px;
  padding: 12px 16px 12px 12px;
  text-decoration: none;
  color: var(--eh-text);
  transition: transform 0.15s, box-shadow 0.18s, border-color 0.15s;
  overflow: hidden;
}
.eh-rcard:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.10);
  border-color: var(--eh-rojo);
}
.eh-rcard-img {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  background: #f0f0f0;
  position: relative;
}
.eh-rcard-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}
.eh-rcard:hover .eh-rcard-img img { transform: scale(1.10); }
.eh-rcard-body { flex: 1; min-width: 0; }
.eh-rcard-name {
  display: block;
  font-weight: 700;
  font-size: 15px;
  color: var(--eh-text);
  line-height: 1.2;
  margin-bottom: 3px;
}
.eh-rcard-count {
  display: block;
  font-size: 13px;
  color: var(--eh-text-soft);
}
.eh-rcard-arrow {
  color: var(--eh-rojo);
  font-size: 24px;
  font-weight: 300;
  margin-left: auto;
  flex-shrink: 0;
}

/* ============ BLOG / ARTÍCULOS ============ */
.eh-blog {
  background: var(--eh-negro);
  color: #fff;
}
.eh-section-head-dark { color: #fff; }
.eh-articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}
.eh-article {
  background: var(--eh-negro2);
  border: 1px solid rgba(255,255,255,0.08);
  border-top: 4px solid var(--eh-rojo);
  border-radius: var(--eh-radius);
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}
.eh-article:hover { transform: translateY(-4px); border-top-color: var(--eh-oro); }
.eh-article-link { display: block; text-decoration: none; color: inherit; }
.eh-article-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  overflow: hidden;
}
.eh-article-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.eh-article-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--eh-rojo) 0%, var(--eh-negro) 100%);
  position: relative;
  overflow: hidden;
}
.eh-article:hover .eh-article-img img { transform: scale(1.05); }
.eh-article-img img { transition: transform 0.4s; }
.eh-article-body { padding: 22px 24px 24px; }
.eh-coming-tag {
  display: inline-block;
  background: rgba(201,169,89,0.18);
  color: var(--eh-oro);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.eh-article-title {
  font-size: 18px;
  line-height: 1.3;
  margin: 0 0 12px;
  color: #fff;
}
.eh-article-meta {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.eh-article-meta span + span { margin-left: 4px; }

.eh-blog-cta { text-align: center; }
.eh-coming-msg {
  display: inline-block;
  font-style: italic;
  color: rgba(255,255,255,0.55);
  font-size: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  max-width: 600px;
}

.eh-btn {
  display: inline-block;
  padding: 14px 30px;
  background: var(--eh-rojo);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.15s;
  border: 0;
}
.eh-btn:hover { background: var(--eh-rojo-dark); transform: translateY(-1px); }
.eh-btn-or {
  background: transparent;
  color: var(--eh-oro);
  border: 2px solid var(--eh-oro);
}
.eh-btn-or:hover { background: var(--eh-oro); color: var(--eh-negro); }
.eh-btn-large { padding: 18px 44px; font-size: 16px; }

/* ============ TRUST ============ */
.eh-trust { background: #fff; }
.eh-trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.eh-trust-card {
  background: var(--eh-bg);
  border: 1px solid var(--eh-line);
  border-radius: var(--eh-radius);
  padding: 32px 28px;
  text-align: left;
  transition: border-color 0.2s, transform 0.15s;
}
.eh-trust-card:hover { border-color: var(--eh-rojo); transform: translateY(-2px); }
.eh-trust-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--eh-rojo);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.eh-trust-card h3 {
  font-size: 19px;
  margin: 0 0 8px;
  color: var(--eh-text);
}
.eh-trust-card p {
  color: var(--eh-text-soft);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}

/* ============ CTA FINAL ============ */
.eh-cta-final {
  background: linear-gradient(135deg, var(--eh-rojo) 0%, var(--eh-rojo-dark) 100%);
  color: #fff;
  padding: 72px 20px;
  text-align: center;
}
.eh-cta-inner { max-width: 720px; margin: 0 auto; }
.eh-cta-title {
  font-family: var(--eh-fdisp);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  margin: 0 0 12px;
}
.eh-cta-sub {
  color: rgba(255,255,255,0.85);
  font-size: 16px;
  margin: 0 0 32px;
}
.eh-cta-final .eh-btn-large {
  background: var(--eh-negro);
  color: #fff;
}
.eh-cta-final .eh-btn-large:hover { background: #000; }

/* ============ REGION PAGE ============ */
.er-region .er-hero { padding: 56px 20px 56px; }
.er-region .er-hero .eh-hero-inner { grid-template-columns: 1fr; gap: 0; }
.er-breadcrumb {
  font-size: 12px;
  color: rgba(255,255,255,.65);
  margin-bottom: 20px;
}
.er-breadcrumb a { color: rgba(255,255,255,.65); text-decoration: none; }
.er-breadcrumb a:hover { color: #fff; text-decoration: underline; }
.er-breadcrumb .sep { margin: 0 6px; color: rgba(255,255,255,.4); }
.er-breadcrumb .current { color: rgba(255,255,255,.95); font-weight: 600; }
.er-prov-badge {
  background: linear-gradient(135deg, var(--eh-rojo) 0%, var(--eh-rojo-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.er-prov-code {
  color: #fff;
  font-family: var(--eh-fdisp);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.02em;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  .eh-hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .eh-hero-card { transform: rotate(0); max-width: 380px; }
  .eh-spotlight-grid { grid-template-columns: repeat(2, 1fr); }
  .eh-regions-grid { grid-template-columns: repeat(2, 1fr); }
  .eh-articles-grid { grid-template-columns: 1fr; }
  .eh-trust-grid { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 560px) {
  .eh-hero { padding: 48px 18px 56px; }
  .eh-section { padding: 56px 18px; }
  .eh-spotlight-grid { grid-template-columns: 1fr; }
  .eh-regions-grid { grid-template-columns: 1fr; }
  .eh-search { flex-direction: column; gap: 6px; padding: 8px; }
  .eh-search input { width: 100%; }
  .eh-search button { width: 100%; }
  .eh-hero-stats { gap: 24px; }
}
