/*
Theme Name: Stadium Pulse
Theme URI: https://example.com/stadium-pulse
Author: Manus AI
Author URI: https://manus.im/
Description: A fast, accessible football-news theme with Gutenberg support and scheduled RSS ingestion.
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: stadium-pulse
Tags: news, blog, grid-layout, custom-logo, featured-images, block-styles, wide-blocks, accessibility-ready
*/

:root {
  --sp-navy-950: #040914;
  --sp-navy-900: #071324;
  --sp-navy-850: #0b1a2d;
  --sp-navy-800: #10253d;
  --sp-navy-700: #1d3955;
  --sp-orange: #ffad33;
  --sp-orange-strong: #f58a07;
  --sp-cream: #fff8ec;
  --sp-white: #f7fafc;
  --sp-muted: #bac7d5;
  --sp-border: rgba(186, 199, 213, 0.2);
  --sp-shadow: 0 1.25rem 3.5rem rgba(0, 0, 0, 0.28);
  --sp-radius-sm: 0.65rem;
  --sp-radius: 1.1rem;
  --sp-radius-lg: 1.6rem;
  --sp-content: 76rem;
  --sp-narrow: 48rem;
  --sp-serif: Georgia, 'Times New Roman', serif;
  --sp-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 85% 5%, rgba(255, 173, 51, 0.09), transparent 24rem),
    linear-gradient(180deg, var(--sp-navy-950), #06111f 48%, #050d19);
  color: var(--sp-white);
  font-family: var(--sp-sans);
  font-size: 1rem;
  line-height: 1.7;
  min-width: 20rem;
  text-rendering: optimizeLegibility;
}

body.admin-bar .site-header {
  top: 2rem;
}

a {
  color: var(--sp-orange);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--sp-cream);
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button,
.button,
.wp-element-button,
.wp-block-button__link {
  align-items: center;
  background: linear-gradient(135deg, var(--sp-orange), var(--sp-orange-strong));
  border: 0;
  border-radius: 999px;
  color: var(--sp-navy-950);
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  gap: 0.5rem;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1.1rem;
  text-decoration: none;
}

button:hover,
.button:hover,
.wp-element-button:hover,
.wp-block-button__link:hover {
  background: var(--sp-cream);
  color: var(--sp-navy-950);
}

:focus-visible {
  outline: 0.2rem solid var(--sp-orange);
  outline-offset: 0.2rem;
}

::selection {
  background: var(--sp-orange);
  color: var(--sp-navy-950);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--sp-white);
  font-family: var(--sp-serif);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin-block: 0 0.65em;
}

h1 {
  font-size: clamp(2.2rem, 7vw, 5.2rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 3.15rem);
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

p {
  margin-block: 0 1.25rem;
}

.site-shell {
  margin-inline: auto;
  max-width: calc(var(--sp-content) + 3rem);
  padding-inline: clamp(1rem, 4vw, 1.5rem);
  width: 100%;
}

.site-main {
  min-height: 60vh;
  padding-block: clamp(2.5rem, 7vw, 6rem);
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus,
.skip-link:focus {
  clip: auto !important;
  clip-path: none;
  height: auto;
  width: auto;
}

.skip-link {
  background: var(--sp-orange);
  border-radius: 0 0 var(--sp-radius-sm) 0;
  color: var(--sp-navy-950);
  font-weight: 800;
  left: 0;
  padding: 0.75rem 1rem;
  position: fixed;
  top: 0;
  transform: translateY(-150%);
  transition: transform 150ms ease;
  z-index: 100000;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  backdrop-filter: blur(1rem);
  background: rgba(4, 9, 20, 0.9);
  border-bottom: 1px solid var(--sp-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__inner {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1rem;
  justify-content: space-between;
  min-height: 4.75rem;
  position: relative;
}

.site-branding {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  min-width: 0;
}

.custom-logo-link {
  flex: 0 0 auto;
}

.custom-logo {
  max-height: 2.4rem;
  width: auto;
}

.site-title {
  font-family: var(--sp-serif);
  font-size: clamp(1.15rem, 4vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}

.site-title a {
  color: var(--sp-white);
  text-decoration: none;
}

.site-title a::after {
  color: var(--sp-orange);
  content: '•';
  margin-left: 0.25rem;
}

.menu-toggle {
  display: none;
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding: 0.7rem;
}

.menu-toggle__icon,
.menu-toggle__icon::before,
.menu-toggle__icon::after {
  background: currentColor;
  display: block;
  height: 0.125rem;
  transition: transform 150ms ease;
  width: 1.25rem;
}

.menu-toggle__icon {
  position: relative;
}

.menu-toggle__icon::before,
.menu-toggle__icon::after {
  content: '';
  left: 0;
  position: absolute;
}

.menu-toggle__icon::before {
  top: -0.38rem;
}

.menu-toggle__icon::after {
  top: 0.38rem;
}

.menu-toggle[aria-expanded='true'] .menu-toggle__icon {
  background: transparent;
}

.menu-toggle[aria-expanded='true'] .menu-toggle__icon::before {
  top: 0;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded='true'] .menu-toggle__icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.site-navigation {
  flex-basis: 100%;
}

.primary-menu,
.site-navigation ul {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0 0 1rem;
}

.site-navigation a {
  border-radius: var(--sp-radius-sm);
  color: var(--sp-white);
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.65rem 0.8rem;
  text-decoration: none;
}

.site-navigation a:hover,
.site-navigation .current-menu-item > a,
.site-navigation .current_page_item > a {
  background: var(--sp-navy-800);
  color: var(--sp-orange);
}

.has-js .menu-toggle {
  display: inline-flex;
}

.has-js .site-navigation .primary-menu,
.has-js .site-navigation > ul {
  display: none;
}

.has-js .site-navigation.is-open .primary-menu,
.has-js .site-navigation.is-open > ul {
  display: flex;
}

.eyebrow {
  align-items: center;
  color: var(--sp-orange);
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 900;
  gap: 0.55rem;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.eyebrow::before {
  background: var(--sp-orange);
  content: '';
  height: 0.125rem;
  width: 1.8rem;
}

.news-hero {
  background:
    linear-gradient(135deg, rgba(255, 173, 51, 0.06), transparent 45%),
    var(--sp-navy-850);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-lg);
  box-shadow: var(--sp-shadow);
  display: grid;
  gap: 0;
  margin-bottom: clamp(3rem, 8vw, 6rem);
  overflow: hidden;
}

.news-hero__content {
  align-self: center;
  padding: clamp(1.5rem, 5vw, 3.75rem);
}

.news-hero__title {
  font-size: clamp(2.2rem, 7vw, 4.8rem);
  max-width: 14ch;
}

.news-hero__title a {
  color: var(--sp-white);
  text-decoration: none;
}

.news-hero__title a:hover {
  color: var(--sp-orange);
}

.news-hero__excerpt {
  color: var(--sp-muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  max-width: 42rem;
}

.news-hero__media {
  background: var(--sp-navy-900);
  min-height: 15rem;
  order: -1;
  position: relative;
}

.news-hero__media::after {
  background: linear-gradient(180deg, transparent 50%, rgba(7, 19, 36, 0.55));
  content: '';
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.news-hero__media img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.story-meta {
  align-items: center;
  color: var(--sp-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.82rem;
  gap: 0.45rem 0.8rem;
  margin-bottom: 1.1rem;
}

.story-meta > * + *::before {
  color: var(--sp-orange);
  content: '•';
  margin-right: 0.8rem;
}

.story-meta a {
  color: inherit;
}

.section-heading {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}

.section-heading h2 {
  margin: 0;
}

.section-heading p {
  color: var(--sp-muted);
  margin: 0;
  max-width: 36rem;
}

.news-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1fr);
}

.news-card {
  background: var(--sp-navy-850);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.news-card:hover {
  border-color: rgba(255, 173, 51, 0.6);
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.22);
  transform: translateY(-0.2rem);
}

.news-card__media {
  aspect-ratio: 3 / 2;
  background: var(--sp-navy-900);
  overflow: hidden;
}

.news-card__media img {
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
  width: 100%;
}

.news-card:hover .news-card__media img {
  transform: scale(1.025);
}

.news-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.25rem;
}

.news-card__title {
  margin-bottom: 0.65rem;
}

.news-card__title a {
  color: var(--sp-white);
  text-decoration: none;
}

.news-card__title a:hover {
  color: var(--sp-orange);
}

.news-card__excerpt {
  color: var(--sp-muted);
  font-size: 0.95rem;
}

.news-card__link {
  align-items: center;
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 800;
  gap: 0.35rem;
  margin-top: auto;
  text-decoration: none;
}

.news-card__link::after {
  content: '→';
  transition: transform 150ms ease;
}

.news-card__link:hover::after {
  transform: translateX(0.2rem);
}

.archive-header,
.search-header {
  border-bottom: 1px solid var(--sp-border);
  margin-bottom: 2rem;
  padding-bottom: 2rem;
}

.archive-description,
.search-summary {
  color: var(--sp-muted);
  font-size: 1.1rem;
  max-width: 44rem;
}

.article-shell {
  margin-inline: auto;
  max-width: var(--sp-narrow);
}

.single-article__header {
  margin-bottom: 2rem;
}

.single-article__title {
  font-size: clamp(2.35rem, 8vw, 5rem);
}

.single-article__media {
  background: var(--sp-navy-850);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-lg);
  margin: 0 auto 2.5rem;
  max-width: var(--sp-content);
  overflow: hidden;
}

.single-article__media img {
  max-height: 44rem;
  object-fit: cover;
  width: 100%;
}

.entry-content {
  color: #dbe3ec;
  font-size: clamp(1.05rem, 2vw, 1.16rem);
}

.entry-content > * {
  margin-inline: auto;
  max-width: var(--sp-narrow);
}

.entry-content > .alignwide {
  max-width: var(--sp-content);
}

.entry-content > .alignfull {
  max-width: none;
  width: 100%;
}

.entry-content blockquote {
  border-left: 0.25rem solid var(--sp-orange);
  color: var(--sp-white);
  font-family: var(--sp-serif);
  font-size: 1.35em;
  margin-block: 2rem;
  padding-left: 1.25rem;
}

.entry-content code,
.entry-content pre {
  background: #020711;
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-sm);
}

.entry-content code {
  padding: 0.12em 0.35em;
}

.entry-content pre {
  overflow-x: auto;
  padding: 1rem;
}

.source-note {
  background: var(--sp-navy-850);
  border: 1px solid var(--sp-border);
  border-left: 0.25rem solid var(--sp-orange);
  border-radius: var(--sp-radius-sm);
  color: var(--sp-muted);
  font-size: 0.93rem;
  margin-top: 2.5rem;
  padding: 1rem 1.1rem;
}

.related-news {
  border-top: 1px solid var(--sp-border);
  margin-top: 4rem;
  padding-top: 3rem;
}

.pagination {
  margin-top: 3rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.page-numbers {
  align-items: center;
  border: 1px solid var(--sp-border);
  border-radius: 999px;
  color: var(--sp-white);
  display: inline-flex;
  font-weight: 800;
  min-height: 2.75rem;
  min-width: 2.75rem;
  justify-content: center;
  padding: 0.45rem 0.9rem;
  text-decoration: none;
}

.page-numbers.current,
.page-numbers:hover {
  background: var(--sp-orange);
  border-color: var(--sp-orange);
  color: var(--sp-navy-950);
}

.empty-state,
.error-404 {
  background: var(--sp-navy-850);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-lg);
  box-shadow: var(--sp-shadow);
  margin-inline: auto;
  max-width: 52rem;
  padding: clamp(1.5rem, 6vw, 4rem);
}

.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.25rem;
}

.search-form label {
  flex: 1 1 15rem;
}

.search-field {
  background: var(--sp-navy-950);
  border: 1px solid var(--sp-border);
  border-radius: 999px;
  color: var(--sp-white);
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  width: 100%;
}

.site-footer {
  background: #020711;
  border-top: 1px solid var(--sp-border);
  color: var(--sp-muted);
  margin-top: clamp(3rem, 8vw, 7rem);
  padding-block: 3rem;
}

.site-footer__inner {
  display: grid;
  gap: 1.5rem;
}

.site-footer__title {
  color: var(--sp-white);
  font-family: var(--sp-serif);
  font-size: 1.25rem;
  font-weight: 800;
}

.site-footer p {
  margin: 0;
  max-width: 42rem;
}

.site-footer__meta {
  border-top: 1px solid var(--sp-border);
  font-size: 0.85rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
}

.pattern-hero,
.pattern-callout {
  background: var(--sp-navy-850);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-lg);
  overflow: hidden;
}

.pattern-callout {
  border-left: 0.3rem solid var(--sp-orange);
  padding: clamp(1.5rem, 5vw, 3rem);
}

@media (min-width: 48rem) {
  body.admin-bar .site-header {
    top: 2rem;
  }

  .site-header__inner {
    flex-wrap: nowrap;
  }

  .menu-toggle,
  .has-js .menu-toggle {
    display: none;
  }

  .site-navigation {
    flex-basis: auto;
  }

  .primary-menu,
  .site-navigation ul,
  .has-js .site-navigation .primary-menu,
  .has-js .site-navigation > ul {
    align-items: center;
    display: flex;
    flex-direction: row;
    padding: 0;
  }

  .news-hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.95fr);
    min-height: 32rem;
  }

  .news-hero__media {
    min-height: 100%;
    order: 0;
  }

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

  .site-footer__inner {
    align-items: end;
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (min-width: 90rem) {
  .news-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-shell {
    max-width: calc(var(--sp-content) + 6rem);
    padding-inline: 3rem;
  }
}

@media (max-width: 37.5rem) {
  #wpadminbar {
    position: fixed;
  }

  body.admin-bar .site-header {
    top: 2.875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .related-news,
  .button,
  .news-card__link {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }

  h1,
  h2,
  h3,
  h4,
  p,
  .entry-content {
    color: #111;
  }

  a {
    color: #111;
  }
}

.pattern-hero .wp-block-cover {
  min-height: 30rem;
}
