/*
Theme Name: Simple News
Theme URI: https://example.com/simple-news
Author: Local Dev
Author URI: https://example.com
Description: Tema de noticias simple y liviano, inspirado en un portal de actualidad.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: simple-news
*/

:root {
  --bg: #eef2f6;
  --surface: #ffffff;
  --text: #1f2933;
  --muted: #5f6c7a;
  --primary: #0a5bc9;
  --primary-dark: #07479f;
  --border: #d9e1ea;
  --shadow: 0 10px 28px rgba(20, 32, 52, 0.08);
  --header-bg: #f8f8f8;
  --header-top-bg: #ebebeb;
  --header-border: #cfcfcf;
  --header-title: #2d2d2d;
  --header-sub: #6a6a6a;
  --header-nav-bg: #f3f6fa;
  --header-nav-border: #d4dde7;
  --accent-soft: #e9f1ff;
  --max-width: 1100px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, #f7f9fc 0%, #eef2f6 52%),
    linear-gradient(180deg, #f8fafc 0%, #e9eef4 100%);
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
}

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

.container {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
}

.site-header {
  background: linear-gradient(180deg, #fafafa 0%, var(--header-bg) 100%);
  border-top: 1px solid #ffffff;
  border-bottom: 1px solid var(--header-border);
  box-shadow: 0 6px 16px rgba(33, 33, 33, 0.08);
  margin-bottom: 1.8rem;
}

.site-header-top {
  background: linear-gradient(180deg, #f1f1f1 0%, var(--header-top-bg) 100%);
  border-bottom: 1px solid var(--header-border);
}

.site-header-top-inner {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-header-date,
.site-header-edition {
  margin: 0;
  font-size: 0.78rem;
  color: var(--header-sub);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.site-header-main {
  text-align: center;
  padding: 1.2rem 0 1rem;
}

.site-title {
  margin: 0;
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.site-title a {
  color: var(--header-title);
}

.site-tagline {
  margin: 0.35rem 0 0;
  color: var(--header-sub);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.site-header-nav-wrap {
  border-top: 1px solid #ffffff;
  border-bottom: 1px solid var(--header-nav-border);
  background: linear-gradient(180deg, #f9fbfd 0%, var(--header-nav-bg) 100%);
}

.site-header-nav-inner {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-header-nav .menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.site-header-nav .menu li {
  margin: 0;
  padding: 0;
}

.site-header-nav .menu a {
  display: inline-block;
  color: #2f3a45;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.45rem 0.25rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-header-nav .menu a:hover,
.site-header-nav .menu .current-menu-item > a,
.site-header-nav .menu .current-cat > a {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.header-action {
  background: var(--primary);
  color: #ffffff;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  padding: 0.45rem 0.6rem;
  border-radius: 3px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.header-action:hover {
  background: var(--primary-dark);
  color: #ffffff;
  transform: translateY(-1px);
}

.portal-home {
  display: grid;
  gap: 1.3rem;
  margin-bottom: 2rem;
}

.breaking-strip {
  border: 1px solid var(--header-nav-border);
  background: linear-gradient(90deg, #f7fafe 0%, #eef4fb 100%);
  box-shadow: 0 4px 12px rgba(20, 32, 52, 0.06);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
}

.breaking-label {
  margin: 0;
  background: var(--primary);
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.62rem 0.78rem;
}

.breaking-items {
  min-width: 0;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  overflow-x: auto;
  padding: 0 0.75rem;
  scrollbar-width: thin;
}

.breaking-items a {
  color: #2b3a4a;
  font-size: 0.88rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.breaking-items a::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #90a4bb;
}

.breaking-items a:last-child::after {
  display: none;
}

.portal-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 1.1rem;
  align-items: stretch;
}

.portal-lead {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  animation: rise-in 0.5s ease both;
}

.portal-lead::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, #5e89d9 100%);
}

.portal-lead-media {
  display: block;
  min-height: 320px;
  background: #d7e2f0;
}

.portal-lead-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.portal-lead:hover .portal-lead-media img {
  transform: scale(1.03);
}

.portal-lead-content {
  padding: 1rem 1.2rem 1.2rem;
}

.portal-kicker {
  margin: 0 0 0.4rem;
  color: var(--primary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.portal-lead h2 {
  margin: 0 0 0.35rem;
  line-height: 1.2;
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
}

.portal-secondary {
  display: grid;
  gap: 0.8rem;
}

.portal-secondary-item {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: 110px 1fr;
  min-height: 110px;
  animation: rise-in 0.5s ease both;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.portal-secondary-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(20, 32, 52, 0.12);
}

.portal-secondary-media {
  min-height: 100%;
  background: #d7e2f0;
}

.portal-secondary-media img,
.portal-secondary-media .news-card-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portal-secondary-content {
  padding: 0.55rem 0.7rem;
}

.portal-secondary-content h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  line-height: 1.3;
}

.portal-secondary-content .news-meta {
  margin: 0;
}

.portal-stream {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: block;
  animation: rise-in 0.45s ease both;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(20, 32, 52, 0.14);
}

.news-card-media {
  display: block;
  min-height: 195px;
  background: #d7e2f0;
  overflow: hidden;
}

.news-card-media img,
.news-card-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card-media img {
  transition: transform 0.35s ease;
}

.news-card:hover .news-card-media img {
  transform: scale(1.04);
}

.news-card-placeholder {
  display: block;
  background:
    linear-gradient(160deg, rgba(10, 91, 201, 0.72), rgba(45, 79, 122, 0.75)),
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 45%);
}

.news-card-content {
  padding: 0.9rem 1rem 1rem;
}

.news-card h2 {
  margin: 0 0 0.35rem;
  line-height: 1.25;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.stream-card h3 {
  margin: 0 0 0.35rem;
  line-height: 1.3;
  font-size: 1.1rem;
}

.portal-lead h2 a,
.portal-secondary-content h3 a,
.stream-card h3 a {
  color: #1c2a38;
}

.portal-lead h2 a:hover,
.portal-secondary-content h3 a:hover,
.stream-card h3 a:hover {
  color: var(--primary);
}

.news-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.news-excerpt {
  margin: 0;
  color: #2a3542;
}

.news-excerpt p {
  margin: 0;
}

.news-empty {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1rem;
}

.pagination {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.2rem 0 2rem;
}

.pagination a {
  background: #f7faff;
  border: 1px solid var(--border);
  padding: 0.55rem 0.75rem;
  box-shadow: 0 4px 10px rgba(20, 32, 52, 0.06);
  border-radius: 3px;
}

.single-article {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 1.35rem;
  margin-bottom: 2rem;
}

.single-header {
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
  padding-bottom: 0.9rem;
}

.single-kicker {
  margin: 0 0 0.45rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  font-weight: 700;
}

.single-article-media {
  margin: -1.35rem -1.35rem 1rem;
  border-bottom: 1px solid var(--border);
  max-height: 500px;
  overflow: hidden;
}

.single-article-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.single-article-video {
  position: relative;
  padding-top: 56.25%;
  max-height: none;
  overflow: hidden;
}

.single-article-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.single-article h1 {
  margin: 0;
  line-height: 1.15;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.single-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.9rem;
  margin: 0.65rem 0 0;
}

.single-meta-row .news-meta {
  margin: 0;
}

.single-meta-row .news-meta:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-left: 0.9rem;
  border-radius: 50%;
  background: #9db0c7;
  vertical-align: middle;
}

.single-lead {
  margin: 0.85rem 0 0;
  color: #334254;
  font-size: 1.05rem;
  line-height: 1.55;
  border-left: 3px solid var(--primary);
  padding-left: 0.7rem;
}

.single-content p {
  margin-top: 0;
}

.single-content {
  color: #213040;
  line-height: 1.75;
  font-size: 1.04rem;
}

.single-content h2,
.single-content h3,
.single-content h4 {
  line-height: 1.25;
  margin: 1.2rem 0 0.6rem;
  color: #1b2a3a;
}

.single-content a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.single-content blockquote {
  margin: 1.2rem 0;
  padding: 0.65rem 0.9rem;
  border-left: 3px solid var(--primary);
  background: var(--accent-soft);
  color: #2a3b4d;
}

.single-content ul,
.single-content ol {
  padding-left: 1.1rem;
}

.single-footer-nav {
  margin-top: 1.3rem;
  border-top: 1px solid var(--border);
  padding-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.single-footer-nav a {
  display: inline-block;
  color: #1d2d3d;
  font-size: 0.9rem;
  background: #f7faff;
  border: 1px solid var(--border);
  padding: 0.55rem 0.7rem;
  border-radius: 3px;
}

.single-nav-next {
  text-align: right;
}

@keyframes rise-in {
  from {
    transform: translateY(10px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.site-footer {
  border-top: 2px solid var(--border);
  background: #f1f5f9;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 1rem 0;
}

@media (max-width: 860px) {
  .site-header-nav-inner {
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.4rem 0;
  }

  .site-header-nav .menu {
    justify-content: center;
  }

  .portal-top-grid {
    grid-template-columns: 1fr;
  }

  .portal-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-stream {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-card {
    grid-template-columns: 1fr;
  }

  .portal-lead-media {
    min-height: 280px;
  }
}

@media (max-width: 640px) {
  .site-header {
    margin-bottom: 1.2rem;
  }

  .site-header-main {
    padding: 0.95rem 0 0.8rem;
  }

  .site-header-top-inner {
    min-height: 34px;
  }

  .site-header-date,
  .site-header-edition {
    font-size: 0.72rem;
  }

  .site-header-nav .menu {
    gap: 0.5rem;
  }

  .site-header-nav .menu a {
    font-size: 0.78rem;
    padding: 0.35rem 0.2rem;
  }

  .header-action {
    width: 100%;
    text-align: center;
  }

  .breaking-strip {
    grid-template-columns: 1fr;
  }

  .breaking-label {
    text-align: center;
  }

  .breaking-items {
    padding: 0.5rem 0.65rem 0.6rem;
  }

  .single-article {
    padding: 0.9rem;
  }

  .single-header {
    margin-bottom: 0.8rem;
    padding-bottom: 0.75rem;
  }

  .single-lead {
    font-size: 0.98rem;
  }

  .single-content {
    font-size: 0.99rem;
    line-height: 1.68;
  }

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

  .single-nav-next {
    text-align: left;
  }

  .portal-secondary {
    grid-template-columns: 1fr;
  }

  .portal-stream {
    grid-template-columns: 1fr;
  }

  .portal-secondary-item {
    grid-template-columns: 95px 1fr;
    min-height: 95px;
    padding: 0;
  }

  .portal-lead-media,
  .news-card-media {
    min-height: 220px;
  }

  .portal-lead-content,
  .news-card-content {
    padding: 0.85rem;
  }

  .single-article-media {
    margin: -0.9rem -0.9rem 0.9rem;
  }

  .pagination {
    flex-direction: column;
  }
}
