/* ===========================================================
   Vivevolando Magazine — estilos del sitio público
   =========================================================== */

:root {
  --navy: #0f2547;
  --navy-dark: #081832;
  --blue: #1c62b6;
  --sky: #3aa0e8;
  --accent: #e2295c;
  --accent-dark: #b81c48;
  --paper: #f6f7fb;
  --ink: #1b1f2a;
  --ink-soft: #57616f;
  --border: #e3e7ee;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(15, 37, 71, 0.08);
  --shadow-hover: 0 16px 34px rgba(15, 37, 71, 0.16);
  --font-head: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', 'Segoe UI', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Top bar ---------- */
.topbar {
  background: var(--navy-dark);
  color: #cfd9ea;
  font-size: 13px;
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding-top: 6px;
  padding-bottom: 6px;
  flex-wrap: wrap;
  row-gap: 4px;
}

.topbar .date {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar .date {
  letter-spacing: 0.04em;
}

.topbar nav a {
  margin-left: 18px;
  color: #cfd9ea;
}

.topbar nav a:hover {
  color: #fff;
}

.topbar .socials {
  display: flex;
  gap: 12px;
  margin-left: 18px;
}

.topbar .socials a {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  height: 46px;
  width: auto;
}

.brand-text {
  font-family: var(--font-head);
  line-height: 1;
}

.brand-text .name {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.02em;
}

.brand-text .tag {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.search-box {
  display: flex;
  align-items: center;
}

.search-box form {
  display: flex;
}

.search-box input {
  border: 1px solid var(--border);
  border-radius: 999px 0 0 999px;
  padding: 9px 16px;
  font-size: 14px;
  width: 200px;
  outline: none;
}

.search-box button {
  border: none;
  background: var(--navy);
  color: #fff;
  padding: 9px 16px;
  border-radius: 0 999px 999px 0;
  cursor: pointer;
}

/* ---------- Nav ---------- */
.main-nav {
  background: var(--navy);
}

.nav-container {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  white-space: nowrap;
  flex: 1;
  padding-bottom: 4px;
  /* barra de scroll delgada y discreta (Firefox) */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

/* barra de scroll delgada y discreta (Chrome/Edge/Safari) */
.nav-links::-webkit-scrollbar {
  height: 5px;
}

.nav-links::-webkit-scrollbar-track {
  background: transparent;
}

.nav-links::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

.nav-links::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

.main-nav a {
  display: inline-block;
  padding: 13px 16px;
  color: #dbe6f5;
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.03em;
  font-size: 15px;
  border-bottom: 3px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
  color: #fff;
  border-bottom-color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
}

/* Botón hamburguesa: oculto en escritorio, visible solo en móvil */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

/* ---------- Hero / destacados ---------- */
.hero {
  padding: 26px 0 10px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
}

.hero-main {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 420px;
  background: #ccc;
  box-shadow: var(--shadow);
}

.hero-main img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-main .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 24, 50, 0) 30%, rgba(8, 24, 50, 0.92) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-side .card {
  flex: 1;
  min-height: 190px;
}

.badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
  width: fit-content;
}

.hero-main h2 {
  font-family: var(--font-head);
  color: #fff;
  font-size: 32px;
  line-height: 1.15;
  margin: 0 0 8px;
  font-weight: 700;
}

.hero-main .meta {
  color: #bcd0ea;
  font-size: 13px;
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: block;
  min-height: 220px;
  background: #ccc;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

.card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 24, 50, 0) 35%, rgba(8, 24, 50, 0.9) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
}

.card h3 {
  font-family: var(--font-head);
  color: #fff;
  font-size: 18px;
  line-height: 1.2;
  margin: 0;
  font-weight: 700;
}

/* ---------- Secciones de listado ---------- */
.section {
  padding: 34px 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 3px solid var(--navy);
  margin-bottom: 20px;
  padding-bottom: 8px;
}

.section-head h2 {
  font-family: var(--font-head);
  font-size: 24px;
  color: var(--navy);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.section-head a {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.article-list {
  display: grid;
  gap: 22px;
}

.article-row {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.article-row .thumb {
  position: relative;
  min-height: 170px;
  background: #ccc;
}

.article-row .thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-row .content {
  padding: 18px 18px 18px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.article-row h3 {
  font-family: var(--font-head);
  font-size: 22px;
  margin: 6px 0;
  color: var(--navy);
}

.article-row p {
  color: var(--ink-soft);
  margin: 0 0 10px;
  font-size: 14.5px;
}

.article-row .meta {
  font-size: 12.5px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pill {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: #fdeaef;
  padding: 3px 9px;
  border-radius: 4px;
  width: fit-content;
}

/* ---------- Sidebar ---------- */
.layout {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 30px;
  align-items: start;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 20px;
}

.widget {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.widget h4 {
  font-family: var(--font-head);
  color: var(--navy);
  text-transform: uppercase;
  border-bottom: 2px solid var(--border);
  padding-bottom: 8px;
  margin: 0 0 12px;
  letter-spacing: 0.04em;
}

.widget .cat-link {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--ink);
}

.widget .cat-link:last-child {
  border-bottom: none;
}

.widget .cat-link:hover {
  color: var(--accent);
}

.widget-cta {
  background: var(--navy);
  color: #fff;
  text-align: center;
}

.widget-cta h4 {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.widget-cta p {
  font-size: 13.5px;
  color: #cfe0f5;
}

.widget-cta a.btn {
  margin-top: 10px;
}

/* ---------- Artículo individual ---------- */
.post-header {
  padding: 30px 0 10px;
}

.post-header .pill {
  margin-bottom: 12px;
}

.post-header h1 {
  font-family: var(--font-head);
  font-size: 40px;
  color: var(--navy);
  line-height: 1.1;
  margin: 0 0 14px;
}

.post-header .excerpt {
  font-size: 18px;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.post-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--ink-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  margin-bottom: 20px;
}

.post-cover {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 26px;
}

.post-cover img {
  width: 100%;
}

/* ---------- Lector de Issuu (revistas) ---------- */
.issuu-embed {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto 26px;
  padding-top: 62%;
  /* proporción del visor de Issuu, no de una página vertical */
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
  background: #1b1f2a;
}

.issuu-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 600px) {
  .issuu-embed {
    padding-top: 110%;
  }
}

.post-body {
  font-size: 17px;
  color: #2b3140;
  max-width: 760px;
}

.post-body p {
  margin: 0 0 20px;
}

.share-box {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 26px 0;
  padding: 14px 18px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 760px;
}

.share-box span {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  font-size: 13px;
}

.share-box a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 10px 22px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 13.5px;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--accent-dark);
}

.btn-outline {
  background: transparent;
  border: 2px solid #fff;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-dark);
  color: #b9c6db;
  margin-top: 40px;
  padding: 40px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 26px;
}

.footer-grid h4 {
  color: #fff;
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.footer-grid a {
  display: block;
  padding: 4px 0;
  color: #b9c6db;
  font-size: 14px;
}

.footer-grid a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12.5px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.footer-brand img {
  height: 34px;
  filter: brightness(0) invert(1);
}

.footer-brand span {
  font-family: var(--font-head);
  font-size: 18px;
  color: #fff;
  font-weight: 700;
}

/* ---------- Estados vacíos / paginación ---------- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-soft);
}

.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 30px 0;
}

.pagination a,
.pagination span {
  padding: 8px 14px;
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 14px;
}

.pagination .current {
  background: var(--navy);
  color: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

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

  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-row {
    grid-template-columns: 1fr;
  }

  .article-row .content {
    padding: 0 16px 16px;
  }

  .article-row .thumb {
    min-height: 200px;
  }

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

@media (max-width: 560px) {

  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .post-header h1 {
    font-size: 28px;
  }

  /* La fecha completa no cabe junto a Nosotros/Contacto y los iconos en
     pantallas muy angostas, así que se oculta y solo queda esa barra. */
  /* .topbar .date { display: none; } */
  .topbar .container {
    justify-content: flex-start;
  }

  /* Logo centrado y buscador de ancho completo en el encabezado móvil */
  .site-header .container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .brand {
    justify-content: center;
  }

  .search-box,
  .search-box form {
    width: 100%;
  }

  .search-box input {
    flex: 1;
    width: auto;
  }
}

/* Menú principal: en pantallas angostas se convierte en desplegable de
   hamburguesa en vez de la fila horizontal con scroll. */
@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    white-space: normal;
    overflow: visible;
    background: var(--navy);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 20;
  }

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

  .nav-links a {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .main-nav {
    position: relative;
  }
}