/* Mázas Mosó - Premium Car Detailing Website */
/* Shared stylesheet with theme system, typography, and bento grid */

/* ============================================
   CSS CUSTOM PROPERTIES / THEME VARIABLES
   ============================================ */

:root {
  /* Light Mode Colors */
  --color-bg: #FAFAFA;
  --color-surface: #FFFFFF;
  --color-surface-secondary: #F5F5F5;
  --color-primary: #1A3A52;
  --color-primary-light: #2D5A7B;
  --color-primary-dark: #0F2438;
  --color-accent: #C9A961;
  --color-accent-hover: #B8985A;
  --color-text: #1A1A1A;
  --color-text-secondary: #4A4A4A;
  --color-text-muted: #767676;
  --color-border: #E8E8E8;
  --color-success: #4CAF50;
  --color-warning: #FFC107;
  --color-error: #F44336;

  /* Shadow Palette - Light */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.15);

  /* Spacing */
  --space-unit: 8px;
  --space-xs: calc(var(--space-unit) * 1);
  --space-sm: calc(var(--space-unit) * 2);
  --space-md: calc(var(--space-unit) * 3);
  --space-lg: calc(var(--space-unit) * 4);
  --space-xl: calc(var(--space-unit) * 5);
  --space-2xl: calc(var(--space-unit) * 6);
  --space-3xl: calc(var(--space-unit) * 8);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Transitions */
  --transition-fast: 0.15s ease-in-out;
  --transition-base: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;

  /* Typography */
  --font-family-serif: 'Georgia', 'Garamond', serif;
  --font-family-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
  --font-family-heading: 'Georgia', 'Garamond', serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  --line-height-tight: 1.2;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.8;
}

/* Dark Mode */
[data-theme="dark"] {
  --color-bg: #0F0F0F;
  --color-surface: #1A1A1A;
  --color-surface-secondary: #242424;
  --color-text: #F5F5F5;
  --color-text-secondary: #D0D0D0;
  --color-text-muted: #909090;
  --color-border: #333333;

  /* Softer shadows in dark mode */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.7);
}

/* ============================================
   GLOBAL STYLES
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: background-color var(--transition-base), color var(--transition-base);
}

/* Smooth theme transitions */
* {
  transition: background-color var(--transition-base), color var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-base);
}

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

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: 700;
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--font-size-5xl);
}

h2 {
  font-size: var(--font-size-4xl);
}

h3 {
  font-size: var(--font-size-3xl);
}

h4 {
  font-size: var(--font-size-2xl);
}

h5 {
  font-size: var(--font-size-xl);
}

h6 {
  font-size: var(--font-size-lg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

p {
  margin-bottom: var(--space-lg);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

small {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.lead {
  font-size: var(--font-size-lg);
  font-weight: 300;
  color: var(--color-text-secondary);
}

/* ============================================
   NAVIGATION
   ============================================ */

header {
  background-color: var(--color-primary);
  color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

nav {
  padding: var(--space-lg) 0;
}

.navbar-brand {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: white !important;
  letter-spacing: -0.01em;
}

.nav-item a {
  color: rgba(255, 255, 255, 0.8) !important;
  font-size: var(--font-size-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color var(--transition-base);
  padding: var(--space-sm) var(--space-md) !important;
}

.nav-item a:hover,
.nav-item a.active {
  color: var(--color-accent) !important;
}

.nav-controls {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  margin-left: var(--space-lg);
}

.nav-button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: var(--font-size-lg);
  padding: var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  transition: background-color var(--transition-base), color var(--transition-base);
}

.nav-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--color-accent);
}

/* ============================================
   BUTTONS & CTAs
   ============================================ */

.btn, button {
  font-family: var(--font-family-sans);
  font-weight: 600;
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background-color: var(--color-primary);
  color: white;
  border: 2px solid var(--color-accent);
}

.btn-secondary:hover {
  background-color: var(--color-primary-dark);
  color: var(--color-accent);
}

.btn-accent {
  background-color: var(--color-accent);
  color: var(--color-primary);
}

.btn-accent:hover {
  background-color: var(--color-accent-hover);
}

.btn-lg {
  padding: var(--space-lg) var(--space-2xl);
  font-size: var(--font-size-lg);
}

.btn-sm {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-size-xs);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  padding: calc(var(--space-3xl) * 2) 0;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(201, 169, 97, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(45, 90, 123, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  animation: fadeInUp 0.8s ease-out;
}

.hero h1 {
  color: white;
  margin-bottom: var(--space-lg);
  font-size: clamp(2.5rem, 8vw, 4rem);
}

.hero p {
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-2xl);
}

.hero-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   BENTO GRID SYSTEM
   ============================================ */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-2xl);
  margin: var(--space-2xl) 0;
}

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

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

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

/* Bento specific: varying spans */
.grid-item {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.grid-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.grid-item.span-2 {
  grid-column: span 2;
}

.grid-item.span-2-row {
  grid-row: span 2;
}

.grid-item.span-full {
  grid-column: 1 / -1;
}

@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .grid-item.span-2 {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .grid, .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .grid-item.span-2,
  .grid-item.span-2-row,
  .grid-item.span-full {
    grid-column: 1;
    grid-row: auto;
  }
}

/* ============================================
   CARDS & TILES
   ============================================ */

.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-header {
  background-color: var(--color-primary);
  color: white;
  padding: var(--space-lg);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-body {
  padding: var(--space-xl);
}

.card-title {
  color: var(--color-primary);
  margin-bottom: var(--space-md);
  font-size: var(--font-size-xl);
}

.card-text {
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

.card-footer {
  background-color: var(--color-surface-secondary);
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--color-border);
}

/* ============================================
   SERVICE ICONS & TILES
   ============================================ */

.service-tile {
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-surface-secondary) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  text-align: center;
  transition: all var(--transition-base);
  cursor: pointer;
}

.service-tile:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent);
}

.service-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-lg);
  fill: var(--color-accent);
  transition: fill var(--transition-base), transform var(--transition-base);
}

.service-tile:hover .service-icon {
  transform: scale(1.1);
  fill: var(--color-accent-hover);
}

.service-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}

.service-description {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
}

/* ============================================
   TESTIMONIALS
   ============================================ */

.testimonial-card {
  background-color: var(--color-surface);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.testimonial-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.testimonial-stars {
  color: var(--color-accent);
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-md);
}

.testimonial-text {
  font-size: var(--font-size-lg);
  color: var(--color-text);
  font-style: italic;
  margin-bottom: var(--space-md);
  line-height: var(--line-height-relaxed);
}

.testimonial-author {
  font-weight: 700;
  color: var(--color-primary);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   FORMS & INPUTS
   ============================================ */

.form-group {
  margin-bottom: var(--space-lg);
}

label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: 600;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: var(--font-size-sm);
}

input, textarea, select {
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-family-sans);
  font-size: var(--font-size-base);
  color: var(--color-text);
  background-color: var(--color-surface);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.1);
}

textarea {
  resize: vertical;
  min-height: 150px;
}

/* ============================================
   SECTIONS & CONTAINERS
   ============================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

section {
  padding: var(--space-3xl) 0;
}

section.bg-surface {
  background-color: var(--color-surface);
}

section.bg-secondary {
  background-color: var(--color-surface-secondary);
}

section.bg-primary {
  background-color: var(--color-primary);
  color: white;
}

section.bg-primary h2,
section.bg-primary h3 {
  color: white;
}

section.bg-primary p {
  color: rgba(255, 255, 255, 0.9);
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  background-color: var(--color-primary);
  color: white;
  padding: var(--space-3xl) 0 var(--space-lg);
  margin-top: var(--space-3xl);
}

footer h6 {
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}

footer a {
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition-base);
}

footer a:hover {
  color: var(--color-accent);
}

footer p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-md);
  font-size: var(--font-size-sm);
}

.footer-divider {
  border-color: rgba(255, 255, 255, 0.1);
  margin: var(--space-2xl) 0;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   IMAGES
   ============================================ */

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
}

.img-fluid {
  width: 100%;
  height: auto;
}

.img-shadow {
  box-shadow: var(--shadow-lg);
}

/* ============================================
   UTILITIES
   ============================================ */

.text-center {
  text-align: center;
}

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

.text-right {
  text-align: right;
}

.text-accent {
  color: var(--color-accent);
}

.text-muted {
  color: var(--color-text-muted);
}

.text-white {
  color: white;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }
.mb-5 { margin-bottom: var(--space-2xl); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }
.mt-5 { margin-top: var(--space-2xl); }

.py-3 { padding: var(--space-lg) 0; }
.py-5 { padding: var(--space-2xl) 0; }

.px-3 { padding: 0 var(--space-lg); }

.mx-auto { margin-left: auto; margin-right: auto; }

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gap-2 { gap: var(--space-md); }
.gap-3 { gap: var(--space-lg); }

.rounded {
  border-radius: var(--radius-md);
}

.rounded-lg {
  border-radius: var(--radius-lg);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

.slide-in-left {
  animation: slideInLeft 0.8s ease-out;
}

/* Stagger animation for lists */
.grid-item:nth-child(1) { animation: fadeInUp 0.5s ease-out 0.1s both; }
.grid-item:nth-child(2) { animation: fadeInUp 0.5s ease-out 0.2s both; }
.grid-item:nth-child(3) { animation: fadeInUp 0.5s ease-out 0.3s both; }
.grid-item:nth-child(4) { animation: fadeInUp 0.5s ease-out 0.4s both; }
.grid-item:nth-child(n+5) { animation: fadeInUp 0.5s ease-out 0.5s both; }

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  html {
    font-size: 16px;
  }

  h1 {
    font-size: var(--font-size-3xl);
  }

  h2 {
    font-size: var(--font-size-2xl);
  }

  .container {
    padding: 0 var(--space-md);
  }

  section {
    padding: var(--space-2xl) 0;
  }

  .hero {
    min-height: 50vh;
    padding: var(--space-2xl) 0;
  }

  .hero h1 {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  nav {
    padding: var(--space-md) 0;
  }

  .nav-controls {
    margin-left: var(--space-md);
    gap: var(--space-sm);
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: var(--font-size-2xl);
  }

  h2 {
    font-size: var(--font-size-xl);
  }

  p {
    font-size: var(--font-size-sm);
  }

  .btn {
    padding: var(--space-md) var(--space-lg);
    font-size: var(--font-size-xs);
  }

  .card-body {
    padding: var(--space-lg);
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --color-accent: #9D7E40;
  }
}

/* Print Styles */
@media print {
  header, footer, .nav-controls, .btn-primary {
    display: none;
  }

  body {
    background-color: white;
  }

  .card {
    box-shadow: none;
  }
}
