/* IMCA Slot Racing — Custom Styles */
/* Design: Bold motorsport heritage — navy/dark chassis + red racing stripe */

:root {
  --navy: #0d1b2a;
  --navy-mid: #1b2d44;
  --navy-light: #243752;
  --red: #c0392b;
  --red-light: #e74c3c;
  --gold: #f39c12;
  --white: #ffffff;
  --off-white: #f8f9fa;
  --text-dark: #1a1a2e;
  --text-mid: #4a5568;
  --text-light: #718096;
  --border: #e2e8f0;
  --shadow: 0 4px 20px rgba(0,0,0,0.12);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.7;
  margin: 0;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); transition: color 0.2s; }
a:hover { color: var(--red-light); }

/* Racing stripe accent line */
.racing-stripe {
  height: 4px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--red) 35%, var(--gold) 65%, var(--navy) 100%);
}

/* Navigation */
.site-nav {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--white);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

.nav-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--red);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 900;
  color: white;
  letter-spacing: -0.05em;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Hero */
.hero {
  background: var(--navy);
  color: var(--white);
  padding: 4rem 1.5rem 3rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(192,57,43,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 1rem;
  color: var(--white);
}

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

.hero-text .lead {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

.hero-badge {
  display: inline-block;
  background: var(--red);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: 3px;
  margin-bottom: 1rem;
}

.hero-image {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  aspect-ratio: 16/10;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Page Hero (non-index) */
.page-hero {
  background: var(--navy);
  color: white;
  padding: 3rem 1.5rem 2.5rem;
  border-bottom: 3px solid var(--red);
}

.page-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.page-hero h1 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  margin: 0 0 0.75rem;
  color: var(--white);
}

.page-hero p {
  color: rgba(255,255,255,0.75);
  font-size: 1.05rem;
  max-width: 700px;
  margin: 0;
}

/* Main Content */
.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.content-main {
  max-width: 800px;
}

.content-main h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--red);
}

.content-main h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--navy-mid);
  margin: 1.75rem 0 0.75rem;
}

.content-main p { margin: 0 0 1.25rem; }

.content-main ul, .content-main ol {
  margin: 0 0 1.25rem;
  padding-left: 1.5rem;
}

.content-main li { margin-bottom: 0.5rem; }

.content-main strong { color: var(--navy); font-weight: 700; }

/* Inline images in content */
.content-image {
  margin: 2rem 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.content-image img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.content-image.tall img { height: 400px; }

/* Tables */
.content-main table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
  border-radius: 6px;
  overflow: hidden;
}

.content-main table thead {
  background: var(--navy);
  color: white;
}

.content-main table th {
  padding: 0.75rem 1rem;
  font-weight: 600;
  text-align: left;
  letter-spacing: 0.03em;
}

.content-main table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
}

.content-main table tbody tr:last-child td { border-bottom: none; }

.content-main table tbody tr:nth-child(even) { background: var(--off-white); }

.content-main table tbody tr:hover { background: #e8f0fe; }

/* Feature Cards Grid (homepage) */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  border-top: 3px solid var(--red);
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.feature-card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--navy);
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-mid);
  margin: 0 0 1rem;
}

.feature-card a.card-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--red);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.feature-card a.card-link:hover { color: var(--red-light); }

/* Stat boxes */
.stat-bar {
  background: var(--navy);
  color: white;
  padding: 2.5rem 1.5rem;
  margin: 0;
}

.stat-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-item .stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
  display: block;
}

.stat-item .stat-label {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
  margin-top: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.gallery-item {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--navy);
  transition: transform 0.2s;
}

.gallery-item:hover { transform: scale(1.02); }

.gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.gallery-item .gallery-caption {
  padding: 0.75rem 1rem;
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
}

/* Contact form */
.contact-form {
  max-width: 600px;
  margin: 1.5rem 0;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--navy);
}

.btn-submit {
  background: var(--red);
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  letter-spacing: 0.03em;
}

.btn-submit:hover { background: var(--red-light); }

/* Info box */
.info-box {
  background: var(--off-white);
  border-left: 4px solid var(--red);
  border-radius: 0 6px 6px 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.info-box p { margin: 0; font-size: 0.95rem; color: var(--text-mid); }

/* Footer */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.75);
  padding: 3rem 1.5rem 2rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .footer-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.75rem;
}

.footer-brand p { font-size: 0.875rem; line-height: 1.6; }

.footer-col h4 {
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col ul li { margin-bottom: 0.5rem; }

.footer-col ul a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-col ul a:hover { color: white; }

.footer-bottom {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
}

/* Breadcrumb */
.breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem 0;
  font-size: 0.85rem;
  color: var(--text-light);
}

.breadcrumb a { color: var(--text-light); text-decoration: none; }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb span { margin: 0 0.4rem; }

/* Responsive */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero-image { display: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--navy); padding: 1rem 1.5rem; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .stat-bar-inner { grid-template-columns: 1fr 1fr; }
}
