/*
Theme Name: Magazine Cancun
Theme URI: https://magazinecancun.com
Author: Magazine Cancun
Description: Tema de periódico digital con portada de bloques por sección, columna de anuncios, últimas noticias y diseño responsivo.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: quequi
Tags: news, magazine, blog, three-columns, custom-menu, featured-images
*/

:root {
  --q-bg: #ffffff;
  --q-ink: #14181f;
  --q-muted: #6b7280;
  --q-line: #e3e6ea;
  --q-black: #111417;
  --q-accent: #c8102e;
  --q-soft: #f4f5f7;
  --q-max: 1200px;
  --q-font: "Roboto", "Helvetica Neue", Arial, sans-serif;
  --q-head: "Roboto Condensed", "Arial Narrow", Arial, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--q-soft);
  color: var(--q-ink);
  font-family: var(--q-font);
  font-size: 15px;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.q-wrap { max-width: var(--q-max); margin: 0 auto; padding: 0 16px; }

/* Topbar */
.q-topbar { background: #fff; border-bottom: 1px solid var(--q-line); }
.q-topbar .q-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 40px; }
.q-topbar-menu ul { display: flex; gap: 14px; list-style: none; margin: 0; padding: 0; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.q-social a { color: var(--q-muted); margin-left: 10px; font-size: 12px; }

/* Branding / leaderboard */
.q-branding { background: #fff; padding: 18px 0; text-align: center; }
.q-branding .site-title { font-family: var(--q-head); font-size: 34px; margin: 0 0 4px; letter-spacing: .02em; text-transform: uppercase; }
.q-branding .site-description { margin: 0; color: var(--q-muted); font-size: 12px; }
.q-ad-leader { max-width: 728px; margin: 12px auto 0; min-height: 90px; background: repeating-linear-gradient(45deg,#f0f0f0,#f0f0f0 10px,#e9e9e9 10px,#e9e9e9 20px); display: flex; align-items: center; justify-content: center; color: #9aa0a6; font-size: 12px; }

/* Nav */
.q-nav { background: var(--q-black); }
.q-nav .q-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.q-nav ul { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.q-nav a { color: #fff; display: block; padding: 12px 11px; font-family: var(--q-head); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.q-nav a:hover, .q-nav .current-menu-item > a { background: var(--q-accent); }
.q-search input { border: 0; padding: 6px 10px; font-size: 12px; width: 190px; }
.q-nav-toggle { display: none; background: none; border: 1px solid #444; color: #fff; padding: 6px 10px; }

/* Ticker */
.q-ticker { background: #fff; border-bottom: 1px solid var(--q-line); font-size: 12px; }
.q-ticker .q-wrap { display: flex; align-items: center; gap: 14px; height: 36px; overflow: hidden; }
.q-ticker .q-ticker-label { font-family: var(--q-head); text-transform: uppercase; font-weight: 700; white-space: nowrap; }
.q-ticker ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; white-space: nowrap; overflow: hidden; }
.q-ticker li::before { content: "•"; color: var(--q-accent); margin-right: 8px; }
.q-ticker .q-date { margin-left: auto; color: var(--q-muted); white-space: nowrap; }

/* Layout */
.q-main { padding: 16px 0 40px; }
.q-cols { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 20px; }

/* Section head */
.q-section { background: #fff; border: 1px solid var(--q-line); margin-bottom: 16px; }
.q-section-head { background: linear-gradient(90deg, var(--q-black) 0 180px, #f7f7f8 180px); color: #fff; }
.q-section-head span { display: inline-block; font-family: var(--q-head); text-transform: uppercase; font-size: 12px; letter-spacing: .1em; padding: 8px 16px; }
.q-section-body { padding: 12px; }

/* Hero card */
.q-hero { position: relative; display: block; }
.q-hero img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.q-hero .q-hero-text { position: absolute; inset: auto 0 0 0; padding: 16px; background: linear-gradient(transparent, rgba(0,0,0,.85)); color: #fff; }
.q-hero h2 { font-family: var(--q-head); text-transform: uppercase; font-size: 22px; line-height: 1.15; margin: 6px 0 0; }
.q-kicker { display: inline-block; background: var(--q-accent); color: #fff; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; padding: 3px 7px; }

/* Grid of cards */
.q-grid { display: grid; gap: 12px; margin-top: 12px; }
.q-grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.q-grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.q-card img { aspect-ratio: 4/3; object-fit: cover; }
.q-card h3 { font-family: var(--q-head); font-size: 14px; line-height: 1.2; margin: 8px 0 4px; }
.q-card p { margin: 0; font-size: 12px; color: var(--q-muted); }

/* Split section: hero + list */
.q-split { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); gap: 12px; }
.q-list { list-style: none; margin: 0; padding: 0; }
.q-list li { display: grid; grid-template-columns: 84px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--q-line); }
.q-list li:last-child { border-bottom: 0; }
.q-list img { aspect-ratio: 4/3; object-fit: cover; }
.q-list h4 { font-size: 13px; margin: 0 0 4px; font-weight: 600; line-height: 1.25; }
.q-meta { font-size: 11px; color: var(--q-muted); }
.q-tag { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--q-accent); font-weight: 700; }

/* Sidebar */
.q-side .widget { background: #fff; border: 1px solid var(--q-line); margin-bottom: 16px; }
.q-side .widget-title { background: var(--q-black); color: #fff; font-family: var(--q-head); text-transform: uppercase; font-size: 12px; letter-spacing: .1em; margin: 0; padding: 8px 16px; }
.q-side .widget > *:not(.widget-title) { padding: 12px; }
.q-ad-box { min-height: 250px; background: repeating-linear-gradient(45deg,#f0f0f0,#f0f0f0 10px,#e9e9e9 10px,#e9e9e9 20px); display: flex; align-items: center; justify-content: center; color: #9aa0a6; font-size: 12px; margin-bottom: 16px; }

/* Single */
.q-article { background: #fff; border: 1px solid var(--q-line); padding: 24px; }
.q-article h1 { font-family: var(--q-head); text-transform: uppercase; font-size: 32px; line-height: 1.1; margin: 8px 0 12px; }
.q-article .entry-content { font-size: 16px; line-height: 1.7; }
.q-article .entry-content p { margin: 0 0 16px; }

/* Footer */
.q-footer { background: var(--q-black); color: #cbd0d6; padding: 32px 0; font-size: 13px; }
.q-footer a { color: #fff; }
.q-footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.q-footer h3 { font-family: var(--q-head); text-transform: uppercase; font-size: 12px; letter-spacing: .1em; color: #fff; }
.q-copy { border-top: 1px solid #26292e; margin-top: 24px; padding-top: 16px; color: #8b9199; }

/* Pagination */
.q-pagination { padding: 16px 0; }
.q-pagination .page-numbers { display: inline-block; padding: 6px 11px; background: #fff; border: 1px solid var(--q-line); margin-right: 4px; font-size: 13px; }
.q-pagination .current { background: var(--q-accent); color: #fff; border-color: var(--q-accent); }

/* Accessibility */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }

@media (max-width: 1024px) {
  .q-cols { grid-template-columns: 1fr; }
  .q-grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .q-split { grid-template-columns: 1fr; }
  .q-footer-cols { grid-template-columns: 1fr; }
  .q-nav ul { display: none; width: 100%; }
  .q-nav.is-open ul { display: block; }
  .q-nav-toggle { display: block; margin: 8px 0; }
  .q-hero h2 { font-size: 18px; }
}

/* Carrusel de notas de portada */
.q-carousel { position: relative; overflow: hidden; }
.q-carousel-track { display: flex; transition: transform .5s ease; }
.q-carousel-slide { flex: 0 0 100%; min-width: 100%; }
.q-carousel-prev,
.q-carousel-next {
	position: absolute; top: 50%; transform: translateY(-50%);
	background: var(--q-black, #191a1c); color: #fff; border: 0;
	font-size: 20px; line-height: 1; padding: 10px 13px; cursor: pointer; opacity: .8;
}
.q-carousel-prev:hover, .q-carousel-next:hover { opacity: 1; }
.q-carousel-prev { left: 8px; }
.q-carousel-next { right: 8px; }
.q-carousel-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.q-carousel-dot { width: 24px; height: 8px; border: 1px solid rgba(255,255,255,.7); background: rgba(255,255,255,.5); padding: 0; cursor: pointer; }
.q-carousel-dot[aria-current="true"] { background: var(--q-accent, #c62828); }

/* Bloque de dos columnas (Mundo / País) */
.q-duo {
	display: grid;
	gap: 16px;
	grid-template-columns: 1fr;
}
@media (min-width: 782px) {
	.q-duo { grid-template-columns: 1fr 1fr; }
}

/* Galería horizontal */
.q-gallery-wrap { position: relative; }
.q-gallery-track {
	display: flex;
	gap: 12px;
	list-style: none;
	margin: 0;
	padding: 0;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
}
.q-gallery-track li { flex: 0 0 70%; scroll-snap-align: start; }
@media (min-width: 600px) { .q-gallery-track li { flex-basis: 45%; } }
@media (min-width: 900px) { .q-gallery-track li { flex-basis: 31%; } }
.q-gallery-track a { position: relative; display: block; }
.q-gallery-track img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.q-gallery-caption {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: 6px 8px;
	font-size: 12px;
	line-height: 1.3;
	color: #fff;
	background: linear-gradient(transparent, rgba(0,0,0,.85));
}
.q-gallery-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: #111;
	color: #fff;
	border: 0;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	padding: 8px 12px;
	opacity: .85;
}
.q-gallery-nav:hover { opacity: 1; }
.q-gallery-nav.q-prev { left: 4px; }
.q-gallery-nav.q-next { right: 4px; }
