/* Garman Racing - Main Stylesheet */
/* Clean, modern, responsive racing theme */

:root {
  --black: #0a0a0a;
  --dark: #121212;
  --charcoal: #1c1c1c;
  --gray: #2a2a2a;
  --light-gray: #888;
  --white: #f5f5f5;
  --red: #e10600;
  --red-dark: #b30500;
  --blue: #1e90ff;
  --gold: #d4af37;
  --accent: #e10600;
  --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display: 'Arial Black', 'Helvetica Neue', sans-serif;
  --max-width: 1200px;
  --header-height: 80px;
  --transition: 0.25s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--black);
  color: var(--white);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--red);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: #ff3333;
}

/* ========== HEADER ========== */
.site-header {
  background: var(--dark);
  border-bottom: 3px solid var(--red);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.6);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-link img {
  height: 52px;
  width: auto;
}

.main-nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.main-nav a {
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0.9rem;
  border-radius: 4px;
  transition: background var(--transition), color var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--red);
  color: var(--white);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--red);
  color: var(--white);
  font-size: 1.4rem;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  border-radius: 4px;
}

/* ========== HERO ========== */
.hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--charcoal);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.45;
  filter: brightness(0.7);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem 1.5rem;
  max-width: 800px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.hero h1 span {
  color: var(--red);
}

.hero p {
  font-size: 1.2rem;
  color: #ccc;
  margin-bottom: 1.75rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-weight: 700;
  padding: 0.85rem 1.8rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.btn:hover {
  background: var(--red-dark);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--red);
  color: var(--red);
  margin-left: 0.75rem;
}

.btn-outline:hover {
  background: var(--red);
  color: var(--white);
}

/* ========== SECTIONS ========== */
.section {
  padding: 3.5rem 1.25rem;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
  text-align: center;
}

.section-title span {
  color: var(--red);
}

.section-subtitle {
  text-align: center;
  color: var(--light-gray);
  margin-bottom: 2.5rem;
  font-size: 1.05rem;
}

/* ========== CARDS / GRID ========== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

.card {
  background: var(--charcoal);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #2a2a2a;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.45);
}

.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--gray);
}

.card-body {
  padding: 1.25rem 1.4rem 1.5rem;
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}

.card h3 span {
  color: var(--red);
}

.card p {
  color: #bbb;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.photo-credit {
  font-size: 0.75rem;
  color: #666;
  font-style: italic;
}

/* ========== CARS PAGE ========== */
.car-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 3.5rem;
  background: var(--charcoal);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #2a2a2a;
}

.car-detail:nth-child(even) {
  direction: rtl;
}

.car-detail:nth-child(even) > * {
  direction: ltr;
}

.car-detail img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}

.car-info {
  padding: 2rem 1.75rem;
}

.car-info h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin-bottom: 0.4rem;
}

.car-info .car-class {
  color: var(--red);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.car-info p {
  color: #ccc;
  margin-bottom: 0.75rem;
}

/* ========== SPONSORS ========== */
.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  text-align: center;
}

.sponsor-item {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  transition: border-color var(--transition), transform var(--transition);
}

.sponsor-item:hover {
  border-color: var(--red);
  transform: translateY(-3px);
}

.sponsor-item img {
  max-width: 100%;
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.sponsor-item strong {
  font-size: 0.9rem;
  line-height: 1.3;
  color: #222;
  margin-top: 0.5rem;
}

.sponsor-item.text-only {
  background: var(--charcoal);
  border-color: #2a2a2a;
}

.sponsor-item.text-only strong {
  color: var(--white);
}

/* ========== PRODUCTS ========== */
.product-box {
  background: var(--charcoal);
  border-radius: 10px;
  padding: 2rem;
  border: 1px solid #2a2a2a;
  margin-bottom: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}

.product-box h3 {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

.product-box p {
  color: #bbb;
  flex: 1 1 280px;
}

.product-box .btn {
  flex-shrink: 0;
}

/* ========== CONTACT ========== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.contact-info h3 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.contact-info p {
  margin-bottom: 0.6rem;
  color: #ccc;
}

.contact-info a {
  color: var(--red);
  font-weight: 600;
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--dark);
  border-top: 3px solid var(--red);
  padding: 2.5rem 1.25rem 1.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-brand img {
  height: 42px;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  color: #888;
  font-size: 0.9rem;
  max-width: 280px;
}

.footer-links h4 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  color: #aaa;
}

.footer-links a {
  display: block;
  color: #ccc;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

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

.footer-bottom {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid #333;
  text-align: center;
  color: #666;
  font-size: 0.85rem;
}

/* ========== UTILITIES ========== */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 1rem; }

.highlight-box {
  background: linear-gradient(135deg, #1a1a1a, #221111);
  border-left: 4px solid var(--red);
  padding: 1.25rem 1.5rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    background: var(--dark);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border-bottom: 2px solid var(--red);
    padding: 0.5rem 0;
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 0.85rem 1.5rem;
    border-radius: 0;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .car-detail,
  .car-detail:nth-child(even) {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .car-detail img {
    min-height: 240px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .btn-outline {
    margin-left: 0;
    margin-top: 0.75rem;
  }

  .hero {
    min-height: 380px;
  }
}

@media (max-width: 480px) {
  .logo-link img {
    height: 42px;
  }

  .section {
    padding: 2.5rem 1rem;
  }
}
