/*
Theme Name: Pirlo Editorial
Description: A reusable WordPress theme based on the Pirlo layout, with a dark split hero, a match schedule and readable guides.
Version: 1.0.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: pirlo-editorial
*/

:root {
  --rr-paper: #fff;
  --rr-wash: #f7f6f3;
  --rr-ink: #21201e;
  --rr-muted: #625e57;
  --rr-rule: #e5e1d9;
  --rr-accent: #ae170f;
  --rr-field: #397b20;
  --rr-width: 74rem;
  --rr-reading: 70ch;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--rr-ink); background: var(--rr-paper); font: 1rem/1.65 system-ui, sans-serif; }
a { color: var(--rr-accent); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--rr-accent); outline-offset: 4px; }
img { max-width: 100%; height: auto; }
iframe { max-width: 100%; }
button, input { font: inherit; }
h1, h2, h3, h4 { line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5vw, 4.3rem); letter-spacing: -.055em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -.035em; }
p { margin-block: 0 1.15em; }
.rr-wrap { width: min(calc(100% - 2rem), var(--rr-width)); margin-inline: auto; }
.rr-reading { width: min(100%, var(--rr-reading)); margin-inline: auto; }
.rr-skip { position: absolute; top: .5rem; left: .5rem; transform: translateY(-200%); z-index: 10000; background: white; padding: .6rem 1rem; }
.rr-skip:focus { transform: none; }
.rr-header { border-bottom: 1px solid var(--rr-rule); }
.rr-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; min-height: 4.75rem; padding-block: .75rem; }
.rr-brand { color: var(--rr-accent); font-size: 1.35rem; font-weight: 850; letter-spacing: -.045em; text-decoration: none; }
.rr-brand .custom-logo { display: block; max-width: 12rem; max-height: 3rem; width: auto; object-fit: contain; }
.rr-nav ul, .rr-footer-menu { list-style: none; padding: 0; margin: 0; }
.rr-nav > ul, .rr-nav > div > ul, .rr-footer-menu { display: flex; flex-wrap: wrap; gap: .3rem 1.15rem; }
.rr-nav li { position: relative; }
.rr-nav a, .rr-footer-menu a { color: var(--rr-ink); text-decoration: none; font-weight: 650; font-size: .92rem; display: block; padding-block: .45rem; }
.rr-nav a:hover, .rr-nav .current-menu-item > a, .rr-footer-menu a:hover { color: var(--rr-accent); text-decoration: underline; }
.rr-nav .sub-menu, .rr-nav .children { display: none; position: absolute; min-width: 12rem; z-index: 5; background: var(--rr-paper); border: 1px solid var(--rr-rule); padding: .45rem .8rem; }
.rr-nav li:hover > ul, .rr-nav li:focus-within > ul { display: block; }
.rr-nav li li > ul { left: 100%; top: 0; }
.rr-tools { display: flex; gap: .6rem; align-items: center; }
.rr-search summary { cursor: pointer; font-weight: 650; font-size: .92rem; }
.rr-search { position: relative; }
.rr-search form { position: absolute; z-index: 10; right: 0; top: 2rem; width: min(19rem, calc(100vw - 2rem)); padding: 1rem; background: var(--rr-paper); border: 1px solid var(--rr-rule); }
.rr-search form label, .rr-search form input { width: 100%; }
.rr-search input, .search-field { padding: .5rem .65rem; border: 1px solid var(--rr-muted); border-radius: .3rem; }
.rr-hero { background: radial-gradient(ellipse at 100% 0%, #481e1a, transparent 45%), #181817; color: white; border-bottom: 4px solid #57a52d; }
.rr-hero-inner { padding-block: clamp(2rem, 5vw, 4.5rem); }
.rr-hero-inner:has(.rr-hero-image) { display: grid; align-items: center; gap: 2rem; grid-template-columns: 1.2fr 1fr; }
.rr-hero h1 { max-width: 18ch; margin: .45rem 0 1.1rem; font-weight: 850; }
.rr-hero-copy { color: #e7e3dc; max-width: 50ch; font-size: clamp(1rem, 2vw, 1.15rem); }
.rr-eyebrow { color: var(--rr-accent); font-size: .78rem; letter-spacing: .12em; font-weight: 800; text-transform: uppercase; }
.rr-hero .rr-eyebrow { color: #b4e794; }
.rr-hero-image { width: 100%; height: auto; object-fit: contain; }
.rr-hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.rr-hero .rr-button { color: #a62218; background: white; }
.rr-hero .rr-button-outline { color: white; background: transparent; border-color: #a19c96; }
.rr-schedule { margin-block: 1.5rem 0; border: 1px solid var(--rr-rule); border-radius: .65rem; overflow: hidden; }
.rr-schedule-heading { padding: .85rem 1.1rem; color: white; background: var(--rr-field); }
.rr-schedule-heading h2 { margin: 0; font-size: 1.4rem; }
.rr-schedule-body { padding: 1rem; }
.rr-schedule-body .adh-agenda { max-width: none; }
.rr-button, .rr-menu-toggle, .search-submit, .comment-form .submit { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: .55rem .95rem; color: white; background: var(--rr-accent); border: 1px solid transparent; border-radius: .35rem; font-weight: 700; text-decoration: none; cursor: pointer; }
.rr-button:hover { color: white; text-decoration: underline; }
.rr-menu-toggle { display: none; }
.rr-section { padding-block: clamp(2rem, 5vw, 4rem); }
.rr-section-title { margin: 0 0 1.5rem; }
.rr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2rem); }
.rr-card { min-width: 0; border-top: 1px solid var(--rr-rule); padding-top: 1rem; }
.rr-card img { display: block; width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: .4rem; }
.rr-card h2, .rr-card h3 { font-size: 1.35rem; margin: .55rem 0; overflow-wrap: anywhere; }
.rr-card h2 a, .rr-card h3 a { color: var(--rr-ink); text-decoration: none; }
.rr-card h2 a:hover, .rr-card h3 a:hover { color: var(--rr-accent); text-decoration: underline; }
.rr-meta, .rr-card p { color: var(--rr-muted); font-size: .92rem; }
.rr-meta { margin-block: .65rem .3rem; }
.rr-entry-title { margin: 0 0 .6rem; }
.rr-entry { overflow-wrap: anywhere; }
.rr-entry h2 { margin-top: 1.8em; }
.rr-entry h3 { margin-top: 1.6em; }
.rr-guide-index { padding: 1rem 1.35rem; border: 1px solid var(--rr-rule); border-radius: .45rem; background: var(--rr-wash); }
.rr-guide-index h2 { margin-top: 0; }
.rr-entry blockquote { margin-inline: 0; padding-inline-start: 1.15rem; border-inline-start: 3px solid var(--rr-accent); }
.rr-entry pre { overflow: auto; padding: 1rem; background: var(--rr-wash); }
.rr-entry .wp-block-table { overflow-x: auto; }
.rr-entry .alignwide { max-width: min(calc(100vw - 2rem), var(--rr-width)); width: auto; }
.rr-entry .alignleft { float: left; margin: 0 1rem 1rem 0; }
.rr-entry .alignright { float: right; margin: 0 0 1rem 1rem; }
.rr-entry .aligncenter { display: block; margin-inline: auto; }
.rr-entry .wp-caption { max-width: 100%; }
.rr-entry::after { content: ''; display: block; clear: both; }
.rr-featured { margin-block: 1.5rem; }
.rr-featured img { display: block; border-radius: .45rem; }
.rr-pagination { margin-top: 2rem; }
.rr-pagination .nav-links { display: flex; flex-wrap: wrap; gap: .65rem; }
.rr-pagination .page-numbers { padding: .3rem .65rem; border: 1px solid var(--rr-rule); border-radius: .3rem; }
.rr-pagination .current { background: var(--rr-wash); font-weight: 800; }
.rr-footer { border-top: 1px solid var(--rr-rule); background: var(--rr-wash); }
.rr-footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 1.5rem; }
.rr-footer small { color: var(--rr-muted); }
.rr-footer small a { color: inherit; }
.rr-comments { margin-top: 2.5rem; border-top: 1px solid var(--rr-rule); padding-top: 1.25rem; }
.rr-comments textarea { width: 100%; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.rr-existing-home { min-width: 0; }
.rr-quick-links { display: flex; flex-wrap: wrap; gap: .35rem 1rem; padding-block: .45rem; }
.rr-quick-links a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 700; font-size: .9rem; }
.rr-existing-home .pt-hero { margin-top: 0; }
.rr-existing-home .pt-wrap { width: min(calc(100% - 2rem), var(--rr-width)); margin-inline: auto; }
.rr-existing-home .pt-hero h1 { text-wrap: balance; }
.rr-existing-home .pt-hero { padding-block: clamp(1.5rem, 3.5vw, 3.5rem); }
.rr-existing-home .pt-hero-grid { gap: clamp(1rem, 3vw, 2.5rem); }
.rr-existing-home .pt-lead { max-width: 50ch; }
.rr-existing-home .pt-today { margin-top: 1.25rem; }
.rr-existing-home .pt-today-head { background: var(--rr-field); }
.rr-existing-home .pt-wrap > section { scroll-margin-top: 1.25rem; }
.rr-existing-home .pt-wrap > section > p { max-width: var(--rr-reading); }
.rr-existing-home .pt-toc { background: var(--rr-wash); border: 1px solid var(--rr-rule); border-radius: .45rem; }
.rr-existing-home .pt-toc a { background: transparent; text-decoration: underline; text-underline-offset: .2em; }
.rr-existing-home .pt-toc a:hover { color: white !important; }
.rr-existing-home .pt-tile, .rr-existing-home .pt-card { box-shadow: none; }
@media (max-width: 700px) {
  .rr-existing-home .pt-hero h1 { font-size: clamp(1.7rem, 7vw, 2.6rem); }
  .rr-existing-home .pt-lead { font-size: 1rem; line-height: 1.55; }
  .rr-existing-home .pt-hero-img { max-width: 15rem; }
  .rr-existing-home .pt-hero-img img { max-height: 8rem; object-fit: contain; }
  .rr-existing-home .pt-cta { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: .5rem; margin-bottom: .95rem; }
  .rr-existing-home .pt-cta .pt-btn { padding: .65rem .4rem; font-size: .83rem; line-height: 1.3; text-align: center; }
  .rr-existing-home .pt-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; }
  .rr-existing-home .pt-chips li { font-size: .75rem; padding: .45rem .5rem; border-radius: .4rem; }
  .rr-existing-home .pt-chips span { font-size: .58rem; }
  .rr-existing-home .pt-wrap { padding-inline: 0; }
}
@media (max-width: 880px) {
  .rr-header-inner { flex-wrap: wrap; }
  .rr-nav { flex: 1 0 100%; order: 3; }
  .rr-menu-toggle { display: inline-flex; color: var(--rr-ink); background: var(--rr-wash); border-color: var(--rr-rule); }
  .rr-nav[data-collapsed="true"] { display: none; }
  .rr-nav > ul, .rr-nav > div > ul { display: grid; gap: 0; }
  .rr-nav .sub-menu, .rr-nav .children { display: block; position: static; border: 0; padding-block: 0; }
  .rr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .rr-quick-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .65rem; }
  .rr-quick-links a { border-bottom: 1px solid var(--rr-rule); }
  .rr-grid, .rr-hero-inner:has(.rr-hero-image) { grid-template-columns: 1fr; }
  .rr-hero-image { max-height: 13rem; }
}
@media (prefers-reduced-motion: reduce) {
  .rr-existing-home .pt-badge-live, .rr-existing-home .pt-badge-live::before,
  .rr-existing-home .pt-watch-live { animation: none !important; }
}

