/*
Theme Name: Tema Noticias
Author: Julio García
Description: Tema para el vertex.
Version: 1.0
*/

:root {
  color-scheme: light;
  --paper: #f2f2f2;
  --white: #fff;
  --ink: #222;
  --muted: #777;
  --line: #d9d9d9;
  --accent: #4a4a4a;
  --accent-soft: #c5c5c5;
  --serif: Verdana, Geneva, sans-serif;
  --sans: Verdana, Geneva, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 14px; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
.container { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }

.topline { height: 34px; background: #222; color: #c4c4c4; font-size: 9px; font-weight: 600; letter-spacing: .14em; }
.topline-inner { display: flex; height: 100%; align-items: center; justify-content: flex-end; }
.edition { color: #a0a0a0; letter-spacing: .04em; }
.site-header { background: var(--paper); }
.header-main { height: 100px; display: flex; align-items: center; justify-content: space-between; }
.header-actions { display: flex; align-items: center; gap: 15px; }
.language-toggle { padding: 11px 12px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; font-size: 10px; font-weight: 700; cursor: pointer; }
.language-toggle:hover { background: #e5e5e5; }
.header-social { display: flex; align-items: center; gap: 9px; }
.social-icon-link { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--line); color: var(--ink); transition: background .2s, color .2s, transform .2s; }
.social-icon-link:hover { transform: translateY(-2px); background: var(--ink); color: var(--white); }
.social-icon-link svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.social-icon-link svg path { fill: currentColor; stroke: none; }
.social-icon-link svg.email-icon path { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.social-icon-link svg .instagram-dot { fill: currentColor; stroke: none; }
.brand { display: inline-flex; align-items: center; }
.brand-logo { display: block; width: min(310px, 38vw); height: auto; object-fit: contain; }
.main-nav { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; gap: 26px; height: 51px; }
.nav-link { position: relative; display: flex; height: 100%; align-items: center; color: #555; font-size: 12px; font-weight: 600; transition: color .2s; }
.nav-link:hover, .nav-link.active { color: var(--ink); }
.nav-link.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--accent); content: ""; }
.nav-tag { margin-left: auto; color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .12em; }

.eyebrow { display: block; color: var(--accent); font-size: 9px; font-weight: 700; letter-spacing: .14em; }

.lead-section { display: block; padding: 43px 0 53px; border-bottom: 1px solid var(--line); }
.image-frame { position: relative; display: block; overflow: hidden; background: #d7d7d7; }
.image-frame img { transition: transform .5s ease; }
.image-frame:hover img, .image-frame:focus-visible img { transform: scale(1.025); }
.lead-image { min-height: 355px; aspect-ratio: 1.48; }
.lead-image::after { position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(14,14,14,.42)); content: ""; }
.image-credit { position: absolute; z-index: 1; bottom: 17px; left: 18px; color: white; font-size: 9px; font-weight: 700; letter-spacing: .13em; }
.lead-copy { padding: 8px 7px 0 0; }
.category-label { display: flex; align-items: center; gap: 8px; color: var(--accent); font-size: 9px; font-weight: 700; letter-spacing: .15em; }
.category-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-soft); }
.lead-copy h2, .story-content h2 { max-width: 440px; margin: 17px 0 13px; font-family: var(--serif); font-size: clamp(32px, 4vw, 47px); font-weight: 600; letter-spacing: -.035em; line-height: 1.12; }
.lead-summary { max-width: 400px; margin: 0 0 20px; color: #666; font-size: 13px; line-height: 1.8; }
.byline, .story-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.read-more { display: inline-flex; align-items: center; gap: 14px; margin-top: 26px; padding-bottom: 6px; border-bottom: 1px solid var(--accent); color: var(--accent); font-size: 11px; font-weight: 700; }
.read-more span { font-size: 15px; transition: transform .2s; }
.read-more:hover span { transform: translateX(4px); }

.news-section { padding: 43px 0 48px; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-heading h2 { margin: 7px 0 0; font-family: var(--serif); font-size: 28px; font-weight: 600; letter-spacing: -.025em; }
.text-link { color: var(--accent); font-size: 10px; font-weight: 700; }
.text-link span { margin-left: 7px; font-size: 14px; }
.carousel { position: relative; }
.carousel-viewport { min-width: 0; overflow: hidden; }
.story-grid { display: flex; gap: 0; transition: transform .45s ease; }
.story-card { display: grid; min-width: 0; min-height: 355px; flex: 0 0 100%; grid-template-columns: 1.25fr 1fr; background: var(--white); }
.story-image { min-height: 355px; aspect-ratio: 1.48; }
.carousel-control { position: absolute; z-index: 2; top: 50%; display: grid; width: 38px; height: 38px; place-items: center; transform: translateY(-50%); border: 1px solid #bcbcbc; border-radius: 50%; background: rgba(255,255,255,.88); color: var(--ink); font: inherit; font-size: 20px; cursor: pointer; transition: background .2s, color .2s; }
.carousel-control:hover { background: var(--ink); color: var(--white); }
.carousel-previous { left: 12px; }
.carousel-next { right: 12px; }
.carousel-pagination { display: none; }
.carousel-dot-button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: #bcbcbc; cursor: pointer; }
.carousel-dot-button[aria-current="true"] { background: var(--ink); }
.image-index { position: absolute; right: 11px; bottom: 10px; color: var(--white); font-family: var(--serif); font-size: 20px; font-weight: 700; text-shadow: 0 1px 4px #0008; }
.story-content { align-self: center; padding: 26px; }
.story-category { color: var(--accent); font-size: 8px; font-weight: 700; letter-spacing: .13em; }
.story-content h2 { margin-top: 12px; }
.story-content h2 a:hover { color: var(--accent); }
.story-content h3 { margin: 9px 0 8px; font-family: var(--serif); font-size: 18px; font-weight: 600; letter-spacing: -.01em; line-height: 1.35; }
.story-content h3 a:hover { color: var(--accent); }
.story-content p { margin: 0 0 13px; color: #757575; font-size: 11px; line-height: 1.65; }
.story-meta { gap: 7px; font-size: 9px; }

.news-section { padding-top: 42px; padding-bottom: 40px; }
.news-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.news-card { display: flex; min-width: 0; flex-direction: column; background: var(--white); }
.news-card-image { aspect-ratio: 1.65; }
.news-card .story-content { flex: 1; padding: 18px; }
.news-card .story-content h3 { font-size: 16px; }
.news-card .story-content p { font-size: 10px; }
.sports-section { border-bottom: 1px solid var(--line); }
.politics-section { border-bottom: 0; }

.site-footer { padding: 39px 0 18px; background: #222; color: #d9d9d9; }
.footer-main { display: grid; grid-template-columns: 1.7fr 1fr 1.4fr 1fr; gap: 30px; padding-bottom: 34px; }
.brand-light .brand-logo { filter: invert(1); }
.footer-brand p { margin: 14px 0 0; color: #aaa; font-family: var(--serif); font-size: 13px; line-height: 1.55; }
.footer-column { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; color: #c1c1c1; font-size: 10px; }
.footer-social-links .social-icon-link { border-color: #666; color: #ddd; }
.footer-social-links .social-icon-link:hover { background: #fff; color: #222; }
.footer-title { margin-bottom: 4px; color: #bdbdbd; font-size: 8px; font-weight: 700; letter-spacing: .14em; }
.footer-column a:hover, .footer-bottom a:hover { color: var(--white); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 16px; border-top: 1px solid #444; color: #9e9e9e; font-size: 9px; }
.footer-bottom div { display: flex; flex-wrap: wrap; gap: 20px; }

.article-home-link, .article-back-link { color: var(--accent); font-size: 11px; font-weight: 700; }
.article-home-link:hover, .article-back-link:hover { color: var(--ink); }
.article-page { min-height: 60vh; padding-top: 36px; padding-bottom: 64px; }
.article-back-link { display: inline-block; margin-bottom: 32px; }
.article-header { max-width: 920px; margin: 0 auto 28px; }
.article-header h1, .article-not-found h1 { margin: 12px 0; font-family: var(--serif); font-size: clamp(32px, 5vw, 54px); font-weight: 600; letter-spacing: -.035em; line-height: 1.12; }
.article-summary { margin: 0 0 18px; color: #666; font-size: 16px; line-height: 1.7; }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 10px; }
.article-meta span + span::before { margin-right: 10px; content: "·"; }
.article-demo-label { color: #8a4e21; font-weight: 700; }
.article-figure { max-width: 920px; margin: 0 auto 30px; }
.article-figure img { height: auto; max-height: 560px; aspect-ratio: 1.65; object-fit: cover; }
.article-body { max-width: 920px; margin: 0 auto; font-size: 15px; line-height: 1.85; }
.article-body h2 { margin: 0 0 18px; font-family: var(--serif); font-size: 22px; font-weight: 600; }
.article-body p { margin: 0 0 18px; color: #555; }
.article-source { margin-top: 28px !important; font-size: 12px; }
.article-source a { text-decoration: underline; text-underline-offset: 3px; }
.article-not-found { max-width: 700px; margin: 80px auto; }
.article-not-found p { color: #666; line-height: 1.7; }

.editorial-page { max-width: 860px; padding-top: 44px; padding-bottom: 64px; }
.editorial-page h1 { margin: 8px 0 12px; font-family: var(--serif); font-size: clamp(30px, 4vw, 42px); font-weight: 600; }
.editorial-intro { color: #666; line-height: 1.7; }
.editorial-notice { margin: 18px 0; padding: 13px 16px; border-left: 3px solid #8a4e21; background: #fff8ef; color: #59452e; font-size: 12px; line-height: 1.6; }
.editorial-form { display: grid; gap: 16px; margin-top: 24px; }
.editorial-form label { display: grid; gap: 7px; font-size: 12px; font-weight: 700; }
.editorial-form input, .editorial-form textarea, .editorial-form select { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 0; background: #fff; color: var(--ink); font: inherit; font-size: 13px; }
.editorial-form textarea { min-height: 190px; resize: vertical; line-height: 1.6; }
.editorial-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.editorial-button { padding: 11px 16px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.editorial-button:hover { background: #444; }
.editorial-button-secondary { background: transparent; color: var(--ink); }
.editorial-button-secondary:hover { background: #e5e5e5; color: var(--ink); }
.editorial-message { min-height: 20px; font-size: 12px; line-height: 1.5; }
.editorial-message[data-kind="error"] { color: #a22; }
.editorial-message[data-kind="success"] { color: #27633c; }
.editorial-list { display: grid; gap: 12px; margin-top: 20px; padding: 0; list-style: none; }
.editorial-list-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; background: #fff; }
.editorial-list-item h3 { margin: 0 0 6px; font-size: 14px; }
.editorial-list-item p { margin: 0; color: var(--muted); font-size: 11px; }
.editorial-list-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.editorial-list-actions button { padding: 8px 10px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; font-size: 11px; cursor: pointer; }
.editorial-list-actions button:hover { background: #eee; }
.news-card-image img { height: 100%; }

@media (max-width: 900px) {
  .news-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr));     .editorial-list-item { align-items: flex-start; flex-direction: column; }
  }
  .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story-card { min-height: 0; grid-template-columns: 1fr; }
  .story-image { min-height: 0; aspect-ratio: 2.1; }
  .story-card .story-content { padding: clamp(20px, 4vw, 32px); }
  .story-card .story-content h2 { max-width: none; font-size: clamp(26px, 4vw, 36px); }
  .carousel-control { display: none; }
  .carousel-pagination { display: flex; justify-content: center; gap: 10px; padding-top: 14px; }
}

@media (max-width: 760px) {
  .container { width: calc(100% - 40px); }
  .topline { font-size: 8px; }
  .edition { font-size: 8px; }
  .header-main { height: 80px; }
  .article-page { padding-top: 28px; padding-bottom: 42px; }
  .article-back-link { margin-bottom: 24px; }
  .article-summary { font-size: 14px; }
  .article-figure { margin-bottom: 22px; }
  .language-toggle { padding: 10px 8px; font-size: 9px; }
  .nav-inner { flex-wrap: wrap; justify-content: flex-start; gap: 0 20px; height: auto; min-height: 47px; padding-block: 4px; }
  .nav-link { flex: 0 0 auto; font-size: 11px; }
  .nav-tag { display: none; }
  .lead-section { padding: 27px 0 35px; }
  .story-card { min-height: 0; grid-template-columns: 1fr; }
  .story-image { min-height: 0; aspect-ratio: 1.65; }
  .lead-copy h2 { max-width: 560px; font-size: 38px; }
  .lead-summary { max-width: 550px; }
  .news-section { padding: 34px 0; }
  .story-card .story-content h2 { max-width: 560px; font-size: 28px; }
  .carousel-viewport { touch-action: pan-y; }
  .carousel-control { display: none; }
  .carousel-pagination { display: flex; justify-content: center; gap: 10px; padding-top: 14px; }
  .story-content { padding: 16px; }
  .story-content h3 { font-size: 16px; }
  .story-content p { font-size: 10px; }
  .news-card-grid { gap: 13px; }
  .news-card .story-content { padding: 13px 12px 15px; }
  .news-card .story-content h3 { font-size: 15px; }
  .footer-main { row-gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 480px) {
  .container { width: calc(100% - 32px); }
  .topline-inner { gap: 10px; }
  .header-main { height: 72px; }
  .nav-inner { gap: 0 14px; }
  .header-actions { gap: 7px; }
  .header-social { gap: 5px; }
  .social-icon-link { width: 30px; height: 30px; }
  .social-icon-link svg { width: 15px; height: 15px; }
  .language-toggle { padding: 8px 6px; font-size: 8px; }
  .lead-copy h2, .story-content h2 { font-size: 34px; }
  .story-card .story-content h2 { font-size: 25px; line-height: 1.2; }
  .section-heading { align-items: flex-start; }
  .section-heading h2 { font-size: 25px; }
  .text-link { max-width: 106px; padding-top: 19px; font-size: 9px; line-height: 1.5; }
  .story-card { min-height: auto; grid-template-columns: 1fr; }
  .story-image { min-height: 0; aspect-ratio: 1.65; }
  .story-content { padding: 15px; }
  .story-content h3 { margin: 7px 0; font-size: 15px; }
  .story-content p { display: block; }
  .story-meta { gap: 5px; font-size: 8px; }
  .news-card-grid { grid-template-columns: 1fr; gap: 14px; }
  .news-card { display: flex; }
  .news-card-image { min-height: 0; aspect-ratio: 1.65; }
  .news-card .story-content { padding: 13px; }
  .news-card .story-content p { display: block; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 25px 15px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-column:nth-child(4) { grid-column: 2; }
  .footer-bottom div { gap: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
