/*
Theme Name: ATA Clean
Theme URI: https://auto-truck-accessories.com/
Author: Auto Truck Accessories
Description: Responsive editorial theme for truck accessory reviews and fitment guides.
Version: 1.0.0
Text Domain: ata-clean
*/

:root {
  --ata-black: #111315;
  --ata-ink: #20252a;
  --ata-gray: #66717b;
  --ata-line: #dfe4e8;
  --ata-paper: #ffffff;
  --ata-soft: #f4f6f7;
  --ata-red: #c62828;
  --ata-red-dark: #931d1d;
  --ata-yellow: #f2bd22;
  --ata-max: 1240px;
  --ata-reading: 820px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ata-ink);
  background: var(--ata-paper);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1.68;
}

a {
  color: var(--ata-red-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover,
a:focus-visible {
  color: var(--ata-red);
}

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

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

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 9999;
  width: auto;
  height: auto;
  padding: 10px 14px;
  clip: auto;
  color: #fff;
  background: var(--ata-black);
}

.site-header {
  position: relative;
  z-index: 50;
  color: #fff;
  background: var(--ata-black);
  border-bottom: 4px solid var(--ata-red);
}

.header-inner {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 28px;
  align-items: center;
  width: min(100% - 40px, var(--ata-max));
  min-height: 88px;
  margin: 0 auto;
}

.site-branding {
  display: inline-flex;
  gap: 13px;
  align-items: center;
  color: #fff;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: #fff;
  background: var(--ata-red);
  border: 3px solid #fff;
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-name {
  font-size: 21px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-tagline {
  color: #c7cdd2;
  font-size: 12px;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: uppercase;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  color: #fff;
  background: transparent;
  border: 1px solid #4d555c;
  border-radius: 4px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: currentColor;
}

.primary-menu,
.footer-menu {
  display: flex;
  gap: 21px;
  align-items: center;
  padding: 0;
  margin: 0;
  list-style: none;
}

.primary-menu a {
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: uppercase;
}

.primary-menu a:hover,
.primary-menu a:focus-visible {
  color: var(--ata-yellow);
}

.site-main {
  min-height: 60vh;
}

.home-hero {
  position: relative;
  min-height: 470px;
  color: #fff;
  background-color: #24292e;
  background-position: center;
  background-size: cover;
}

.home-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(8, 10, 12, 0.66);
}

.home-hero-inner {
  position: relative;
  display: grid;
  align-content: center;
  width: min(100% - 40px, var(--ata-max));
  min-height: 470px;
  margin: 0 auto;
  padding: 58px 0 88px;
}

.home-hero h1 {
  max-width: 800px;
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.01;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-hero p {
  max-width: 720px;
  margin: 0;
  color: #eef1f3;
  font-size: 21px;
}

.section-shell,
.archive-shell {
  width: min(100% - 40px, var(--ata-max));
  margin: 0 auto;
  padding: 58px 0;
}

.section-header {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-header h2,
.archive-title {
  margin: 0;
  font-size: 35px;
  line-height: 1.15;
  letter-spacing: 0;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.post-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--ata-line);
  border-radius: 6px;
}

.post-card-media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #dde2e5;
}

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

.post-card-body {
  padding: 22px;
}

.post-card-meta,
.entry-meta {
  color: var(--ata-gray);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.post-card h2 {
  margin: 9px 0 10px;
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: 0;
}

.post-card h2 a {
  color: var(--ata-ink);
  text-decoration: none;
}

.post-card p {
  margin: 0;
  color: #4e5962;
  font-size: 15px;
}

.topic-band {
  color: #fff;
  background: var(--ata-black);
  border-top: 4px solid var(--ata-yellow);
}

.topic-band .section-shell {
  padding-block: 42px;
}

.topic-links {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.topic-links a {
  display: grid;
  min-height: 74px;
  padding: 15px;
  place-items: center;
  color: #fff;
  border: 1px solid #444c53;
  text-align: center;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

.topic-links a:hover,
.topic-links a:focus-visible {
  color: var(--ata-black);
  background: var(--ata-yellow);
  border-color: var(--ata-yellow);
}

.entry-shell {
  width: min(100% - 40px, var(--ata-reading));
  margin: 0 auto;
  padding: 54px 0 70px;
}

.entry-header {
  margin-bottom: 28px;
}

.entry-header h1 {
  margin: 10px 0 16px;
  font-size: clamp(38px, 6vw, 58px);
  line-height: 1.06;
  letter-spacing: 0;
}

.entry-hero {
  width: min(100% - 40px, 1120px);
  margin: 0 auto;
}

.entry-hero img {
  width: 100%;
  max-height: 640px;
  object-fit: cover;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  line-height: 1.18;
  letter-spacing: 0;
}

.entry-content h2 {
  margin: 48px 0 16px;
  padding-left: 14px;
  border-left: 5px solid var(--ata-red);
  font-size: 32px;
}

.entry-content h3 {
  margin: 34px 0 12px;
  font-size: 25px;
}

.entry-content p,
.entry-content ul,
.entry-content ol {
  margin-block: 0 21px;
}

.entry-content figure {
  margin: 34px 0;
}

.entry-content figcaption {
  margin-top: 8px;
  color: var(--ata-gray);
  font-size: 13px;
}

.entry-content img {
  width: auto;
  max-width: 100%;
  border-radius: 4px;
}

.entry-content blockquote {
  padding: 20px 24px;
  margin: 30px 0;
  background: #f7f8f9;
  border-left: 5px solid var(--ata-yellow);
}

.entry-content .wp-block-table,
.entry-content .table-scroll,
.entry-content > table {
  width: 100%;
  margin: 28px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.entry-content table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: #fff;
  font-size: 15px;
}

.entry-content th,
.entry-content td {
  padding: 12px;
  border: 1px solid #cfd6db;
  text-align: left;
  vertical-align: top;
}

.entry-content th {
  color: #fff;
  background: var(--ata-red-dark);
}

.ata-button,
.wp-block-button__link {
  display: inline-flex;
  min-height: 42px;
  padding: 10px 16px;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--ata-red);
  border: 0;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
}

.ata-button:hover,
.ata-button:focus-visible,
.wp-block-button__link:hover,
.wp-block-button__link:focus-visible {
  color: #111;
  background: var(--ata-yellow);
}

.pagination {
  margin-top: 34px;
}

.nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.page-numbers {
  display: grid;
  min-width: 42px;
  min-height: 42px;
  padding: 8px;
  place-items: center;
  color: var(--ata-ink);
  background: #fff;
  border: 1px solid var(--ata-line);
  text-decoration: none;
}

.page-numbers.current {
  color: #fff;
  background: var(--ata-red);
  border-color: var(--ata-red);
}

.site-footer {
  color: #d8dde1;
  background: var(--ata-black);
  border-top: 4px solid var(--ata-red);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  width: min(100% - 40px, var(--ata-max));
  margin: 0 auto;
  padding: 34px 0;
}

.footer-menu a {
  color: #fff;
  font-size: 13px;
  text-decoration: none;
}

.footer-note {
  margin: 4px 0 0;
  color: #9fa8af;
  font-size: 12px;
}

@media (max-width: 980px) {
  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    grid-column: 1 / -1;
    display: none;
    padding-bottom: 20px;
  }

  .site-nav.is-open {
    display: block;
  }

  .primary-menu {
    display: grid;
    gap: 0;
  }

  .primary-menu a {
    display: block;
    padding: 12px 0;
    border-top: 1px solid #343a40;
  }

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

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

@media (max-width: 680px) {
  body {
    font-size: 16px;
  }

  .header-inner,
  .section-shell,
  .archive-shell,
  .home-hero-inner,
  .entry-shell,
  .entry-hero,
  .footer-inner {
    width: min(100% - 28px, var(--ata-max));
  }

  .brand-name {
    font-size: 17px;
  }

  .brand-tagline {
    max-width: 210px;
    font-size: 10px;
  }

  .home-hero,
  .home-hero-inner {
    min-height: 420px;
  }

  .home-hero h1 {
    font-size: 42px;
  }

  .home-hero p {
    font-size: 18px;
  }

  .post-grid,
  .topic-links,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .post-card h2 {
    font-size: 21px;
  }

  .section-header {
    align-items: start;
    flex-direction: column;
  }

  .entry-header h1 {
    font-size: 38px;
  }

  .entry-content h2 {
    font-size: 27px;
  }

  .entry-content h3 {
    font-size: 23px;
  }

  .entry-content table {
    min-width: 620px;
  }

  .footer-menu {
    align-items: start;
    flex-direction: column;
  }
}
