/* ==========================================================================
   Noticias MV — main stylesheet
   Brand: royal-blue gradient badge + navy wordmark (matches the logo)
   ========================================================================== */

:root {
	/* Brand */
	--brand:        #2563EB;
	--brand-2:      #3B82F6;
	--brand-deep:   #1D4ED8;
	--brand-grad:   linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);

	/* Ink & surfaces */
	--ink:          #16223D;
	--ink-soft:     #5A6B85;
	--ink-faint:    #8A98B0;
	--bg:           #FFFFFF;
	--surface:      #F4F6FA;
	--surface-2:    #EDF1F8;
	--line:         #E5EAF2;
	--urgent:       #EF4444;

	/* Type */
	--font-display: "Urbanist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-body:    system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	/* Rhythm */
	--wrap:         1200px;
	--gap:          24px;
	--radius:       12px;
	--radius-sm:    8px;
	--shadow:       0 1px 2px rgba(22,34,61,.06), 0 8px 24px rgba(22,34,61,.06);
}

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

body {
	margin: 0;
	font-family: var(--font-body);
	color: var(--ink);
	background: var(--bg);
	line-height: 1.6;
	font-size: 17px;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
a { color: var(--brand-deep); text-decoration: none; }
a:hover { color: var(--brand); }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }

.screen-reader-text {
	position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden;
}
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 1000; }
.skip-link:focus { left: 12px; top: 12px; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; }

/* --------------------------------------------------------------- Header */
.site-header { border-bottom: 1px solid var(--line); background: #fff; }
.topbar { background: var(--ink); color: #cdd6e6; font-size: 13px; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 36px; }
.topbar-social a { color: #cdd6e6; margin-left: 16px; font-weight: 600; }
.topbar-social a:hover { color: #fff; }

.masthead { border-top: 3px solid transparent; background-image: var(--brand-grad); background-size: 100% 3px; background-repeat: no-repeat; }
.masthead-inner { display: flex; align-items: center; gap: 16px; min-height: 76px; }
.masthead-brand { flex: 1; display: flex; align-items: center; }
.brand img, .custom-logo { max-height: 52px; width: auto; }

.nav-toggle, .search-toggle {
	border: 0; background: transparent; cursor: pointer; padding: 8px; border-radius: 8px; color: var(--ink);
	font-size: 22px; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
}
.nav-toggle { flex-direction: column; gap: 5px; width: 44px; height: 44px; }
.nav-toggle-bar { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.search-toggle { font-size: 24px; }

/* --------------------------------------------------------------- Primary nav */
.primary-nav { border-top: 1px solid var(--line); }
.nav-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.nav-menu > li { position: relative; }
.nav-menu .menu-link {
	display: block; padding: 13px 14px; color: var(--ink); font-weight: 700; font-size: 15px;
	font-family: var(--font-display); letter-spacing: .01em; white-space: nowrap;
}
.nav-menu > li > .menu-link { border-bottom: 3px solid transparent; }
.nav-menu > li:hover > .menu-link,
.nav-menu > li:focus-within > .menu-link { color: var(--brand-deep); border-bottom-color: var(--brand); }
.sub-menu { list-style: none; margin: 0; padding: 8px 0; position: absolute; top: 100%; left: 0;
	min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
	box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .16s; z-index: 60; }
.nav-menu > li:hover > .sub-menu, .nav-menu > li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.sub-menu .menu-link { padding: 8px 16px; font-size: 14px; font-weight: 600; }
.sub-menu .menu-link:hover { background: var(--surface); }
.submenu-toggle { display: none; border: 0; background: transparent; cursor: pointer; color: var(--ink-soft); }

.site-search { border-top: 1px solid var(--line); background: var(--surface); padding: 16px 0; }
.search-form { display: flex; gap: 8px; max-width: 640px; }
.search-field { flex: 1; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 16px; background: #fff; }
.search-submit, .btn {
	border: 0; background-image: var(--brand-grad); color: #fff; font-weight: 700; padding: 12px 20px;
	border-radius: var(--radius-sm); cursor: pointer; font-family: var(--font-display); font-size: 15px;
}
.btn { display: inline-block; }

/* --------------------------------------------------------------- Ads */
.ad-unit { position: relative; display: flex; align-items: center; justify-content: center; background: var(--surface); border-radius: var(--radius-sm); margin: 0 auto; overflow: hidden; }
.ad-label { position: absolute; top: 6px; left: 8px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.ad-header { padding: 16px 20px 0; }
.ad-infeed, .ad-belowpost { padding: 24px 20px; }
.ad-infeed .ad-unit, .ad-belowpost .ad-unit { max-width: 970px; }

/* --------------------------------------------------------------- Section titles */
.block-title { font-size: 22px; position: relative; padding-bottom: 8px; margin-bottom: 16px; }
.block-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 48px; height: 3px; background-image: var(--brand-grad); border-radius: 3px; }
.block-title a { color: inherit; }

.cat-badge {
	display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: 11px;
	letter-spacing: .06em; text-transform: uppercase; color: var(--brand-deep);
	margin-bottom: 8px;
}
.cat-badge::before { content: ""; display: inline-block; width: 14px; height: 2px; background: var(--brand); vertical-align: middle; margin-right: 7px; }

/* --------------------------------------------------------------- Home layout */
.home-grid { display: grid; grid-template-columns: 1fr; gap: 32px; padding-top: 28px; }
@media (min-width: 992px) { .home-grid { grid-template-columns: minmax(0,2.2fr) minmax(0,1fr); } }

.lead { display: grid; gap: 20px; }
.hero { display: grid; gap: 14px; }
.hero-media { display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; background: var(--surface); }
.hero-img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.hero-media:hover .hero-img { transform: scale(1.03); }
.hero-title { font-size: clamp(26px, 3.4vw, 40px); }
.hero-title a { color: var(--ink); }
.hero-title a:hover { color: var(--brand-deep); }
.hero-excerpt { color: var(--ink-soft); font-size: 18px; margin: 0 0 6px; }
.hero-meta, .card-meta, .list-meta, .byline-meta { color: var(--ink-faint); font-size: 13px; }
.dot { margin: 0 6px; }

.lead-secondary { display: grid; gap: 18px; }
@media (min-width: 560px) { .lead-secondary { grid-template-columns: 1fr 1fr 1fr; } }
@media (min-width: 992px) { .lead-secondary { grid-template-columns: 1fr 1fr 1fr; } }

/* Cards */
.card { display: grid; gap: 10px; }
.card-media { display: block; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 16/9; background: var(--surface); }
.card-img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card-media:hover .card-img { transform: scale(1.04); }
.card-img--placeholder { display: block; background: var(--surface-2); }
.card-title { font-size: 18px; line-height: 1.28; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--brand-deep); }
.card-excerpt { color: var(--ink-soft); font-size: 15px; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.card-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .card-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .card-grid { grid-template-columns: 1fr 1fr 1fr; } }

/* Rail / most read */
.rail { display: grid; gap: 24px; align-content: start; }
.rail-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.list-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.list-item:last-child { border-bottom: 0; padding-bottom: 0; }
.list-item:first-of-type { padding-top: 0; }
.list-rank { font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 1; color: var(--brand); min-width: 28px; }
.list-media { flex: 0 0 84px; border-radius: 6px; overflow: hidden; aspect-ratio: 1; background: var(--surface-2); }
.list-img { width: 100%; height: 100%; object-fit: cover; }
.list-body { flex: 1; }
.list-title { font-size: 15px; line-height: 1.3; margin: 2px 0 4px; }
.list-title a { color: var(--ink); }
.list-title a:hover { color: var(--brand-deep); }

/* --------------------------------------------------------------- Category strips */
.strip { padding-top: 40px; }
.strip-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.strip-more { font-family: var(--font-display); font-weight: 700; font-size: 14px; white-space: nowrap; }
.strip-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .strip-grid { grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); } }
.strip-rest { display: grid; align-content: start; }
.strip-rest .list-item:first-of-type { padding-top: 14px; border-top: 0; }

/* --------------------------------------------------------------- Listing pages */
.listing-grid { display: grid; gap: 36px; grid-template-columns: 1fr; padding-block: 28px; }
@media (min-width: 992px) { .listing-grid { grid-template-columns: minmax(0,1fr) 320px; } }
.archive-head { padding-top: 28px; }
.archive-title { font-size: clamp(26px, 3vw, 38px); }
.archive-title span { color: var(--brand-deep); }
.archive-desc { color: var(--ink-soft); max-width: 70ch; }
.no-results { color: var(--ink-soft); padding: 40px 0; }

/* Pagination */
.pagination, .nav-links { display: flex; flex-wrap: wrap; gap: 8px; padding: 32px 0; }
.pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 12px;
	border: 1px solid var(--line); border-radius: 8px; font-weight: 700; color: var(--ink); background: #fff;
}
.pagination .page-numbers.current { background-image: var(--brand-grad); color: #fff; border-color: transparent; }
.pagination .page-numbers:hover { border-color: var(--brand); color: var(--brand-deep); }

/* --------------------------------------------------------------- Single article */
.single-grid { display: grid; gap: 40px; grid-template-columns: 1fr; padding-block: 28px; }
@media (min-width: 992px) { .single-grid { grid-template-columns: minmax(0,1fr) 320px; } }
.single-content { max-width: 760px; }
.breadcrumbs { font-size: 13px; color: var(--ink-soft); margin-bottom: 16px; }
.breadcrumbs a { color: var(--ink-soft); font-weight: 600; }
.breadcrumbs a:hover { color: var(--brand-deep); }
.breadcrumbs .sep { margin: 0 8px; color: var(--ink-faint); }

.entry-title { font-size: clamp(30px, 4.2vw, 48px); line-height: 1.12; }
.entry-dek { font-size: 20px; color: var(--ink-soft); line-height: 1.5; margin: 0 0 18px; }
.entry-byline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 0; border-block: 1px solid var(--line); margin: 18px 0; }
.byline-avatar { border-radius: 50%; }
.byline-author a { color: var(--ink); font-weight: 700; }
.entry-featured { margin: 0 0 24px; border-radius: var(--radius); overflow: hidden; }
.entry-featured figcaption { font-size: 13px; color: var(--ink-faint); padding: 8px 2px 0; }

.entry-content { font-size: 18px; line-height: 1.75; }
.entry-content p { margin: 0 0 1.3em; }
.entry-content h2 { font-size: 28px; margin: 1.4em 0 .5em; }
.entry-content h3 { font-size: 22px; margin: 1.2em 0 .4em; }
.entry-content img, .entry-content figure { border-radius: var(--radius-sm); margin: 1.4em 0; }
.entry-content figcaption { font-size: 13px; color: var(--ink-faint); }
.entry-content a { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--brand-2); }
.entry-content blockquote {
	margin: 1.5em 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--brand); font-size: 20px;
	font-family: var(--font-display); font-weight: 600; color: var(--ink); font-style: normal;
}
.entry-content ul, .entry-content ol { padding-left: 1.3em; margin: 0 0 1.3em; }
.entry-content li { margin-bottom: .4em; }

.entry-tags { margin: 28px 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tags-label { font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--ink-soft); margin-right: 4px; }
.entry-tags a { display: inline-block; background: var(--surface); border: 1px solid var(--line); padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.entry-tags a:hover { border-color: var(--brand); color: var(--brand-deep); }

/* Share */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0; }
.share-label { font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--ink-soft); }
.share-btn { font-size: 13px; font-weight: 700; padding: 7px 14px; border-radius: 999px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.share-btn:hover { background-image: var(--brand-grad); color: #fff; border-color: transparent; }

/* Related */
.related { margin-top: 40px; padding-top: 28px; border-top: 2px solid var(--line); }
.related-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .related-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .related-grid { grid-template-columns: repeat(4,1fr); } }
@media (min-width: 900px) { .related-grid .card-title { font-size: 16px; } }

/* --------------------------------------------------------------- Widgets */
.widget { margin-bottom: 28px; }
.widget-title { font-size: 18px; position: relative; padding-bottom: 8px; margin-bottom: 14px; }
.widget-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 40px; height: 3px; background-image: var(--brand-grad); border-radius: 3px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.widget a { color: var(--ink); font-weight: 600; }
.widget a:hover { color: var(--brand-deep); }

/* --------------------------------------------------------------- 404 */
.error-404 { padding: 80px 0; }
.error-inner { max-width: 600px; margin-inline: auto; text-align: center; }
.error-code { font-family: var(--font-display); font-weight: 800; font-size: 90px; line-height: 1; background-image: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin: 0; }
.error-title { font-size: 28px; }
.error-text { color: var(--ink-soft); margin-bottom: 24px; }
.error-404 .search-form { max-width: 420px; margin: 0 auto 16px; }

/* --------------------------------------------------------------- Footer */
.site-footer { margin-top: 56px; background: var(--ink); color: #c7d0e2; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; padding: 48px 20px 32px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.footer-brand .brand img, .footer-brand .custom-logo { filter: brightness(0) invert(1); max-height: 44px; }
.footer-tagline { color: #93a1bd; font-size: 14px; max-width: 36ch; }
.footer-social { display: flex; gap: 14px; margin-top: 14px; }
.footer-social a { color: #c7d0e2; font-weight: 700; font-size: 14px; }
.footer-social a:hover { color: #fff; }
.footer-col .widget-title { color: #fff; }
.footer-col .widget-title::after { background: var(--brand-2); }
.footer-col a { color: #c7d0e2; }
.footer-col a:hover { color: #fff; }
.footer-col li { border-bottom-color: rgba(255,255,255,.08); }
.footer-bar { border-top: 1px solid rgba(255,255,255,.1); }
.footer-bar-inner { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 18px 20px; font-size: 13px; color: #93a1bd; }
.footer-menu { list-style: none; display: flex; flex-wrap: wrap; gap: 18px; margin: 0; padding: 0; }
.footer-menu a { color: #c7d0e2; font-weight: 600; }
.footer-menu a:hover { color: #fff; }

/* --------------------------------------------------------------- Mobile nav */
@media (max-width: 991px) {
	.nav-toggle { display: inline-flex; }
	.primary-nav { position: fixed; inset: 0 0 0 auto; width: min(86vw, 360px); background: #fff; transform: translateX(100%);
		transition: transform .25s ease; z-index: 200; overflow-y: auto; box-shadow: -8px 0 30px rgba(0,0,0,.15); border-top: 0; }
	.primary-nav.is-open { transform: none; }
	.primary-nav .wrap { padding: 16px; }
	.nav-menu { flex-direction: column; }
	.nav-menu > li > .menu-link { border-bottom: 0; padding: 14px 8px; border-radius: 8px; }
	.nav-menu .menu-link { display: flex; justify-content: space-between; align-items: center; }
	.sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; border-left: 2px solid var(--line);
		border-radius: 0; margin-left: 12px; padding: 0; display: none; }
	.sub-menu.is-open { display: block; }
	.submenu-toggle { display: inline-flex; padding: 6px 10px; }
	.nav-open { overflow: hidden; }
	.nav-scrim { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 150; opacity: 0; pointer-events: none; transition: opacity .25s; }
	.nav-scrim.is-open { opacity: 1; pointer-events: auto; }
}
@media (min-width: 992px) {
	.search-toggle { display: inline-flex; }
}

/* --------------------------------------------------------------- Motion */
@media (prefers-reduced-motion: reduce) {
	* { animation-duration: .001ms !important; transition-duration: .001ms !important; }
	.hero-media:hover .hero-img, .card-media:hover .card-img { transform: none; }
}
