:root {
  /* -- Color Palette (Luxury Wedding Theme) -- */
  --bg-body: #F9F8F6; /* Warm Alabaster */
  --bg-card: #FFFFFF;
  --text-main: #3C3C3C; /* Soft Charcoal */
  --text-muted: #6B6B6B;
  --primary: #4A5D52; /* Deep Sage Green */
  --primary-hover: #37463D;
  --accent: #D4A373; /* Muted Gold/Sand */
  --accent-light: #FDF6EE;
  --border-light: #EBEBEB;
  --shadow-soft: 0 10px 30px rgba(74, 93, 82, 0.08);
  
  /* -- Typography -- */
  --font-heading: 'Cormorant Garamond', serif;
  --font-body: 'Lato', sans-serif;
}

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

body {
  margin: 0;
  padding: 0; /* Reset padding because Header/Footer handle spacing */
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-footer {
  margin-top: auto;
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  padding: 18px 0 26px;
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: flex-end;
}

.footer-link {
  color: var(--text-muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.footer-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* -- HEADER STYLES -- */
.site-header {
  background: #ffffff;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 40px;
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.logo-image {
  height: 48px;
  width: auto;
  display: block;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 24px;
  align-items: center;
}

.site-nav a {
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

.site-nav a:hover {
  color: var(--primary);
}

.site-nav .nav-cta {
  padding: 8px 20px;
  background: var(--primary);
  color: #fff;
  border-radius: 50px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.site-nav .nav-cta:hover {
  background: var(--primary-hover);
  color: #fff;
  transform: translateY(-1px);
}

/* -- SHARED: Typography -- */
h1, h2, h3 {
  font-family: var(--font-heading);
  color: #1a1a1a;
  margin-top: 0;
}

h1 {
  font-size: 2.8rem;
  font-weight: 400;
  text-align: center;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

/* -- SHARED: Main Container -- */
/* Applies to both Quiz and Budget pages */
.quiz-container,
.estimator-container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-card);
  padding: 48px 40px;
  border-radius: 2px;
  box-shadow: var(--shadow-soft);
  border-top: 4px solid var(--primary);
}

/* -- QUIZ SPECIFIC STYLES -- */
p.description {
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 3rem;
  font-size: 1.1rem;
}

.question {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-light);
  animation: fadeIn 0.5s ease-in-out;
}

.question:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.question-title {
  font-size: 1.4rem;
  font-family: var(--font-heading);
  margin-bottom: 1rem;
  color: var(--primary);
}

.question-help {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: block;
}

/* -- INTERACTIVE OPTIONS (Cards) -- */
.option-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.option-group label {
  cursor: pointer;
  padding: 12px 20px;
  border: 1px solid #d1d1d1;
  border-radius: 50px;
  background: white;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
}

.option-group label:hover {
  border-color: var(--primary);
  background: #F4F6F5;
}

/* Active State (Added via React Logic) */
.option-group label.selected {
  border-color: var(--primary);
  background-color: #F4F6F5;
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(74, 93, 82, 0.1);
}

input[type="radio"],
input[type="checkbox"] {
  accent-color: var(--primary);
  transform: scale(1.2);
  margin-right: 10px;
}

/* -- BUDGET FORM SPECIFIC -- */
.estimator-form {
  display: grid;
  gap: 24px;
}

label {
  font-weight: 700;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

select, 
.lead-row input[type="text"],
.lead-row input[type="email"],
.lead-row input[type="tel"] {
  padding: 14px;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 1rem;
  font-family: var(--font-body);
  background-color: #fff;
  width: 100%;
}

select:focus,
input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74, 93, 82, 0.1);
}

/* -- SHARED: Buttons -- */
.submit-row {
  margin-top: 40px;
  text-align: center;
}

button[type="submit"],
.cta-buttons button {
  padding: 16px 32px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--primary);
  color: #ffffff;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(74, 93, 82, 0.2);
  margin-top: 10px;
}

button[type="submit"]:hover,
.cta-buttons button:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.cta-buttons button.secondary {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  box-shadow: none;
}

.cta-buttons button.secondary:hover {
  background: var(--primary);
  color: white;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 50px;
  border: 1px solid var(--primary);
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.button.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(74, 93, 82, 0.18);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.button.secondary {
  background: transparent;
}

.button.full-width {
  width: 100%;
}

.quote-row {
  margin-top: 12px;
}

.quote-row input,
.quote-field {
  display: block;
  width: 100%;
  padding: 14px;
  height: 56px;
  min-height: 56px;
  line-height: 1.4;
  box-sizing: border-box;
  font-size: 1rem;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
}

/* -- RESULTS SECTION -- */
.results, .result {
  margin-top: 40px;
  padding: 30px;
  border-top: 1px solid var(--border-light);
  background: #fafafa;
  border-radius: 8px;
}

/* Budget Result Card specific */
.result {
  background: var(--accent-light);
  border-left: 4px solid var(--accent);
  border-top: none;
}

.result-item {
  border-radius: 8px;
  background: #ffffff;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border-left: 4px solid var(--accent);
}

.result-name, .result h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.result-rank {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.result-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.9rem;
  padding: 10px 24px;
  text-decoration: none;
  border: 1px solid var(--primary);
  color: var(--primary);
  background: transparent;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.result-link:hover {
  background: var(--primary);
  color: white;
}

.breakdown ul {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

.breakdown li {
  margin: 10px 0;
  color: var(--text-main);
  border-bottom: 1px dashed rgba(0,0,0,0.1);
  padding-bottom: 8px;
  display: flex;
  justify-content: space-between;
}

/* -- LEAD CAPTURE -- */
.lead-capture {
  margin: 30px 0 10px;
  padding: 30px;
  border-radius: 8px;
  background: #F4F6F5;
  border: 1px solid #DCE3DF;
  text-align: center;
}

.lead-capture h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.lead-row {
  display: flex;
  gap: 15px;
  flex-direction: column;
  margin-top: 15px;
  text-align: left;
}

/* Hub layout */
.hub-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: start;
}

.hub-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 20px;
}

.hub-sidebar__title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-bottom: 16px;
  color: var(--primary);
}

.hub-sidebar__user {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.hub-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.hub-sidebar__name {
  font-weight: 700;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.hub-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.hub-nav a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
}

.hub-nav a:hover {
  background: #f4f6f5;
  color: var(--primary);
}

.hub-main h1 {
  text-align: left;
}

.hub-section {
  margin-top: 28px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--bg-card);
  box-shadow: var(--shadow-soft);
  padding: 18px 18px 8px;
}

.hub-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hub-card {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: #f7f4ed;
}

.hub-card.empty {
  background: #f4f6f5;
}

.hub-card__title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
}

@media (max-width: 800px) {
  .hub-layout {
    grid-template-columns: 1fr;
  }

  .hub-sidebar {
    position: static;
  }
}

.error-message {
  color: #b91c1c;
  font-size: 0.85rem;
  margin-top: 4px;
}

/* -- FOOTER STYLES -- */
.site-footer {
  background: var(--primary);
  color: #ffffff;
  padding: 60px 20px 30px;
  margin-top: auto; /* Pushes footer to bottom */
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  opacity: 0.8;
  max-width: 300px;
  font-weight: 300;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  display: block;
  margin-bottom: 10px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links h4 {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  opacity: 0.6;
  margin-bottom: 8px;
  color: #fff;
}

.footer-links a {
  color: #ffffff;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.footer-links a:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer-copyright {
  max-width: 1000px;
  margin: 0 auto;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.5;
}

/* -- ANIMATIONS -- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* -- RESPONSIVE -- */
@media (min-width: 600px) {
  .lead-row {
    flex-direction: row;
  }
}

@media (max-width: 768px) {
  body { padding: 0; }
  .quiz-container, .estimator-container { padding: 30px 20px; margin: 20px; }
  
  .header-inner {
    flex-direction: column;
    gap: 15px;
  }
  
  .site-nav ul {
    gap: 15px;
    font-size: 0.9rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand p {
    margin: 0 auto;
  }
}
