/* ============================================
   Capital Route — Editorial Premium Stylesheet
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600&family=Lora:ital,wght@0,400;0,600;0,700;1,400;1,600&display=swap');

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

/* ---------- Custom Properties (Premium Palette) ---------- */
:root {
  /* Colors */
  --accent-color: #d4282b;
  --accent-hover: #b12124;
  --body-bg: #fdfaf6; /* Warm paper-like background */
  --card-bg: #ffffff;
  --text-primary: #121417;
  --text-secondary: #4a5568;
  --text-tertiary: #718096;
  --border-color: rgba(0, 0, 0, 0.05);
  
  /* Sidebar Glass */
  --sidebar-bg: rgba(255, 255, 255, 0.15);
  --sidebar-width: 280px;
  --sidebar-margin: 20px;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
  --shadow-md: 0 12px 30px -10px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 50px -12px rgba(0,0,0,0.12);
  
  /* Fonts */
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-serif: 'Lora', Georgia, serif;
  
  /* Radius */
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 8px;
}

/* ---------- Custom Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--body-bg); }
::-webkit-scrollbar-thumb { 
  background: rgba(0,0,0,0.1); 
  border-radius: 10px; 
  border: 3px solid var(--body-bg); 
}
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.2); }
[data-scheme="dark"] ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); }
[data-scheme="dark"] ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

[data-scheme="dark"] {
  --body-bg: #0f1115;
  --card-bg: #1a1d23;
  --text-primary: #f7fafc;
  --text-secondary: #a0aec0;
  --text-tertiary: #718096;
  --border-color: rgba(255, 255, 255, 0.06);
  --sidebar-bg: rgba(26, 29, 35, 0.35);
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.2);
  --shadow-md: 0 12px 30px -10px rgba(0,0,0,0.4);
}

/* ---------- Category Colors (Refined) ---------- */
:root {
  --cat-capital-bg: #f3e5f5; --cat-capital-text: #6b21a8; --cat-capital-border: #9333ea;
  --cat-route-bg: #ecfdf5; --cat-route-text: #065f46; --cat-route-border: #10b981;
  --cat-a-traves-del-tiempo-bg: #fff7ed; --cat-a-traves-del-tiempo-text: #9a3412; --cat-a-traves-del-tiempo-border: #f97316;
  --cat-vagabundeando-bg: #fffbeb; --cat-vagabundeando-text: #92400e; --cat-vagabundeando-border: #fbbf24;
  --cat-opinion-bg: #f1f5f9; --cat-opinion-text: #334155; --cat-opinion-border: #64748b;
  --cat-eventos-bg: #fef2f2; --cat-eventos-text: #991b1b; --cat-eventos-border: #ef4444;
  
  --cat-inicio-bg: #eff6ff; --cat-inicio-text: #1e40af; --cat-inicio-border: #3b82f6;
  --cat-archivo-bg: #fefce8; --cat-archivo-text: #854d0e; --cat-archivo-border: #eab308;
}

/* ---------- Base ---------- */
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--body-bg);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background 0.4s cubic-bezier(0.4, 0, 0.2, 1), color 0.4s;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-color); text-decoration: none; transition: 0.2s; }
a:hover { opacity: 0.85; }
.post-card-link:hover,
.post-card-link:hover * { opacity: 1; }
img { max-width: 100%; height: auto; display: block; border-radius: var(--radius-sm); }
h1, h2, h3, h4, h5 { font-family: var(--font-heading); font-weight: 700; letter-spacing: -0.02em; }

/* ---------- Ambient Textures ---------- */
.site-wrapper::after {
  content: "";
  position: fixed;
  bottom: -10%; right: -5%;
  width: 40vw; height: 40vw;
  max-width: 500px; max-height: 500px;
  background: rgba(16, 185, 129, 0.08); /* Emerald glow for the partners pill */
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
}

[data-scheme="dark"] .site-wrapper::after {
  background: rgba(99, 102, 241, 0.20); 
}

/* ---------- Layout ---------- */
.site-wrapper {
  display: flex;
  min-height: 100vh;
  max-width: 1600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.main-content {
  margin-left: calc(var(--sidebar-width) + var(--sidebar-margin));
  flex: 1;
  padding: 40px 40px 80px;
  min-width: 0;
}

/* Category Page Banner (Cinematic Overlay) */
.category-banner {
  position: relative;
  width: 100%;
  height: 380px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 40px;
  display: flex;
  align-items: flex-end;
}

.category-banner img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: contrast(1.05) saturate(1.1);
  will-change: transform;
  transform: scale(1.1);
}

.category-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.80) 0%,
    rgba(0,0,0,0.35) 45%,
    rgba(0,0,0,0.05) 100%
  );
  border-radius: inherit;
  pointer-events: none;
}

.category-banner-content {
  position: relative;
  z-index: 2;
  padding: 40px 48px;
  width: 100%;
}

.category-banner-title {
  font-family: var(--font-serif);
  font-size: 3.2rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
  margin-bottom: 10px;
}

.category-banner-desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
  font-weight: 400;
  text-shadow: 0 2px 10px rgba(0,0,0,0.4);
  max-width: 560px;
  line-height: 1.5;
}

/* ---------- Sidebar (Floating Glassmorphism) ---------- */
#sidebar {
  position: fixed;
  top: var(--sidebar-margin);
  left: var(--sidebar-margin);
  width: var(--sidebar-width);
  height: calc(100vh - (var(--sidebar-margin) * 2));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Noise + color — textura de grano sobre color sólido */
#sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--sidebar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: -1;
  pointer-events: none;
}

#sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  opacity: 0.04;
  z-index: 0;
  pointer-events: none;
  border-radius: var(--radius-lg);
}

.sidebar-orb3 { display: none; }

[data-scheme="dark"] #sidebar::after {
  opacity: 0.06;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 16px 20px 12px;
}

.sidebar-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.sidebar-logo {
  width: 105px; height: 105px;
  border-radius: 0;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.sidebar-logo:hover {
  transform: scale(1.03);
}

.sidebar-site-name, .sidebar-site-desc {
  display: none !important;
}

/* Social row */
.sidebar-social {
  display: flex;
  gap: 12px;
  margin: 0 0 10px;
  justify-content: center;
}

.sidebar-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  background: rgba(0,0,0,0.03);
  color: var(--text-secondary);
  transition: all 0.3s;
}

[data-scheme="dark"] .sidebar-social a { background: rgba(255,255,255,0.05); }

.sidebar-social a:hover {
  background: var(--accent-color);
  color: #fff;
  transform: translateY(-2px);
}

/* Sidebar Nav - Pill Style */
.sidebar-nav {
  overflow-y: auto;
  overflow-x: hidden;
  margin: 4px -10px;
  padding: 10px 10px;
  scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.sidebar-nav ul { 
  list-style: none; 
  display: flex; 
  flex-direction: column; 
  gap: 4px; /* Espaciado ultra compacto */
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 14px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 999px;
  color: var(--text-secondary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  border: 1px solid transparent;
  background: var(--bg-secondary);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.sidebar-nav a:hover {
  transform: translateY(-2px) scale(1.02);
}

/* Nav pills — tonos del rojo accent, reposo sutil, hover vibrante */
.sidebar-nav li a {
  background: rgba(212, 40, 43, 0.06);
  color: var(--text-secondary);
  border-color: transparent;
}

.sidebar-nav li a:hover {
  background: rgba(212, 40, 43, 0.14);
  color: var(--text-primary);
  border-color: rgba(212, 40, 43, 0.25);
}

/* Cada categoría mantiene su matiz propio pero desaturado en reposo */
.nav-item-capital a        { --pill-color: 99, 102, 241; }
.nav-item-route a          { --pill-color: 16, 185, 129; }
.nav-item-a-traves-del-tiempo a { --pill-color: 245, 158, 11; }
.nav-item-vagabundeando a  { --pill-color: 236, 72, 153; }
.nav-item-opinion a        { --pill-color: 107, 114, 128; }
.nav-item-eventos a        { --pill-color: 239, 68, 68; }
.nav-item-inicio a         { --pill-color: 59, 130, 246; }
.nav-item-archivo a        { --pill-color: 133, 77, 14; }
.nav-item-contacto a       { --pill-color: 14, 165, 233; }

.sidebar-nav li[class] a {
  background: rgba(var(--pill-color), 0.12);
  color: var(--text-primary);
}

.sidebar-nav li[class] a:hover {
  background: rgba(var(--pill-color), 0.85);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 6px 18px rgba(var(--pill-color), 0.35);
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
  transform: translateY(-2px) scale(1.02);
}

/* Active highlights */
.sidebar-nav .active a {
  background: var(--card-bg) !important;
  border-color: var(--accent-color) !important;
  color: var(--accent-color) !important;
  box-shadow: 0 4px 15px rgba(212, 40, 43, 0.1);
}

.sidebar-nav a svg { width: 18px; height: 18px; opacity: 0.8; }

.sidebar-search {
  margin: 6px 0 6px;
}
.sidebar-search form { display: flex; position: relative; }
.sidebar-search input {
  width: 100%;
  height: 34px;
  padding: 0 35px 0 12px;
  font-size: 0.78rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: rgba(0,0,0,0.02);
  color: var(--text-primary);
  font-family: var(--font-body);
  transition: all 0.3s;
}
[data-scheme="dark"] .sidebar-search input { background: rgba(255,255,255,0.03); }

.sidebar-search-dropdown {
  display: none;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  margin-top: 6px;
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
}

.sidebar-search-dropdown.open { display: flex; }

.sidebar-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.15s;
  opacity: 1;
}

.sidebar-search-item:last-of-type { border-bottom: none; }
.sidebar-search-item:hover { background: var(--bg-secondary); opacity: 1; }

.sidebar-search-item img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.sidebar-search-item div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sidebar-search-item-cat {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 1px 6px;
  border-radius: 20px;
  align-self: flex-start;
}

.sidebar-search-item-title {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-search-all {
  display: block;
  text-align: center;
  padding: 8px;
  font-size: 0.75rem;
  color: var(--accent-color);
  background: var(--bg-secondary);
  font-weight: 600;
  opacity: 1;
}

.sidebar-search-all:hover { background: var(--border-color); opacity: 1; }

.sidebar-search-empty {
  padding: 12px;
  font-size: 0.8rem;
  color: var(--text-tertiary);
  text-align: center;
}

.sidebar-search-dropdown mark {
  background: rgba(212, 40, 43, 0.15);
  color: var(--accent-color);
  border-radius: 2px;
  padding: 0 1px;
  font-weight: 700;
}

.sidebar-search input:focus {
  background: var(--card-bg);
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px rgba(212, 40, 43, 0.1);
  outline: none;
}
.sidebar-search button {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: var(--text-tertiary);
  cursor: pointer;
}

/* Dark mode toggle */
.sidebar-dark-toggle { margin-bottom: 6px; }
.sidebar-dark-toggle button {
  width: 100%;
  height: 34px;
  background: rgba(0,0,0,0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.3s;
}
[data-scheme="dark"] .sidebar-dark-toggle button { background: rgba(255,255,255,0.03); }
.sidebar-dark-toggle button:hover {
  background: var(--card-bg);
  border-color: var(--accent-color);
  color: var(--accent-color);
}


.footer-partners-marquee {
  position: fixed;
  bottom: 32px;
  left: calc(var(--sidebar-width) + var(--sidebar-margin) + 32px);
  right: 32px;
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 8px 32px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--sidebar-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 990;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.footer-partners-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 0;
  margin-right: 32px;
  white-space: nowrap;
}

.footer-marquee-wrap {
  flex: 1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.footer-marquee-track {
  display: flex;
  flex-direction: row;
  gap: 48px;
  width: max-content;
  animation: marquee 24s linear infinite;
  align-items: center;
}

.footer-marquee-track:hover {
  animation-play-state: paused;
}

.footer-marquee-track img {
  height: 44px;
  width: auto;
  border-radius: 0;
  filter: grayscale(1) opacity(0.5);
  transition: filter 0.3s, transform 0.3s;
}

.footer-marquee-track a:hover img {
  filter: grayscale(0) opacity(1);
  transform: scale(1.05);
}

[data-scheme="dark"] .footer-marquee-track img {
  filter: brightness(0) invert(1) opacity(0.5);
}

[data-scheme="dark"] .footer-marquee-track a:hover img {
  filter: brightness(0) invert(1) opacity(1);
}

.sidebar-footer {
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
  font-size: 0.65rem;
  color: var(--text-tertiary);
  font-weight: 500;
  text-align: center;
}

/* ---------- Page Hero (Cinematic) ---------- */
.page-hero {
  position: relative;
  width: 100%;
  min-height: 540px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 56px;
  box-shadow: var(--shadow-lg);
  background: var(--card-bg);
  display: flex;
  align-items: flex-end;
}

.hero-image {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  filter: contrast(1.05) saturate(1.1);
  animation: heroZoom 24s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0) 100%);
  z-index: 1;
}

@keyframes heroZoom {
  from { transform: scale(1); }
  to { transform: scale(1.12); }
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 60px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-content h1 {
  font-family: var(--font-serif);
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
  color: #ffffff;
  text-shadow: 0 8px 30px rgba(0,0,0,0.6);
  max-width: 800px;
}

.hero-content p {
  font-size: 1.25rem;
  line-height: 1.7;
  max-width: 650px;
  color: rgba(255,255,255,0.95);
  font-weight: 400;
  text-shadow: 0 4px 15px rgba(0,0,0,0.5);
  margin-bottom: 24px;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 24px;
  height: 24px;
  color: rgba(255, 255, 255, 0.7);
  animation: bounceHint 2s infinite ease-in-out;
}

@keyframes bounceHint {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.5; }
  50% { transform: translate(-50%, 10px); opacity: 1; }
}

/* ---------- Search Page ---------- */
.search-hero {
  text-align: center;
  padding: 48px 0 40px;
  margin-bottom: 8px;
}

.search-hero-title {
  font-family: var(--font-serif);
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.search-hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.search-bar-wrap {
  max-width: 640px;
  margin: 0 auto 24px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 999px;
  padding: 12px 20px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-bar:focus-within {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px rgba(212, 40, 43, 0.1);
}

.search-bar-icon {
  width: 20px;
  height: 20px;
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: color 0.2s;
}

.search-bar:focus-within .search-bar-icon {
  color: var(--accent-color);
}

.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1.05rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  outline: none;
}

.search-bar input::placeholder { color: var(--text-tertiary); }

.search-clear {
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 6px;
  border-radius: 50%;
  display: none;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}

.search-clear:hover { background: var(--bg-secondary); color: var(--text-primary); }
.search-clear.visible { display: block; }

.search-suggestions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.search-suggestions-label {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-right: 4px;
}

.search-suggestions a {
  font-size: 0.78rem;
  padding: 6px 16px;
  border-radius: 999px !important;
  border: 1px solid transparent;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s;
  opacity: 1;
}

.search-results-info {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  text-align: center;
}

.search-empty {
  color: var(--text-secondary);
  font-size: 1rem;
  padding: 40px 0;
  text-align: center;
}

mark {
  background: rgba(212, 40, 43, 0.15);
  color: var(--accent-color);
  border-radius: 3px;
  padding: 0 2px;
  font-weight: 600;
}

/* ---------- Page Header (Standard) ---------- */
.page-header { margin-bottom: 48px; }
.page-header h1 {
  font-family: var(--font-serif);
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.page-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
}

/* ---------- Post Card Grid (Bento Editorial) ---------- */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* Featured card spans 2 columns */
.post-card--featured {
  grid-column: span 2;
}

.post-card--featured .post-card-media {
  aspect-ratio: 16 / 7;
}

.post-card--featured .post-card-title {
  font-size: 1.6rem;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.post-card--featured .post-card-desc {
  -webkit-line-clamp: 4;
  line-clamp: 4;
}

@keyframes cardEntrance {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

.post-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  animation: cardEntrance 0.5s ease-out both;
  position: relative;
}

.post-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}

.post-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(212, 40, 43, 0.3);
}

.post-card:hover::after {
  opacity: 1;
}

.post-card:hover .post-card-desc {
  opacity: 0.8 !important; /* Subtle fade to focus on title and image */
}

.post-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.post-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;        /* override del reset global que añade border-radius a todas las imgs */
  display: block;          /* elimina el inline gap */
}

/* hover image gestionado por parallax JS en animations.js */

.post-card-tags {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.post-card-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 6px 14px;
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
}

/* Category Pills Colors (Badge Style High Contrast) */
.tag-capital { --tag-color: 99, 102, 241; background: rgba(99, 102, 241, 0.12); color: rgb(99, 102, 241); }
.tag-route { --tag-color: 16, 185, 129; background: rgba(16, 185, 129, 0.12); color: rgb(16, 185, 129); }
.tag-a-traves-del-tiempo { --tag-color: 245, 158, 11; background: rgba(245, 158, 11, 0.12); color: rgb(200, 128, 6); }
.tag-vagabundeando { --tag-color: 236, 72, 153; background: rgba(236, 72, 153, 0.12); color: rgb(236, 72, 153); }
.tag-opinion { --tag-color: 107, 114, 128; background: rgba(107, 114, 128, 0.12); color: rgb(107, 114, 128); }
.tag-eventos { --tag-color: 239, 68, 68; background: rgba(239, 68, 68, 0.12); color: rgb(239, 68, 68); }

.tag-capital:hover, .tag-route:hover, .tag-a-traves-del-tiempo:hover,
.tag-vagabundeando:hover, .tag-opinion:hover, .tag-eventos:hover {
  background: rgba(var(--tag-color), 0.85);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(var(--tag-color), 0.35);
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
  transform: translateY(-2px) scale(1.02);
  opacity: 1;
}

.post-card-body {
  padding: 28px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  border-top: 3px solid transparent;
}

/* Category accent on card body */
.cat-border-capital       { border-top-color: rgba(99, 102, 241, 0.7); }
.cat-border-route         { border-top-color: rgba(16, 185, 129, 0.7); }
.cat-border-a-traves-del-tiempo { border-top-color: rgba(245, 158, 11, 0.7); }
.cat-border-vagabundeando { border-top-color: rgba(236, 72, 153, 0.7); }
.cat-border-opinion       { border-top-color: rgba(107, 114, 128, 0.7); }
.cat-border-eventos       { border-top-color: rgba(239, 68, 68, 0.7); }

.post-card-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-desc {
  font-size: 0.9rem;
  font-style: normal;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: opacity 0.4s ease;
}

.post-card-date {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: auto;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-card-date::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent-color);
}

/* ---------- Single Post Page ---------- */
.post-single {
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "hero header"
    "hero content"
    "hero footer";
  gap: 0 48px;
  align-items: start;
}

.post-hero {
  grid-area: hero;
  position: sticky;
  top: 32px;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  background: var(--bg-secondary);
  margin-bottom: 0;
  position: relative; /* para nav elements */
}

.post-hero img:not(.slider-img) {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* Slider System */
.slider-hero {
  position: sticky;
}

.slider-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  height: 100%;
  max-height: 85vh; /* restrict height so it fits on screen nicely */
}

.slider-track::-webkit-scrollbar {
  display: none;
}

.slider-img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  scroll-snap-align: start;
  display: block;
}

.slider-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 16px;
  pointer-events: none;
}

.slider-nav button {
  pointer-events: auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  color: white;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-nav button:hover {
  background: rgba(220,38,38,0.9);
}

.slider-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: none;
  opacity: 0.8;
}

.post-header {
  grid-area: header;
  margin-bottom: 28px;
}

.post-title {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  line-height: 1.1;
  margin: 15px 0;
  letter-spacing: -0.01em;
  font-weight: 700;
}

.post-content {
  grid-area: content;
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.post-content p {
  margin-bottom: 25px;
}

.post-footer {
  grid-area: footer;
}

/* ---------- Single Post (Editorial Focus) ---------- */

.post-title {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 24px;
}

.post-content {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.post-content p { margin-bottom: 1.8em; }

.post-content blockquote {
  font-size: 1.4rem;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-primary);
  border-left: 6px solid var(--accent-color);
  padding: 20px 40px;
  margin: 40px 0;
  background: var(--card-bg);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* ---------- Partners Footer ---------- */

.partners-marquee {
  margin-top: 80px;
  border-top: 1px solid var(--border-color);
  padding: 40px 0 20px;
  overflow: hidden;
}

.partners-marquee h3 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-tertiary);
  margin-bottom: 24px;
  text-align: center;
}

.marquee-track {
  display: flex;
  gap: 60px;
  width: max-content;
  animation: marquee 25s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

.marquee-track img {
  height: 40px;
  width: auto;
  filter: grayscale(1) opacity(0.4);
  transition: 0.3s;
  border-radius: 0;
}

.marquee-track img:hover {
  filter: grayscale(0) opacity(1);
}

@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------- Mobile Top Bar & Overlay ---------- */
.mobile-topbar {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 100px;
  background: var(--sidebar-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1100;
  align-items: center;
  padding: 0 20px;
  justify-content: center;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.mobile-brand-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.mobile-logo {
  width: 80px;
  height: 80px;
  display: block;
  object-fit: contain;
}

.hamburger-btn {
  background: none; border: none;
  width: 40px; height: 40px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.hamburger-btn span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.hamburger-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger-btn.active span:nth-child(2) { opacity: 0; }
.hamburger-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999;
}
.mobile-overlay.active { display: block; }

/* Single Post Categories (Pills) */
.post-header .post-categories {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.post-header .post-categories a {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-header .post-categories a:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* Single Post Pill Colors (Badge Style High Contrast) */
.cat-label-capital { --tag-color: 99, 102, 241; background: rgba(99, 102, 241, 0.12) !important; color: rgb(99, 102, 241) !important; }
.cat-label-route { --tag-color: 16, 185, 129; background: rgba(16, 185, 129, 0.12) !important; color: rgb(16, 185, 129) !important; }
.cat-label-a-traves-del-tiempo { --tag-color: 245, 158, 11; background: rgba(245, 158, 11, 0.12) !important; color: rgb(200, 128, 6) !important; }
.cat-label-vagabundeando { --tag-color: 236, 72, 153; background: rgba(236, 72, 153, 0.12) !important; color: rgb(236, 72, 153) !important; }
.cat-label-opinion { --tag-color: 107, 114, 128; background: rgba(107, 114, 128, 0.12) !important; color: rgb(107, 114, 128) !important; }
.cat-label-eventos { --tag-color: 239, 68, 68; background: rgba(239, 68, 68, 0.12) !important; color: rgb(239, 68, 68) !important; }

.cat-label-capital:hover, .cat-label-route:hover, .cat-label-a-traves-del-tiempo:hover,
.cat-label-vagabundeando:hover, .cat-label-opinion:hover, .cat-label-eventos:hover {
  background: rgba(var(--tag-color), 0.85) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(var(--tag-color), 0.35) !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
  transform: translateY(-2px) scale(1.02);
  opacity: 1;
}

/* ---------- Scroll indicator en hero ---------- */
.hero-scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.65);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: scrollBounce 2s ease-in-out infinite;
  pointer-events: none;
}

.hero-scroll-hint svg {
  width: 20px; height: 20px;
  stroke: rgba(255,255,255,0.65);
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.65; }
  50% { transform: translateX(-50%) translateY(7px); opacity: 1; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .main-content { padding: 40px 28px 80px; }
  .page-header h1 { font-size: 2.5rem; }
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .post-card--featured { grid-column: span 2; }

  .category-banner {
    height: 300px;
    margin-bottom: 30px;
  }
  .category-banner-title { font-size: 2.4rem; }
  .category-banner-content { padding: 32px 36px; }
}

@media (max-width: 768px) {
  #sidebar {
    left: -100%;
    top: 0;
    height: 100vh;
    border-radius: 0;
    width: 300px;
    margin: 0;
  }
  #sidebar.open { left: 0; }
  
  .mobile-topbar {
    display: flex;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
  }
  .post-card--featured { grid-column: span 1; }
  .post-card--featured .post-card-media { aspect-ratio: 4 / 3; }
  .post-card--featured .post-card-title { font-size: 1.25rem; }

  .main-content {
    margin-left: 0;
    padding: 116px 20px 40px;
  }
  
  /* Hero — tipografía adaptada a móvil */
  .hero-content { padding: 32px 24px; }
  .hero-content h1 { font-size: 2.4rem; line-height: 1.1; }
  .hero-content p  { font-size: 1rem; }

  .category-banner {
    height: 240px;
    margin-bottom: 24px;
    border-radius: var(--radius-md);
  }
  .category-banner-title { font-size: 2rem; }
  .category-banner-content { padding: 24px; }
  
  .hamburger-btn {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
  }

  .post-title { font-size: 1.75rem; line-height: 1.2; }
  .post-content h2 { font-size: 1.25rem; }
  .post-content h3 { font-size: 1.05rem; }

  /* Ajuste de la marquesina en footer para móvil */
  .footer-partners-marquee {
    left: 20px;
    right: 20px;
    bottom: 20px;
    padding: 8px 24px;
    border-radius: 999px;
  }
  .footer-partners-label {
    display: none; /* Ocultar el texto en móvil para ahorrar espacio */
  }

  /* Post single: columna única en móvil */
  .post-single {
    grid-template-columns: 1fr;
    grid-template-areas:
      "hero"
      "header"
      "content"
      "footer";
  }
  .post-hero { position: static; }
}


/* Dark Mode Partner Logos */
[data-scheme="dark"] .marquee-track img {
  filter: brightness(0) invert(1) opacity(0.8); 
  transition: filter 0.3s;
}

[data-scheme="dark"] .marquee-track img:hover {
  filter: brightness(0) invert(1) opacity(1);
}


