@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600&display=swap');

/* Root Variables (Dark Mode - Default) */
:root {
    --bg-primary: #1b1e28;
    --bg-secondary: #2a303d;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --accent-color: #cfdd33;
    --border-color: #3e4450;
    --card-bg: #2a303d;
    --card-border: #3e4450;
    --link-hover: #cfdd33;
    --font-heading: 'Chakra Petch', sans-serif;
    --font-body: 'Instrument Sans', sans-serif;
}

/* Light Mode Variables */
body.light-mode {
    --bg-primary: #f0f2f5;
    --bg-secondary: #ffffff;
    --text-primary: #333333;
    --text-secondary: #555555;
    --accent-color: #286090; /* A complementary blue */
    --border-color: #dddddd;
    --card-bg: #ffffff;
    --card-border: #cccccc;
    --link-hover: #286090;
    background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.1) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 1px, transparent 1px);
}

body {
    font-family: 'Instrument Sans', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.2) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 1px, transparent 1px);
    background-size: 50px 50px;
}
a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--link-hover);
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1rem;
}

header {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    font-family: "Chakra Petch";
    text-transform: uppercase;
}

h1, h2, h3, h4 {
  font-family: "Chakra Petch";
  text-transform: uppercase;
}
.home-link {
    margin-right: auto;
}

nav a {
    color: var(--text-primary);
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

nav a:hover {
    background-color: var(--border-color);
}

.truck-tracker {
  text-transform: uppercase;
  font-family: "Chakra Petch", sans-serif;
  padding-top: 4vh;
  padding-bottom: 0;
}

.truck-tracker ol {
  display: flex;
  justify-content: space-between; /* space items evenly */
  list-style: none; /* optional: remove default numbering */
  padding: 0;
  margin: 0;
  padding-top: 10px;
}

.truck-tracker ol li {
  flex: 0 1 auto; /* allow items to size naturally */
  text-align: center;
  opacity: 0.5;
}
.truck-tracker img {max-width: 80px; padding-right: 10px;}


/* CLAUDE-POWERED RACE DIAGRAM */

.race-container {
    max-width: 1600px;
    margin: 0 auto;
}

.race-lane {
    display: flex;
    align-items: center;
    margin-bottom: -5px;
    position: relative;
}

.track {
    flex: 1;
    height: 1px;
    background-color: #c4d93b;
    margin-right: 20px;
    position: relative;
}

.vehicle {
    width: 50px;
    height: 30px;
    margin-right: 15px;
    position: relative;
}

.vehicle img {
    max-width: 60px;

}

.vehicle-name {
    font-size: 24px;
    letter-spacing: 2px;
    color: #c4d93b;
    text-transform: uppercase;
    letter-spacing: -0.04em;
}

/* Different track lengths for visual variety */

.race-lane.preorders .track {flex: 0.3;}
.race-lane.announced .track {flex: 0.1;}
.race-lane.shipment .track {flex: 0.7;}
.race-lane.delivered .track {flex: 0.8;}
.race-lane.manufacturing .track {flex: 0.6;}

.vehicle {
  transform-origin: center center;
}

/* keyframes: small random shifts + rotations */
@keyframes rumble {
  0%   { transform: translate(0, 0) rotate(0); }
  10%  { transform: translate(-2px, 1px) rotate(-0.5deg); }
  20%  { transform: translate(-1px, -1px) rotate(0.5deg); }
  30%  { transform: translate(2px, 1px) rotate(0); }
  40%  { transform: translate(1px, -2px) rotate(-0.6deg); }
  50%  { transform: translate(-1px, 2px) rotate(.7deg); }
  60%  { transform: translate(-2px, 1px) rotate(0); }
  70%  { transform: translate(2px, -1px) rotate(-.4deg); }
  80%  { transform: translate(-1px, 2px) rotate(.6deg); }
  90%  { transform: translate(1px, -1px) rotate(0); }
  100% { transform: translate(0, 0) rotate(1deg); }
}

/* trigger it on hover */
.vehicle:hover {
  animation: rumble 0.2s linear infinite;
}


@media (max-width: 768px) {
    .vehicle-name {
        font-size: 24px;
    }

    .vehicle {
        width: 40px;
        height: 24px;
    }

    body {
        padding: 20px;
    }
}

/*
  position: relative;
  display: inline-block;
  width: 100%;
  padding-left: 10px;
  border-bottom: 1px solid #1b1e28;
  margin-bottom: -1px;
}

.truck a::before {
  content: "";
  position: absolute;
  left: -50%;
  top: 55%;
  width: 50%;
  height: 1px;
  background-color: yellow;
  transform: translateY(-50%);
}
*/




/* Theme Toggle Switch */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    margin-left: 2rem;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 26px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 26px;
}

input:checked + .slider {
    background-color: var(--accent-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Hero section */
.hero {
    margin-bottom: 2rem;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 5.5rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    width: 100%;
    position: relative;
    z-index: 1; /* make sure the text stays above */
}

.hero h1::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background-color: yellow;
    z-index: -1; /* put it behind the text */

}
.hero h1 span {display: block;  background: var(--bg-primary); }

.hero-statement {
    font-size: 2rem;
    color: var(--accent-color);
    margin: 0 auto;
    font-style: italic;
    font-family: "Chakra Petch";
    font-weight: 300;
}

/* News Grid */
.news-grid, .truck-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding-bottom: 2rem;
}

.news-card, .truck-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover, .truck-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.news-card h3, .truck-card h3 {
    color: var(--accent-color);
    margin-top: 0;
    font-family: "Chakra Petch";
}

.news-meta {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.news-tags {
    margin-top: 1rem;
}

.news-tags .tag {
    display: inline-block;
    background-color: var(--border-color);
    color: var(--text-secondary);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Truck Card Specific */
.truck-cover-photo {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.truck-card {padding: 0;}
/* Single News Post and Truck Page */
.post-header, .truck-header {
    text-align: center;
    margin-bottom: 2rem;
}

.post-header h1, .truck-header h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.post-meta {
    font-size: 1rem;
    color: var(--text-secondary);
}

.post-content, .truck-details {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.post-content p, .truck-details p {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.post-content h2, .truck-details h2 {
    color: var(--accent-color);
    margin-top: 2rem;
    font-family: "Chakra Petch";
}

.post-content ul, .truck-details ul {
    list-style: none;
    padding: 0;
}

.post-content ul li, .truck-details ul li {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.8rem 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.truck-details .specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.truck-details .specs div {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1rem;
}

.truck-details .specs div strong {
    color: var(--accent-color);
    display: block;
    margin-bottom: 0.3rem;
}

footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
    background-color: var(--bg-secondary);
}

/* Form Styles for search/filter */
.filter-controls {
    margin-bottom: 2rem;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: flex-end; /* Align items to the bottom */
}

.filter-controls label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: bold;
}

.filter-controls input[type="text"],
.filter-controls select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    box-sizing: border-box; /* Include padding in width */
}

.filter-controls button {
    background-color: var(--accent-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.filter-controls button:hover {
    background-color: var(--link-hover);
}

.filter-group {
    flex: 1; /* Allow groups to take available space */
    min-width: 200px; /* Minimum width before wrapping */
}

/* News Tag Page Styles */
.tag-list {
    margin-bottom: 2rem;
}

.tag-list li {
    display: inline-block;
    margin-right: 1rem;
}

.tag-list a {
    background-color: var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.tag-list a:hover {
    background-color: var(--accent-color);
    color: white;
}

/* Trucks Page Specific Styles */
.truck-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.truck-card {
    background-color: #11131a;
    border-radius: 2px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.truck-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}
.truck-card-details {
  padding: 0 1rem 1.5rem 1rem;
}

.truck-card h3 {
    font-family: var(--font-heading);
    color: var(--accent-color);
    margin-top: 0;
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-style: italic;
}

.truck-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.truck-card-specs {
    border-top: 1px dashed var(--border-color);
    padding-top: 1rem;
    margin-top: auto;
    text-align: left;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
}

.truck-card-specs p {
    margin-bottom: 0;
    font-size: 0.9rem;
    color: var(--text-color);
}

.truck-card-specs p strong {
    color: var(--accent-color);
    font-family: var(--font-body);
    font-weight: 600;
}

.truck-card a {
    display: inline-block;
    margin-top: 1rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.truck-card a:hover {
    color: var(--accent-color);
}

.truck-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.truck-details {
    margin-top: 2rem;
    text-align: left;
}

.truck-details h2 {
    font-family: var(--font-heading);
    color: var(--accent-color);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.truck-details p {
    margin-bottom: 0.8rem;
}

.truck-details ul {
    list-style: none;
    padding: 0;
}

.truck-details ul li {
    background-color: #16213e;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 0.7rem 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.truck-details ul li strong {
    color: var(--accent-color);
    font-family: var(--font-heading);
}

/* Sorting and Filtering */
.sort-filter-controls {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.sort-filter-controls label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-right: 0.5rem;
}

.sort-filter-controls select {
    background-color: #16213e;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s ease;
}

.sort-filter-controls select:focus {
    border-color: var(--accent-color);
}

/* Single Truck Page */
.truck-single-content {
    padding: 2rem 0;
}

.truck-single-content h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--accent-color);
    text-align: center;
    margin-bottom: 1.5rem;
}

.truck-single-content p {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.truck-image-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.truck-image-gallery img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-statement {
        font-size: 1rem;
    }

    .news-grid,
    .truck-list {
        grid-template-columns: 1fr;
    }

    .recent-news h2,
    .progress-chart h2 {
        font-size: 2rem;
    }

    .truck-single-content h1 {
        font-size: 2rem;
    }
}

/* Truck Review Page Styles */
.header {
    padding: 20px 0;
    margin-bottom: 30px;
    border-radius: 12px;
}

.header-content {
    text-align: left;
}

.header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    font-weight: 700;
}

.header p {
    font-size: 1.2em;
    opacity: 0.9;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2a303d;
    padding: 20px;
    border-radius: 2px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.status-warning { background-color: #f39c12; }
.status-good { background-color: #27ae60; }
.status-risk { background-color: #e74c3c; }

.main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.card {
    background: #2a303d;
    border-radius: 2px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card h2 {
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 10px;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.spec-item {
    padding: 15px;
    background: #1b1e28;
    border-radius: 2px;
    border-left: 4px solid #999507;
}

.spec-label {
    font-size: 0.9em;
    margin-bottom: 5px;
    font-family: 'Chakra Petch';
    text-transform: uppercase;
    opacity: 0.8;
}

.spec-value {
    font-size: 1.1em;
    font-weight: 600;
}

.timeline {
    background: #2a303d;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ecf0f1;
}

.timeline-date {
    min-width: 100px;
    font-weight: 600;
    color: #7f8c8d;
    font-size: 0.9em;
}

.timeline-content {
    flex: 1;
    margin-left: 20px;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    border: 1px solid #74c0fc;
    color: #0c5460;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f39c12, #e67e22);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.comparison-table th,
.comparison-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.comparison-table th {
    background: #2c3e50;
    font-weight: 600;
}

.use-case {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 12px;
    background: #1b1e28;
    border-radius: 2px;
}

.use-case-icon {
    width: 40px;
    height: 40px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
}

.rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
}

.star {
    color: #f39c12;
}

.sidebar-stats {
    display: grid;
    gap: 15px;
}

.stat-box {
    background: #2a303d;
    padding: 20px;
    border-radius: 2px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 2em;
    font-weight: 700;
    color: #fff;
    display: block;
}

.stat-label {
    font-size: 0.9em;
    margin-top: 5px;
    font-family: 'Chakra Petch';
    text-transform: uppercase;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }

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

    .header h1 {
        font-size: 2em;
    }

    .status-bar {
        flex-direction: column;
        gap: 15px;
    }
}
