/* ============================================
   State Farm Car Insurance Landing Page
   Responsive CSS
   ============================================ */

/* --- CSS Variables --- */
:root {
  --sf-red: #d62311;
  --sf-red-hover: #b71c1c;
  --sf-dark: #333333;
  --sf-gray: #666666;
  --sf-light-bg: #f0f6fb;
  --sf-white: #ffffff;
  --sf-border: #e0e0e0;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Roboto', sans-serif;
  color: #333;
  line-height: 1.6;
  background: #fff;
}

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

/* --- Layout --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Hero Section --- */
.hero {
  background: var(--sf-light-bg);
  padding: 60px 0;
}

.hero .container {
  display: flex;
  gap: 40px;
  align-items: center;
}

.hero-content {
  flex: 1;
}

.hero-title {
  color: var(--sf-red);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.hero-subtitle {
  color: var(--sf-dark);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-top: 16px;
}

.hero-image-wrapper {
  flex: 0 0 45%;
}

.hero-image {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
}

/* --- Quote Form --- */
.quote-form {
  margin-top: 30px;
  background: var(--sf-white);
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.quote-label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--sf-dark);
}

.quote-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--sf-border);
  border-radius: 4px;
  font-size: 1rem;
  margin: 12px 0;
  font-family: 'Roboto', sans-serif;
  transition: border-color 0.2s ease;
}

.quote-input:focus {
  outline: none;
  border-color: var(--sf-red);
}

.quote-input.error {
  border-color: var(--sf-red);
}

.error-message {
  color: var(--sf-red);
  font-size: 0.8rem;
  margin-top: -8px;
  margin-bottom: 8px;
}

.btn-quote {
  background: var(--sf-red);
  color: var(--sf-white);
  border: none;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s ease;
  font-family: 'Roboto', sans-serif;
}

.btn-quote:hover {
  background: var(--sf-red-hover);
}

/* --- Section Heading (transition) --- */
.section-benchmark {
  text-align: center;
  padding: 30px 0 10px;
}

.section-heading {
  color: var(--sf-red);
  font-size: 1.8rem;
  font-weight: 700;
}

/* --- Stories Section --- */
.stories-section {
  padding: 20px 0 40px;
}

.stories-photos {
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 8px;
}

.stories-banner {
  width: 100%;
  display: block;
  margin-bottom: -18%;
}

.stories-caption {
  text-align: center;
  font-size: 1.1rem;
  color: var(--sf-dark);
  max-width: 800px;
  margin: 20px auto 40px;
}

.story-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 30px;
}

.story-card {
  background: var(--sf-white);
  border: 1px solid var(--sf-border);
  border-radius: 8px;
  padding: 24px;
  transition: box-shadow 0.2s ease;
}

.story-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.story-header {
  margin-bottom: 12px;
}

.story-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--sf-dark);
}

.story-exp {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--sf-red);
  font-weight: 500;
  margin-top: 4px;
}

.story-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--sf-gray);
}

/* --- Discounts Section --- */
.discounts-section {
  padding: 60px 0;
  background: #fafafa;
}

.discounts-title {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--sf-red);
  margin-bottom: 40px;
}

.discounts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.discount-card {
  padding: 0 16px;
}

.discount-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--sf-dark);
  margin-bottom: 12px;
}

.discount-card-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--sf-gray);
}

.discount-card-text a {
  color: var(--sf-red);
  text-decoration: underline;
}

.discount-card-text a:hover {
  color: var(--sf-red-hover);
}

/* --- Footer --- */
.footer {
  background: #333;
  color: #ccc;
  padding: 40px 0;
  font-size: 0.85rem;
}

.footer-disclaimer {
  margin-bottom: 8px;
  line-height: 1.6;
}

.footer-privacy {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #555;
}

.footer-privacy h3 {
  color: white;
  font-size: 1rem;
  margin-bottom: 8px;
}

.footer-privacy p {
  margin-bottom: 8px;
  line-height: 1.6;
}

.footer-links {
  margin-top: 20px;
}

.footer-links a {
  color: #aaa;
  text-decoration: none;
  margin: 0 8px;
}

.footer-links a:hover {
  color: white;
}

.footer-copyright {
  margin-top: 16px;
  color: #888;
}

/* --- Header (for privacy-policy page) --- */
.header {
  background: var(--sf-dark);
  padding: 14px 0;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
}

.logo {
  text-decoration: none;
}

.logo-text {
  color: var(--sf-white);
  font-size: 1.3rem;
  font-weight: 700;
}

/* --- Legal Page (privacy-policy) --- */
.legal-page {
  padding: 40px 0 60px;
}

.legal-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--sf-dark);
  margin-bottom: 8px;
}

.legal-updated {
  color: var(--sf-gray);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

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

.legal-section {
  margin-bottom: 28px;
}

.legal-section h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--sf-dark);
  margin-bottom: 10px;
}

.legal-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--sf-dark);
  margin: 16px 0 6px;
}

.legal-section p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--sf-gray);
  margin-bottom: 8px;
}

.legal-section ul {
  margin: 8px 0 8px 24px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--sf-gray);
}

.legal-section a {
  color: var(--sf-red);
}

/* ============================================
   Responsive Design
   ============================================ */

/* --- Tablet (max-width: 1024px) --- */
@media (max-width: 1024px) {
  .hero .container {
    flex-direction: column;
  }

  .hero-image-wrapper {
    flex: none;
    width: 100%;
    max-width: 500px;
    margin: 30px auto 0;
  }

  .story-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .discounts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Mobile (max-width: 768px) --- */
@media (max-width: 768px) {
  .hero-title {
    font-size: 1.8rem;
  }

  .section-heading {
    font-size: 1.4rem;
  }

  .story-cards {
    grid-template-columns: 1fr;
  }

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

  .quote-form {
    padding: 16px;
  }

  .container {
    padding: 0 16px;
  }
}
