/* AutoVibe Initial CSS for project 1755147029676 - Iteration 1 */

/* 1. CSS Variables for Theming */
:root {
  --primary-color: #007bff; /* A vibrant blue for key actions and links */
  --primary-dark: #0056b3; /* Darker shade for hover states */
  --secondary-color: #6c757d; /* A muted grey for secondary elements */
  --secondary-dark: #5a6268; /* Darker shade for hover states */
  --background-color: #f8f9fa; /* Light background for the overall page */
  --text-color: #343a40; /* Dark grey for general text */
  --heading-color: #212529; /* Even darker grey for headings */
  --border-color: #dee2e6; /* Light grey for borders and separators */
  --card-background: #ffffff; /* White background for cards */
  --shadow-light: rgba(0, 0, 0, 0.08); /* Light shadow for cards/elements */

  --font-family-sans-serif: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-size-base: 16px;
  --line-height-base: 1.6;
  --border-radius: 0.3rem;
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
}

/* 2. Basic Reset and Global Box-sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 3. Body and Global Styles */
body {
  font-family: var(--font-family-sans-serif);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--text-color);
  background-color: var(--background-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh; /* Ensures body takes at least full viewport height */
  display: flex; /* Use flexbox for overall page layout */
  flex-direction: column; /* Stack header, main, footer vertically */
}

/* 4. Typography Styles */
h1, h2, h3, h4, h5, h6 {
  color: var(--heading-color);
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: 2.5rem; /* Mobile heading size */
  margin-top: 1em; /* Default margin for h1 */
}

h2 {
  font-size: 2rem;
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

h3 {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
}

p {
  margin-bottom: var(--spacing-md);
  max-width: 800px; /* Constrain paragraph width for readability */
  margin-left: auto; /* Center paragraphs within their container */
  margin-right: auto;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

a:hover,
a:focus {
  text-decoration: underline;
  color: var(--primary-dark);
  outline: 2px solid var(--primary-color); /* Custom focus style for accessibility */
  outline-offset: 2px;
}

ul {
  list-style: none;
}

/* Global container for content centering */
.container {
  max-width: 1200px; /* Max width for main content */
  margin: 0 auto; /* Center the container */
  padding: 0 var(--spacing-md); /* Add horizontal padding */
}

/* 5. Header Styles */
header {
  background-color: var(--card-background);
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 4px var(--shadow-light);
  width: 100%; /* Ensure header is full width */
}

header nav {
  display: flex;
  flex-direction: column; /* Stack logo and nav items on mobile */
  align-items: center;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

header .logo a {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--heading-color);
  white-space: nowrap; /* Prevent logo text from wrapping */
  margin-bottom: var(--spacing-md); /* Space below logo on mobile */
  outline-offset: 2px;
}

header nav ul {
  display: flex;
  flex-direction: column; /* Stack nav items on mobile */
  gap: var(--spacing-md);
  width: 100%;
}

header nav ul li a {
  display: block; /* Make links full width for better tap target */
  padding: var(--spacing-sm) 0;
  color: var(--text-color);
  font-weight: 500;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
  border-radius: var(--border-radius);
  outline: none; /* Remove default outline */
}

header nav ul li a:hover,
header nav ul li a:focus {
  background-color: var(--background-color);
  color: var(--primary-color);
  text-decoration: none;
  outline: 2px solid var(--primary-color); /* Custom focus style */
  outline-offset: 2px;
}

/* 6. Main Content Area */
main {
  flex-grow: 1; /* Allows main content to take up available space */
  width: 100%; /* Ensure main is full width */
}

/* 7. Section Styles */
section {
  padding: var(--spacing-xl) 0;
  text-align: center;
}

section:nth-of-type(even) {
  background-color: var(--background-color);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://via.placeholder.com/1500x800/282c34/ffffff?text=Auto+Event+Background') no-repeat center center/cover;
  color: white;
  padding: calc(var(--spacing-lg) * 2) var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh; /* Minimum height for hero section */
}

.hero-content {
  max-width: 900px;
}

.hero-content h1 {
  font-size: 3rem; /* Larger for hero */
  margin-bottom: var(--spacing-md);
  margin-top: 0; /* Override global h1 margin-top */
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-lg);
  color: rgba(255, 255, 255, 0.9);
}

.hero-actions {
  display: flex;
  flex-direction: column; /* Stack buttons on mobile */
  gap: var(--spacing-md);
  justify-content: center;
  align-items: center;
}

/* Buttons */
.button {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--border-radius);
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, transform 0.1s ease-out, border-color 0.2s ease-in-out;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  outline: none; /* Remove default outline for custom focus */
}

.button.primary {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.button.primary:hover,
.button.primary:focus {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  color: white; /* Ensure text remains white on hover */
  transform: translateY(-2px);
  text-decoration: none;
  outline: 2px solid var(--primary-dark);
  outline-offset: 2px;
}

.button.secondary {
  background-color: transparent;
  color: white;
  border-color: white;
}

.button.secondary:hover,
.button.secondary:focus {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  transform: translateY(-2px);
  text-decoration: none;
  outline: 2px solid white;
  outline-offset: 2px;
}

/* Features Section */
.features-section .feature-grid {
  display: flex;
  flex-direction: column; /* Stack cards on mobile */
  gap: var(--spacing-lg);
  padding: 0 var(--spacing-md);
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  background-color: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 8px var(--shadow-light);
  padding: var(--spacing-lg);
  text-align: left; /* Align text left within cards */
}

.feature-card h3 {
  color: var(--primary-color);
  margin-bottom: var(--spacing-md);
}

.feature-card ul {
  margin-left: var(--spacing-md); /* Indent list items */
}

.feature-card ul li {
  margin-bottom: var(--spacing-sm);
}

.feature-card ul li:last-child {
  margin-bottom: 0;
}

.feature-card ul li strong {
  color: var(--heading-color);
}

/* Call to Action Section */
.cta-section {
  background-color: var(--primary-color);
  color: white;
  padding: var(--spacing-xl) var(--spacing-md);
}

.cta-section h2 {
  color: white;
  margin-bottom: var(--spacing-md);
}

.cta-section p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.15rem;
  margin-bottom: var(--spacing-lg);
}

/* 8. Footer Styles */
footer {
  background-color: var(--heading-color);
  color: white;
  padding: var(--spacing-md) 0;
  text-align: center;
  width: 100%;
  margin-top: auto; /* Pushes footer to the bottom if content is short */
}

footer p {
  margin-bottom: 0;
  font-size: 0.9rem;
  max-width: none; /* Remove max-width for footer text */
}

/* 9. Responsive Design - Media Queries */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
  .hero-actions {
    flex-direction: row; /* Buttons side-by-side */
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
  body {
    padding: 0; /* Remove body padding, sections will handle it */
  }

  h1 {
    font-size: 3.5rem; /* Larger heading for tablets */
  }

  h2 {
    font-size: 2.5rem;
  }

  header nav {
    flex-direction: row; /* Nav items side-by-side */
    justify-content: space-between;
  }

  header .logo {
    margin-bottom: 0; /* No margin below logo on larger screens */
  }

  header nav ul {
    flex-direction: row; /* Nav links side-by-side */
    width: auto;
    gap: var(--spacing-lg);
  }

  header nav ul li a {
    padding: var(--spacing-sm) var(--spacing-md); /* Add horizontal padding for links */
  }

  .hero-section {
    min-height: 70vh;
    padding: calc(var(--spacing-lg) * 3) var(--spacing-md);
  }

  .hero-content h1 {
    font-size: 4rem;
  }

  .features-section .feature-grid {
    flex-direction: row; /* Cards side-by-side */
    flex-wrap: wrap; /* Allow wrapping if needed */
    justify-content: center;
  }

  .feature-card {
    flex: 1; /* Allow cards to grow and shrink */
    min-width: 300px; /* Minimum width for cards */
    max-width: calc(50% - (var(--spacing-lg) / 2)); /* Two cards per row with gap */
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  h1 {
    font-size: 4rem; /* Even larger heading for desktops */
  }

  h2 {
    font-size: 3rem;
  }

  .hero-section {
    min-height: 80vh;
    padding: calc(var(--spacing-lg) * 4) var(--spacing-md);
  }

  .hero-content h1 {
    font-size: 5rem;
  }

  .feature-card {
    max-width: calc(50% - (var(--spacing-lg) / 2)); /* Maintain two columns for features */
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .container,
  header nav,
  .features-section .feature-grid {
    padding: 0; /* Remove horizontal padding as max-width handles centering */
  }
}