/*
Theme Name: Direttagoal
Description: Tema leggero di direttagoal.it: header, footer e pagine news. Il livescore è nel plugin.
Version: 1.0.0
Requires PHP: 7.4
Text Domain: direttagoal
*/
:root {
  --dgt-primary: #123456;
  --dgt-primary-2: #15406a;
  --dgt-accent: #ff8040;
  --dgt-ink: #101828;
  --dgt-muted: #667085;
  --dgt-line: #e3e7ee;
  --dgt-bg: #f2f4f7;
  --dgt-footer: #222;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--dgt-bg); color: var(--dgt-ink); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
img { max-width: 100%; height: auto; }
a { color: var(--dgt-primary-2); }
.screen-reader-text, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 8px 12px; background: #fff; border-radius: 6px; }
:focus-visible { outline: 2px solid var(--dgt-accent); outline-offset: 2px; }

/* header */
.dgt-header { background: var(--dgt-primary); color: #fff; }
.dgt-header__in { display: flex; align-items: stretch; gap: 16px; max-width: 1280px; margin: 0 auto; padding: 0 16px; min-height: 60px; }
.dgt-logo { display: flex; align-items: center; flex: none; line-height: 0; }
.dgt-logo img { width: 150px; height: auto; }
.dgt-nav { display: flex; margin-left: auto; }
.dgt-nav ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.dgt-nav li { display: flex; }
.dgt-nav a { display: flex; align-items: center; padding: 0 14px; color: rgba(255, 255, 255, .82); font-size: 14px; font-weight: 700; letter-spacing: .04em; text-decoration: none; text-transform: uppercase; box-shadow: inset 0 -3px 0 transparent; }
.dgt-nav a:hover { color: #fff; }
.dgt-nav .current-menu-item > a, .dgt-nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -3px 0 var(--dgt-accent); }
.dgt-burger { display: none; align-self: center; margin-left: auto; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; background: none; color: #fff; cursor: pointer; }
.dgt-burger:hover { background: var(--dgt-primary-2); }
.dgt-burger svg { display: block; margin: auto; }

/* contenuti news */
.dgt-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; max-width: 1120px; margin: 0 auto; padding: 20px 16px 40px; }
.dgt-wrap--full { grid-template-columns: minmax(0, 1fr); max-width: 820px; }
.dgt-card { background: #fff; border-radius: 10px; padding: 24px; }
.dgt-title { margin: 0 0 8px; font-size: 30px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.dgt-meta { margin: 0 0 16px; font-size: 13px; color: var(--dgt-muted); }
.dgt-hero { display: block; width: 100%; margin: 0 0 20px; border-radius: 8px; aspect-ratio: 3 / 2; object-fit: cover; }
.dgt-content { font-size: 17px; line-height: 1.7; overflow-wrap: break-word; }
.dgt-content > * { max-width: 70ch; }
.dgt-content h2 { margin: 1.6em 0 .5em; font-size: 22px; line-height: 1.3; }
.dgt-content h3 { margin: 1.4em 0 .4em; font-size: 19px; }
.dgt-content figure { margin: 1.5em 0; max-width: 100%; }
.dgt-content iframe { max-width: 100%; }
.dgt-content blockquote { margin: 1.5em 0; padding: 0 24px; color: var(--dgt-muted); font-size: 19px; font-style: italic; }
.dgt-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 24px 0 0; padding: 0; list-style: none; }
.dgt-tags a { display: block; padding: 4px 10px; border-radius: 999px; background: var(--dgt-bg); font-size: 13px; text-decoration: none; }

.dgt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.dgt-post { display: flex; flex-direction: column; overflow: hidden; background: #fff; border-radius: 10px; color: inherit; text-decoration: none; }
.dgt-post img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--dgt-line); }
.dgt-post__body { padding: 14px 16px 16px; }
.dgt-post__title { margin: 0 0 6px; font-size: 17px; font-weight: 700; line-height: 1.3; }
.dgt-post:hover .dgt-post__title { color: var(--dgt-primary-2); }
.dgt-post time { font-size: 12px; color: var(--dgt-muted); }
.dgt-archive-title { margin: 0 0 16px; font-size: 24px; font-weight: 800; }
.dgt-pager { display: flex; justify-content: center; gap: 6px; margin-top: 24px; }
.dgt-pager .page-numbers { padding: 8px 14px; border-radius: 8px; background: #fff; font-weight: 600; text-decoration: none; }
.dgt-pager .current { background: var(--dgt-primary); color: #fff; }

.dgt-aside { display: flex; flex-direction: column; gap: 16px; }
.dgt-aside__title { margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--dgt-accent); font-size: 18px; font-weight: 800; }
.dgt-recent { margin: 0; padding: 0; list-style: none; }
.dgt-recent a { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: center; padding: 8px 0; color: inherit; font-size: 14px; font-weight: 600; line-height: 1.35; text-decoration: none; }
.dgt-recent a:hover { color: var(--dgt-primary-2); }
.dgt-recent img { width: 84px; height: 56px; border-radius: 6px; object-fit: cover; background: var(--dgt-line); }
.dgt-ad { min-height: 250px; }

/* footer */
.dgt-footer { background: var(--dgt-footer); color: #fff; font-size: 14px; text-align: center; }
.dgt-footer__in { max-width: 1120px; margin: 0 auto; padding: 28px 16px; }
.dgt-footer a { color: #fff; }
.dgt-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 16px; }
.dgt-footer p { margin: 0 0 8px; color: #d0d5dd; }
.dgt-footer__adv { margin-top: 18px; font-size: 12px; color: #98a2b3; }
.dgt-footer__adv img { display: block; width: 90px; height: auto; margin: 0 auto 6px; }

@media (max-width: 900px) {
  .dgt-wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 782px) {
  .dgt-header__in { min-height: 56px; }
  .dgt-logo img { width: 110px; }
  .dgt-burger { display: block; }
  .dgt-nav { display: none; position: absolute; top: 56px; left: 0; right: 0; z-index: 50; margin: 0; padding: 8px; background: var(--dgt-primary); box-shadow: 0 12px 24px rgba(0, 0, 0, .2); }
  .dgt-nav.is-open { display: block; }
  .dgt-nav ul { flex-direction: column; }
  .dgt-nav li { display: block; }
  .dgt-nav a { padding: 14px 16px; box-shadow: none; }
  .dgt-header { position: relative; }
  .dgt-card { padding: 16px; }
  .dgt-title { font-size: 24px; }
  .dgt-wrap { padding: 12px 8px 32px; }
}
