@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&family=Crimson+Pro:ital,wght@0,300;0,400;0,600;1,300;1,400&display=swap');

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

:root {
  --bg-base:        #f6f3ee;
  --bg-surface:     #edeae3;
  --bg-card:        #ffffff;
  --border:         #d6cec4;
  --border-soft:    #e8e3db;
  --text-primary:   #18140d;
  --text-secondary: #5c5248;
  --text-muted:     #9c9088;
  --accent-gold:    #9e7228;
  --accent-blue:    #1a5fa8;
  --font-display:   'Cormorant Garamond', Georgia, serif;
  --font-body:      'Crimson Pro', Georgia, serif;
  --radius:         3px;
  --max-width:      1200px;
  --header-h:       64px;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ══ HEADER ══ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 300;
  height: var(--header-h);
  transition: background 0.35s, box-shadow 0.35s;
}
.site-header.scrolled {
  background: rgba(246, 243, 238, 0.97);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.35s;
  letter-spacing: 0.02em;
}
.site-logo span { color: rgba(210, 175, 80, 0.95); }
.site-header.scrolled .site-logo { color: var(--text-primary); }

.header-nav {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2.2rem);
  list-style: none;
}
.header-nav a {
  font-size: 0.76rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.2s;
  white-space: nowrap;
}
.header-nav a:hover { color: rgba(210, 175, 80, 0.95); }
.site-header.scrolled .header-nav a { color: var(--text-secondary); }
.site-header.scrolled .header-nav a:hover { color: var(--accent-gold); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: #ffffff;
  transition: all 0.3s;
}
.site-header.scrolled .nav-toggle span { background: var(--text-primary); }

/* ══ HERO ══ */
.site-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--header-h) 0 0;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 30% 50%, #0d2d5e 0%, #07192e 50%, #030d1a 100%);
}

/* Starfield */
.hero-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero-stars::before,
.hero-stars::after {
  content: '';
  position: absolute;
  inset: 0;
}
.hero-stars::before {
  background-image:
    radial-gradient(1px 1px at  7% 11%, rgba(255,255,255,.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 18% 35%, rgba(255,255,255,.45) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 25% 18%, rgba(255,255,255,.8) 0%, transparent 100%),
    radial-gradient(1px 1px at 42%  8%, rgba(255,255,255,.55) 0%, transparent 100%),
    radial-gradient(1px 1px at 60% 22%, rgba(255,255,255,.4) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 73% 14%, rgba(255,255,255,.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 32%, rgba(255,255,255,.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 93% 55%, rgba(255,255,255,.65) 0%, transparent 100%),
    radial-gradient(1px 1px at 12% 65%, rgba(255,255,255,.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 33% 72%, rgba(255,255,255,.35) 0%, transparent 100%),
    radial-gradient(1px 1px at 54% 60%, rgba(255,255,255,.5) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 78% 70%, rgba(255,255,255,.6) 0%, transparent 100%),
    radial-gradient(1px 1px at  4% 82%, rgba(255,255,255,.45) 0%, transparent 100%),
    radial-gradient(1px 1px at 48% 88%, rgba(255,255,255,.55) 0%, transparent 100%),
    radial-gradient(1px 1px at 88% 88%, rgba(255,255,255,.4) 0%, transparent 100%);
}
.hero-stars::after {
  background-image:
    radial-gradient(1px 1px at 15% 25%, rgba(255,255,255,.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 38% 44%, rgba(255,255,255,.25) 0%, transparent 100%),
    radial-gradient(1px 1px at 66% 38%, rgba(255,255,255,.35) 0%, transparent 100%),
    radial-gradient(1px 1px at 82% 15%, rgba(255,255,255,.28) 0%, transparent 100%),
    radial-gradient(1px 1px at 96%  8%, rgba(255,255,255,.4) 0%, transparent 100%),
    radial-gradient(1px 1px at  2% 48%, rgba(255,255,255,.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 22% 92%, rgba(255,255,255,.35) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 95%, rgba(255,255,255,.25) 0%, transparent 100%);
}

/* Bottom fade to light */
.hero-bottom-fade {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 160px;
  background: linear-gradient(to bottom, transparent, var(--bg-base));
  pointer-events: none;
  z-index: 2;
}

/* ══ HERO LAYOUT ══ */
.hero-layout {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-width);
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 5vw, 3rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  min-height: calc(100vh - var(--header-h));
  overflow: hidden;
}

/* ── Text side ── */
.hero-text {
  animation: heroFadeUp 1s ease both;
}
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(210, 175, 80, 0.9);
  border: 1px solid rgba(210, 175, 80, 0.3);
  padding: 0.28rem 0.9rem;
  border-radius: var(--radius);
  margin-bottom: 1.6rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  font-weight: 300;
  line-height: 1.06;
  color: #ffffff;
  margin-bottom: 1.4rem;
  text-shadow: 0 2px 40px rgba(0,0,0,0.4);
}
.hero-title em {
  font-style: italic;
  color: rgba(215, 175, 70, 0.95);
}

.hero-description {
  font-size: clamp(1rem, 1.8vw, 1.12rem);
  font-weight: 300;
  color: rgba(255,255,255,0.55);
  max-width: 440px;
  line-height: 1.85;
  margin-bottom: 2.5rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--accent-gold);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.9rem 2.2rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(158, 114, 40, 0.35);
}
.hero-cta:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(158, 114, 40, 0.45);
}

/* ── Globe ── */
.hero-globe-side {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: heroFadeUp 1.2s ease 0.15s both;
}

/* Globe.gl inyecta su canvas con position:absolute internamente */
.globe-wrapper {
  width: min(95%, clamp(500px, 65vw, 820px));
  aspect-ratio: 1;
  position: relative;
  margin: 0 auto;
}
.globe-wrapper > div {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
}

/* Scroll hint */
.hero-scroll {
  position: absolute;
  bottom: clamp(2rem, 5vw, 3rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.28);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: scrollBounce 2.8s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}
.hero-scroll-line {
  width: 1px;
  height: 28px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.28), transparent);
}

/* ══ STATS BAR ══ */
.stats-bar {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: clamp(1rem, 3vw, 1.75rem) clamp(1rem, 4vw, 2rem);
}
.stats-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: clamp(2rem, 8vw, 7rem);
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-number {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
  color: var(--accent-gold);
  line-height: 1;
  display: block;
}
.stat-label {
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.35rem;
  display: block;
}

/* ══ SEARCH BAR ══ */
.search-bar-wrapper {
  max-width: var(--max-width);
  margin: clamp(2.5rem, 5vw, 3.5rem) auto 0;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}
.search-box {
  position: relative;
  max-width: 420px;
}
.search-box input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.96rem;
  padding: 0.68rem 1rem 0.68rem 2.6rem;
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box input::placeholder { color: var(--text-muted); }
.search-box input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(26, 95, 168, 0.08);
}
.search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}

/* ══ TABS ══ */
.tabs-wrapper {
  max-width: var(--max-width);
  margin: 1.25rem auto 0;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs-wrapper::-webkit-scrollbar { display: none; }

.tabs {
  display: flex;
  gap: 0;
  white-space: nowrap;
  min-width: max-content;
}

.tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  padding: 0.9rem 1.4rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text-primary); }
.tab.active {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
  font-weight: 600;
}

/* ══ RESULTS INFO ══ */
.results-info {
  max-width: var(--max-width);
  margin: 0.9rem auto 0;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 300;
  letter-spacing: 0.04em;
}

/* ══ ARTICLES GRID ══ */
.articles-grid {
  max-width: var(--max-width);
  margin: 1.25rem auto 0;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
}

.article-card {
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: background 0.22s;
  animation: fadeUp 0.4s ease both;
}
.article-card:hover { background: var(--bg-surface); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.article-card:nth-child(1) { animation-delay: 0.04s; }
.article-card:nth-child(2) { animation-delay: 0.09s; }
.article-card:nth-child(3) { animation-delay: 0.14s; }
.article-card:nth-child(4) { animation-delay: 0.19s; }
.article-card:nth-child(5) { animation-delay: 0.24s; }
.article-card:nth-child(6) { animation-delay: 0.29s; }

.card-image-wrapper { overflow: hidden; position: relative; }
.card-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  opacity: 0.88;
  transition: opacity 0.35s, transform 0.45s;
}
.article-card:hover .card-image { opacity: 1; transform: scale(1.04); }

.card-category {
  position: absolute;
  top: 0.75rem; left: 0.75rem;
  background: rgba(246, 243, 238, 0.94);
  border: 1px solid var(--border);
  color: var(--accent-gold);
  font-size: 0.66rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius);
}

.card-body {
  padding: clamp(1rem, 3vw, 1.4rem) clamp(1rem, 3vw, 1.5rem) clamp(1.1rem, 3vw, 1.4rem);
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.28rem);
  font-weight: 600;
  line-height: 1.22;
  color: var(--text-primary);
  margin-bottom: 0.55rem;
  transition: color 0.2s;
}
.article-card:hover .card-title { color: var(--accent-gold); }

.card-excerpt {
  font-size: 0.91rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
}
.card-footer {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-date  { font-size: 0.73rem; color: var(--text-muted); font-weight: 300; }
.card-read  { font-size: 0.71rem; color: var(--accent-blue); letter-spacing: 0.07em; text-transform: uppercase; }

/* ══ PAGINATION ══ */
.pagination {
  max-width: var(--max-width);
  margin: 3rem auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.page-btn {
  min-width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: var(--radius);
  transition: all 0.2s;
  padding: 0 0.75rem;
}
.page-btn:hover { border-color: var(--accent-gold); color: var(--accent-gold); }
.page-btn.active { background: var(--accent-gold); border-color: var(--accent-gold); color: #fff; font-weight: 600; }
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ══ LOADING / EMPTY ══ */
.loading, .empty-state {
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  width: 100%;
  background: var(--bg-card);
  grid-column: 1 / -1;
}

/* ══ FOOTER ══ */
.site-footer {
  margin-top: 5rem;
  border-top: 1px solid var(--border-soft);
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 4vw, 2rem);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 300;
  letter-spacing: 0.05em;
}

/* ══ ARTICLE PAGE ══ */
.article-hero {
  width: 100%;
  height: clamp(220px, 40vw, 460px);
  overflow: hidden;
  position: relative;
}
.article-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.65;
}
.article-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 20%, var(--bg-base) 100%);
}
.article-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 2rem) clamp(3rem, 8vw, 5rem);
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.meta-category {
  color: var(--accent-gold);
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid rgba(158,114,40,0.35);
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius);
}
.meta-date { color: var(--text-muted); font-size: 0.82rem; font-weight: 300; }
.article-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  font-weight: 600;
  line-height: 1.12;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}
.article-lead {
  font-size: clamp(1.05rem, 2.5vw, 1.2rem);
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.82;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-soft);
}
.article-body { font-size: clamp(1rem, 2vw, 1.05rem); font-weight: 300; line-height: 1.9; }
.article-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 600;
  color: var(--text-primary);
  margin: 2.5rem 0 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
}
.article-body h3 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 1.4rem);
  font-weight: 600;
  color: var(--accent-gold);
  margin: 2rem 0 0.75rem;
}
.article-body p { margin-bottom: 1.4rem; }
.article-body blockquote {
  border-left: 2px solid var(--accent-gold);
  margin: 2rem 0;
  padding: 1rem clamp(1rem, 3vw, 1.5rem);
  background: var(--bg-surface);
  font-style: italic;
  font-size: 1.08rem;
  color: var(--text-secondary);
}
.article-body strong { color: var(--text-primary); font-weight: 600; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin: 2rem 0;
  transition: color 0.2s;
}
.back-link:hover { color: var(--accent-gold); }

/* ══ RESPONSIVE ══ */

/* Tablet grande */
@media (max-width: 1024px) {
  .hero-layout {
    grid-template-columns: 1fr 1fr;
    gap: clamp(1.5rem, 4vw, 3rem);
  }
  .globe-wrapper {
    width: min(95%, clamp(300px, 44vw, 500px));
  }
}

/* Tablet */
@media (max-width: 820px) {
  .hero-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    text-align: center;
    padding: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 5vw, 2.5rem) 5rem;
    min-height: auto;
    padding-top: calc(var(--header-h) + 2rem);
  }
  .hero-globe-side {
    order: -1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .globe-wrapper {
    width: min(80%, clamp(260px, 58vw, 420px));
    margin: 0 auto;
  }
  .hero-description { margin: 0 auto 2.5rem; }
  .hero-text { display: flex; flex-direction: column; align-items: center; }
}

/* Mobile */
@media (max-width: 640px) {
  .header-nav { display: none; }
  .header-nav.open {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: rgba(246, 243, 238, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0 1rem;
    z-index: 299;
  }
  .header-nav.open li a {
    display: block;
    padding: 0.75rem clamp(1rem, 4vw, 2rem);
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border-soft);
    color: var(--text-secondary) !important;
  }
  .nav-toggle { display: flex; }
  .articles-grid { grid-template-columns: 1fr; }
  .stats-inner { gap: 1.5rem; }
  .hero-globe-side {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0;
  }
  .globe-wrapper {
    width: clamp(260px, 78vw, 340px);
    margin: 0 auto;
  }
}

@media (max-width: 380px) {
  .hero-title { font-size: 2.1rem; }
  .tab { font-size: 0.78rem; padding: 0.8rem 1rem; }
}

