/**
 * Website Theme CSS - Shared between Preview Mode and Production Site
 *
 * IMPORTANT: This file is used in BOTH:
 * - Backoffice Preview Mode (Shadow DOM)
 * - Production Nuxt 3 Site
 *
 * Any changes here will reflect in both environments.
 */

/* ============================================
   CSS RESET & BASE
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ============================================
   THEME VARIABLES - FALLBACK DEFAULTS ONLY
   These are overridden by PagePreview.vue's generateThemeVariables()
   ============================================ */
:host, :root {
  /* Typography - these are safe defaults, rarely overridden by theme */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  --font-size-base: 1rem;
  --line-height-base: 1.6;

  /* Layout - structural, not theme-dependent */
  --max-width: 1200px;
  --container-padding: 2rem;
  --spacing-unit: 1rem;

  /* Border Radius - structural */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;

  /* Shadows - can be themed but safe defaults */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

  /*
   * COLOR VARIABLES ARE INTENTIONALLY NOT SET HERE!
   * They are injected by PagePreview.vue from the template's themeConfigJson.
   * If you need fallbacks, use them inline: var(--background, #FFFFFF)
   *
   * Theme-controlled variables (set by PagePreview):
   * --primary-color, --color-primary
   * --secondary-color, --color-secondary
   * --background, --color-background
   * --surface, --color-surface
   * --text-color, --color-text
   * --text-secondary, --color-textSecondary
   * --border-color, --color-border
   * --primary-dark, --primary-light
   */
}

/* ============================================
   BASE TYPOGRAPHY
   ============================================ */
body, :host {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--text-color);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ============================================
   HERO BLOCK
   ============================================ */
.hero-block {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 4rem var(--container-padding);
  overflow: hidden;
}

.hero-large {
  min-height: 600px;
}

.hero-medium {
  min-height: 400px;
}

.hero-small {
  min-height: 300px;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  text-align: center;
}

.hero-align-left .hero-content {
  text-align: left;
  margin-right: auto;
  margin-left: 0;
}

.hero-align-center .hero-content {
  text-align: center;
  margin: 0 auto;
}

.hero-align-right .hero-content {
  text-align: right;
  margin-left: auto;
  margin-right: 0;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: white;
  opacity: 0.95;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ============================================
   TEXT BLOCK
   ============================================ */
.text-block {
  padding: 3rem var(--container-padding);
  margin: 0 auto;
}

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

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

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

.text-content {
  font-size: 1.125rem;
  line-height: 1.8;
  max-width: var(--max-width);
  margin: 0 auto;
}

.text-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
}

.text-content h2 {
  font-size: 2rem;
  font-weight: 600;
  margin: 1.75rem 0 1rem;
}

.text-content h3 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 1.5rem 0 1rem;
}

.text-content h4 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 1.5rem 0 1rem;
}

.text-content p {
  margin: 1rem 0;
}

.text-content strong, .text-content b {
  font-weight: 600;
}

.text-content em, .text-content i {
  font-style: italic;
}

.text-content ul, .text-content ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

.text-content li {
  margin: 0.5rem 0;
}

.text-content a {
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px solid var(--primary-light);
  transition: all 0.2s;
}

.text-content a:hover {
  color: var(--primary-dark);
  border-bottom-color: var(--primary-dark);
}

.text-content code {
  background: var(--surface);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: #E11D48;
}

.text-content blockquote {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
  border-left: 4px solid var(--primary-color);
  font-style: italic;
  color: var(--text-secondary);
}

/* ============================================
   IMAGE BLOCK
   ============================================ */
.image-block {
  padding: 2rem var(--container-padding);
  margin: 0 auto;
  max-width: var(--max-width);
}

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

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

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

.image-block img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s;
}

.image-block img:hover {
  transform: scale(1.02);
}

.image-caption {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* ============================================
   CTA BLOCK
   ============================================ */
.cta-block {
  position: relative;
  padding: 4rem var(--container-padding);
  background-size: cover;
  background-position: center;
  text-align: center;
  overflow: hidden;
}

.cta-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.cta-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
}

.cta-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
}

.cta-description {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: white;
  opacity: 0.95;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-button {
  padding: 0.75rem 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
}

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

.cta-button.primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.cta-button.secondary {
  background: transparent;
  color: white;
  border-color: white;
}

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

/* ============================================
   DIVIDER BLOCK
   ============================================ */
.divider-block {
  padding: 1rem var(--container-padding);
  margin: 0 auto;
}

.divider-line {
  border: none;
  border-top-style: solid;
  margin: 0 auto;
}

.divider-solid {
  border-top-style: solid;
}

.divider-dashed {
  border-top-style: dashed;
}

.divider-dotted {
  border-top-style: dotted;
}

/* ============================================
   SPACER BLOCK
   ============================================ */
.spacer-block {
  display: block;
}

/* ============================================
   GALLERY BLOCK
   ============================================ */
.gallery-block {
  padding: 2rem var(--container-padding);
  margin: 0 auto;
  max-width: var(--max-width);
}

.gallery-grid {
  display: grid;
  gap: 1rem;
}

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

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

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

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

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

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  :root {
    --container-padding: 1rem;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.25rem;
  }

  .text-content {
    font-size: 1rem;
  }

  .text-content h1 {
    font-size: 2rem;
  }

  .text-content h2 {
    font-size: 1.75rem;
  }

  .cta-title {
    font-size: 2rem;
  }

  .cta-description {
    font-size: 1.125rem;
  }

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

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

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 1.125rem;
  }

  .gallery-columns-2,
  .gallery-columns-3,
  .gallery-columns-4 {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   FEATURES BLOCK
   ============================================ */
.features-block {
  padding: 4rem var(--container-padding);
  background: var(--background);
}

.features-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text-color);
}

.features-grid {
  display: grid;
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.feature-card {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-color);
}

.feature-description {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================
   TESTIMONIALS BLOCK
   ============================================ */
.testimonials-block {
  padding: 4rem var(--container-padding);
  background: var(--surface);
}

.testimonials-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text-color);
}

.testimonials-container {
  display: grid;
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.testimonials-layout-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.testimonial-card {
  background: var(--background);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.testimonial-quote {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-color);
  font-style: italic;
  margin: 0 0 1.5rem 0;
  border-left: 3px solid var(--primary-color);
  padding-left: 1rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.testimonial-name {
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
}

.testimonial-author-title {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

.testimonial-rating {
  margin-bottom: 0.75rem;
}

/* ============================================
   FAQ BLOCK
   ============================================ */
.faq-block {
  padding: 4rem var(--container-padding);
  background: var(--background);
}

.faq-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text-color);
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text-color);
  font-family: inherit;
}

.faq-question:hover {
  color: var(--primary-color);
}

.faq-icon {
  transition: transform 0.2s;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.faq-question.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  padding-bottom: 1.25rem;
}

.faq-answer-content {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   CONTACT FORM BLOCK
   ============================================ */
.contact-form-block {
  padding: 4rem var(--container-padding);
  background: var(--surface);
}

.contact-form-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.contact-form-description {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-field {
  margin-bottom: 1.5rem;
}

.form-field label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.form-field .required {
  color: #dc2626;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: inherit;
  background: var(--background);
  color: var(--text-color);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

textarea.form-input {
  min-height: 120px;
  resize: vertical;
}

.form-submit-button {
  width: 100%;
  padding: 1rem 2rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.form-submit-button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* ============================================
   FLEET SHOWCASE BLOCK (RentalQube)
   ============================================ */
.fleet-showcase-block {
  padding: 4rem var(--container-padding);
  background: var(--background);
}

.fleet-showcase-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.fleet-showcase-subtitle {
  font-size: 1.125rem;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text-secondary);
}

.fleet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.vehicle-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.vehicle-image {
  width: 100%;
  height: 200px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.vehicle-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vehicle-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.vehicle-info {
  padding: 1.5rem;
}

.vehicle-name {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--text-color);
}

.vehicle-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.vehicle-features {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  flex-wrap: wrap;
}

.vehicle-price-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.vehicle-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.vehicle-price-period {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.vehicle-book-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.vehicle-book-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

/* ============================================
   LOCATIONS BLOCK (RentalQube)
   ============================================ */
.locations-block {
  padding: 4rem var(--container-padding);
  background: var(--surface);
}

.locations-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.locations-subtitle {
  font-size: 1.125rem;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text-secondary);
}

.locations-grid {
  display: grid;
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.location-card {
  background: var(--background);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.location-name {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: var(--text-color);
}

.location-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.location-info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.location-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: var(--surface);
  border-radius: 50%;
  font-size: 1rem;
  flex-shrink: 0;
}

.location-directions-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
  font-weight: 500;
  margin-top: 1rem;
  transition: color 0.2s;
}

.location-directions-link:hover {
  color: var(--primary-dark);
}

/* ============================================
   BOOKING WIDGET BLOCK (RentalQube)
   ============================================ */
.booking-widget-block {
  padding: 3rem var(--container-padding);
  background: var(--background);
}

.booking-widget-title {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text-color);
}

.booking-widget-container {
  max-width: 900px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.booking-widget-form {
  display: grid;
  gap: 1.5rem;
}

.booking-field-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.booking-field label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.booking-field input,
.booking-field select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1rem;
  background: var(--background);
  color: var(--text-color);
}

.booking-submit-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
}

.booking-submit-btn:hover {
  background: var(--primary-dark);
}
