/* ============================================
   RESIDENCIA FISCAL CHIPRE - Stylesheet
   Professional & Clean Design
   ============================================ */

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

:root {
  --navy: #1a2744;
  --navy-light: #2a3f6a;
  --blue-accent: #3b6fb6;
  --gold: #c9a84c;
  --gold-light: #e8d490;
  --bg: #f7f8fa;
  --bg-card: #ffffff;
  --text: #2d3748;
  --text-light: #64748b;
  --border: #e2e8f0;
  --success: #22c55e;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
  --max-width: 1140px;
}

html { scroll-behavior: smooth; }

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

a { color: var(--blue-accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--navy); }
img { max-width: 100%; height: auto; }

/* --- Typography --- */
h1, h2, h3, h4 { color: var(--navy); line-height: 1.3; }
h1 { font-size: 2.25rem; font-weight: 700; margin-bottom: 1rem; }
h2 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.75rem; }
h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; }
h4 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }
ul, ol { margin-bottom: 1rem; padding-left: 1.5rem; }
li { margin-bottom: 0.35rem; }
strong { font-weight: 600; }

/* --- Layout --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

/* ========================================
   HEADER / NAVIGATION
   (supports both sticky-header and site-header variants)
   ======================================== */
.sticky-header,
.site-header,
header.header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-inner,
.header-content,
.header-container,
.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.logo a { color: #fff; text-decoration: none; }
.logo h1 { margin: 0; font-size: 1.15rem; color: #fff; }
.logo span { color: var(--gold); }

.nav-menu,
.nav-links,
nav.nav {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link,
.nav-links a,
.nav-menu a {
  color: rgba(255,255,255,0.85);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-block;
  text-decoration: none;
}
.nav-link:hover, .nav-link.active,
.nav-links a:hover, .nav-links a.active,
.nav-menu a:hover, .nav-menu a.active {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

/* Hamburger / Mobile menu */
.hamburger-menu,
.menu-toggle,
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}
.hamburger-menu span {
  width: 25px;
  height: 3px;
  background: #fff;
  display: block;
  transition: all 0.3s;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  padding: 4rem 1.5rem 3.5rem;
  text-align: center;
}
.hero-content {
  max-width: 760px;
  margin: 0 auto;
}
.hero h1,
.hero-title {
  color: #fff;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.hero p,
.hero-subtitle {
  color: rgba(255,255,255,0.85);
  font-size: 1.15rem;
  max-width: 680px;
  margin: 0 auto 1.5rem;
}
.hero-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  padding: 0.35rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}
.hero-badge span { color: var(--navy); }

/* CTA Buttons */
.cta-button,
.cta-button-lg {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: var(--gold);
  color: var(--navy);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.cta-button:hover,
.cta-button-lg:hover {
  background: var(--gold-light);
  color: var(--navy);
  transform: translateY(-1px);
}
.cta-button-lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

/* ========================================
   PAGE HEADER (inner pages)
   ======================================== */
.page-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  padding: 3rem 1.5rem 2.5rem;
}
.page-header-content {
  max-width: var(--max-width);
  margin: 0 auto;
}
.page-header h1 { color: #fff; }
.page-header p,
.page-subtitle {
  color: rgba(255,255,255,0.8);
  font-size: 1.05rem;
}
.breadcrumb,
.breadcrumb-container {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.75rem;
}
.breadcrumb a { color: var(--gold-light); }

/* ========================================
   CONTENT LAYOUT
   ======================================== */
.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}
.main-content,
.article-content { min-width: 0; }
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.content-section,
section.section { margin-bottom: 2rem; }

/* ========================================
   STATS BAR
   ======================================== */
.stats-bar {
  padding: 2rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.stat-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.stat-number,
.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--blue-accent);
  display: block;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}

/* ========================================
   ROADMAP / TIMELINE
   ======================================== */
.roadmap {
  padding: 3rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.roadmap-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}
.roadmap-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.step-number {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--navy), var(--blue-accent));
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 auto 1rem;
}
.card-link {
  color: var(--blue-accent);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-block;
  margin-top: 0.75rem;
}
.card-link:hover { color: var(--navy); }

/* Steps Navigation (sidebar) */
.steps-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}
.steps-nav li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.steps-nav li:last-child { border-bottom: none; }
.steps-nav a {
  font-size: 0.9rem;
  display: block;
}
.steps-nav .current a,
.steps-nav .active a {
  color: var(--blue-accent);
  font-weight: 600;
}

/* ========================================
   CARDS
   ======================================== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.card-highlight { border-left: 4px solid var(--gold); }
.card-blue { border-left: 4px solid var(--blue-accent); }

/* ========================================
   FEATURE GRID
   ======================================== */
.why-cyprus {
  padding: 3rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}
.features-grid,
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0;
}
.feature-card,
.feature-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
  text-align: center;
}
.feature-card:hover,
.feature-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.feature-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--navy), var(--blue-accent));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  color: #fff;
}
.feature-card h3 { margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-light); font-size: 0.95rem; margin-bottom: 1rem; }
.feature-card .btn-link { color: var(--blue-accent); font-weight: 600; font-size: 0.9rem; }

/* ========================================
   INFO BOXES
   ======================================== */
.info-box {
  background: #f0f5ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1.5rem 0;
}
.info-box.warning,
.warning-box {
  background: #fffbeb;
  border-color: #fde68a;
}
.info-box.success,
.info-box.green {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.info-box-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.info-highlight {
  background: #f0f5ff;
  border-left: 4px solid var(--blue-accent);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.info-location {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0;
  font-size: 0.95rem;
}

/* Tip / Warning boxes */
.tip-box,
.tip-widget {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1rem 0;
}
.warning-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1rem 0;
}

/* ========================================
   TABLES
   ======================================== */
.table-wrapper { overflow-x: auto; margin: 1.5rem 0; }
table,
.price-table,
.rental-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
tr:hover { background: #f8fafc; }

/* ========================================
   TIMELINE
   ======================================== */
.timeline {
  position: relative;
  padding-left: 2rem;
  margin: 1.5rem 0;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0.75rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--blue-accent);
}
.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.35rem;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  background: var(--blue-accent);
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--blue-accent);
}

/* ========================================
   CHECKLIST
   ======================================== */
.checklist {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
.checklist-item,
.checklist li {
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

/* Requirements list */
.requirements-list {
  list-style: none;
  padding: 0;
}
.requirements-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}
.requirements-list li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--blue-accent);
  font-weight: 700;
}

/* Expense list */
.expense-list {
  list-style: none;
  padding: 0;
}
.expense-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.expense-list li:last-child { border-bottom: none; }

/* ========================================
   COST CARDS
   ======================================== */
.cost-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}
.cost-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.cost-amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue-accent);
}
.cost-detail {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Climate info */
.climate-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.climate-stat {
  text-align: center;
  padding: 1rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* ========================================
   SIDEBAR WIDGETS
   ======================================== */
.sidebar-widget,
.widget,
.navigation-widget {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.sidebar-widget h3,
.widget h3,
.navigation-widget h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--gold);
}
.sidebar-widget ul,
.widget ul,
.navigation-widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-widget li,
.widget li,
.navigation-widget li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.sidebar-widget li:last-child,
.widget li:last-child,
.navigation-widget li:last-child {
  border-bottom: none;
}
.sidebar-widget li a,
.widget li a,
.navigation-widget li a {
  font-size: 0.9rem;
}

/* ========================================
   AD SLOTS
   ======================================== */
.ad-slot,
.ad-slot-banner,
.ad-slot-sidebar,
.ad-slot-inline,
.ad-slot-between,
.ad-container {
  background: #f1f5f9;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  color: var(--text-light);
  font-size: 0.8rem;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.5rem 0;
}
.ad-slot-sidebar { min-height: 250px; }
.ad-label {
  font-size: 0.7rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ========================================
   CTA SECTION
   ======================================== */
.cta-section {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  padding: 3rem 1.5rem;
  text-align: center;
  margin-top: 2rem;
}
.cta-section h2 { color: #fff; }
.cta-section p { color: rgba(255,255,255,0.8); max-width: 600px; margin: 0 auto 1.5rem; }

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  text-decoration: none;
}
.btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: var(--gold-light); color: var(--navy); }
.btn-outline { border: 2px solid #fff; color: #fff; background: transparent; }
.btn-outline:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* ========================================
   FOOTER (supports all variants)
   ======================================== */
.site-footer,
footer.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 2.5rem 0 1.5rem;
  font-size: 0.9rem;
}
.footer-grid,
.footer-content,
.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-section {
  color: rgba(255,255,255,0.7);
}
.footer-grid h4,
.footer-section h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.footer-grid ul,
.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-grid li,
.footer-section li {
  margin-bottom: 0.5rem;
}
.footer-grid a,
.footer-section a,
.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
}
.footer-grid a:hover,
.footer-section a:hover,
.footer-links a:hover {
  color: var(--gold);
}
.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}
.disclaimer {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ========================================
   FAQ ACCORDION
   ======================================== */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
}
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.faq-question {
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 1rem;
  color: var(--navy);
  font-family: inherit;
}
.faq-question:hover { background: #f8fafc; }
.faq-question .toggle-icon {
  font-size: 1.25rem;
  color: var(--blue-accent);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.faq-question::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--blue-accent);
  transition: transform 0.2s;
}
.faq-item.open .faq-question::after { content: '\2212'; }
/* If toggle-icon span is used instead of ::after, hide ::after */
.faq-question:has(.toggle-icon)::after { display: none; }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-item.open .faq-answer {
  max-height: 500px;
}
.faq-answer-inner,
.faq-answer p,
.faq-answer div {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-light);
  line-height: 1.7;
}

/* ========================================
   COMPARISON TABLE
   ======================================== */
.comparison-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  border-bottom: 1px solid var(--border);
}
.comparison-row.header { background: var(--navy); color: #fff; font-weight: 600; font-size: 0.85rem; border-radius: var(--radius) var(--radius) 0 0; }
.comparison-cell { padding: 0.75rem 1rem; }
.comparison-row:not(.header):hover { background: #f8fafc; }

/* Separator / divider */
.separator,
.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 900px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }
  .sidebar { order: 2; }
  .features-grid,
  .feature-grid { grid-template-columns: 1fr; }
  .footer-grid,
  .footer-content,
  .footer-container { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .roadmap-grid { grid-template-columns: repeat(2, 1fr); }
  .cost-breakdown { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hamburger-menu,
  .menu-toggle,
  .mobile-menu-toggle { display: flex; }

  .nav-menu,
  .nav-links,
  nav.nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 99;
  }
  .nav-menu.active,
  .nav-menu.open,
  .nav-links.open { display: flex; }

  .hero h1,
  .hero-title { font-size: 1.75rem; }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.4rem; }

  .roadmap-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }

  .comparison-row { grid-template-columns: 1fr; }
  .comparison-row.header { display: none; }
  .comparison-cell::before { content: attr(data-label); font-weight: 600; display: block; font-size: 0.8rem; color: var(--text-light); }

  /* Hero padding reducido en móvil */
  .hero { padding: 3rem 1rem 2.5rem; }
  .page-header { padding: 2.5rem 1rem 2rem; }

  /* Grid principal de subpáginas: reducir padding horizontal en móvil */
  [style*="grid-template-columns:1fr 280px"] {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    gap: 1.5rem !important;
  }

  /* Breadcrumbs ocultos en móvil: la navegación entre bloques del sidebar
     y las flechas prev/next ya cumplen su función */
  .breadcrumb { display: none !important; }
}

/* Pantallas muy estrechas (móvil pequeño) */
@media (max-width: 480px) {
  .hero h1,
  .hero-title { font-size: 1.5rem; }
  .hero-subtitle,
  .hero p { font-size: 0.98rem; }
  h1 { font-size: 1.55rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.05rem; }

  .hero { padding: 2.5rem 0.85rem 2rem; }
  .page-header { padding: 2rem 0.85rem 1.5rem; }

  [style*="grid-template-columns:1fr 280px"] {
    padding-left: 0.85rem !important;
    padding-right: 0.85rem !important;
  }

  .v-card,
  .section-nav { padding: 1rem 1.1rem; }

  .cta-button,
  .cta-button-lg { padding: 0.75rem 1.5rem; font-size: 0.95rem; }
}

/* ========================================
   SECTION NAV COMPACT ARROWS
   Flechas compactas al final del .section-nav (sidebar)
   Generadas por menu.js para acceso rápido prev/next
   ======================================== */
.section-nav-arrows {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.section-nav-arrows .sn-arrow {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.6rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--text);
  text-decoration: none;
  transition: all 0.15s;
  min-height: 34px;
  overflow: hidden;
}

.section-nav-arrows a.sn-arrow:hover {
  background: #f0f5ff;
  border-color: var(--blue-accent);
  color: var(--blue-accent);
}

.section-nav-arrows .sn-arrow .sn-arrow-icon {
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
  color: var(--blue-accent);
  font-weight: 700;
}

.section-nav-arrows .sn-arrow .sn-arrow-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.section-nav-arrows .sn-prev {
  justify-content: flex-start;
}
.section-nav-arrows .sn-next {
  justify-content: flex-end;
  text-align: right;
}

.section-nav-arrows .sn-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: transparent;
  border-style: dashed;
}
.section-nav-arrows .sn-disabled .sn-arrow-icon {
  color: var(--text-light);
}

/* ========================================
   PAGE NAVIGATION ARROWS (prev/next)
   Generated dynamically by menu.js at the end of <main>
   ======================================== */
.page-nav-arrows {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 3rem 0 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.page-nav-arrows a {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
  min-height: 72px;
  justify-content: center;
}

.page-nav-arrows a:hover {
  border-color: var(--blue-accent);
  background: #f0f5ff;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.page-nav-arrows a .nav-arrow-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  font-weight: 600;
}

.page-nav-arrows a .nav-arrow-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--blue-accent);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.page-nav-arrows .nav-prev {
  text-align: left;
}
.page-nav-arrows .nav-prev .nav-arrow-title::before {
  content: '←';
  font-size: 1.1rem;
}

.page-nav-arrows .nav-next {
  text-align: right;
  align-items: flex-end;
}
.page-nav-arrows .nav-next .nav-arrow-title::after {
  content: '→';
  font-size: 1.1rem;
}

/* Emoji del bloque dentro de las flechas grandes */
.page-nav-arrows .nav-arrow-emoji {
  font-size: 1.1rem;
  line-height: 1;
}

/* Emoji del bloque dentro de las flechas compactas del sidebar */
.section-nav-arrows .sn-arrow-emoji {
  font-size: 1rem;
  line-height: 1;
  margin: 0 0.2rem;
}

/* En desktop las flechas entre bloques son redundantes con la tarjeta
   "Siguiente paso" del sidebar — sólo se muestran en móvil (≤900px) */
@media (min-width: 901px) {
  .page-nav-arrows,
  .section-nav-arrows { display: none !important; }
}

/* Si solo hay uno (primera o última página de sección), ocupa ancho completo */
.page-nav-arrows.only-next {
  grid-template-columns: 1fr;
}
.page-nav-arrows.only-prev {
  grid-template-columns: 1fr;
}

@media (max-width: 600px) {
  .page-nav-arrows {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
  .page-nav-arrows a {
    min-height: 60px;
    padding: 0.85rem 1rem;
  }
  .page-nav-arrows .nav-next {
    text-align: left;
    align-items: flex-start;
  }
}

/* ========================================
   UTILITIES
   ======================================== */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.section-title { text-align: center; margin-bottom: 0.5rem; }
.section-subtitle { text-align: center; color: var(--text-light); margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }

/* ========================================
   VISUAL COMPONENTS - Enhanced Visual Design
   ======================================== */

/* --- Icon Heading (h2 with emoji icon) --- */
.icon-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.icon-heading .icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--navy), var(--blue-accent));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  color: #fff;
}
.icon-heading h2 { margin-bottom: 0; }

/* --- Visual Cards with accent top border --- */
.v-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
  border-top: 4px solid var(--blue-accent);
  position: relative;
}
.v-card.gold { border-top-color: var(--gold); }
.v-card.green { border-top-color: var(--success); }
.v-card.navy { border-top-color: var(--navy); }

/* --- Highlight Numbers / Key Metrics --- */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.metric-item {
  background: linear-gradient(135deg, #f0f5ff 0%, #e8f0fe 100%);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  border: 1px solid #bfdbfe;
}
.metric-item.gold-bg {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-color: #fde68a;
}
.metric-item.green-bg {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: #bbf7d0;
}
.metric-item.navy-bg {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-color: var(--navy);
  color: #fff;
}
.metric-item.navy-bg .metric-value { color: var(--gold); }
.metric-item.navy-bg .metric-label { color: rgba(255,255,255,0.8); }
.metric-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--blue-accent);
  display: block;
  line-height: 1.2;
}
.metric-label {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.35rem;
  font-weight: 500;
}

/* --- Visual Steps / Process Flow --- */
.process-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 1.5rem 0;
  position: relative;
}
.process-step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1.25rem;
  align-items: start;
  position: relative;
  padding-bottom: 1.5rem;
}
.process-step:last-child { padding-bottom: 0; }
.process-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 27px;
  top: 56px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--blue-accent), var(--gold));
}
.step-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--blue-accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(59, 111, 182, 0.3);
  z-index: 1;
}
.step-circle.icon { font-size: 1.5rem; font-weight: 400; }
.step-content {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.step-content h3 { margin-bottom: 0.5rem; font-size: 1.1rem; }
.step-content p { margin-bottom: 0; font-size: 0.95rem; color: var(--text-light); }

/* --- Visual Checklist --- */
.visual-checklist {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
.visual-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  margin-bottom: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  transition: transform 0.15s, box-shadow 0.15s;
}
.visual-checklist li:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
}
.visual-checklist li::before {
  content: '✓';
  width: 24px;
  height: 24px;
  background: var(--success);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.visual-checklist li.warning::before {
  content: '!';
  background: #f59e0b;
}
.visual-checklist li.info::before {
  content: 'i';
  background: var(--blue-accent);
}

/* --- Comparison / VS Card --- */
.vs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: stretch;
  margin: 1.5rem 0;
  position: relative;
}
.vs-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.vs-card.recommended {
  border: 2px solid var(--gold);
  box-shadow: 0 4px 20px rgba(201, 168, 76, 0.2);
}
.vs-card.recommended::before {
  content: '⭐ Recomendado';
  display: block;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  width: fit-content;
  margin-bottom: 0.75rem;
}
.vs-divider {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-light);
  z-index: 1;
  background: var(--bg-main);
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

/* --- Progress Bar --- */
.progress-bar {
  background: #e2e8f0;
  border-radius: 50px;
  height: 12px;
  overflow: hidden;
  margin: 0.5rem 0;
}
.progress-fill {
  height: 100%;
  border-radius: 50px;
  background: linear-gradient(90deg, var(--blue-accent), var(--gold));
  transition: width 0.6s ease;
}

/* --- Badge / Pill --- */
.badge {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-gold { background: #fef3c7; color: #92400e; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-navy { background: var(--navy); color: #fff; }

/* --- Callout Box (enhanced) --- */
.callout {
  display: block;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  margin: 1.5rem 0;
}
.callout:has(.callout-icon) {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.callout-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.callout-content { flex: 1; }
.callout-content p { margin-bottom: 0; }
.callout-content strong { display: block; margin-bottom: 0.25rem; }
.callout.tip {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}
.callout.tip .callout-icon { background: #dcfce7; color: #166534; }
.callout.warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
}
.callout.warning .callout-icon { background: #fef3c7; color: #92400e; }
.callout.danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
}
.callout.danger .callout-icon { background: #fee2e2; color: #991b1b; }
.callout.info {
  background: #f0f5ff;
  border: 1px solid #bfdbfe;
}
.callout.info .callout-icon { background: #dbeafe; color: #1e40af; }

/* --- Icon List (inline icons) --- */
.icon-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
.icon-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.icon-list li:last-child { border-bottom: none; }
.icon-list .li-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

/* --- Gradient Section Background --- */
.section-alt {
  background: linear-gradient(180deg, #f0f5ff 0%, var(--bg) 100%);
  padding: 3rem 0;
}
.section-dark {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  padding: 3rem 0;
}
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: rgba(255,255,255,0.85); }

/* --- Visual Table (enhanced) --- */
.visual-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow);
  margin: 1.5rem 0;
  max-width: 100%;
}
/* Cuando .visual-table es un <div> envolviendo un <table>, el div actúa como scroller */
div.visual-table > table {
  width: 100%;
  min-width: max-content;
  border-collapse: separate;
  border-spacing: 0;
}
.visual-table th {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.85rem 1rem;
}
.visual-table td {
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.visual-table tr:last-child td { border-bottom: none; }
.visual-table tr:hover td { background: #f8fafc; }
.visual-table .highlight-row td {
  background: #fffbeb;
  font-weight: 600;
}

/* --- Diagram / Flow Chart --- */
.flow-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 2rem 0;
  flex-wrap: wrap;
}
.flow-box {
  background: var(--bg-card);
  border: 2px solid var(--blue-accent);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  min-width: 130px;
  position: relative;
}
.flow-box.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.flow-box .flow-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.35rem;
}
.flow-arrow {
  color: var(--gold);
  font-size: 1.5rem;
  font-weight: 700;
  padding: 0 0.5rem;
}

/* --- Summary / Key Takeaway Box --- */
.summary-box {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  margin: 2rem 0;
}
.summary-box h3 { color: var(--gold); margin-bottom: 1rem; }
.summary-box p { color: rgba(255,255,255,0.9); }
.summary-box .summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.summary-item {
  text-align: center;
  padding: 1rem;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius);
}
.summary-item .value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  display: block;
}
.summary-item .label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  margin-top: 0.25rem;
}

/* --- Responsive for new visual components --- */
@media (max-width: 900px) {
  .vs-grid { grid-template-columns: 1fr; }
  .vs-divider { transform: rotate(90deg); padding: 0.5rem 0; }
  .flow-diagram { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .process-step { grid-template-columns: 44px 1fr; gap: 1rem; }
  .step-circle { width: 44px; height: 44px; font-size: 1rem; }
  .process-step:not(:last-child)::after { left: 21px; top: 44px; }
}
@media (max-width: 768px) {
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .icon-heading .icon { width: 40px; height: 40px; font-size: 1.2rem; }
}

/* ========================================
   MEGA MENU NAVIGATION
   ======================================== */

/* Override old nav for mega menu */
.mega-nav {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
}

.mega-nav > li {
  position: relative;
  height: 64px;
  display: flex;
  align-items: center;
}

.mega-nav > li > a {
  color: rgba(255,255,255,0.85);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
  white-space: nowrap;
}

.mega-nav > li > a:hover,
.mega-nav > li > a.active {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.mega-nav > li > a .arrow {
  font-size: 0.6rem;
  transition: transform 0.2s;
  opacity: 0.7;
}

.mega-nav > li:hover > a .arrow {
  transform: rotate(180deg);
}

/* Dropdown Panel */
.mega-dropdown {
  position: absolute;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
  padding: 1.5rem 2rem;
  min-width: 320px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-8px);
  transition: all 0.25s ease;
  z-index: 200;
}

.mega-nav > li:hover > .mega-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.mega-dropdown-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  padding-bottom: 0.75rem;
  margin-bottom: 0.5rem;
  border-bottom: 2px solid var(--gold);
}

.mega-dropdown-header .dd-icon {
  font-size: 1rem;
}

.mega-dropdown-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mega-dropdown-links li {
  margin: 0;
}

.mega-dropdown-links a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s;
  text-decoration: none;
}

.mega-dropdown-links a:hover {
  background: #f0f5ff;
  color: var(--blue-accent);
  transform: translateX(4px);
}

.mega-dropdown-links a .link-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  background: #f0f5ff;
  flex-shrink: 0;
}

.mega-dropdown-links a:hover .link-icon {
  background: var(--blue-accent);
  color: #fff;
  /* make emoji visible on colored bg */
  filter: none;
}

.mega-dropdown-links a .link-text {
  display: flex;
  flex-direction: column;
}

.mega-dropdown-links a .link-title {
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.3;
}

.mega-dropdown-links a .link-desc {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 400;
  line-height: 1.3;
}

/* --- City Card Component (for visitar-chipre page) --- */
.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.city-card {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
  padding: 1.25rem 1.5rem;
}

.city-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.city-card-header {
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.city-card-header h3 {
  color: #fff;
  margin: 0;
  font-size: 1.15rem;
}

.city-card-header .city-badge {
  background: var(--gold);
  color: var(--navy);
  padding: 0.15rem 0.6rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
}

.city-card-body {
  padding: 1.25rem 1.5rem;
}

.city-card-body .city-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.city-stat {
  text-align: center;
  padding: 0.6rem;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.city-stat .stat-val {
  font-weight: 700;
  color: var(--blue-accent);
  font-size: 0.95rem;
  display: block;
}

.city-stat .stat-lbl {
  font-size: 0.7rem;
  color: var(--text-light);
}

.city-card-body .city-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.city-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 500;
  background: #f0f5ff;
  color: var(--blue-accent);
  border: 1px solid #bfdbfe;
}

.city-tag.pro { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.city-tag.con { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.city-tag.neutral { background: #f8fafc; color: var(--text-light); border-color: var(--border); }

/* --- Breadcrumb --- */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-light);
}
.breadcrumb a {
  color: var(--text-light);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--blue-accent);
}

/* --- Subpage Grid Layout (main + sidebar) --- */
/* Prevent grid items from forcing overflow when content is wider than the column */
[style*="grid-template-columns:1fr 280px"] > main,
[style*="grid-template-columns:1fr 280px"] > aside {
  min-width: 0;
}
@media (max-width: 900px) {
  [style*="grid-template-columns:1fr 280px"] {
    grid-template-columns: 1fr !important;
  }
  /* En móvil el aside deja de ser sticky — debe fluir al final */
  [style*="grid-template-columns:1fr 280px"] > aside,
  aside {
    position: static;
  }

  /* display: contents hace que los hijos del aside (.section-nav y
     .v-card "Siguiente paso") se conviertan en hijos directos del grid,
     permitiendo reordenarlos independientemente de main */
  [style*="grid-template-columns:1fr 280px"] > aside {
    display: contents;
  }
  /* El sidebar de navegación de sección va ARRIBA del main */
  [style*="grid-template-columns:1fr 280px"] > aside > nav.section-nav {
    order: -1;
    margin-bottom: 0;
  }
  /* El main va en medio */
  [style*="grid-template-columns:1fr 280px"] > main {
    order: 0;
  }
  /* La tarjeta "Siguiente paso" se queda al final */
  [style*="grid-template-columns:1fr 280px"] > aside > .v-card {
    order: 1;
    margin-top: 1.5rem !important;
  }
}

/* Wrapper for wide tables: allows horizontal scroll inside the wrapper
   so the page itself never overflows on narrow viewports */
.table-wrapper {
  max-width: 100%;
  overflow-x: auto;
  margin: 1rem 0;
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
}
.table-wrapper > .visual-table {
  margin: 0;
}

/* --- Photo/Image placeholder --- */
.img-placeholder {
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-light);
  font-size: 0.85rem;
  margin: 1.5rem 0;
  border: 2px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.img-placeholder .placeholder-icon {
  font-size: 2.5rem;
  opacity: 0.5;
}

/* --- Section Navigation (replaces sidebar for subpages) --- */
.section-nav {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* Make entire aside sticky so nav + "siguiente paso" card stick together */
aside {
  position: sticky;
  top: 80px;
  align-self: start;
}

.section-nav h3 {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--gold);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.section-nav li {
  margin: 0;
  border-bottom: 1px solid var(--border);
}

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

.section-nav a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.5rem;
  font-size: 0.85rem;
  color: var(--text);
  border-radius: 4px;
  transition: all 0.15s;
}

.section-nav a:hover {
  background: #f0f5ff;
  color: var(--blue-accent);
  transform: translateX(3px);
}

.section-nav a.current,
.section-nav li.current > a {
  color: var(--blue-accent);
  font-weight: 600;
  background: #f0f5ff;
}

.section-nav .nav-icon {
  font-size: 0.9rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

/* --- Responsive Mega Menu --- */
@media (max-width: 900px) {
  .mega-dropdown {
    min-width: 280px;
  }
  .city-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .mega-nav {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--navy);
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 1rem 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 99;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }

  .mega-nav.open {
    display: flex;
  }

  .mega-nav > li {
    display: block;
    height: auto;
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: relative;
  }
  .mega-nav > li:last-child {
    border-bottom: none;
  }

  .mega-nav > li > a {
    display: flex;
    width: 100%;
    padding: 0.9rem 0.5rem;
    justify-content: space-between;
    align-items: center;
    color: rgba(255,255,255,0.9);
    white-space: normal;
  }

  .mega-nav > li > a .arrow {
    transition: transform 0.2s;
    opacity: 0.7;
  }
  .mega-nav > li.open > a .arrow {
    transform: rotate(180deg);
  }

  /* Neutralizar el :hover del desktop en touch (evita estado pegajoso) */
  .mega-nav > li:hover > .mega-dropdown {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .mega-dropdown {
    position: static;
    transform: none;
    background: rgba(255,255,255,0.05);
    box-shadow: none;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    min-width: 100%;
    width: 100%;
    opacity: 1;
    visibility: visible;
    display: none;
    margin: 0 0 0.5rem;
  }

  .mega-nav > li.open > .mega-dropdown {
    display: block;
    transform: none;
  }

  .mega-dropdown-header {
    color: rgba(255,255,255,0.7);
    border-bottom-color: rgba(255,255,255,0.2);
  }

  .mega-dropdown-links a {
    color: rgba(255,255,255,0.9);
    padding: 0.6rem 0.5rem;
  }

  .mega-dropdown-links a:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    transform: none;
  }

  .mega-dropdown-links a .link-icon {
    background: rgba(255,255,255,0.1);
  }

  .mega-dropdown-links a .link-desc {
    color: rgba(255,255,255,0.55);
  }

  .section-nav {
    position: static;
  }
}
