/*
Theme Name: FinanzasHoy
Description: Tema de noticias financieras con diseño de tarjetas, cabecera degradada y pestañas de categorías. Creado a medida para FinanzasHoy.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: finanzashoy
*/

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

:root {
  --teal:      #0bbfbc;
  --purple:    #6b21a8;
  --orange:    #e85d26;
  --dark:      #111827;
  --mid:       #374151;
  --muted:     #9ca3af;
  --bg:        #f4f6f8;
  --white:     #ffffff;
  --card-r:    12px;
}

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

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ── TOP NAV ────────────────────────────────── */
.topbar {
  background: linear-gradient(135deg, var(--teal) 0%, #4f46e5 55%, var(--purple) 100%);
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
}

.nav-icons { display: flex; gap: 20px; align-items: center; }

.nav-icons svg {
  width: 20px; height: 20px;
  stroke: rgba(255,255,255,0.85);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  cursor: pointer;
}

.nav-icons svg:hover { stroke: #fff; }

/* ── HERO ───────────────────────────────────── */
.hero { position: relative; height: 320px; overflow: hidden; }

.hero-bg { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; }

.hero-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(160deg, #0d1b2a 0%, #1a2744 60%, #2d1b69 100%);
  position: relative;
  overflow: hidden;
}

.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,15,35,0.92) 40%, rgba(10,15,35,0.25) 100%);
}

.hero-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 20px 20px 24px;
  max-width: 700px;
  margin: 0 auto;
}

.badge {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  margin-bottom: 10px;
}

.hero-headline {
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 10px;
}

.hero-sub { font-size: 0.82rem; color: rgba(255,255,255,0.72); line-height: 1.55; }

/* ── TABS ───────────────────────────────────── */
.tabs-wrap {
  background: var(--white);
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 56px;
  z-index: 90;
}

.tabs {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 12px;
  gap: 4px;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex-shrink: 0;
  padding: 13px 14px 11px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  background: none;
  border-top: none; border-left: none; border-right: none;
}

.tab:hover { color: var(--dark); }
.tab.active { color: var(--orange); border-bottom-color: var(--orange); }

/* ── FEED ───────────────────────────────────── */
.feed {
  max-width: 700px;
  margin: 0 auto;
  padding: 16px 12px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── TICKER ─────────────────────────────────── */
.ticker-wrap { max-width: 700px; margin: 16px auto 0; padding: 0 12px; }

.ticker {
  background: var(--white);
  border-radius: var(--card-r);
  padding: 12px 16px;
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.ticker::-webkit-scrollbar { display: none; }

.tick-item { flex-shrink: 0; text-align: center; }
.tick-name { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); text-transform: uppercase; margin-bottom: 2px; }
.tick-val { font-size: 0.95rem; font-weight: 700; color: var(--dark); }
.tick-chg { font-size: 0.72rem; font-weight: 600; margin-top: 1px; }
.up   { color: #16a34a; }
.down { color: #dc2626; }

/* ── NEWS CARD ──────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--card-r);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: transform 0.18s, box-shadow 0.18s;
}

.card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }

.card-img { width: 100%; height: 200px; object-fit: cover; display: block; }
.card-img-placeholder { width: 100%; height: 200px; }

.card-body { padding: 16px 18px 20px; }

.card-cat {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--orange); margin-bottom: 8px;
}

.card-title { font-size: 1.05rem; font-weight: 700; color: var(--dark); line-height: 1.35; margin-bottom: 8px; }
.card-title a:hover { color: var(--orange); }

.card-desc { font-size: 0.82rem; color: var(--mid); line-height: 1.58; margin-bottom: 12px; }

.card-meta { font-size: 0.72rem; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.card-meta span.dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }

/* ── HORIZONTAL CARD ────────────────────────── */
.card-h {
  background: var(--white);
  border-radius: var(--card-r);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  display: flex;
  transition: transform 0.18s, box-shadow 0.18s;
}

.card-h:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }

.card-h .card-img,
.card-h .card-img-placeholder { width: 110px; height: 110px; object-fit: cover; flex-shrink: 0; }

.card-h .card-body { padding: 14px 16px; display: flex; flex-direction: column; justify-content: center; }
.card-h .card-title { font-size: 0.9rem; }
.card-h .card-desc { display: none; }

/* ── SECTION LABEL ──────────────────────────── */
.section-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 8px 4px 4px; }

/* ── PAGINATION ─────────────────────────────── */
.pagination { max-width: 700px; margin: 0 auto; padding: 0 12px 24px; display: flex; justify-content: space-between; gap: 10px; }
.pagination a, .pagination span {
  display: inline-block; padding: 10px 16px; background: var(--white); border-radius: 8px;
  font-size: 0.8rem; font-weight: 600; color: var(--dark); box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.pagination a:hover { color: var(--orange); }

/* ── SINGLE POST ────────────────────────────── */
.single-wrap { max-width: 700px; margin: 0 auto; padding: 0 16px 40px; }
.single-eyebrow { padding-top: 20px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange); margin-bottom: 10px; }
.single-title { font-family: 'Playfair Display', serif; font-size: 1.8rem; font-weight: 700; line-height: 1.3; margin-bottom: 12px; }
.single-meta { font-size: 0.78rem; color: var(--muted); margin-bottom: 20px; display: flex; gap: 8px; align-items: center; }
.single-meta span.dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }
.single-featured { width: 100%; max-height: 360px; object-fit: cover; border-radius: var(--card-r); margin-bottom: 24px; }
.single-content { font-size: 1rem; line-height: 1.75; color: var(--mid); }
.single-content p { margin-bottom: 18px; }
.single-content h2 { font-family: 'Playfair Display', serif; font-size: 1.3rem; margin: 28px 0 12px; color: var(--dark); }
.single-content h3 { font-size: 1.1rem; margin: 22px 0 10px; color: var(--dark); }
.single-content a { color: var(--teal); text-decoration: underline; }
.single-content img { border-radius: 8px; margin: 16px 0; }
.single-back { display: inline-block; margin-top: 28px; font-size: 0.82rem; font-weight: 600; color: var(--orange); }

/* ── PAGE (static pages: aviso legal, privacidad) ──── */
.page-wrap { max-width: 700px; margin: 0 auto; padding: 28px 16px 40px; }
.page-title { font-family: 'Playfair Display', serif; font-size: 1.6rem; margin-bottom: 18px; }
.page-content { font-size: 0.95rem; line-height: 1.75; color: var(--mid); }
.page-content p { margin-bottom: 16px; }

/* ── ARCHIVE HEADER ─────────────────────────── */
.archive-header { max-width: 700px; margin: 0 auto; padding: 18px 12px 4px; }
.archive-title { font-family: 'Playfair Display', serif; font-size: 1.3rem; }

/* ── TIPS / GUIDE PAGE ──────────────────────── */
.tips-wrap { max-width: 700px; margin: 0 auto; padding: 24px 16px 40px; }
.tips-eyebrow { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange); margin-bottom: 10px; }
.tips-title { font-family: 'Playfair Display', serif; font-size: 1.7rem; font-weight: 700; line-height: 1.3; margin-bottom: 12px; }
.tips-intro { font-size: 0.92rem; color: var(--mid); line-height: 1.65; margin-bottom: 26px; }

.tip-list { display: flex; flex-direction: column; gap: 12px; }

.tip-card {
  background: var(--white);
  border-radius: var(--card-r);
  padding: 18px 18px 18px 56px;
  position: relative;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.tip-num {
  position: absolute;
  left: 16px; top: 18px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--purple));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.tip-title { font-size: 0.98rem; font-weight: 700; color: var(--dark); margin-bottom: 6px; line-height: 1.35; }
.tip-text { font-size: 0.85rem; color: var(--mid); line-height: 1.6; }

/* ── FOOTER ─────────────────────────────────── */
footer.site-footer {
  background: linear-gradient(135deg, var(--teal) 0%, #4f46e5 55%, var(--purple) 100%);
  padding: 28px 20px;
  text-align: center;
  margin-top: 24px;
}

.footer-logo { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 800; color: #fff; margin-bottom: 8px; }
.footer-links { margin-bottom: 10px; }
.footer-links a { font-size: 0.75rem; color: rgba(255,255,255,0.85); margin: 0 8px; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
footer.site-footer p { font-size: 0.75rem; color: rgba(255,255,255,0.6); }

@media (min-width: 600px) {
  .hero { height: 380px; }
  .hero-headline { font-size: 1.75rem; }
}
