:root {
  --blue-dark: #0d2137;
  --blue-mid: #1565c0;
  --blue-light: #1e88e5;
  --gold: #0891b2;
  --gold-dark: #0e7490;
  --green: #2e7d32;
  --green-light: #e8f5e9;
  --red-light: #ffebee;
  --amber-light: #ecfeff;
  --bg: #f5f7fa;
  --white: #ffffff;
  --text: #1a1a2e;
  --text-mid: #4a5568;
  --text-light: #718096;
  --border: #e2e8f0;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 10px;
  --radius-lg: 16px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}

a { color: var(--blue-mid); text-decoration: none; }
a:hover { color: var(--blue-light); text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ===== NAVBAR ===== */
.navbar {
  background: var(--blue-dark);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-logo span { color: #fbbf24; }

.nav-menu {
  display: flex;
  list-style: none;
  gap: 4px;
}

.nav-menu a {
  color: rgba(255,255,255,0.85);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  text-decoration: none;
}

.nav-menu a:hover,
.nav-menu a.active {
  background: rgba(255,255,255,0.12);
  color: var(--white);
}

.nav-menu .nav-cta a {
  background: var(--gold);
  color: #ffffff;
  font-weight: 700;
}

.nav-menu .nav-cta a:hover {
  background: var(--gold-dark);
  color: var(--blue-dark);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--blue-dark) 0%, #1a3d6b 60%, #1565c0 100%);
  color: var(--white);
  padding: 80px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(8,145,178,0.2) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.35);
  color: #ffffff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero h1 span { color: var(--gold); }

.hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 640px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--gold);
  color: #ffffff;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  background: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(8,145,178,0.4);
  text-decoration: none;
  color: #ffffff;
}

.btn-secondary {
  background: rgba(255,255,255,0.12);
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.3);
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.2);
  color: var(--white);
  text-decoration: none;
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 64px 20px;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--blue-dark);
  margin-bottom: 12px;
}

.section-subtitle {
  color: var(--text-mid);
  font-size: 1.05rem;
  margin-bottom: 48px;
  max-width: 640px;
}

.section-header {
  margin-bottom: 48px;
}

/* ===== CARDS ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.country-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all 0.3s;
  text-decoration: none;
  color: var(--text);
  display: block;
}

.country-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: var(--text);
  border-color: var(--blue-light);
}

.country-flag {
  margin-bottom: 16px;
  line-height: 1;
}

.country-flag .fi {
  width: 56px;
  height: 42px;
  border-radius: 5px;
  display: inline-block;
}

/* FA icons in info boxes */
.info-box strong i { margin-right: 6px; }
.etias-icon i { font-size: 2rem; }

/* FA icons in author/team avatars */
.author-avatar i,
.team-avatar i { font-size: 2.2rem; }

/* Flag icons in small country grids */
.country-grid-item .fi {
  width: 40px;
  height: 30px;
  border-radius: 3px;
  display: block;
  margin: 0 auto 8px;
}

.country-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 8px;
}

.country-card p {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.6;
}

.country-card .card-tag {
  display: inline-block;
  margin-top: 16px;
  background: var(--bg);
  color: var(--blue-mid);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ===== CONTENT LAYOUT (Article + Sidebar) ===== */
.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 20px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
}

.article-content h2 {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--blue-dark);
  margin: 40px 0 16px;
  padding-top: 8px;
}

.article-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--blue-dark);
  margin: 28px 0 12px;
}

.article-content p {
  margin-bottom: 16px;
  color: var(--text);
  line-height: 1.8;
}

.article-content ul, .article-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.article-content li {
  margin-bottom: 8px;
  color: var(--text);
}

/* ===== INFO BOXES ===== */
.info-box {
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 28px 0;
  border-left: 4px solid;
}

.info-box.blue {
  background: #e3f2fd;
  border-color: var(--blue-mid);
}

.info-box.green {
  background: var(--green-light);
  border-color: var(--green);
}

.info-box.amber {
  background: var(--amber-light);
  border-color: var(--gold);
}

.info-box.red {
  background: var(--red-light);
  border-color: #c62828;
}

.info-box strong {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  color: var(--text-mid);
}

/* ===== SIDEBAR ===== */
.sidebar {
  position: sticky;
  top: 80px;
}

.sidebar-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 24px;
}

.sidebar-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gold);
}

.sidebar-links {
  list-style: none;
}

.sidebar-links li {
  border-bottom: 1px solid var(--border);
}

.sidebar-links li:last-child { border-bottom: none; }

.sidebar-links a {
  display: block;
  padding: 10px 0;
  font-size: 0.9rem;
  color: var(--text-mid);
  transition: color 0.2s;
}

.sidebar-links a:hover { color: var(--blue-mid); text-decoration: none; }

/* ===== VISA CARDS ===== */
.visa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.visa-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.visa-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 8px;
}

.visa-card p {
  font-size: 0.875rem;
  color: var(--text-mid);
  margin-bottom: 12px;
}

.visa-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.visa-tag.popular { background: #e3f2fd; color: var(--blue-mid); }
.visa-tag.easy { background: var(--green-light); color: var(--green); }
.visa-tag.hard { background: var(--red-light); color: #c62828; }
.visa-tag.new { background: var(--amber-light); color: var(--gold-dark); }

/* ===== STATS STRIP ===== */
.stats-strip {
  background: var(--blue-dark);
  color: var(--white);
  padding: 48px 20px;
}

.stats-grid {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--gold);
}

.stat-label {
  font-size: 0.875rem;
  opacity: 0.8;
  margin-top: 4px;
}

/* ===== AD SLOTS ===== */
.ad-container {
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  margin: 32px 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.8rem;
}

.ad-container.sidebar-ad {
  min-height: 250px;
  min-width: 250px;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
}

.breadcrumb-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-mid);
  flex-wrap: wrap;
}

.breadcrumb-inner a { color: var(--blue-mid); }
.breadcrumb-inner span { color: var(--text-light); }

/* ===== PAGE HERO (inner pages) ===== */
.page-hero {
  background: linear-gradient(135deg, var(--blue-dark) 0%, #1a3d6b 100%);
  color: var(--white);
  padding: 56px 20px;
}

.page-hero-inner {
  max-width: 860px;
  margin: 0 auto;
}

.page-hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.page-hero h1 span { color: var(--gold); }

.page-hero p {
  font-size: 1.05rem;
  opacity: 0.9;
  max-width: 680px;
}

.page-hero .meta {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  font-size: 0.85rem;
  opacity: 0.75;
  flex-wrap: wrap;
}

/* ===== TABLE OF CONTENTS ===== */
.toc {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
}

.toc h4 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-mid);
  margin-bottom: 12px;
}

.toc ol {
  padding-left: 20px;
}

.toc li { margin-bottom: 6px; }
.toc a { color: var(--blue-mid); font-size: 0.9rem; }

/* ===== AUTHOR BOX ===== */
.author-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 40px 0;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  box-shadow: var(--shadow);
}

.author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-mid), var(--blue-dark));
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--white);
}

.author-info h4 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.author-info .role { font-size: 0.8rem; color: var(--text-mid); margin-bottom: 8px; }
.author-info p { font-size: 0.875rem; color: var(--text-mid); line-height: 1.6; }

/* ===== TEAM CARDS ===== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 40px;
}

.team-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-align: center;
}

.team-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--blue-mid), var(--blue-dark));
  color: var(--white);
}

.team-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--blue-dark); margin-bottom: 4px; }
.team-card .role { font-size: 0.85rem; color: var(--gold-dark); font-weight: 600; margin-bottom: 12px; }
.team-card p { font-size: 0.875rem; color: var(--text-mid); line-height: 1.6; }

/* ===== FOOTER ===== */
footer {
  background: var(--blue-dark);
  color: rgba(255,255,255,0.7);
  padding: 56px 20px 24px;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-brand h3 span { color: var(--gold); }

.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
}

.footer-links li { margin-bottom: 8px; }

.footer-links a {
  color: rgba(255,255,255,0.65);
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--gold); text-decoration: none; }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
}

.disclaimer {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 0.8rem;
  line-height: 1.6;
  margin: 32px auto;
  max-width: 1200px;
}

/* ===== ETIAS ALERT ===== */
.etias-alert {
  background: linear-gradient(135deg, #e0f7fa, #ecfeff);
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 40px 0;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.etias-icon { font-size: 2rem; flex-shrink: 0; }

.etias-alert h3 { font-size: 1.1rem; font-weight: 700; color: var(--blue-dark); margin-bottom: 8px; }
.etias-alert p { font-size: 0.9rem; color: var(--text-mid); }

/* ===== CHECKLIST ===== */
.checklist {
  list-style: none;
  padding: 0;
}

.checklist li {
  padding: 10px 0 10px 32px;
  position: relative;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.checklist li:last-child { border-bottom: none; }

.checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

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

@media (max-width: 640px) {
  .nav-menu { display: none; }
  .hamburger { display: flex; }

  .nav-menu.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--blue-dark);
    padding: 16px;
    gap: 4px;
    border-top: 1px solid rgba(255,255,255,0.1);
  }

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

  .author-box {
    flex-direction: column;
  }

  .hero { padding: 56px 20px; }
}

/* ===== RAIL ADS (anuncios laterales en pantallas anchas) ===== */
.rail-ad {
  position: fixed;
  top: 84px;
  width: 160px;
  z-index: 500;
  display: none;
}

.rail-ad-left  { left:  calc(50% - 780px); }
.rail-ad-right { right: calc(50% - 780px); }

.rail-ad-inner {
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.75rem;
  text-align: center;
  padding: 8px;
  writing-mode: horizontal-tb;
}

@media (min-width: 1600px) {
  .rail-ad { display: block; }
}

/* ===== COOKIE BANNER ===== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0d1b2a;
  color: #e2e8f0;
  padding: 18px 20px;
  z-index: 9999;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.35);
  border-top: 2px solid var(--gold);
  display: none;
}

.cookie-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-banner-text {
  flex: 1;
  font-size: 0.875rem;
  line-height: 1.6;
  min-width: 200px;
}

.cookie-banner-text strong { color: #ffffff; }

.cookie-banner-text a {
  color: #38bdf8;
  text-decoration: underline;
}

.cookie-banner-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.cookie-btn-accept {
  background: var(--gold);
  color: #ffffff;
  border: none;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background 0.2s;
}

.cookie-btn-accept:hover { background: var(--gold-dark); }

.cookie-btn-reject {
  background: transparent;
  color: #e2e8f0;
  border: 1.5px solid rgba(255,255,255,0.3);
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.875rem;
  transition: border-color 0.2s;
}

.cookie-btn-reject:hover { border-color: rgba(255,255,255,0.6); }

@media (max-width: 640px) {
  .cookie-banner-inner { flex-direction: column; align-items: flex-start; }
  .cookie-banner-buttons { width: 100%; }
  .cookie-btn-accept, .cookie-btn-reject { flex: 1; text-align: center; }
}
