/* Request Demo Page Styles with Dark Theme Support */

/* Demo Request Hero Section */
.demo-hero-section {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: white;
  overflow: hidden;
}

/* Generic centered container (in case global .container differs) */
.demo-hero-section .container,
.demo-form-section .container,
.demo-benefits-section .container {
  width: 100%;
  max-width: 1200px; /* Wider for symmetry with large headings */
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  box-sizing: border-box;
}

@media (min-width: 1536px) {
  .demo-hero-section .container,
  .demo-form-section .container,
  .demo-benefits-section .container {
    max-width: 1400px;
  }
}

/* Ensure internal content blocks are centered */
.demo-form-container,
.benefits-grid {
  margin-left: auto;
  margin-right: auto;
}

html.dark .demo-hero-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.demo-hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../Uploads/background-cta.jpg') no-repeat center
    center/cover;
  opacity: 0.3;
  z-index: 1;
}

.demo-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  text-align: center;
}

.demo-hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 1rem;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.demo-hero-subtitle {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

/* Demo Request Form Section */
.demo-form-section {
  padding: 4rem 0;
  background: #f8fafc;
  transition: background-color 0.3s ease;
}

html.dark .demo-form-section {
  background: #1f2937;
}

.demo-form-container {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  border-radius: 16px;
  padding: 3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

html.dark .demo-form-container {
  background: #374151;
  border-color: #4b5563;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.demo-form-header {
  text-align: center;
  margin-bottom: 2rem;
}

.demo-form-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

html.dark .demo-form-header h2 {
  color: #f9fafb;
}

.demo-form-header p {
  color: #64748b;
  font-size: 1.125rem;
  line-height: 1.6;
  transition: color 0.3s ease;
}

html.dark .demo-form-header p {
  color: #d1d5db;
}

/* Success and Error Messages */
.success-message,
.error-message {
  margin-bottom: 2rem;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  border: 1px solid;
  transition: all 0.3s ease;
}

.success-message {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

html.dark .success-message {
  background: #064e3b;
  border-color: #065f46;
  color: #a7f3d0;
}

.error-message {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

html.dark .error-message {
  background: #7f1d1d;
  border-color: #991b1b;
  color: #fca5a5;
}

.success-message-content,
.error-message-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.success-icon,
.error-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

/* Form Styles */
.demo-form {
  margin-top: 2rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-field {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

html.dark .form-label {
  color: #e5e7eb;
}

.required-field {
  color: #ef4444;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
  color: #374151;
}

html.dark .form-input,
html.dark .form-select,
html.dark .form-textarea {
  background: #4b5563;
  border-color: #6b7280;
  color: #f9fafb;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

html.dark .form-input:focus,
html.dark .form-select:focus,
html.dark .form-textarea:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

/* Calendar icon color for date inputs */
.form-input[type='date'] {
  color-scheme: light;
  min-width: 0;
  width: 100%;
}

html.dark .form-input[type='date'] {
  color-scheme: dark;
}

/* Webkit calendar picker button styling */
.form-input[type='date']::-webkit-calendar-picker-indicator {
  filter: invert(0);
  cursor: pointer;
  opacity: 1;
  width: 20px;
  height: 20px;
}

html.dark .form-input[type='date']::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 1;
  width: 20px;
  height: 20px;
}

/* Make date input more compact on mobile */
@media (max-width: 768px) {
  .form-input[type='date'] {
    font-size: 0.9rem;
    padding: 0.75rem 0.875rem;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: textfield;
  }

  .form-input[type='date']::-webkit-calendar-picker-indicator {
    width: 18px;
    height: 18px;
    margin-left: 5px;
    background-size: 18px 18px;
  }

  @media (max-width: 480px) {
    .form-input[type='date']::-webkit-calendar-picker-indicator {
      width: 16px;
      height: 16px;
      margin-left: 2px;
    }
  }
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* Submit Button */
.submit-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

html.dark .submit-button {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

html.dark .submit-button:hover {
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.submit-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.submit-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.submit-note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #6b7280;
  font-style: italic;
  transition: color 0.3s ease;
}

html.dark .submit-note {
  color: #9ca3af;
}

/* Benefits Section */
.demo-benefits-section {
  padding: 4rem 0;
  background: white;
  transition: background-color 0.3s ease;
}

html.dark .demo-benefits-section {
  background: #111827;
}

.demo-benefits-section h2 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 3rem;
  transition: color 0.3s ease;
}

html.dark .demo-benefits-section h2 {
  color: #f9fafb;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.benefit-card {
  text-align: center;
  padding: 2rem;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

html.dark .benefit-card {
  background: #374151;
  border-color: #4b5563;
}

.benefit-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

html.dark .benefit-card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.benefit-icon {
  width: 60px;
  height: 60px;
  background: #3b82f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  transition: background-color 0.3s ease;
}

html.dark .benefit-icon {
  background: #2563eb;
}

.benefit-icon svg {
  width: 30px;
  height: 30px;
  color: white;
}

.benefit-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

html.dark .benefit-card h3 {
  color: #f9fafb;
}

.benefit-card p {
  color: #64748b;
  line-height: 1.6;
  transition: color 0.3s ease;
}

html.dark .benefit-card p {
  color: #d1d5db;
}

/* Scroll Animation Styles */
.scroll-trigger {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-trigger.animate {
  opacity: 1;
  transform: translateY(0);
}

section {
  opacity: 0;
  transform: translateY(50px);
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

section.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
  .demo-form-container {
    padding: 2rem 1.5rem;
    margin: 0 1rem;
    border-radius: 12px;
  }

  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
    width: 100%;
    overflow: hidden;
  }

  .form-field {
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .form-input,
  .form-select,
  .form-textarea {
    min-width: 0;
    box-sizing: border-box;
    max-width: 100%;
    width: 100%;
  }

  /* Specific fix for date inputs on mobile */
  .form-input[type='date'] {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }

  .demo-benefits-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
  }

  .benefit-card {
    padding: 1.5rem;
  }

  .demo-hero-section {
    min-height: 50vh;
    padding: 2rem 0;
  }

  .demo-form-section {
    padding: 2rem 0;
  }

  .demo-benefits-section {
    padding: 2rem 0;
  }
}

@media (max-width: 480px) {
  .demo-form-container {
    padding: 1.5rem 1rem;
    margin: 0 0.5rem;
  }

  .demo-hero-title {
    font-size: 2rem;
  }

  .demo-hero-subtitle {
    font-size: 1rem;
  }

  .demo-form-header h2 {
    font-size: 1.5rem;
  }

  .demo-form-header p {
    font-size: 1rem;
  }

  .form-input,
  .form-select,
  .form-textarea {
    padding: 0.75rem 0.875rem;
    font-size: 0.95rem;
  }

  .submit-button {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    width: 100%;
    justify-content: center;
  }

  .benefit-card {
    padding: 1.25rem;
  }

  .benefit-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 1rem;
  }

  .benefit-icon svg {
    width: 25px;
    height: 25px;
  }

  .benefit-card h3 {
    font-size: 1.125rem;
  }

  .benefit-card p {
    font-size: 0.9rem;
  }
}

@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 360px) {
  .demo-form-container {
    padding: 1rem 0.75rem;
    margin: 0 0.25rem;
  }

  .demo-hero-title {
    font-size: 1.75rem;
  }

  .demo-hero-subtitle {
    font-size: 0.9rem;
  }

  .form-input,
  .form-select,
  .form-textarea {
    padding: 0.625rem 0.75rem;
    font-size: 0.9rem;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Extra specific fix for date inputs on very small screens */
  .form-input[type='date'] {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    font-size: 0.85rem;
    padding: 0.625rem 0.75rem;
    box-sizing: border-box;
  }

  .form-input[type='date']::-webkit-calendar-picker-indicator {
    width: 16px;
    height: 16px;
    margin-left: 3px;
  }

  .form-grid {
    grid-template-columns: 1fr !important;
    width: 100%;
    overflow: hidden;
  }

  .form-field {
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .submit-button {
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .form-input,
  .form-select,
  .form-textarea {
    border-width: 3px;
  }

  .submit-button {
    border: 2px solid #1d4ed8;
  }

  html.dark .submit-button {
    border-color: #1e40af;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .scroll-trigger,
  section,
  .benefit-card,
  .submit-button {
    transition: none;
  }

  .benefit-card:hover {
    transform: none;
  }

  .submit-button:hover {
    transform: none;
  }
}

/* Newsletter checkbox label color fix (light/dark) */
.newsletter-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-weight: 500;
  cursor: pointer;
}
.newsletter-text {
  font-size: 0.9rem;
  line-height: 1.4;
  color: #111827; /* black-ish in light mode */
}
html.dark .newsletter-text {
  color: #f9fafb; /* white in dark mode */
}