/* Saga Motors Performance — intentionally dependency-free. */
:root {
  --saga-navy: #071A2B;
  --gm-blue: #0067B1;
  --electric-blue: #00AEEF;
  --ice-blue: #EAF5FB;
  --off-white: #F7F9FA;
  --white: #FFFFFF;
  --graphite: #252A2E;
  --slate-gray: #66717A;
  --silver: #DCE1E4;
  --ev-teal: #00A88F;

  --chevrolet-gold: #CFB53B;
  --chevrolet-dark-gold: #B38F1A;
  --chevrolet-charcoal: #1D1F21;
  --chevrolet-silver: #E6E6E6;

  --gmc-red: #C8102E;
  --gmc-dark-red: #8E0E1A;
  --gmc-graphite: #2B2F33;
  --gmc-gunmetal: #6B7177;
  --gmc-silver: #BFC5CA;

  --cadillac-black: #0D0D0F;
  --cadillac-graphite: #1A1C1E;
  --cadillac-silver: #C7C9CC;
  --cadillac-champagne: #D6CBB5;

  --brand-accent: var(--gm-blue);
  --brand-accent-hover: #00538f;
  --brand-dark: var(--saga-navy);
  --brand-soft: var(--ice-blue);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --container: 1280px;
  --content: 760px;
  --gutter: clamp(1rem, 3vw, 2rem);
  --section-space: clamp(3.5rem, 7vw, 7rem);
  --radius-sm: .5rem;
  --radius-md: .875rem;
  --radius-lg: 1.25rem;
  --shadow-sm: 0 8px 30px rgb(7 26 43 / 8%);
  --transition: 180ms ease;
}

.brand-gm { --brand-accent: var(--gm-blue); --brand-accent-hover: var(--electric-blue); --brand-dark: var(--saga-navy); --brand-soft: var(--ice-blue); }
.brand-chevrolet { --brand-accent: var(--chevrolet-gold); --brand-accent-hover: var(--chevrolet-dark-gold); --brand-dark: var(--chevrolet-charcoal); --brand-soft: #fbf8ea; }
.brand-gmc { --brand-accent: var(--gmc-red); --brand-accent-hover: var(--gmc-dark-red); --brand-dark: var(--gmc-graphite); --brand-soft: #fbecf0; }
.brand-cadillac { --brand-accent: var(--cadillac-champagne); --brand-accent-hover: #b8aa8d; --brand-dark: var(--cadillac-black); --brand-soft: #f5f2ec; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; text-size-adjust: 100%; }
body { margin: 0; background: var(--off-white); color: var(--graphite); font-family: var(--font-sans); font-size: 1rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg, video { display: block; max-width: 100%; height: auto; }
iframe { max-width: 100%; }
input, button, textarea, select { font: inherit; }
button, [role="button"] { cursor: pointer; }
a { color: var(--gm-blue); text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:hover { text-decoration-thickness: .12em; }
:focus-visible { outline: 3px solid var(--electric-blue); outline-offset: 3px; }

h1,h2,h3,h4,h5,h6 { color: var(--brand-dark); font-weight: 750; line-height: 1.08; letter-spacing: -.025em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 6vw, 5.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.35rem, 2vw, 2rem); }
p { text-wrap: pretty; }

.layout-wide { width: min(calc(100% - (2 * var(--gutter))), var(--container)); margin-inline: auto; }
.layout-content { width: min(calc(100% - (2 * var(--gutter))), var(--content)); margin-inline: auto; }
.entry-content > :where(:not(.alignwide):not(.alignfull)) { width: min(calc(100% - (2 * var(--gutter))), var(--content)); margin-inline: auto; }
.entry-content > .alignwide { width: min(calc(100% - (2 * var(--gutter))), var(--container)); margin-inline: auto; }
.entry-content > .alignfull { width: 100%; }
.entry-content { overflow: clip; }
.entry-content > * + * { margin-top: 1.3em; }
.entry-content > :where(.wp-block-group,.wp-block-cover,.wp-block-columns).alignfull { margin-top: var(--section-space); margin-bottom: var(--section-space); }

.screen-reader-text { position: absolute !important; 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 !important; z-index: 100000; top: 1rem; left: 1rem; width: auto; height: auto; clip: auto; padding: .8rem 1rem; background: var(--white); color: var(--saga-navy); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }

.site-header { position: sticky; top: 0; z-index: 50; background: rgb(255 255 255 / 94%); border-bottom: 1px solid rgb(220 225 228 / 80%); backdrop-filter: blur(10px); }
.site-header__inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.custom-logo { width: auto; max-height: 48px; }
.site-title { color: var(--saga-navy); text-decoration: none; font-weight: 800; font-size: 1.15rem; }
.site-nav__menu, .footer-menu { margin: 0; padding: 0; list-style: none; display: flex; align-items: center; gap: clamp(1rem, 2vw, 2rem); }
.site-nav__link { color: var(--saga-navy); font-weight: 650; text-decoration: none; }
.site-nav__link:hover, .current-menu-item > .site-nav__link { color: var(--brand-accent); }
.menu-toggle { display: none; width: 46px; height: 46px; padding: 11px; border: 0; background: transparent; }
.menu-toggle span:not(.screen-reader-text) { display: block; height: 2px; margin: 5px 0; background: var(--saga-navy); border-radius: 999px; }

.hero { position: relative; isolation: isolate; min-height: min(78vh, 820px); display: grid; align-items: end; color: var(--white); background: var(--saga-navy); overflow: hidden; }
.hero__media, .hero__overlay { position: absolute; inset: 0; z-index: -2; }
.hero__image { width: 100%; height: 100%; object-fit: cover; }
.hero__overlay { z-index: -1; background: linear-gradient(90deg, rgb(7 26 43 / 85%) 0%, rgb(7 26 43 / 48%) 48%, rgb(7 26 43 / 15%) 100%); }
.hero__content { padding-top: clamp(7rem, 18vh, 12rem); padding-bottom: clamp(3.5rem, 9vh, 7rem); }
.hero h1 { color: var(--white); max-width: 920px; margin: .25em 0; }
.hero__lead { max-width: 700px; margin: 0; font-size: clamp(1.1rem, 2vw, 1.4rem); color: rgb(255 255 255 / 90%); }
.eyebrow { margin: 0 0 .75rem; color: var(--brand-accent); font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.hero .eyebrow { color: var(--electric-blue); }

.page-header, .entry-header, .archive-header, .error-404 { padding-top: clamp(3rem, 8vw, 7rem); padding-bottom: clamp(2rem, 5vw, 4rem); }
.page-header h1, .entry-header h1, .archive-header h1 { margin: 0; }
.page-featured { margin-top: 0; margin-bottom: clamp(2rem, 5vw, 4rem); }
.page-featured img { width: 100%; border-radius: var(--radius-lg); }
.entry-content { padding-bottom: var(--section-space); }
.entry-meta, .post-card__meta { color: var(--slate-gray); font-size: .875rem; }

.button, .wp-element-button, .wp-block-button__link, button[type="submit"], input[type="submit"] { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .78rem 1.25rem; border: 1px solid transparent; border-radius: var(--radius-sm); background: var(--brand-accent); color: var(--white); font-weight: 750; line-height: 1; text-decoration: none; transition: transform var(--transition), background-color var(--transition), border-color var(--transition); }
.button:hover, .wp-element-button:hover, .wp-block-button__link:hover, button[type="submit"]:hover, input[type="submit"]:hover { background: var(--brand-accent-hover); color: var(--white); transform: translateY(-1px); }
.brand-chevrolet .button, .brand-chevrolet .wp-element-button, .brand-chevrolet .wp-block-button__link, .brand-cadillac .button, .brand-cadillac .wp-element-button, .brand-cadillac .wp-block-button__link { color: var(--brand-dark); }

.wp-block-group.has-background { padding: clamp(2rem, 5vw, 5rem) var(--gutter); }
.wp-block-cover { min-height: 520px; }
.wp-block-column > :first-child { margin-top: 0; }
.wp-block-columns { gap: clamp(1.25rem, 3vw, 2.5rem); }

.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: clamp(1rem, 2.5vw, 2rem); padding-bottom: var(--section-space); }
.post-card { background: var(--white); border: 1px solid var(--silver); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.post-card__media { display: block; aspect-ratio: 3/2; overflow: hidden; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 350ms ease; }
.post-card:hover .post-card__media img { transform: scale(1.02); }
.post-card__body { padding: 1.35rem; }
.post-card__title { margin: .2rem 0 .7rem; font-size: 1.5rem; }
.post-card__title a { color: inherit; text-decoration: none; }

input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]), textarea, select { width: 100%; min-height: 48px; padding: .72rem .85rem; color: var(--graphite); background: var(--white); border: 1px solid #b9c1c6; border-radius: var(--radius-sm); }
textarea { min-height: 140px; resize: vertical; }
label { font-weight: 650; }

.site-footer { margin-top: var(--section-space); background: var(--saga-navy); color: rgb(255 255 255 / 76%); }
.site-footer__inner { padding-top: clamp(3rem, 7vw, 5rem); padding-bottom: 2rem; }
.site-footer .custom-logo { filter: brightness(0) invert(1); }
.site-footer__widgets { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 2rem; margin: 2.5rem 0; }
.site-footer a { color: var(--white); }
.footer-menu { margin-top: 2rem; flex-wrap: wrap; }
.site-footer__copyright { margin: 2rem 0 0; padding-top: 1.5rem; border-top: 1px solid rgb(255 255 255 / 15%); font-size: .875rem; }

.pagination .nav-links, .post-navigation .nav-links { display: flex; justify-content: space-between; gap: 1rem; margin: 2rem 0; }

@media (max-width: 959px) {
  .menu-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 1rem var(--gutter) 1.5rem; background: var(--white); border-bottom: 1px solid var(--silver); box-shadow: var(--shadow-sm); }
  .site-nav.is-open { display: block; }
  .site-nav__menu { align-items: stretch; flex-direction: column; gap: 0; }
  .site-nav__link { display: block; padding: .8rem 0; }
  .post-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .site-footer__widgets { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .site-header__inner { min-height: 66px; }
  .hero { min-height: 70svh; }
  .hero__overlay { background: linear-gradient(0deg, rgb(7 26 43 / 88%) 0%, rgb(7 26 43 / 35%) 75%); }
  .post-grid, .site-footer__widgets { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .site-footer, .menu-toggle, .post-navigation { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
}

/* Elementor compatibility — no extra framework or dependency required. */
.sagamotors-elementor-header,
.sagamotors-elementor-footer { width: 100%; position: relative; z-index: 50; }
.sagamotors-elementor-header > .elementor,
.sagamotors-elementor-footer > .elementor { width: 100%; }
.elementor-page .entry-content > .elementor,
.elementor-page .entry-content > .elementor[data-elementor-type="wp-page"] { width: 100%; max-width: none; margin-inline: 0; }
.elementor-page .entry-content { overflow: visible; }
.sagamotors-has-elementor-footer .site-footer { margin-top: 0; }
