/*
Theme Name: Lilo Car Wash
Theme URI: https://lilosrl.it
Description: A clean, modern WordPress theme for Noleggio Lilo SRL car wash services in Trieste
Version: 2.0
Author: Lilo Development Team
Text Domain: lilo-carwash
*/

/* ================================
   DESIGN SYSTEM - COLOR PALETTE
   ================================ */
:root {
  /* Primary Brand Colors */
  --lilo-green: #7bc74c;
  --lilo-green-dark: #6ab03d;
  --lilo-green-light: #8cd75f;
  
  /* Neutral Colors */
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Semantic Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
  
  /* Design System Values */
  --border-radius: 24px;
  --border-radius-sm: 12px;
  --border-radius-lg: 32px;
  --max-width: 1600px;
  --spacing-unit: 8px;
  
  /* Shadows for haptic feel */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* Transitions for smooth feel */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================================
   BASE STYLES
   ================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--gray-800);
  line-height: 1.6;
  overflow-x: hidden;
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-900);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p {
  margin-bottom: 1rem;
}

/* ================================
   CONTAINER SYSTEM
   ================================ */
.site-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .site-container {
    padding: 0 3rem;
  }
}

@media (min-width: 1200px) {
  .site-container {
    padding: 0 4rem;
  }
}

/* ================================
   SMOOTH TRANSITIONS & HAPTIC FEEL
   ================================ */
a, button, .card, .service-card, .gallery-item, 
.service-tab, input, textarea, select {
  transition: all var(--transition-base);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--lilo-green);
}

/* Button Base Styles */
button, .btn {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  padding: 0.75rem 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

button:hover, .btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

button:active, .btn:active {
  transform: translateY(0);
}

/* ================================
   BRAND ACCENT - LIME GREEN
   ================================ */
.btn-phone,
.btn-primary,
.bg-accent {
  background-color: var(--lilo-green) !important;
  color: var(--white) !important;
}

.btn-phone:hover,
.btn-primary:hover {
  background-color: var(--lilo-green-dark) !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(123, 199, 76, 0.3);
}

.text-accent {
  color: var(--lilo-green) !important;
}

.border-accent {
  border-color: var(--lilo-green) !important;
}

/* Hover state for phone numbers and CTAs */
a[href^="tel:"] {
  color: var(--lilo-green);
  font-weight: 600;
  transition: all var(--transition-base);
}

a[href^="tel:"]:hover {
  color: var(--lilo-green-dark);
  text-decoration: none;
}

/* ================================
   IMAGE STYLING WITH ROUNDED CORNERS
   ================================ */
img {
  border-radius: var(--border-radius);
  max-width: 100%;
  height: auto;
  display: block;
}

/* ================================
   CARD COMPONENTS
   ================================ */
.card, .service-card, .review-card {
  background: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: all var(--transition-base);
}

.card:hover, .service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-2xl);
}

.review-card {
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-100);
}

.review-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
  border-color: var(--lilo-green);
}

/* ================================
   SERVICE TABS
   ================================ */
.service-tabs {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--lilo-green) var(--gray-100);
}

.service-tabs::-webkit-scrollbar {
  height: 6px;
}

.service-tabs::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: 3px;
}

.service-tabs::-webkit-scrollbar-thumb {
  background: var(--lilo-green);
  border-radius: 3px;
}

.service-tab {
  padding: 0.875rem 1.75rem;
  border-radius: 9999px;
  background: var(--white);
  border: 2px solid var(--gray-200);
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.service-tab:hover {
  border-color: var(--lilo-green);
  color: var(--lilo-green);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.service-tab.active {
  background: var(--lilo-green);
  color: var(--white);
  border-color: var(--lilo-green);
  box-shadow: var(--shadow-lg);
}

/* ================================
   GALLERY GRID
   ================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  aspect-ratio: 4/3;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

.gallery-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.3));
  opacity: 0;
  transition: opacity var(--transition-base);
  z-index: 1;
}

.gallery-item:hover::before {
  opacity: 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
  border-radius: 0;
}

.gallery-item:hover {
  box-shadow: var(--shadow-2xl);
}

.gallery-item:hover img {
  transform: scale(1.08);
}

/* ================================
   COMPARISON SLIDER
   ================================ */
.comparison-slider-wrapper {
  position: relative;
  user-select: none;
}

.comparison-slider {
  position: relative;
  overflow: hidden;
  cursor: ew-resize;
  touch-action: none;
}

.comparison-after {
  position: relative;
}

.comparison-after img,
.comparison-before img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  border-radius: 0 !important;
}

.comparison-before {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  overflow: hidden;
  z-index: 2;
  width: 50%;
}

.comparison-before img {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: auto;
  max-width: none;
  min-width: 100%;
  object-fit: cover;
}

.comparison-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  z-index: 3;
  cursor: ew-resize;
  transform: translateX(-50%);
  touch-action: none;
}

.handle-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: white;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.handle-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--lilo-green) 0%, var(--lilo-green-dark) 100%);
  border: 4px solid white;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.handle-circle [data-lucide] {
  color: white;
}

@media (max-width: 768px) {
  .handle-circle {
    width: 54px;
    height: 54px;
  }
}

/* ================================
   FORM ELEMENTS
   ================================ */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--border-radius-sm);
  font-family: inherit;
  font-size: 1rem;
  transition: all var(--transition-base);
  background: var(--white);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--lilo-green);
  box-shadow: 0 0 0 3px rgba(123, 199, 76, 0.1);
}

input::placeholder,
textarea::placeholder {
  color: var(--gray-400);
}

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

.fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Stagger animation for multiple elements */
.fade-in-up:nth-child(1) { animation-delay: 0ms; }
.fade-in-up:nth-child(2) { animation-delay: 100ms; }
.fade-in-up:nth-child(3) { animation-delay: 200ms; }
.fade-in-up:nth-child(4) { animation-delay: 300ms; }

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ================================
   ICON STYLING
   ================================ */
[data-lucide] {
  display: inline-block;
  vertical-align: middle;
}

/* ================================
   UTILITY CLASSES
   ================================ */
.smooth-scroll {
  scroll-behavior: smooth;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ================================
   RESPONSIVE UTILITIES
   ================================ */
@media (max-width: 767px) {
  .hide-mobile {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .hide-desktop {
    display: none !important;
  }
}

/* ================================
   ACCESSIBILITY
   ================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 2px solid var(--lilo-green);
  outline-offset: 2px;
}

/* ================================
   PRINT STYLES
   ================================ */
@media print {
  .no-print {
    display: none !important;
  }
  
  a[href]:after {
    content: " (" attr(href) ")";
  }
}

/* ================================
   LIGHTBOX GALLERY
   ================================ */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  animation: lightboxZoom 0.3s ease;
}

@keyframes lightboxZoom {
  from {
    transform: scale(0.8);
  }
  to {
    transform: scale(1);
  }
}

.lightbox-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--border-radius);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10000;
}

.lightbox-close:hover {
  background: var(--lilo-green);
  transform: rotate(90deg);
}

.lightbox-close svg {
  width: 24px;
  height: 24px;
  color: var(--gray-900);
}

.lightbox-close:hover svg {
  color: white;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10000;
}

.lightbox-nav:hover {
  background: var(--lilo-green);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-nav svg {
  width: 24px;
  height: 24px;
  color: var(--gray-900);
}

.lightbox-nav:hover svg {
  color: white;
}

.gallery-item {
  cursor: zoom-in;
}