/*
Theme Name: Brutalismo Sovietico - Partito Comunista
Theme URI: https://ilpartitocomunista.it/
Author: Ufficio Agitprop
Description: Tema custom brutalista per Il Partito Comunista.
Version: 0.1.7
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: pc-brutalist
*/

:root {
  --red: #bd171b;
  --black: #101010;
  --white: #fbfbfb;
  --paper: #f5f5f5;
  --muted: #696969;
  --border: 2px solid var(--black);
  --shadow: 6px 6px 0 var(--black);
  --max: 1216px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--black);
  font-family: "Arial Narrow", Impact, Haettenschweiler, Arial, sans-serif;
  letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

.article-body a:not(.btn):not(.card),
.body-copy a:not(.btn):not(.card),
.panel p a:not(.btn):not(.card),
.wp-content a:not(.btn):not(.card),
.entry-content a:not(.btn):not(.card) {
  color: var(--red) !important;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.article-body a:not(.btn):not(.card):hover,
.body-copy a:not(.btn):not(.card):hover,
.panel p a:not(.btn):not(.card):hover,
.wp-content a:not(.btn):not(.card):hover,
.entry-content a:not(.btn):not(.card):hover {
  color: var(--black) !important;
}

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.newsbar {
  background: #050505;
  color: var(--white);
  border-bottom: var(--border);
  font-family: "Courier New", monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.newsbar-inner {
  display: flex;
  align-items: center;
  height: 40px;
  overflow: hidden;
  white-space: nowrap;
}

.newsbar-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.newsbar-links a {
  color: var(--white);
}

.newsbar-links a:hover {
  color: var(--red);
}

.news-label {
  align-self: stretch;
  display: grid;
  place-items: center;
  margin-right: 18px;
  padding: 0 12px;
  background: var(--red);
  font-family: Impact, sans-serif;
  letter-spacing: 1px;
}

.site-header {
  background: var(--white);
  border-bottom: var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 900;
  text-transform: uppercase;
}

.logo {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  background: var(--white);
  overflow: hidden;
}

.logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.main-nav,
.main-nav ul {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
}

.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a { color: var(--red); }

.main-nav a.nav-emphasis,
.site-header a.nav-emphasis,
header a.nav-emphasis,
nav a.nav-emphasis,
.main-nav a[href*="#iscrivitiNewsletter"],
.main-nav a[href*="#newsletter"],
.main-nav a[href*="newsletter"],
.main-nav a[href*="#elezionitrasparenti"],
.main-nav a[href*="elezioni-trasparenti"],
.site-header a[href*="#iscrivitiNewsletter"],
.site-header a[href*="#newsletter"],
.site-header a[href*="newsletter"],
.site-header a[href*="#elezionitrasparenti"],
.site-header a[href*="elezioni-trasparenti"],
header nav a[href*="#iscrivitiNewsletter"],
header nav a[href*="#newsletter"],
header nav a[href*="newsletter"],
header nav a[href*="#elezionitrasparenti"],
header nav a[href*="elezioni-trasparenti"] {
  color: var(--red) !important;
}

.main-nav a.nav-emphasis:hover,
.site-header a.nav-emphasis:hover,
header a.nav-emphasis:hover,
nav a.nav-emphasis:hover,
.main-nav a[href*="#iscrivitiNewsletter"]:hover,
.main-nav a[href*="#newsletter"]:hover,
.main-nav a[href*="newsletter"]:hover,
.main-nav a[href*="#elezionitrasparenti"]:hover,
.main-nav a[href*="elezioni-trasparenti"]:hover,
.site-header a[href*="#iscrivitiNewsletter"]:hover,
.site-header a[href*="#newsletter"]:hover,
.site-header a[href*="newsletter"]:hover,
.site-header a[href*="#elezionitrasparenti"]:hover,
.site-header a[href*="elezioni-trasparenti"]:hover,
header nav a[href*="#iscrivitiNewsletter"]:hover,
header nav a[href*="#newsletter"]:hover,
header nav a[href*="newsletter"]:hover,
header nav a[href*="#elezionitrasparenti"]:hover,
header nav a[href*="elezioni-trasparenti"]:hover {
  color: var(--black) !important;
}

.main-nav li {
  position: relative;
}

.main-nav > div > ul > li,
.main-nav > ul > li { padding: 25px 0; }

.main-nav .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 20;
  display: none;
  min-width: 260px;
  background: var(--white);
  border: var(--border);
  box-shadow: var(--shadow);
}

.main-nav li:hover > .sub-menu,
.main-nav li:focus-within > .sub-menu { display: block; }

.main-nav .sub-menu a {
  display: block;
  padding: 14px 16px;
  border-bottom: var(--border);
  color: var(--black);
  line-height: 1.05;
}

.main-nav .sub-menu li:last-child a { border-bottom: 0; }

.mobile-menu-toggle {
  display: none;
  min-height: 42px;
  padding: 0 16px;
  border: var(--border);
  background: var(--black);
  color: var(--white);
  font: 900 16px Impact, "Arial Narrow", sans-serif;
  text-transform: uppercase;
}

.hero {
  background: var(--red);
  color: var(--white);
  border-bottom: var(--border);
  box-shadow: inset 0 4px 0 rgba(0, 0, 0, 0.28);
}

.hero-inner {
  display: grid;
  align-content: center;
  min-height: 420px;
  padding: 70px 0;
}

.hero.compact .hero-inner {
  min-height: 260px;
  padding: 52px 0;
}

.kicker {
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.86);
  font-family: "Courier New", monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 7px;
  text-transform: uppercase;
}

h1, h2, h3, p { margin: 0; }

h1 {
  max-width: 760px;
  font-size: clamp(64px, 8vw, 124px);
  line-height: 0.86;
  text-transform: uppercase;
}

.lead {
  max-width: 760px;
  margin-top: 24px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
  line-height: 1.38;
  color: rgba(255, 255, 255, 0.92);
}

.hero-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 34px;
}

.btn,
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 54px;
  padding: 0 24px;
  border: var(--border);
  background: var(--white);
  box-shadow: var(--shadow);
  color: var(--black);
  font-size: 17px;
  font-weight: 900;
  text-transform: uppercase;
}

.btn.red,
.page-numbers.current { background: var(--red); color: var(--white); }
.btn.black { background: var(--black); color: var(--white); }

.section { padding: 60px 0; }
.section.red { background: var(--red); color: var(--white); border-top: var(--border); border-bottom: var(--border); }
.section.black { background: var(--black); color: var(--white); border-top: var(--border); border-bottom: var(--border); }
.section.white { background: var(--white); border-top: var(--border); border-bottom: var(--border); }

.section-title {
  margin-bottom: 30px;
  font-size: clamp(40px, 5vw, 70px);
  line-height: .86;
  text-transform: uppercase;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}

.card,
.panel,
.ticket {
  background: var(--white);
  border: var(--border);
  box-shadow: var(--shadow);
  color: var(--black);
}

.card-media {
  display: grid;
  min-height: 150px;
  place-items: center;
  background: var(--red);
  border-bottom: var(--border);
  color: var(--white);
  font-size: 22px;
  font-weight: 900;
  text-transform: uppercase;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-body,
.panel { padding: 24px; }

.tag {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 6px 8px;
  background: var(--black);
  color: var(--white);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.card h3,
.panel h3 {
  font-size: 32px;
  line-height: .94;
  text-transform: uppercase;
}

.card p,
.panel p,
.body-copy,
.notice {
  margin-top: 14px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.36;
  font-weight: 700;
}

.pillars {
  background: #050505;
  color: var(--white);
  border-bottom: var(--border);
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: 142px;
}

.pillar {
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 22px;
  text-align: center;
}

.pillar-icon { color: var(--red); font-size: 26px; }
.pillar strong { font-size: 30px; text-transform: uppercase; }

.split {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 44px;
  align-items: start;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-grid.three { grid-template-columns: repeat(3, 1fr); }
.field.full { grid-column: 1 / -1; }

label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

input, select, textarea {
  width: 100%;
  min-height: 52px;
  border: var(--border);
  background: var(--white);
  padding: 0 12px;
  color: var(--black);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-weight: 700;
}

textarea {
  min-height: 122px;
  padding-top: 12px;
  resize: vertical;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.choice-grid.three { grid-template-columns: repeat(3, 1fr); }

.choice,
.submit,
.wpforms-submit {
  min-height: 62px !important;
  border: var(--border) !important;
  background: var(--white) !important;
  color: var(--black) !important;
  font: 900 18px Impact, "Arial Narrow", sans-serif !important;
  text-transform: uppercase !important;
}

.choice.active,
.submit,
.wpforms-submit {
  background: var(--red) !important;
  color: var(--white) !important;
}

.submit,
.wpforms-submit {
  width: 100%;
  margin-top: 26px;
  box-shadow: var(--shadow);
  font-size: 22px !important;
}

.notice {
  padding: 16px;
  background: var(--white);
  border: var(--border);
  box-shadow: var(--shadow);
  color: var(--black);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start !important;
  gap: 38px;
}

.single .article-layout,
.single-post .article-layout {
  align-items: flex-start !important;
}

.article-body {
  background: var(--white);
  border: var(--border);
  box-shadow: var(--shadow);
  padding: 34px;
}

.featured-image {
  display: grid;
  min-height: 380px;
  place-items: center;
  margin-bottom: 28px;
  background: var(--red);
  border: var(--border);
  color: var(--white);
  overflow: hidden;
}

.featured-image img {
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
}

.article-body p,
.entry-content p {
  margin: 0 0 22px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 19px;
  line-height: 1.55;
}

.side-list {
  display: grid !important;
  grid-auto-rows: max-content !important;
  align-self: start !important;
  align-content: start !important;
  gap: 16px;
  height: auto !important;
  min-height: 0 !important;
}

.single .article-layout > aside,
.single-post .article-layout > aside {
  display: grid !important;
  grid-auto-rows: max-content !important;
  align-self: start !important;
  align-content: start !important;
  height: auto !important;
  min-height: 0 !important;
}

.mini {
  flex: 0 0 auto !important;
  align-self: start !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 16px;
  background: var(--white);
  border: var(--border);
  box-shadow: var(--shadow);
}

.single .article-layout > aside > *,
.single-post .article-layout > aside > * {
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: 0 !important;
}

.mini strong {
  display: block;
  font-size: 22px;
  line-height: .95;
  text-transform: uppercase;
}

.election-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.election-links a {
  display: block;
  padding: 13px 0;
  border-bottom: var(--border);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.election-links a:hover { color: var(--red); }

.site-footer {
  background: var(--black);
  color: var(--white);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr 1.2fr 0.85fr;
  gap: 28px;
  padding: 44px 0;
}

.footer-widget {
  min-width: 0;
}

.footer-title,
.footer-widget h3,
.footer-widget .widget-title {
  margin: 0 0 16px;
  color: var(--white);
  font-family: "Arial Narrow", Impact, Haettenschweiler, Arial, sans-serif;
  font-size: 26px;
  line-height: .9;
  text-transform: uppercase;
}

.footer-widget p,
.footer-widget li,
.footer-widget a {
  color: rgba(255, 255, 255, .82);
  font-size: 15px;
  line-height: 1.35;
}

.footer-widget ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-widget a:hover {
  color: var(--red);
}

.footer-widget a.footer-email,
.footer-widget a[href^="mailto:nazionale@ilpartitocomunista.it"] {
  color: var(--red) !important;
}

.footer-widget a.footer-email:hover,
.footer-widget a[href^="mailto:nazionale@ilpartitocomunista.it"]:hover {
  color: var(--white) !important;
}

.footer-posts li {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .22);
}

.footer-posts a,
.footer-widget .widget_recent_entries li > a,
.footer-widget .wp-block-latest-posts li > a,
.footer-widget .wp-block-latest-posts__post-title {
  display: block !important;
  margin-bottom: 6px;
}

.footer-posts span,
.footer-widget .post-date,
.footer-widget time,
.footer-widget .entry-date,
.footer-widget .wp-block-latest-posts__post-date {
  display: block !important;
  clear: both !important;
  margin-top: 6px;
  color: rgba(255, 255, 255, .55);
  font-size: 12px;
  line-height: 1.2;
  text-transform: uppercase;
}

.footer-widget .widget_recent_entries li,
.footer-widget .wp-block-latest-posts li {
  display: block !important;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .22);
}

.footer-bottom {
  border-top: 2px solid rgba(255, 255, 255, .2);
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  color: rgba(255, 255, 255, .72);
  font-size: 14px;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 16px;
}

.footer-legal-name {
  margin-right: 8px;
  color: rgba(255, 255, 255, .72);
}

.footer-legal a {
  color: var(--red) !important;
  font-weight: 900;
}

.footer-legal a:hover {
  color: var(--white) !important;
}

@media (max-width: 1050px) {
  .main-nav,
  .main-nav ul { gap: 14px; font-size: 14px; }
}

@media (max-width: 920px) {
  .nav { align-items: flex-start; flex-direction: column; padding: 14px 0; }
  .mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border: var(--border);
    background: var(--white);
    box-shadow: var(--shadow);
  }
  .nav.menu-open .main-nav { display: flex; }
  .main-nav > div > ul,
  .main-nav > ul {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .main-nav > div > ul > li,
  .main-nav > ul > li { padding: 0; }
  .main-nav a {
    display: block;
    padding: 15px 16px;
    border-bottom: var(--border);
  }
  .main-nav .sub-menu {
    position: static;
    display: none;
    min-width: 0;
    margin: 0;
    border: 0;
    border-bottom: var(--border);
    box-shadow: none;
  }
  .main-nav li:hover > .sub-menu,
  .main-nav li:focus-within > .sub-menu { display: none; }
  .main-nav li.submenu-open > .sub-menu { display: block; }
  .main-nav .sub-menu a {
    padding-left: 32px;
    background: var(--paper);
  }
  .grid-3,
  .grid-2,
  .footer-grid,
  .split,
  .article-layout,
  .election-links,
  .choice-grid,
  .choice-grid.three,
  .form-grid,
  .form-grid.three { grid-template-columns: 1fr; }
  .pillar-grid { grid-template-columns: 1fr; }
  .footer-bottom-inner { flex-direction: column; }
  .featured-image,
  .featured-image img { min-height: 260px; }
}

@media (max-width: 640px) {
  .wrap { width: min(var(--max), calc(100% - 24px)); }
  h1 { font-size: 58px; }
}
