/* =====================================================
   Selfievento Help Center — shared.css
   Estilo inspirado en Kululu Help Center
   ===================================================== */

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

:root {
  --primary:       #00a3ff;
  --primary-dark:  #007fd4;
  --primary-light: #e6f6ff;
  --text-dark:     #101828;
  --text-muted:    #475467;
  --text-light:    #98a2b3;
  --bg-light:      #f9fafb;
  --white:         #ffffff;
  --border:        #e4e7ec;
  --radius:        12px;
  --radius-sm:     8px;
  --card-shadow:       0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --card-shadow-hover: 0 8px 24px rgba(0,163,255,0.14), 0 2px 8px rgba(0,0,0,0.06);
}

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  min-height: 100vh;
}

/* ── TOPBAR ─────────────────────────────────────────── */
.topbar {
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.topbar-logo-text {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.02em;
}

.topbar-logo-sub {
  color: var(--primary);
  font-weight: 600;
}

.topbar-logo img {
  height: 72px;
  width: auto;
  max-width: 400px;
  object-fit: contain;
  display: block;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.topbar-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}
.topbar-nav a:hover { color: var(--primary); }

/* ── HERO (homepage) ─────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #00a3ff 0%, #0057d4 60%, #003fa3 100%);
  padding: 0;
}

.hero-top {
  display: flex;
  justify-content: center;
  padding: 40px 24px 0;
}

.hero-logo-img {
  height: 64px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.95;
  display: block;
  margin: 0 auto 28px;
}

.hero-content {
  text-align: center;
  padding: 48px 24px 80px;
  max-width: 720px;
  margin: 0 auto;
}

.hero-title {
  color: white;
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 32px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.search-wrapper {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.7);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 16px 20px 16px 50px;
  border-radius: 50px;
  border: none;
  font-size: 1rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  background: rgba(255,255,255,0.18);
  color: white;
  outline: none;
  transition: background 0.25s, box-shadow 0.25s;
}

.search-input::placeholder { color: rgba(255,255,255,0.75); }

.search-input:focus {
  background: white;
  color: var(--text-dark);
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}

.search-input:focus::placeholder { color: var(--text-light); }
.search-input:focus + .search-icon,
.search-input:focus ~ .search-icon { color: var(--text-muted); }

/* ── MAIN CONTAINER ─────────────────────────────────── */
.main-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 52px 24px 80px;
}

/* ── CATEGORY CARDS (homepage) ─────────────────────── */
.categories-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.22s, border-color 0.22s, transform 0.15s;
}

.category-card:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.category-icon {
  width: 52px;
  height: 52px;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--primary);
  transition: background 0.2s;
}

.category-card:hover .category-icon {
  background: var(--primary);
  color: white;
}

.category-body { flex: 1; min-width: 0; }

.category-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.category-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.category-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-light);
  white-space: nowrap;
  background: var(--bg-light);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 20px;
}

.category-arrow {
  color: var(--primary);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  flex-shrink: 0;
}

.category-card:hover .category-arrow {
  opacity: 1;
  transform: translateX(4px);
}

/* ── HERO MINI (category & article pages) ─────────── */
.hero-mini {
  background: linear-gradient(135deg, #00a3ff 0%, #0057d4 60%, #003fa3 100%);
  padding: 40px 24px 48px;
}

.hero-mini-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb a:hover { color: white; }

.breadcrumb-sep { opacity: 0.6; }

.hero-mini-icon {
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,0.15);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin: 0 auto 16px;
}

.hero-mini h1 {
  font-size: 1.75rem;
  font-weight: 800;
  color: white;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.hero-mini-meta {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
}

/* ── PAGE MAIN ──────────────────────────────────────── */
.page-main {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ── ARTICLE LIST (category page) ─────────────────── */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.article-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  text-decoration: none;
  color: var(--text-dark);
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.article-item:last-child { border-bottom: none; }

.article-item:hover {
  background: var(--primary-light);
}

.article-icon {
  width: 32px;
  height: 32px;
  background: var(--primary-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--primary);
}

.article-title {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}

.article-arrow {
  color: var(--primary);
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
  flex-shrink: 0;
}

.article-item:hover .article-arrow {
  opacity: 1;
  transform: translateX(3px);
}

/* ── ARTICLE LAYOUT (article page) ─────────────────── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 32px;
  align-items: start;
}

.article-content {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 44px;
  box-shadow: var(--card-shadow);
}

.article-content h1 {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.3;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.article-meta {
  display: flex;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.article-body h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 28px 0 10px;
}

.article-body h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 20px 0 8px;
}

.article-body p {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.article-body ul, .article-body ol {
  margin: 8px 0 16px 20px;
}

.article-body li {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.article-body a {
  color: var(--primary);
  text-decoration: none;
}
.article-body a:hover { text-decoration: underline; }

.article-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* ── CALLOUT ────────────────────────────────────────── */
.callout {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  font-size: 0.9rem;
  color: var(--text-dark);
  line-height: 1.6;
  margin: 20px 0;
}

/* ── FEEDBACK BOX ───────────────────────────────────── */
.feedback-box {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.feedback-box p {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
  margin: 0 !important;
}

.feedback-btns { display: flex; gap: 8px; }

.btn-feedback {
  border: 1.5px solid var(--border);
  background: white;
  padding: 7px 18px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-muted);
}

.btn-feedback:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* ── SIDEBAR ────────────────────────────────────────── */
aside { position: sticky; top: 80px; }

.sidebar-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--card-shadow);
  margin-bottom: 16px;
}

.sidebar-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.sidebar-links { display: flex; flex-direction: column; gap: 2px; }

.sidebar-link {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  line-height: 1.4;
}

.sidebar-link:hover, .sidebar-link.active {
  background: var(--primary-light);
  color: var(--primary);
}

/* ── FOOTER ─────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--white);
  padding: 32px 24px;
}

.footer-inner {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 700;
  font-size: 0.9rem;
}

.footer-logo-img,
.footer-logo img {
  height: 36px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
}

.footer-links { display: flex; gap: 20px; }

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--primary); }

.footer-copy { color: var(--text-light); font-size: 0.78rem; }

/* ── HAMBURGER BUTTON ───────────────────────────────── */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: white;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

/* ── MOBILE NAV OVERLAY ─────────────────────────────── */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: white;
  z-index: 300;
  flex-direction: column;
  padding: 20px 24px 32px;
  overflow-y: auto;
}
.mobile-nav-overlay.open { display: flex; }

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 28px;
}
.mobile-nav-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dark);
  padding: 6px;
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  line-height: 1;
  border-radius: 8px;
  transition: background 0.2s;
}
.mobile-nav-close:hover { background: var(--bg-light); }

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mobile-nav-links a {
  color: var(--text-dark);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 16px 4px;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.mobile-nav-links a:first-child { border-top: 1px solid var(--border); }
.mobile-nav-links a:hover { color: var(--primary); }

@media (max-width: 768px) {
  .article-layout { grid-template-columns: 1fr; }
  aside { position: static; }
}

@media (max-width: 600px) {
  /* Topbar — gradiente sin borde blanco, igual que Kululu */
  .topbar {
    background: linear-gradient(135deg, #00a3ff 0%, #0057d4 60%, #003fa3 100%);
    border-bottom: none;
    box-shadow: none;
  }
  .topbar-inner { height: 60px; padding: 0 20px; }
  .topbar-logo img {
    height: 36px;
    max-width: 200px;
  }
  .topbar-nav a { display: none; }
  .topbar-nav { gap: 0; }
  .hamburger-btn { display: flex; }

  /* Hero — sin padding top para que fluya con el topbar */
  .hero { padding-top: 0; }
  .hero-content { padding: 28px 16px 56px; }
  .hero-title { font-size: 1.55rem; }
  .search-input { font-size: 0.9rem; padding: 13px 16px 13px 44px; }

  /* Tarjetas categoría — layout vertical tipo Kululu */
  .main-container { padding: 24px 12px 60px; }
  .category-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 20px;
    gap: 12px;
  }
  .category-icon { width: 44px; height: 44px; }
  .category-count { display: block; }
  .category-arrow { display: none; }

  /* Mini hero (páginas de categoría) */
  .hero-mini { padding: 28px 16px 36px; }
  .hero-mini h1 { font-size: 1.3rem; }

  /* Artículos */
  .page-main { padding: 24px 16px 60px; }
  .article-content { padding: 24px 20px; }

  /* Footer */
  .footer-inner { flex-direction: column; text-align: center; gap: 12px; }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 12px; }
  .footer-logo img { margin: 0 auto; }
}

@media (max-width: 380px) {
  .topbar-logo img { height: 26px; max-width: 120px; }
  .hero-title { font-size: 1.35rem; }
}
