/*
  Global Styles for Southern Utah Detailing - Dark Professional Theme
  - Variables, Reset, Typography, Layout
  - Mobile-first with responsive utilities
  - Theme: Dark Grey Background, Red Accents, White Text
*/

:root {
  /* Southern Utah Detailing Brand Colors */
  --cd-primary: #D32F2F; /* Red - Buttons & Accents */
  --cd-primary-dark: #B71C1C; /* Darker Red - Hover */
  --cd-primary-light: rgba(211, 47, 47, 0.1); /* Red Tint */
  --cd-bg: #2B2B2B; /* Dark Grey - Main Background */
  --cd-surface: #353535; /* Darker Grey - Cards/Surfaces */
  --cd-surface-hover: #404040; /* Lighter Dark Grey - Hover States */
  --cd-input-bg: #424242; /* Dark Input Backgrounds */
  --cd-text: #FFFFFF; /* White - Primary Text */
  --cd-text-dark: #FFFFFF; /* White Text */
  --cd-muted: #B0B0B0; /* Muted Light Grey Text */
  --cd-border: #505050; /* Medium Grey Border */
  --cd-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --cd-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
  --cd-glow: 0 0 20px rgba(211, 47, 47, 0.3);
  --cd-radius: 16px;
  --cd-radius-sm: 12px;
  --cd-container: 1200px;
  --cd-transition: 220ms cubic-bezier(.22,.61,.36,1);
}

/* Reset */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Noto Sans', 'Helvetica Neue', Arial, 'Apple Color Emoji', 'Segoe UI Emoji';
  color: var(--cd-text);
  background-color: var(--cd-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; border-radius: var(--cd-radius-sm); }

/* Links & Buttons */
a { color: var(--cd-primary); text-decoration: none; transition: color var(--cd-transition); }
a:hover { color: var(--cd-primary-dark); }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 14px 28px; border-radius: var(--cd-radius-sm);
  background: var(--cd-primary);
  color: #ffffff; border: none; cursor: pointer;
  font-weight: 700; font-size: 15px; letter-spacing: .3px;
  box-shadow: var(--cd-shadow), var(--cd-glow);
  transition: all var(--cd-transition);
  position: relative; overflow: hidden;
}
.button::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
  opacity: 0; transition: opacity var(--cd-transition);
}
.button:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(211, 47, 47, 0.5); background: var(--cd-primary-dark); }
.button:hover::before { opacity: 1; }
.button:active { transform: translateY(-1px); }
.button.secondary { background: var(--cd-surface); color: var(--cd-text); box-shadow: var(--cd-shadow); }
.button.secondary:hover { background: var(--cd-surface-hover); box-shadow: var(--cd-shadow-lg); }
.button.outline { background: transparent; color: var(--cd-primary); border: 2px solid var(--cd-primary); box-shadow: none; }
.button.outline:hover { background: var(--cd-primary-light); border-color: var(--cd-primary-dark); }
.button.block { width: 100%; }
.button.icon { padding: 12px 14px; }

/* Layout */
.container { width: 100%; max-width: var(--cd-container); margin: 0 auto; padding: 0 24px; }
.grid { display: grid; gap: 28px; }
.section { padding: 64px 0; }
.section.sm { padding: 40px 0; }
.card {
  background: var(--cd-surface);
  border: 1px solid var(--cd-border);
  border-radius: var(--cd-radius);
  box-shadow: var(--cd-shadow);
  overflow: hidden;
  transition: all var(--cd-transition);
  backdrop-filter: blur(10px);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--cd-shadow-lg);
  border-color: rgba(14, 165, 233, 0.3);
}
.card-body { padding: 28px; }
.card-title { font-size: 1.35rem; font-weight: 700; margin: 0 0 10px; color: var(--cd-text); }
.card-subtitle { color: var(--cd-muted); margin: 0 0 18px; font-size: 15px; }

/* Typography */
.h1 {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.22;
  margin: 0 0 20px;
  padding-bottom: 2px;
  color: var(--cd-primary);
}
.h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800; margin: 0 0 16px;
  color: var(--cd-primary);
}
.h3 { font-size: 1.4rem; font-weight: 700; margin: 0 0 10px; color: var(--cd-text); }
.p { margin: 0 0 18px; color: var(--cd-text); line-height: 1.7; }
.muted { color: var(--cd-muted); }

/* Section headings */
.section .h1 {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 20px;
}
.section p.muted {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 820px;
}

/* Nav & Header base */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(26, 26, 26, 0.85);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--cd-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.nav-brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 800; font-size: 0.9rem;
  color: var(--cd-text);
  transition: color var(--cd-transition);
  flex: 1;
}
.nav-brand:hover { color: var(--cd-primary); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-logo { height: 64px; width: auto; max-width: 80px; object-fit: contain; border-radius: 4px; }
.nav-menu {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  position: static;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  border: none;
  box-shadow: none;
  transform: none;
  opacity: 1;
  pointer-events: auto;
}
.nav-menu.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 72px;
  left: 0;
  right: 0;
  background: rgba(43, 43, 43, 0.95);
  backdrop-filter: blur(16px);
  flex-direction: column;
  padding: 16px 24px;
  border-bottom: 1px solid var(--cd-border);
  gap: 8px;
  z-index: 40;
}
.nav-menu a {
  display: block; padding: 14px 12px;
  border-radius: var(--cd-radius-sm);
  color: var(--cd-text);
  font-weight: 600;
  transition: all var(--cd-transition);
}
.nav-menu a:hover { background: var(--cd-surface); color: var(--cd-primary); }
.nav-toggle { 
  display: flex; 
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--cd-text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  transition: color var(--cd-transition);
}
.nav-toggle:hover { color: var(--cd-primary); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  justify-content: center;
  text-align: center;
  gap: 32px;
  padding: 56px 0;
}
.hero .cta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; justify-content: center; }
.hero-img { justify-self: center; }
.hero .h1 {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.hero-img {
  border-radius: var(--cd-radius);
  overflow: hidden;
  box-shadow: var(--cd-shadow-lg);
  transition: all var(--cd-transition);
  border: 1px solid var(--cd-border);
}
.hero-img:hover {
  transform: scale(1.02);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), var(--cd-glow);
}
.hero-badge {
  display: inline-block;
  background: var(--cd-primary-light);
  color: var(--cd-primary);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .9rem;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

/* Forms */
.form { display: grid; gap: 20px; }
.input, .select, .textarea {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid transparent;
  border-radius: var(--cd-radius-sm);
  background: var(--cd-input-bg);
  color: var(--cd-text-dark);
  font-size: 15px;
  outline: none;
  transition: all var(--cd-transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--cd-primary);
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3), var(--cd-glow);
  transform: translateY(-1px);
}
.input::placeholder, .textarea::placeholder {
  color: #999;
}
.textarea { min-height: 140px; resize: vertical; }
.form-row { display: grid; gap: 16px; }
label {
  display: block;
  margin-bottom: 6px;
  color: var(--cd-text);
  font-weight: 600;
  font-size: 14px;
}

/* Components */
.badge {
  display: inline-flex; align-items: center;
  padding: 8px 14px; border-radius: 999px;
  background: var(--cd-surface);
  color: var(--cd-text);
  font-weight: 600; font-size: .9rem;
  border: 1px solid var(--cd-border);
}
.price {
  font-size: 2.5rem; font-weight: 800;
  background: linear-gradient(135deg, var(--cd-primary) 0%, var(--cd-primary-dark) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 8px 0;
}

/* Carousel */
.carousel { position: relative; overflow: hidden; border-radius: var(--cd-radius); }
.carousel-track { display: flex; transition: transform .6s cubic-bezier(.4,0,.2,1); }
.carousel-item { min-width: 100%; padding: 20px; }
.carousel-nav { display: flex; justify-content: center; gap: 14px; margin-top: 20px; }
.carousel-btn {
  width: 12px; height: 12px;
  border-radius: 999px;
  background: var(--cd-surface);
  border: 2px solid var(--cd-border);
  cursor: pointer;
  transition: all var(--cd-transition);
}
.carousel-btn:hover { background: var(--cd-surface-hover); transform: scale(1.2); }
.carousel-btn.active {
  background: var(--cd-primary);
  border-color: var(--cd-primary);
  box-shadow: var(--cd-glow);
  width: 32px;
}

/* Accordion */
.accordion-item {
  border-bottom: 1px solid var(--cd-border);
  background: var(--cd-surface);
  margin-bottom: 12px;
  border-radius: var(--cd-radius-sm);
  overflow: hidden;
  transition: all var(--cd-transition);
}
.accordion-item:hover { background: var(--cd-surface-hover); }
.accordion-button {
  width: 100%; text-align: left;
  background: transparent; border: none;
  padding: 20px 24px;
  font-weight: 700; font-size: 1.05rem;
  color: var(--cd-text);
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer;
  transition: all var(--cd-transition);
}
.accordion-button:hover { color: var(--cd-primary); }
.accordion-panel {
  max-height: 0; overflow: hidden;
  transition: max-height .3s cubic-bezier(.4,0,.2,1);
  padding: 0 24px;
  color: var(--cd-muted);
}
.accordion-item.open .accordion-panel { padding-bottom: 24px; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  z-index: 60; opacity: 0;
}
.lightbox.open { display: flex; animation: fadeIn .25s ease forwards; }
.lightbox img {
  max-width: min(1000px, 92%);
  max-height: 90%;
  border-radius: var(--cd-radius);
  box-shadow: var(--cd-shadow-lg), 0 0 40px rgba(14, 165, 233, 0.2);
  transform: scale(.96);
  animation: popIn .3s cubic-bezier(.4,0,.2,1) forwards;
  border: 2px solid var(--cd-border);
}

/* Footer */
.footer {
  background: linear-gradient(180deg, rgba(26, 26, 26, 0) 0%, rgba(15, 15, 15, 1) 20%, #0f0f0f 100%);
  color: var(--cd-text);
  padding: 56px 0 32px;
  margin-top: 80px;
  border-top: 1px solid var(--cd-border);
}
.footer a { color: var(--cd-primary); transition: color var(--cd-transition); }
.footer a:hover { color: var(--cd-primary-dark); }
.footer .footer-grid { display: grid; gap: 32px; }
.footer .legal {
  border-top: 1px solid var(--cd-border);
  margin-top: 32px; padding-top: 20px;
  font-size: .9rem; color: var(--cd-muted);
}

/* Utilities */
.hide { display: none !important; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; }
.pt-0 { padding-top: 0; } .pt-16 { padding-top: 16px; } .pt-24 { padding-top: 24px; } .pt-32 { padding-top: 32px; }
.pb-0 { padding-bottom: 0; } .pb-16 { padding-bottom: 16px; } .pb-24 { padding-bottom: 24px; } .pb-32 { padding-bottom: 32px; }

/* Animations */
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes popIn { to { transform: scale(1); } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 200%; }
}

/* Newsletter */
.newsletter {
  background: linear-gradient(135deg, var(--cd-surface) 0%, rgba(42, 42, 42, 0.6) 100%);
  border: 1px solid var(--cd-border);
  border-radius: var(--cd-radius);
  padding: 32px;
  box-shadow: var(--cd-shadow-lg);
  position: relative;
  overflow: hidden;
}
.newsletter::before {
  content: ''; position: absolute;
  top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.1), transparent);
  animation: shimmer 3s infinite;
}
.newsletter .input { border-radius: 999px; }
.newsletter .button { border-radius: 999px; }

/* Responsive */
@media (min-width: 640px) {
  .grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; }
  .nav-brand { font-size: 1.1rem; }
  .nav-logo { height: 48px; max-width: 60px; }
}
@media (min-width: 768px) {
  .grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nav-brand { font-size: 1.3rem; }
  .nav-menu { display: flex; }
  .nav-toggle { display: none; }
  .nav-logo { height: 64px; max-width: 80px; }
}
@media (min-width: 1024px) {
  .grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Date/Time Picker - Modern SaaS Style */
.date-time-picker {
  position: relative;
}

.date-time-input {
  width: 100%;
  padding: 14px 16px;
  background-color: var(--cd-input-bg);
  border: 1px solid var(--cd-border);
  border-radius: 10px;
  color: var(--cd-text);
  cursor: pointer;
  text-align: left;
  transition: all var(--cd-transition);
  font-size: 1rem;
  font-family: inherit;
  font-weight: 500;
}

.date-time-input:hover {
  border-color: rgba(211, 47, 47, 0.4);
  background-color: rgba(65, 65, 65, 0.8);
}

.date-time-input:focus {
  outline: none;
  border-color: var(--cd-primary);
  box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.15);
}

.date-time-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 12px;
  background-color: var(--cd-surface);
  border: 1px solid rgba(80, 80, 80, 0.6);
  border-radius: 12px;
  padding: 24px;
  z-index: 1000;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

.date-time-dropdown.hide {
  display: none;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 0;
  border-bottom: none;
}

.calendar-nav {
  background: none;
  border: none;
  color: var(--cd-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 6px 10px;
  transition: all var(--cd-transition);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-nav:hover {
  color: var(--cd-primary);
  background-color: rgba(211, 47, 47, 0.08);
}

.calendar-title {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--cd-text);
  letter-spacing: 0.3px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin-bottom: 0;
}

.calendar-weekday {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--cd-muted);
  padding: 12px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  color: var(--cd-text);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all var(--cd-transition);
}

.calendar-day:hover:not(.disabled):not(.other-month) {
  background-color: rgba(80, 80, 80, 0.6);
}

.calendar-day.other-month {
  color: var(--cd-muted);
  cursor: default;
  opacity: 0.3;
}

.calendar-day.available {
  border: 2px solid var(--cd-primary);
  background-color: rgba(211, 47, 47, 0.05);
  box-shadow: none;
}

.calendar-day.available:hover {
  background-color: rgba(211, 47, 47, 0.12);
  border-color: var(--cd-primary);
}

.calendar-day.selected {
  background-color: var(--cd-primary);
  border-color: var(--cd-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

.calendar-day.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background-color: transparent;
}

.calendar-day.today {
  font-weight: 600;
}

.time-select-container {
  border-top: 1px solid rgba(80, 80, 80, 0.4);
  padding-top: 20px;
  margin-top: 16px;
}

.time-select-container.hide {
  display: none;
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
}

.time-button {
  padding: 12px 8px;
  background-color: rgba(65, 65, 65, 0.6);
  border: 1px solid rgba(80, 80, 80, 0.6);
  border-radius: 10px;
  color: var(--cd-text);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--cd-transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.time-button:hover:not(.selected) {
  background-color: rgba(80, 80, 80, 0.8);
  border-color: rgba(211, 47, 47, 0.4);
}

.time-button.selected {
  background-color: var(--cd-primary);
  border-color: var(--cd-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}
/* Service Cards */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.service-card {
  padding: 16px;
  background-color: rgba(65, 65, 65, 0.6);
  border: 1px solid rgba(80, 80, 80, 0.6);
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--cd-transition);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.service-card:hover:not(.selected) {
  background-color: rgba(80, 80, 80, 0.8);
  border-color: rgba(211, 47, 47, 0.4);
  transform: translateY(-2px);
}

.service-card.selected {
  background-color: var(--cd-primary);
  border-color: var(--cd-primary);
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

.service-card-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--cd-text);
  margin: 0;
}

.service-card.selected .service-card-name {
  color: #ffffff;
}

.service-card-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--cd-primary);
  margin: 0;
}

.service-card.selected .service-card-price {
  color: #ffffff;
}

.service-card-description {
  font-size: 0.9rem;
  color: var(--cd-text-muted);
  margin: 0;
  line-height: 1.4;
}

.service-card.selected .service-card-description {
  color: rgba(255, 255, 255, 0.9);
}