/*
Theme Name: Vixía Galicia
Theme URI: https://vixiagalicia.es/
Author: Vixía Galicia
Description: Unha portada editorial para a actualidade de Galicia.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: vixia-galicia
*/

:root {
  --ink: #19231e;
  --muted: #68756d;
  --green: #153d2d;
  --green-light: #e8efe8;
  --red: #a33a35;
  --blue: #417e91;
  --gold: #b9964c;
  --paper: #f7f6f0;
  --white: #fffefa;
  --line: #d8ddd5;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 18px; }
body { min-width: 320px; margin: 0; color: var(--ink); background: var(--paper); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 50; top: 10px; left: 10px; padding: 12px 16px; transform: translateY(-160%); border-radius: 3px; color: white; background: var(--green); }
.skip-link:focus { transform: translateY(0); }
.edition-bar { display: flex; min-height: 34px; align-items: center; justify-content: space-between; gap: 12px; padding: 0 max(28px, calc((100% - 1250px) / 2)); border-bottom: 1px solid #e1e4dd; color: #647168; font: 700 9px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.edition-bar time { font: 11px/1 var(--serif); letter-spacing: .02em; text-transform: none; }
.edition-scope { display: inline-flex; align-items: center; gap: 7px; }
.edition-scope i, .front-kicker i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.masthead { display: grid; width: min(1250px, calc(100% - 56px)); min-height: 118px; grid-template-columns: 1fr 1fr 1fr; align-items: center; margin: auto; border-bottom: 1px solid var(--ink); }
.masthead-brand { display: inline-flex; width: max-content; align-items: center; gap: 11px; text-decoration: none; }
.brand-logo { display: block; width: 52px; height: 52px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 50%; object-fit: cover; }
.masthead-name, .footer-masthead { color: var(--ink); font: 500 31px/.95 var(--serif); letter-spacing: -.055em; }
.masthead-name b, .footer-masthead b { color: var(--green); font-weight: 700; }
.masthead-center { display: grid; justify-items: center; gap: 9px; }
.masthead-center p { margin: 0; color: #56645b; font: italic 12px/1 var(--serif); letter-spacing: .03em; }
.masthead-rule { width: min(190px, 85%); height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.masthead-subscribe { display: inline-flex; align-items: center; justify-self: end; gap: 7px; padding: 10px 13px; border: 1px solid #bbc8bd; border-radius: 2px; color: var(--green); font: 800 9px/1 var(--sans); letter-spacing: .06em; text-decoration: none; text-transform: uppercase; }
.masthead-subscribe:hover { border-color: var(--green); background: var(--green-light); }
.edition-nav { display: flex; min-height: 48px; width: min(1250px, calc(100% - 56px)); align-items: center; justify-content: center; gap: clamp(16px, 2.8vw, 36px); margin: auto; border-bottom: 3px double #777f77; font: 750 10px/1 var(--sans); }
.edition-nav a { text-decoration: none; }
.edition-nav a:hover { color: var(--red); }
.edition-nav .nav-home { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: white; background: var(--green); font: 700 9px var(--serif); }
.front-page { display: grid; width: min(1250px, calc(100% - 56px)); grid-template-columns: .7fr 1.35fr .78fr; gap: 28px; margin: auto; padding: 42px 0 46px; border-bottom: 1px solid var(--ink); }
.front-intro { padding-top: 4px; }
.front-kicker { display: inline-flex; align-items: center; gap: 7px; color: var(--green); font: 800 9px/1 var(--sans); letter-spacing: .11em; }
.front-intro h1 { margin: 22px 0 16px; color: var(--ink); font: 500 clamp(38px, 4.2vw, 59px)/.98 var(--serif); letter-spacing: -.065em; }
.front-intro h1 em { color: var(--green); font-weight: 500; }
.front-intro > p { max-width: 250px; margin: 0; color: #626e65; font: 13px/1.75 var(--sans); }
.front-link, .rail-all, .news-more { display: inline-flex; align-items: center; gap: 7px; color: var(--green); font: 800 9px/1 var(--sans); text-decoration: none; }
.front-link { margin-top: 19px; }
.front-link:hover, .rail-all:hover, .news-more:hover { color: var(--red); }
.lead-column { min-width: 0; }
.lead-image, .lead-empty { position: relative; display: block; min-height: clamp(220px, 23vw, 302px); overflow: hidden; background: linear-gradient(150deg, #d8e3db 0%, #eaf0e8 48%, #bacfc6 100%); text-decoration: none; }
.lead-image.has-image { background-image: linear-gradient(180deg, transparent 60%, #111d1aaa), var(--story-image); background-position: center; background-size: cover; }
.coast-art { position: absolute; inset: 0; overflow: hidden; background: linear-gradient(180deg, #dce9eb 0 45%, #aec9c9 46% 49%, #789b91 50% 63%, #31594b 64%); }
.coast-art::before { position: absolute; right: -7%; bottom: -53%; width: 93%; height: 95%; transform: rotate(-12deg); border-radius: 48% 52% 0 0; background: #e8e4d7; content: ''; }
.coast-art::after { position: absolute; right: -10%; bottom: -59%; width: 88%; height: 78%; transform: rotate(-12deg); border-top: 2px solid #6f958a; border-radius: 50%; content: ''; }
.coast-art i:first-child { position: absolute; top: 28%; left: -9%; width: 65%; height: 1px; transform: rotate(-4deg); background: #fffefa99; }
.coast-art i:nth-child(2) { position: absolute; top: 34%; left: 2%; width: 54%; height: 1px; transform: rotate(3deg); background: #fffefa88; }
.coast-art b { position: absolute; top: 16%; right: 17%; width: 39px; height: 39px; border-radius: 50%; background: #f0d798; box-shadow: 0 0 0 13px #f0d79824; }
.image-caption { position: absolute; z-index: 1; bottom: 12px; left: 13px; color: white; font: 800 8px/1 var(--sans); letter-spacing: .14em; text-shadow: 0 1px 5px #1118; }
.image-ornament { position: absolute; z-index: 1; top: 11px; right: 13px; display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid #ffffffa8; border-radius: 50%; color: white; font: 700 9px var(--serif); }
.lead-story .story-meta, .story-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; color: #7c867d; font: 9px/1.3 var(--sans); }
.story-meta span:first-child { color: var(--red); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.lead-story h2 { margin: 9px 0 8px; color: var(--ink); font: 600 clamp(25px, 2.6vw, 34px)/1.08 var(--serif); letter-spacing: -.045em; }
.lead-story h2 a, .rail-story h3 a, .news-card h3 a { text-decoration: none; }
.lead-story h2 a:hover, .rail-story h3 a:hover, .news-card h3 a:hover { color: var(--red); }
.lead-story > p { display: -webkit-box; max-width: 610px; margin: 0; overflow: hidden; color: #5e6b62; font: 12px/1.7 var(--sans); -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.story-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 11px; border-top: 1px solid var(--line); color: #7c867d; font: 9px/1.3 var(--sans); }
.story-footer a { display: inline-flex; align-items: center; gap: 5px; color: var(--green); font-weight: 800; text-decoration: none; }
.lead-empty { display: grid; place-items: center; }
.lead-empty > p { position: relative; z-index: 2; max-width: 260px; margin: 0; color: var(--green); font: 500 24px/1.2 var(--serif); text-align: center; }
.lead-empty .image-caption { color: var(--green); text-shadow: none; }
.lead-empty .image-ornament { border-color: var(--green); color: var(--green); }
.empty-copy h2 { margin: 9px 0 8px; font: 600 25px/1.12 var(--serif); }
.empty-copy > p { color: var(--muted); font: 12px/1.7 var(--sans); }
.latest-rail { min-width: 0; padding-left: 21px; border-left: 1px solid var(--line); }
.rail-heading { display: flex; align-items: end; justify-content: space-between; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.rail-kicker, .section-kicker { color: var(--green); font: 800 8px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.rail-heading h2 { margin: 7px 0 0; color: var(--ink); font: 600 23px/1 var(--serif); letter-spacing: -.035em; }
.rail-live { display: inline-flex; align-items: center; gap: 5px; padding-bottom: 3px; color: var(--muted); font: 800 7px/1 var(--sans); letter-spacing: .1em; }
.rail-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.rail-stories { display: grid; }
.rail-story { display: grid; grid-template-columns: 22px 1fr; gap: 8px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.rail-index { padding-top: 3px; color: #a1a89f; font: 10px/1 var(--serif); }
.rail-category { color: var(--red); font: 800 7px/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; }
.rail-story h3 { margin: 4px 0 5px; color: #26352c; font: 600 14px/1.15 var(--serif); }
.rail-story time { color: #89928a; font: 8px/1 var(--sans); }
.rail-empty { min-height: 118px; margin: 0; padding: 16px 0; color: #67746a; font: 11px/1.65 var(--sans); }
.rail-all { margin-top: 13px; }
.province-section, .news-section { width: min(1250px, calc(100% - 56px)); margin: auto; }
.province-section { padding: 31px 0 38px; border-bottom: 1px solid var(--line); }
.province-heading, .news-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.province-heading h2, .news-heading h2 { margin: 7px 0 0; color: var(--ink); font: 600 30px/1.05 var(--serif); letter-spacing: -.045em; }
.province-heading > p { max-width: 340px; margin: 0 0 2px; color: #6d786f; font: 10px/1.65 var(--sans); }
.province-list { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 22px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.province-list a { display: grid; min-height: 75px; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; align-items: center; gap: 4px 10px; padding: 13px 15px; border-right: 1px solid var(--line); text-decoration: none; transition: background .16s ease; }
.province-list a:last-child { border-right: 0; }
.province-list a:hover { background: var(--green-light); }
.province-list a > span:first-child { color: var(--gold); font: 800 8px/1 var(--sans); letter-spacing: .1em; }
.province-list a b { align-self: end; font: 700 14px/1.1 var(--serif); }
.province-list a > span:last-child { grid-column: 2; grid-row: 2; color: var(--green); }
.news-section { padding: 34px 0 48px; }
.news-heading { padding-bottom: 16px; border-bottom: 1px solid var(--ink); }
.news-total { color: var(--muted); font: 9px/1 var(--sans); }
.news-more { padding-bottom: 4px; }
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 21px; }
.news-card { min-width: 0; padding: 19px 0 17px; border-bottom: 1px solid var(--line); }
.news-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.news-card-index { color: #a2aaa2; font: 10px/1 var(--serif); }
.news-tag { color: var(--red); font: 800 8px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.news-card h3 { margin: 12px 0 7px; color: #26352c; font: 600 20px/1.12 var(--serif); letter-spacing: -.02em; }
.news-card p { display: -webkit-box; min-height: 38px; margin: 0; overflow: hidden; color: #6b766e; font: 10px/1.65 var(--sans); -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.news-card-footer { display: flex; justify-content: space-between; gap: 8px; margin-top: 13px; color: #89928a; font: 8px/1 var(--sans); }
.news-card-footer time { white-space: nowrap; }
.news-note { margin: 17px 0 0; color: #858d86; font: 9px/1.65 var(--sans); }
.news-empty { margin-top: 18px; padding: 23px; border: 1px solid var(--line); color: var(--muted); background: var(--white); font: 13px/1.6 var(--serif); }
.newspaper-footer { display: grid; justify-items: center; gap: 12px; padding: 28px 24px 32px; border-top: 3px double #777f77; text-align: center; }
.footer-masthead { font-size: 24px; text-decoration: none; }
.newspaper-footer > p { max-width: 540px; margin: 0; color: #707b72; font: 10px/1.6 var(--sans); }
.footer-nav { display: flex; gap: 17px; margin-top: 3px; }
.footer-nav a { color: var(--green); font: 800 8px/1 var(--sans); text-decoration: none; }

.article-wrap, .archive-wrap { width: min(880px, calc(100% - 48px)); min-height: 55vh; margin: auto; padding: 48px 0 72px; }
.article-page { max-width: 760px; margin: auto; }
.back-link { display: inline-block; margin-bottom: 28px; color: var(--green); font: 800 9px/1 var(--sans); text-decoration: none; }
.article-kicker { margin-bottom: 11px; color: var(--red); font: 800 9px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.article-page h1, .archive-heading h1, .not-found-page h1 { margin: 0; color: var(--ink); font: 500 clamp(36px, 6vw, 62px)/1.02 var(--serif); letter-spacing: -.055em; }
.article-deck { margin: 17px 0; color: #5f6b63; font: 18px/1.55 var(--serif); }
.article-byline { display: flex; justify-content: space-between; gap: 14px; margin: 18px 0 25px; padding: 12px 0; border-block: 1px solid var(--line); color: #768078; font: 9px/1.2 var(--sans); }
.article-featured-image { margin: 0 0 30px; }
.article-featured-image img { width: 100%; }
.article-featured-image figcaption { margin-top: 6px; color: var(--muted); font: 9px/1.5 var(--sans); }
.article-content { color: #29372f; font: 17px/1.8 var(--serif); }
.article-content > * { max-width: 700px; margin-inline: auto; }
.article-content > .alignwide { max-width: 850px; }
.article-content > .alignfull { max-width: none; }
.article-content img { height: auto; }
.article-content h2, .article-content h3 { margin-top: 1.6em; color: var(--green); line-height: 1.15; }
.article-content a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.post-navigation { display: flex; justify-content: space-between; gap: 20px; margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); font: 11px/1.5 var(--serif); }
.post-navigation a { color: var(--green); text-decoration: none; }
.archive-heading { margin-bottom: 25px; padding-bottom: 17px; border-bottom: 1px solid var(--ink); }
.archive-heading h1 { margin-top: 8px; }
.archive-description { max-width: 600px; margin-top: 10px; color: var(--muted); font: 12px/1.7 var(--sans); }
.archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.archive-grid .news-card h2 { margin: 11px 0 7px; font: 600 23px/1.12 var(--serif); }
.archive-grid .news-card h2 a { text-decoration: none; }
.archive-grid .news-card h2 a:hover { color: var(--red); }
.pagination { margin-top: 28px; }
.pagination .nav-links { display: flex; justify-content: center; gap: 8px; }
.pagination .page-numbers { padding: 8px 11px; border: 1px solid var(--line); color: var(--green); font: 10px/1 var(--sans); text-decoration: none; }
.pagination .current { color: white; background: var(--green); }
.not-found-page > p { color: var(--muted); font: 14px/1.7 var(--sans); }

@media (max-width: 960px) {
  .front-page { grid-template-columns: .72fr 1.28fr; }
  .latest-rail { grid-column: 1 / -1; padding: 21px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .rail-stories { grid-template-columns: repeat(2, 1fr); column-gap: 20px; }
  .rail-heading { align-items: center; }
}
@media (max-width: 680px) {
  .edition-bar { min-height: 31px; padding-inline: 16px; font-size: 7px; }
  .edition-bar time { display: none; }
  .masthead { width: calc(100% - 32px); min-height: 88px; grid-template-columns: 1fr auto; }
  .brand-logo { width: 41px; height: 41px; }
  .masthead-name { font-size: 25px; }
  .masthead-center { display: none; }
  .masthead-subscribe { padding: 9px; font-size: 7px; }
  .edition-nav { width: 100%; min-height: 43px; justify-content: flex-start; gap: 19px; overflow-x: auto; padding: 0 16px; white-space: nowrap; scrollbar-width: none; }
  .edition-nav::-webkit-scrollbar { display: none; }
  .front-page { width: calc(100% - 32px); grid-template-columns: 1fr; gap: 22px; padding: 30px 0 34px; }
  .front-intro h1 { max-width: 500px; margin: 15px 0 10px; font-size: clamp(43px, 13vw, 62px); }
  .front-intro > p { max-width: 420px; font-size: 12px; }
  .front-link { margin-top: 12px; }
  .lead-image, .lead-empty { min-height: 230px; }
  .lead-story h2 { font-size: 28px; }
  .latest-rail { grid-column: auto; }
  .rail-stories { grid-template-columns: 1fr; }
  .province-section, .news-section { width: calc(100% - 32px); }
  .province-heading, .news-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .province-heading h2, .news-heading h2 { font-size: 27px; }
  .province-list { grid-template-columns: repeat(2, 1fr); }
  .province-list a:nth-child(2) { border-right: 0; }
  .province-list a:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .news-grid, .archive-grid { grid-template-columns: 1fr; }
  .news-card h3 { font-size: 21px; }
  .article-wrap, .archive-wrap { width: calc(100% - 36px); padding: 34px 0 52px; }
  .article-page h1, .archive-heading h1, .not-found-page h1 { font-size: clamp(37px, 11vw, 53px); }
  .article-deck { font-size: 16px; }
  .article-content { font-size: 16px; }
  .footer-nav { flex-wrap: wrap; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
