/* ============================================
   Plataforma 10 — Centro de Ayuda
   ============================================ */

/* ── Aspekta (brand font) ───────────────────── */
@font-face { font-family: 'Aspekta'; src: url('../assets/Aspekta-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Aspekta'; src: url('../assets/Aspekta-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Aspekta'; src: url('../assets/Aspekta-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Aspekta'; src: url('../assets/Aspekta-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Aspekta'; src: url('../assets/Aspekta-800.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;

  /* Primary */
  --scarlet:      #FF2700;
  --scarlet-dark: #D91F00;
  --black:        #1F1F1F;
  --sea-salt:     #F7F7F7;

  /* Secondary */
  --teal:         #046865;
  --teal-light:   #e6f4f4;
  --blue:         #63ADF2;
  --saffron:      #F3C35D;

  /* Aliases */
  --red:        var(--scarlet);
  --red-dark:   var(--scarlet-dark);
  --navy:       var(--black);
  --bg:         var(--sea-salt);
  --card:       #ffffff;
  --text:       var(--black);
  --text-muted: #6b7280;
  --border:     #e5e5e5;
  --radius:     12px;
  --shadow-sm:  0 1px 4px rgba(0,0,0,0.06);
  --shadow:     0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:  0 12px 40px rgba(0,0,0,0.14);
}

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Aspekta', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header (páginas internas) ──────────────── */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo { display: inline-flex; align-items: center; text-decoration: none; flex-shrink: 0; }

.logo-img {
  max-height: 32px;
  width: auto;
  display: block;
}

.logo-img-footer {
  height: 32px;
  width: auto;
  display: block;
}

/* Search dentro del header en páginas internas */
.header-search {
  flex: 1;
  max-width: 480px;
  margin: 0;
}

.header-search input {
  box-shadow: none;
  border: 1.5px solid var(--border);
  background: var(--sea-salt);
}

.header-search input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(255,39,0,0.08);
}

/* ── Logo dentro del hero (home) ────────────── */
.hero-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 22px 32px;
  display: flex;
  align-items: center;
}

.logo-img-hero {
  height: 44px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

/* ── Footer ────────────────────────────────── */
.site-footer {
  margin-top: auto;
  background: var(--black);
  padding: 32px;
  border-top: 3px solid var(--scarlet);
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
}

/* ── Loading ────────────────────────────────── */
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 24px;
  color: var(--text-muted);
  gap: 16px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Hero — home (con imagen de banner) ─────── */
.hero {
  position: relative;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 44px;
  text-align: center;
  background-image:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.45) 0%,
      rgba(0, 0, 0, 0.20) 100%
    ),
    url('../assets/banner helpcenter.jpg');
  background-size: cover;
  background-position: center 30%;
  color: white;
}

/* Fallback si no hay imagen */
.hero.no-image {
  background-image:
    linear-gradient(135deg, var(--navy) 0%, #2d1515 50%, var(--red-dark) 100%);
}

.hero-title-upper { text-transform: uppercase; letter-spacing: 2px; }


/* Home — fondo P10 Zoom, mismo estilo q Colombia */
.hero-home {
  min-height: 420px;
  background-position: center center;
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,0.50) 0%, rgba(0,0,0,0.25) 100%),
    url('../assets/P10 Zoom Background_04.jpg');
}

/* País — overlay base (fallback Colombia) */
.hero-country {
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.20) 100%),
    url('../assets/banner helpcenter.jpg');
}
.hero-country-co {
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.20) 100%),
    url('../assets/banner helpcenter.jpg');
}
.hero-country-ar {
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.20) 100%),
    url('../assets/banner argentina.jpg');
}
.hero-country-br {
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.10) 100%),
    url('../assets/header-brasilok.jpg');
}
.hero-country-py {
  background-position: center 60%;
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.20) 100%),
    url('../assets/para2.jpg');
}
.hero-country-pe {
  background-position: center 40%;
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.20) 100%),
    url('../assets/Machu_Picchu,_Peru.jpg');
}

.hero h1 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6), 0 0 40px rgba(0,0,0,0.4);
  width: 100%;
  text-align: center;
}

.hero-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 28px;
  font-weight: 400;
  width: 100%;
  text-align: center;
}

/* ── Bandera y volver en hero de país ───────── */
.hero-country-flag {
  margin-bottom: 10px;
}

.back-countries {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.back-countries:hover { color: var(--red); }

.hero-back-link {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  transition: color 0.15s;
  margin-left: auto;
  margin-right: 12px;
}
.hero-back-link:hover { color: #fff; }

/* ── Country Switcher ────────────────────────── */
.country-switcher {
  position: relative;
}
.switcher-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  border-radius: 8px;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s;
  font-family: inherit;
}
/* Hero variant — sobre imagen oscura */
.switcher-hero .switcher-btn {
  background: var(--red);
  color: #fff;
  border: none;
}
.switcher-hero .switcher-btn:hover { background: var(--red-dark); }

/* Header variant — sobre barra blanca */
.switcher-header .switcher-btn {
  background: var(--red);
  color: #fff;
  border: none;
}
.switcher-header .switcher-btn:hover { background: var(--red-dark); }

.switcher-chevron {
  font-size: 11px;
  display: inline-block;
  transition: transform 0.2s;
}
.country-switcher.open .switcher-chevron { transform: rotate(180deg); }

.switcher-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--black);
  border-radius: 12px;
  min-width: 190px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  overflow: hidden;
  z-index: 200;
}
.country-switcher.open .switcher-dropdown { display: block; }

.switcher-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.12s;
}
.switcher-item:hover { background: rgba(255,255,255,0.08); }
.switcher-item.active {
  background: var(--red);
  font-weight: 700;
}

/* ── Hero slim (páginas interiores) ─────────── */
.hero-slim {
  background: var(--navy);
  padding: 20px 24px 28px;
  border-bottom: 3px solid var(--red);
}

.hero-slim .search-wrap {
  max-width: 1000px;
  margin: 0 auto;
}

/* ── Barra de búsqueda ───────────────────────── */
.search-wrap {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  width: 100%;
}

.search-wrap input {
  width: 100%;
  padding: 15px 20px 15px 52px;
  border: none;
  border-radius: 40px;
  font-size: 15px;
  font-family: 'Aspekta', sans-serif;
  outline: none;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
  color: var(--text);
  transition: box-shadow 0.2s;
}

.search-wrap input:focus {
  box-shadow: 0 4px 32px rgba(0,0,0,0.3);
}

.search-wrap input::placeholder { color: #9ca3af; }

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 17px;
  pointer-events: none;
  line-height: 1;
}

/* ── Main ────────────────────────────────────── */
.main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px 24px 40px;
  flex: 1;
  width: 100%;
}

/* ── Categorías — home ───────────────────────── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.category-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s;
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--red);
}

.category-icon {
  width: 64px;
  height: 64px;
  min-width: 64px;
  background: transparent;
  border: none;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  box-shadow: none;
}

.category-info h2 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}

.category-info .cat-desc {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 8px;
  line-height: 1.4;
}

.category-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--red);
  background: #fff0f0;
  padding: 3px 10px;
  border-radius: 20px;
}

/* ── Breadcrumb ──────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 28px;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.breadcrumb a:hover { color: var(--red); }
.breadcrumb .sep { color: var(--border); font-size: 16px; }

/* ── Encabezado de categoría ─────────────────── */
.category-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.icon-large {
  width: 70px;
  height: 70px;
  min-width: 70px;
  background: transparent;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  box-shadow: none;
}

.category-header h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.category-header .cat-desc {
  color: var(--text-muted);
  margin-top: 4px;
  font-size: 15px;
}

.category-header .cat-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--red);
  background: #fff0f0;
  padding: 3px 10px;
  border-radius: 20px;
  margin-top: 8px;
}

/* ── Lista de artículos ──────────────────────── */
.articles-list {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.article-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s;
  gap: 12px;
}

.article-item:last-child { border-bottom: none; }

.article-item:hover {
  background: #fafbff;
  padding-left: 28px;
}

.article-item-title {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  transition: color 0.12s;
}

.article-item:hover .article-item-title { color: var(--red); }

.article-item-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.chevron {
  color: var(--red);
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.12s, transform 0.12s;
}

.article-item:hover .chevron {
  opacity: 1;
  transform: translateX(3px);
}

/* ── Contenido del artículo ──────────────────── */
.article-body {
  background: var(--card);
  border-radius: var(--radius);
  padding: 48px 52px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.article-body > h1 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
  letter-spacing: -0.4px;
  line-height: 1.3;
  color: var(--navy);
}

.article-content {
  font-size: 15px;
  line-height: 1.85;
  color: #374151;
}

.article-content h2 {
  font-size: 19px;
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--navy);
  letter-spacing: -0.3px;
}

.article-content h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 22px 0 10px;
  color: var(--navy);
}

.article-content p { margin-bottom: 16px; }

.article-content ul,
.article-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.article-content li { margin-bottom: 8px; }

.article-content a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-content strong { font-weight: 700; color: var(--navy); }
.article-content em { font-style: italic; }
.article-content hr { border: none; border-top: 1px solid var(--border); margin: 28px 0; }

.article-content blockquote {
  border-left: 3px solid var(--scarlet);
  padding: 12px 16px;
  margin: 20px 0;
  color: #4b5563;
  background: #fff7f5;
  border-radius: 0 8px 8px 0;
  font-size: 14px;
}

.icon-large.teal { background: transparent; }

.article-content code {
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 13px;
  color: var(--red-dark);
}

/* ── Aviso configuración ─────────────────────── */
.config-notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 13px;
  color: #92400e;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.config-notice strong { display: block; margin-bottom: 2px; font-size: 13px; }

/* ── Selector de países ──────────────────────── */
.countries-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.country-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 40px 20px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s;
  text-align: center;
}

.country-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--red);
}

.flag-img { border-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,0.18); display: inline-block; vertical-align: middle; }
.flag-sm { border-radius: 2px; }

.country-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.country-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--red);
  background: #fff0f0;
  padding: 3px 10px;
  border-radius: 20px;
}

.country-soon-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  background: var(--sea-salt);
  padding: 3px 10px;
  border-radius: 20px;
}

/* ── Country badge en header ─────────────────── */
.country-badge {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  background: var(--sea-salt);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: border-color 0.15s, color 0.15s;
}

.country-badge:hover { border-color: var(--red); color: var(--red); }

/* ── Búsqueda — sin resultados ───────────────── */
.search-results-header {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.no-results {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.no-results .icon { font-size: 52px; margin-bottom: 16px; }
.no-results p { font-size: 16px; }
.no-results small { display: block; margin-top: 8px; font-size: 14px; }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 768px) {

  /* Header interno */
  .site-header { padding: 0 16px; height: auto; }
  .header-inner { flex-wrap: wrap; padding: 10px 0; gap: 10px; }
  .logo-img { max-height: 26px; }
  .header-search { order: 3; flex-basis: 100%; max-width: 100%; }
  .header-search input { padding: 10px 16px 10px 42px; font-size: 14px; }

  /* Hero */
  .hero { min-height: 280px; padding: 76px 16px 36px; }
  .hero h1 { font-size: 26px; }
  .hero-sub { font-size: 14px; margin-bottom: 20px; }
  .hero-nav { padding: 14px 16px; }
  .logo-img-hero { height: 34px; }
  .hero-back-link { font-size: 12px; margin-right: 8px; }
  .search-wrap input { padding: 12px 16px 12px 44px; font-size: 14px; }

  /* Country switcher */
  .switcher-btn { font-size: 12px; padding: 5px 9px; gap: 5px; }
  .switcher-dropdown { min-width: 170px; }

  /* País picker */
  .countries-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; justify-items: stretch; }
  .country-card { min-width: unset; padding: 20px 12px 16px; }
  .country-name { font-size: 14px; }

  /* Categorías */
  .categories-grid { grid-template-columns: 1fr; gap: 10px; }
  .category-card { padding: 16px 18px; gap: 14px; }
  .category-icon { width: 44px; height: 44px; min-width: 44px; font-size: 30px; }
  .category-info h2 { font-size: 15px; }
  .category-info .cat-desc { font-size: 12px; }

  /* Encabezado de categoría */
  .category-header { gap: 14px; margin-bottom: 20px; }
  .icon-large { width: 52px; height: 52px; min-width: 52px; font-size: 34px; }
  .category-header h1 { font-size: 22px; }
  .category-header .cat-desc { font-size: 14px; }

  /* Breadcrumb */
  .breadcrumb { font-size: 12px; gap: 4px; margin-bottom: 20px; }

  /* Lista de artículos */
  .article-item { padding: 14px 16px; }
  .article-item:hover { padding-left: 20px; }
  .article-item-title { font-size: 14px; }

  /* Artículo */
  .article-body { padding: 24px 16px; }
  .article-body > h1 { font-size: 20px; margin-bottom: 20px; padding-bottom: 16px; }
  .article-content { font-size: 14px; line-height: 1.75; }
  .article-content h2 { font-size: 16px; }
  .article-content h3 { font-size: 15px; }

  /* Main */
  .main { padding: 20px 16px 40px; }

  /* Footer */
  .footer-inner { flex-direction: column; gap: 10px; }
  .footer-copy { font-size: 12px; }
  .site-footer { padding: 24px 16px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 22px; letter-spacing: 1px; }
  .hero-back-link { display: none; }
  .hero-nav .country-switcher { margin-left: auto; }
  .country-card { padding: 16px 10px 14px; }
  .flag-img.flag-md { width: 36px; height: 27px; }
}
