/* 
 * Arems SaaS Platform - Stylesheet
 * Based on Arems UI Style Guide
 */

/* ===============================
   Base Styles and Typography 
   =============================== */

:root {
  /* Primary Colors */
  --arems-blue: #0B5394;
  --arems-light-blue: #4A86E8;
  --arems-dark-blue: #073763;
  --primary-color: var(--arems-blue);
  --primary-rgb: 11, 83, 148;
  
  /* Secondary Colors */
  --arems-green: #38761D;
  --arems-orange: #E69138;
  --arems-red: #CC0000;
  
  /* Neutral Colors */
  --arems-black: #212121;
  --arems-dark-gray: #505050;
  --arems-medium-gray: #9E9E9E;
  --arems-light-gray: #E0E0E0;
  --arems-off-white: #F8F9FA;
  --arems-white: #FFFFFF;
  
  /* Gradient Colors */
  --blue-gradient: linear-gradient(135deg, var(--arems-blue) 0%, var(--arems-light-blue) 100%);
  --success-gradient: linear-gradient(135deg, var(--arems-green) 0%, #6AA84F 100%);
  --warning-gradient: linear-gradient(135deg, var(--arems-orange) 0%, #F9CB9C 100%);
  
  /* Spacing */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  
  /* Shadows */
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);
  
  /* Additional document animation colors */
  --text-color: #aaa;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: var(--arems-black);
  background-color: var(--arems-white);
}

/* Typography */
h1, h2, h3, h4, h5 {
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin-bottom: var(--space-md);
  line-height: 1.3;
}

h1 {
  font-weight: 700;
  font-size: 32px;
}

h2 {
  font-weight: 600;
  font-size: 24px;
}

h3 {
  font-weight: 600;
  font-size: 20px;
}

h4 {
  font-weight: 500;
  font-size: 18px;
}

h5 {
  font-weight: 500;
  font-size: 16px;
}

p {
  margin-bottom: var(--space-md);
}

a {
  color: var(--arems-light-blue);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  text-decoration: underline;
}

ul, ol {
  margin-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

li {
  margin-bottom: var(--space-xs);
}

img {
  max-width: 100%;
  height: auto;
}

.section-subtitle {
  font-size: 18px;
  color: var(--arems-dark-gray);
  margin-bottom: var(--space-xl);
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* ===============================
   Layout
   =============================== */

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

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

/* ===============================
   Components
   =============================== */

/* Buttons */
.btn {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--arems-blue);
  color: var(--arems-white);
}

.btn-primary:hover {
  background-color: #094780; /* 10% darker */
  transform: scale(1.02);
  text-decoration: none;
}

.btn-primary:active {
  background-color: #084070; /* 15% darker */
  transform: scale(1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
  background-color: var(--arems-white);
  color: var(--arems-blue);
  border: 1px solid var(--arems-blue);
}

.btn-secondary:hover {
  background-color: #F0F7FF;
  text-decoration: none;
}

.btn-secondary:active {
  background-color: #E1EFFF;
}

.btn-tertiary {
  background-color: transparent;
  color: var(--arems-blue);
}

.btn-tertiary:hover {
  background-color: #F0F7FF;
  text-decoration: none;
}

.btn-full {
  width: 100%;
  display: block;
}

/* Forms */
.form-group {
  margin-bottom: var(--space-md);
}

label {
  display: block;
  margin-bottom: var(--space-xs);
  font-weight: 500;
  color: var(--arems-dark-gray);
}

input, select, textarea {
  width: 100%;
  height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--arems-light-gray);
  border-radius: var(--radius-sm);
  background-color: var(--arems-white);
  color: var(--arems-black);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}

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

input:focus, select:focus, textarea:focus {
  outline: none;
  border: 2px solid var(--arems-light-blue);
  box-shadow: 0 0 0 2px rgba(74, 134, 232, 0.1);
}

textarea {
  height: auto;
  resize: vertical;
}

/* Cards */
.feature-card, .pricing-card {
  background-color: var(--arems-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--arems-light-gray);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.feature-card:hover, .pricing-card:hover {
  box-shadow: var(--shadow-md);
}

/* ===============================
   Header and Navigation
   =============================== */

.main-header {
  background-color: var(--arems-white);
  padding: var(--space-md) 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  flex-direction: column;
}

.logo {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: var(--arems-blue);
  margin: 0;
}

.tagline {
  font-size: 12px;
  color: var(--arems-dark-gray);
  margin: 0;
}

.main-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
}

.main-nav li {
  margin: 0 var(--space-md);
}

.main-nav a {
  font-weight: 500;
  font-size: 14px;
  color: var(--arems-dark-gray);
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--arems-blue);
  text-decoration: none;
}

/* Mobile Navigation Styles */
.mobile-menu-toggle {
  display: none;
  cursor: pointer;
  z-index: 101;
  position: absolute;
  right: var(--space-lg);
  top: 50%;
  transform: translateY(-50%);
}

.burger-icon {
  width: 24px;
  height: 18px;
  position: relative;
}

.burger-icon span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: var(--arems-blue);
  border-radius: 2px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: .25s ease-in-out;
}

.burger-icon span:nth-child(1) {
  top: 0px;
}

.burger-icon span:nth-child(2) {
  top: 8px;
}

.burger-icon span:nth-child(3) {
  top: 16px;
}

/* Burger icon animation when active */
.burger-icon.active span:nth-child(1) {
  top: 8px;
  transform: rotate(45deg);
}

.burger-icon.active span:nth-child(2) {
  opacity: 0;
}

.burger-icon.active span:nth-child(3) {
  top: 8px;
  transform: rotate(-45deg);
}

/* Mobile navigation modal - fixed approach */
.mobile-nav-modal {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background: #FFFFFF;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  z-index: 100;
  transition: transform 0.3s ease-in-out;
  display: none;
  /* Remove transition on background properties */
  transition-property: transform;
  /* Force hardware acceleration */
  transform: translateX(0);
  backface-visibility: hidden;
  -webkit-font-smoothing: subpixel-antialiased;
}

.mobile-nav-modal.active {
  right: 0;
  transform: translateX(0);
  background: #FFFFFF;
}

.mobile-nav-container {
  padding: var(--space-xl) var(--space-lg);
  padding-top: calc(var(--space-xl) + 40px); /* Extra padding at top to avoid X overlap */
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
}

.mobile-nav {
  margin-bottom: var(--space-xl);
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav li {
  margin-bottom: var(--space-lg);
}

.mobile-nav a {
  font-size: 18px;
  font-weight: 500;
  color: var(--arems-dark-gray);
  display: block;
  transition: color 0.2s ease;
}

.mobile-nav a:hover {
  color: var(--arems-blue);
  text-decoration: none;
}

.mobile-cta {
  margin-top: auto;
}

.mobile-cta .btn {
  width: 100%;
}

/* Modal overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 99;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 767px) {
  .chat-container {
    position: relative;
    width: 100%;
    max-width: 261px; /* Adjusted width from sample */
    height: 490px; /* Adjusted height from sample */
    background-color: var(--arems-white);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 36px; /* Rounder corners like sample */
    box-shadow: 0 15px 15px rgba(0, 0, 0, 0.1); /* Matched shadow */
    border: 1px solid var(--arems-dark-gray); /* Darker border for bezel */
    margin: 24px auto; /* Center if needed */
  }
  
  /* Ensure consistent inner elements */
  .chat-container .chat-area {
    flex: 1;
    overflow-y: hidden; /* Hide overflow since we're manually positioning */
    padding: 15px; /* Matched padding */
    position: relative;
    display: block; /* Change from flex to block for absolute positioning */
    height: calc(100% - 116px); /* Subtract header and input area heights */
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    background-image: linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px); /* Subtle background lines */
    background-size: 100% 20px;
  }

  .desktop-nav, .cta-secondary {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .mobile-nav-modal {
    display: block;
  }
  
  .main-header .container {
    flex-direction: column;
    gap: var(--space-md);
  }
  
  .logo-container {
    z-index: 101;
    margin-left: 0;
    text-align: left;
    flex: 0 0 auto;
  }
  
  .mobile-menu-toggle {
    position: absolute;
    right: var(--space-lg);
    top: 50%;
    transform: translateY(-50%);
  }
  
  .tagline {
    display: none;
  }
  
  .benefit-images {
    padding-bottom: 650px; /* More space on smaller screens */
  }
  
  .benefit-image#image-processing {
    height: 600px; /* Slightly taller on small screens to accommodate content */
  }
  
  .benefit-image#document-processing {
    height: 600px; /* Slightly taller on small screens to accommodate content */
  }
  
  .image-animation-container {
    min-height: 600px;
  }
  
  .document-animation-container {
    min-height: 600px;
    transform: scale(0.9); /* Slightly scale down for better fitting */
    transform-origin: center center;
    max-width: 90%; /* Narrower for better mobile display */
  }
  
  /* Adjust the position and size of document icons for mobile display */
  .doc-icon {
    transform-origin: center center !important;
    width: 24px !important; /* Smaller document icons for mobile */
    height: 32px !important;
  }
  
  /* Adjust the lines inside document for mobile proportions */
  .doc-icon:after {
    top: 12px !important;
    left: 4px !important;
    right: 4px !important;
    height: 1px !important;
    box-shadow: 0 4px 0 var(--text-color, #aaa), 0 8px 0 var(--text-color, #aaa) !important;
  }
  
  /* Adjust the document fold for mobile proportions */
  .doc-icon:before {
    border-width: 0 7px 7px 0 !important;
  }
  
  /* Label size for mobile */
  .doc-label {
    font-size: 6px;
    max-width: 22px;
  }
  
  .doc-icon.active .doc-label {
    font-size: 8px;
    max-width: 70px;
  }
}

/* ===============================
   Hero Section
   =============================== */

.hero {
  background: var(--blue-gradient);
  color: var(--arems-white);
  padding: var(--space-3xl) 0;
}

.hero .container {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.hero-content {
  flex: 1;
}

.hero h1 {
  margin-bottom: var(--space-md);
  font-size: 36px;
}

.hero-subtitle {
  font-size: 18px;
  margin-bottom: var(--space-lg);
}

.hero-cta {
  display: flex;
  gap: var(--space-md);
}

.hero .btn-primary {
  background-color: var(--arems-white);
  color: var(--arems-blue);
}

.hero .btn-primary:hover {
  background-color: rgba(255, 255, 255, 0.9);
}

.hero .btn-tertiary {
  color: var(--arems-white);
  border: 1px solid var(--arems-white);
}

.hero .btn-tertiary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.hero-image {
  flex: 1;
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image img {
  display: block;
  max-width: 100%;
  height: auto;
  position: relative;
  z-index: 2;
}

.transparent-bg {
  background-color: transparent !important;
  mix-blend-mode: multiply; /* This helps with transparency on backgrounds */
}

.image-container {
  background-color: transparent;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Mobile adjustments for hero section */
@media (max-width: 767px) {
  .hero {
    padding: var(--space-2xl) 0;
  }
  
  .hero .container {
    flex-direction: column;
    padding-left: 24px;
    padding-right: 24px;
  }
  
  .hero-content {
    width: 100%;
    padding: 0;
    margin-bottom: var(--space-lg);
  }
  
  .hero h1 {
    font-size: 28px;
  }
  
  .hero-subtitle {
    font-size: 16px;
  }
  
  .hero-cta {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-cta .btn {
    width: 100%;
    text-align: center;
  }

  .hero-image {
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-image img {
    width: 100%;
    height: auto;
    display: block;
  }
}

/* ===============================
   Features Section
   =============================== */

.features {
  text-align: center;
  background-color: var(--arems-off-white);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.feature-card {
  text-align: left;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.feature-icon {
  background-color: rgba(74, 134, 232, 0.1);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.feature-icon img {
  width: 32px;
  height: 32px;
}

.feature-card h3 {
  font-size: 18px;
  margin-bottom: var(--space-sm);
}

.feature-card p {
  color: var(--arems-dark-gray);
  margin-bottom: 0;
}

/* ===============================
   AI Benefits Section
   =============================== */

.ai-benefits {
  text-align: center;
  overflow: hidden; /* Prevent any absolute positioned children from escaping */
  position: relative; /* Create a positioning context */
}

.benefits-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 3rem;
  margin-top: 3rem;
}

.benefit-content {
  flex: 1;
}

.benefit-images {
  flex: 1;
  position: relative;
  min-height: 550px;
}

/* Hide mobile image containers on desktop */
.benefit-image-mobile-container {
  display: none; /* Hidden by default on desktop */
}

/* Mobile styles for benefits section */
@media (max-width: 767px) {
  /* Modified benefits container styles for mobile */
  .benefits-container {
    flex-direction: column;
  }
  
  /* Hide original desktop benefit images on mobile */
  .benefit-images {
    display: none !important;
  }
  
  /* Style the mobile wrapper */
  .mobile-benefit-wrapper {
    display: block;
    width: 100%;
    margin-bottom: 3rem;
    position: relative;
  }
  
  /* Style the benefit item inside the wrapper */
  .mobile-benefit-wrapper .benefit-item {
    margin-bottom: 1rem;
  }
  
  /* Style the mobile image container */  
  .mobile-benefit-wrapper .benefit-image-mobile-container {
    display: block;
    width: 100%;
    min-height: 400px;
    position: relative;
  }
  
  /* Style the benefit image */
  .mobile-benefit-wrapper .benefit-image-mobile-container .benefit-image {
    position: static !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: 100% !important;
    min-height: 400px;
  }
  
  /* Style the animation containers */
  .mobile-benefit-wrapper .image-animation-container,
  .mobile-benefit-wrapper .document-animation-container {
    min-height: 400px;
    position: relative;
  }
  
  /* Make images inside animation container visible */
  .mobile-benefit-wrapper .image-animation-container img.image {
    position: absolute;
    top: 0;
    height: 100%;
    width: 100%;
    object-fit: cover;
  }
  
  /* Make initial image visible */
  .mobile-benefit-wrapper .image-animation-container img.image.initial {
    opacity: 1;
  }
}

.benefit-item {
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border-left: 3px solid transparent;
}

.benefit-item:hover, .benefit-item.active {
  background-color: rgba(var(--primary-rgb), 0.05);
  border-left: 3px solid var(--primary-color);
  transform: translateX(5px);
}

.benefit-item h3 {
  margin-bottom: 0.75rem;
}

.benefit-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

.benefit-image#image-processing {
  height: 550px;
}

.benefit-image.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.benefit-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.ai-assistant-highlight {
  background-color: var(--arems-off-white);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  display: flex;
  gap: var(--space-xl);
  align-items: center;
  text-align: left;
}

.assistant-image {
  flex: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.assistant-content {
  flex: 1;
}

.assistant-content h3 {
  color: var(--arems-blue);
  margin-bottom: var(--space-md);
}

.assistant-features {
  list-style: none;
  margin-left: 0;
}

.assistant-features li {
  padding-left: var(--space-lg);
  position: relative;
  margin-bottom: var(--space-sm);
}

.assistant-features li:before {
  content: "✓";
  color: var(--arems-green);
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* ===============================
   Pricing Section
   =============================== */

.pricing {
  background-color: var(--arems-off-white);
  text-align: center;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.pricing-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  position: relative;
}

.pricing-card.featured {
  border: 2px solid var(--arems-blue);
  transform: scale(1.05);
  z-index: 1;
}

.pricing-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background-color: var(--arems-green);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.pricing-header {
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--arems-light-gray);
  margin-bottom: var(--space-md);
}

.pricing-header h3 {
  margin-bottom: var(--space-xs);
}

.price {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: var(--space-xs);
  color: var(--arems-blue);
}

.price span {
  font-size: 16px;
  font-weight: 400;
  color: var(--arems-dark-gray);
}

.price-subtitle {
  font-size: 14px;
  color: var(--arems-dark-gray);
  margin-bottom: 0;
}

.pricing-features {
  flex-grow: 1;
  margin-bottom: var(--space-lg);
}

.pricing-features ul {
  list-style: none;
  margin-left: 0;
}

.pricing-features li {
  padding-left: var(--space-lg);
  position: relative;
  margin-bottom: var(--space-sm);
}

.pricing-features li:before {
  content: "✓";
  color: var(--arems-green);
  position: absolute;
  left: 0;
}

.pricing-cta {
  margin-top: auto;
}

/* ===============================
   Signup Section
   =============================== */

.signup {
  background-color: var(--arems-white);
}

.signup-card {
  background-color: var(--arems-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
}

.signup-content {
  flex: 1;
  padding: var(--space-xl);
  background: var(--blue-gradient);
  color: var(--arems-white);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.signup-content h2 {
  margin-bottom: var(--space-md);
}

.signup-content p {
  margin-bottom: 0;
}

.signup-form {
  flex: 1;
  padding: var(--space-xl);
}

/* ===============================
   About Section
   =============================== */

.about {
  text-align: center;
}

.about-content {
  display: flex;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
  align-items: center;
}

.about-text {
  flex: 1;
  text-align: left;
}

.about-image {
  flex: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* ===============================
   Contact Section
   =============================== */

.contact {
  background-color: var(--arems-off-white);
  text-align: center;
}

.contact-grid {
  display: flex;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}

.contact-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  text-align: left;
}

.contact-icon {
  width: 48px;
  height: 48px;
  background-color: rgba(74, 134, 232, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-icon img {
  width: 24px;
  height: 24px;
}

.contact-detail h4 {
  margin-bottom: var(--space-2xs);
  color: var(--arems-blue);
}

.contact-detail p {
  margin-bottom: 0;
  color: var(--arems-dark-gray);
}

.contact-form {
  flex: 2;
  background-color: var(--arems-white);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  text-align: left;
}

/* ===============================
   Footer
   =============================== */

.main-footer {
  background-color: var(--arems-dark-blue);
  color: var(--arems-white);
  padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.footer-about .footer-logo {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 700;
  font-size: 20px;
  margin-bottom: var(--space-md);
}

.footer-links h4 {
  margin-bottom: var(--space-md);
  font-size: 16px;
}

.footer-links ul {
  list-style: none;
  margin-left: 0;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--arems-light-blue);
  text-decoration: none;
}

.footer-newsletter h4 {
  margin-bottom: var(--space-md);
  font-size: 16px;
}

.newsletter-input {
  display: flex;
}

.newsletter-input input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.newsletter-input .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links {
  display: flex;
  gap: var(--space-md);
}

.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.social-links a:hover {
  background-color: var(--arems-light-blue);
}

.social-links img {
  width: 18px;
  height: 18px;
}

/* ===============================
   Responsive Styles
   =============================== */

@media (max-width: 1023px) {
  h1 {
    font-size: 28px;
  }
  
  h2 {
    font-size: 22px;
  }
  
  h3 {
    font-size: 18px;
  }
  
  .hero .container,
  .benefits-container,
  .ai-assistant-highlight,
  .signup-card,
  .about-content,
  .contact-grid {
    flex-direction: column;
  }
  
  .hero-image,
  .benefit-image,
  .assistant-image,
  .about-image {
    margin-top: var(--space-lg);
  }

  /* Add sizing for hero image in medium viewport */
  .hero-image { 
    width: 100%; 
    max-width: 500px; /* Slightly larger max-width for medium screens */
    margin-left: auto;   
    margin-right: auto;  
  }

  .hero-image img {
    width: 100%;    
    height: auto;   
    display: block; 
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }
  
  .pricing-card.featured {
    transform: scale(1);
  }
}

@media (max-width: 767px) {
  section {
    padding: var(--space-2xl) 0;
  }
  
  .main-header .container {
    flex-direction: column;
    gap: var(--space-md);
  }
  
  .main-nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .main-nav li {
    margin: var(--space-xs) var(--space-sm);
  }
  
  .cta-secondary {
    margin-top: var(--space-sm);
  }
  
  .hero-cta {
    flex-direction: column;
  }
  
  /* Fix for hero padding on mobile */
  .hero .container {
    padding-left: 24px;
    padding-right: 24px;
    flex-direction: column;
  }
  
  .hero-content {
    padding: 0;
    width: 100%;
    margin-bottom: var(--space-lg);
  }
  
  .feature-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
  }
  
  /* Modified benefits container styles for mobile */
  .benefits-container {
    flex-direction: column;
  }
  
  /* Hide original desktop benefit images on mobile */
  .benefit-images {
    display: none !important;
  }
  
  /* Style the mobile wrapper */
  .mobile-benefit-wrapper {
    display: block;
    width: 100%;
    margin-bottom: 3rem;
    position: relative;
  }
  
  /* Style the benefit item inside the wrapper */
  .mobile-benefit-wrapper .benefit-item {
    margin-bottom: 1rem;
  }
  
  /* Style the mobile image container */  
  .mobile-benefit-wrapper .benefit-image-mobile-container {
    display: block;
    width: 100%;
    min-height: 400px;
    position: relative;
  }
  
  /* Style the benefit image */
  .mobile-benefit-wrapper .benefit-image-mobile-container .benefit-image {
    position: static !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: 100% !important;
    min-height: 400px;
  }
  
  /* Style the animation containers */
  .mobile-benefit-wrapper .image-animation-container,
  .mobile-benefit-wrapper .document-animation-container {
    min-height: 400px;
    position: relative;
  }
  
  /* Make images inside animation container visible */
  .mobile-benefit-wrapper .image-animation-container img.image {
    position: absolute;
    top: 0;
    height: 100%;
    width: 100%;
    object-fit: cover;
  }
  
  /* Make initial image visible */
  .mobile-benefit-wrapper .image-animation-container img.image.initial {
    opacity: 1;
  }
}

@media (max-width: 992px) {
  .benefits-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .benefit-images {
    min-height: 400px;
    margin-top: 2rem;
    position: relative;
    height: auto;
    padding-bottom: 600px; /* Add space for the animation content */
  }
  
  .benefit-image#image-processing {
    height: 550px;
    position: absolute;
    top: 0;
  }
  
  .benefit-image#document-processing {
    height: 550px;
    position: absolute;
    top: 0;
  }
  
  .image-animation-container {
    position: relative;
    min-height: 550px;
  }
  
  .document-animation-container {
    position: relative;
    min-height: 550px;
  }
  
  /* Ensure proper spacing between benefits section and assistant highlight */
  .ai-assistant-highlight {
    margin-top: 50px;
    position: relative;
    z-index: 5;
  }
}

/* Additional adjustments for smaller screens */
@media (max-width: 767px) {
  .benefit-images {
    padding-bottom: 650px; /* More space on smaller screens */
  }
  
  .benefit-image#image-processing {
    height: 600px; /* Slightly taller on small screens to accommodate content */
  }
  
  .benefit-image#document-processing {
    height: 600px; /* Slightly taller on small screens to accommodate content */
  }
  
  .image-animation-container {
    min-height: 600px;
  }
  
  .document-animation-container {
    min-height: 600px;
    transform: scale(0.9); /* Slightly scale down for better fitting */
    transform-origin: center center;
    max-width: 90%; /* Narrower for better mobile display */
  }
  
  /* Adjust the position and size of document icons for mobile display */
  .doc-icon {
    transform-origin: center center !important;
    width: 24px !important; /* Smaller document icons for mobile */
    height: 32px !important;
  }
  
  /* Adjust the lines inside document for mobile proportions */
  .doc-icon:after {
    top: 12px !important;
    left: 4px !important;
    right: 4px !important;
    height: 1px !important;
    box-shadow: 0 4px 0 var(--text-color, #aaa), 0 8px 0 var(--text-color, #aaa) !important;
  }
  
  /* Adjust the document fold for mobile proportions */
  .doc-icon:before {
    border-width: 0 7px 7px 0 !important;
  }
  
  /* Label size for mobile */
  .doc-label {
    font-size: 6px;
    max-width: 22px;
  }
  
  .doc-icon.active .doc-label {
    font-size: 8px;
    max-width: 70px;
  }
}

/* Document Animation Styles */
#document-container-desktop,
#document-container-mobile {
  position: relative;
  min-height: 400px;
  width: 100%;
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: center;
}

.document-animation-container {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 550px;
  background-color: #FFFFFF;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(11, 83, 148, 0.04) 10%, transparent 60%),
    radial-gradient(circle at 90% 80%, rgba(56, 118, 29, 0.04) 15%, transparent 70%),
    linear-gradient(135deg, transparent 0%, transparent 40%, rgba(56, 230, 157, 0.05) 40%, rgba(56, 230, 157, 0.05) 70%, transparent 70%, transparent 100%),
    linear-gradient(45deg, transparent 0%, transparent 35%, rgba(0, 173, 204, 0.03) 35%, rgba(0, 197, 204, 0.03) 70%, transparent 70%, transparent 100%),
    repeating-linear-gradient(45deg, rgba(74, 134, 232, 0.03) 0px, rgba(74, 134, 232, 0.03) 1px, transparent 1px, transparent 10px);
  background-size: 300px 300px, 300px 300px, 100% 100%, 100% 100%, 20px 20px;
  background-position: 0 0, 0 0, 0 0, 0 0, 0 0;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden; /* Prevent documents from overflowing */
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto; /* Center the container */
  max-width: 100%; /* Ensure it doesn't overflow */
}

@media (max-width: 767px) {
  #document-container-mobile {
    display: flex;
    min-height: 400px;
    height: 100%;
    width: 100%;
    margin: 0 auto;
  }
  
  .benefit-image-mobile-container .document-animation-container {
    min-height: 400px;
    width: 100%;
    margin: 0 auto;
    overflow: visible;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

/* Added wrapper class to fix mobile layout issues */
.mobile-benefit-wrapper {
  margin-bottom: 2rem;
}

/* Mobile styles for benefits section */
@media (max-width: 767px) {
  .mobile-benefit-wrapper {
    width: 100%;
    display: block;
    position: relative;
    margin-bottom: 3rem;
    clear: both;
  }
} 

/* Document container specific styles */
#document-container-desktop,
#document-container-mobile {
  width: 100%;
  height: 100%;
  min-height: 400px;
  overflow: visible;
}

.document-animation-container {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 400px;
  background-color: #FFFFFF;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(11, 83, 148, 0.04) 10%, transparent 60%),
    radial-gradient(circle at 90% 80%, rgba(56, 118, 29, 0.04) 15%, transparent 70%),
    linear-gradient(135deg, transparent 0%, transparent 40%, rgba(56, 230, 157, 0.05) 40%, rgba(56, 230, 157, 0.05) 70%, transparent 70%, transparent 100%),
    linear-gradient(45deg, transparent 0%, transparent 35%, rgba(0, 173, 204, 0.03) 35%, rgba(0, 197, 204, 0.03) 70%, transparent 70%, transparent 100%),
    repeating-linear-gradient(45deg, rgba(74, 134, 232, 0.03) 0px, rgba(74, 134, 232, 0.03) 1px, transparent 1px, transparent 10px);
  background-size: 300px 300px, 300px 300px, 100% 100%, 100% 100%, 20px 20px;
  background-position: 0 0, 0 0, 0 0, 0 0, 0 0;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  overflow: visible;
}

/* Mobile-specific document animation fixes */
@media (max-width: 767px) {
  .benefit-image-mobile-container .document-animation-container {
    min-height: 400px;
    width: 100%;
    overflow: visible;
    transform: scale(0.9);
    transform-origin: center center;
  }
  
  /* Fix document proportions on mobile */
  .doc-icon {
    width: 20px !important;
    height: 28px !important;
  }
}

/* Document animation inner elements */
.doc-icon {
  position: absolute;
  width: 30px;
  height: 40px;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transform-origin: center;
  overflow: visible;
  z-index: 1;
  transition: transform 0.4s ease, background-color 0.3s ease;
}

.doc-icon.active {
  z-index: 10;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Document corner fold */
.doc-icon:before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 10px 10px 0;
  border-color: transparent #eee transparent transparent;
  transition: border-color 0.3s ease;
}

/* Document lines */
.doc-icon:after {
  content: '';
  position: absolute;
  top: 12px !important;
  left: 4px !important;
  right: 4px !important;
  height: 1px !important;
  background-color: var(--text-color, #aaa);
  box-shadow: 0 4px 0 var(--text-color, #aaa), 0 8px 0 var(--text-color, #aaa) !important;
  opacity: 0.4;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Document label text */
.doc-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 7px;
  font-weight: 600;
  color: var(--text-color, #aaa);
  text-align: center;
  line-height: 1;
  max-width: 26px; /* Constrain width to prevent overflow */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Show text when document is zoomed (active) */
.doc-icon.active .doc-label {
  opacity: 1;
  font-size: 9px;
  max-width: 90px; /* Increase width when zoomed */
}

/* Override for mobile document corners and lines */
@media (max-width: 767px) {
  .doc-icon {
    width: 24px !important;
    height: 32px !important;
  }
  
  .doc-icon:before {
    border-width: 0 7px 7px 0 !important;
  }
  
  .doc-icon:after {
    top: 12px !important;
    left: 4px !important;
    right: 4px !important;
    height: 1px !important;
    box-shadow: 0 4px 0 var(--text-color, #aaa), 0 8px 0 var(--text-color, #aaa) !important;
  }
  
  /* Label size for mobile */
  .doc-label {
    font-size: 6px;
    max-width: 22px;
  }
  
  .doc-icon.active .doc-label {
    font-size: 8px;
    max-width: 70px;
  }
} 

/* Image Animation Styles */
.image-animation-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease, transform 0.5s ease;
    opacity: 0;
    left: 0;
    top: 0;
}

.image.initial {
    opacity: 1;
}

/* Chat bubble styling for image animation */
.image-animation-container .chat-bubble {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    padding: 15px;
    border-radius: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    opacity: 0;
    max-width: 80%;
    z-index: 10;
    margin: 0 auto;
    text-align: center;
}

.cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    vertical-align: middle;
    color: #333;
    font-weight: bold;
    animation: blink 0.7s infinite;
    transform: translateY(-2px);
    position: relative;
    top: -2px;
}

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

/* ===============================
   Chat Animation Styles
   =============================== */

.chat-container {
  position: relative;
  width: 100%;
  max-width: 400px; /* Adjusted width from sample */
  height: 750px; /* Adjusted height from sample */
  background-color: var(--arems-white);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 36px; /* Rounder corners like sample */
  box-shadow: 0 15px 15px rgba(0, 0, 0, 0.1); /* Matched shadow */
  border: 1px solid var(--arems-dark-gray); /* Darker border for bezel */
  margin: 24px auto; /* Center if needed */
}

.chat-container .mobile-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px; /* Matched padding */
  background-color: var(--arems-off-white);
  border-bottom: 1px solid var(--arems-light-gray);
  position: relative;
}

.chat-container .mobile-header-title {
  font-size: 16px; /* Matched size */
  font-weight: bold; /* Matched weight */
  color: var(--arems-dark-gray);
  text-align: center;
}

.chat-container .burger-icon {
  width: 24px;
  height: 18px;
  position: absolute;
  right: 24px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.chat-container .burger-icon span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--arems-dark-gray);
  border-radius: 2px;
}

.chat-container .chat-area {
  flex: 1;
  overflow-y: hidden; /* Hide overflow since we're manually positioning */
  padding: 15px; /* Matched padding */
  position: relative;
  display: block; /* Change from flex to block for absolute positioning */
  height: calc(100% - 116px); /* Subtract header and input area heights */
  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* Internet Explorer 10+ */
  background-image: linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px); /* Subtle background lines */
  background-size: 100% 20px;
}

/* Hide scrollbar for WebKit browsers */
.chat-container .chat-area::-webkit-scrollbar {
    display: none; 
}

.chat-container .bubble {
  position: absolute; /* Changed from relative to absolute */
  max-width: 75%;
  margin-bottom: 15px; /* Matched margin */
  opacity: 0; /* Initially hidden for animation */
  transform: translateY(0); /* Reset initial transform */
  bottom: 0; /* Start at bottom */
  will-change: transform, opacity;
  z-index: 1; /* Ensure proper stacking */
  transition: transform 0.5s ease-out; /* Smooth transitions */
}

.chat-container .user-bubble {
  margin-left: auto;
  margin-right: 16px; /* Matched margin */
  right: 0; /* Position from right */
}

.chat-container .assistant-bubble {
  margin-right: auto;
  margin-left: 16px; /* Matched margin */
  left: 0; /* Position from left */
}

.chat-container .bubble-content {
  padding: 8px 12px; /* Matched padding */
  border-radius: 18px; /* Matched border radius */
  position: relative;
  min-width: 80px; /* Minimum width */
  min-height: 40px; /* Minimum height */
}

.chat-container .user-bubble .bubble-content {
  background-color: var(--arems-blue);
  color: var(--arems-white);
}

.chat-container .assistant-bubble .bubble-content {
  background-color: var(--arems-white);
  color: var(--arems-black);
  border: 1px solid var(--arems-light-gray);
}

.chat-container .user-name-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--arems-dark-gray);
  margin-bottom: 5px;
  padding-left: 5px;
}

.chat-container .bubble-text {
  font-size: 13px;
  line-height: 1.4;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.chat-container .bubble-timestamp {
  font-size: 10px;
  text-align: right;
  margin-top: 4px;
  opacity: 0.7;
}

.chat-container .user-bubble .bubble-timestamp {
  color: rgba(255, 255, 255, 0.7);
}

.chat-container .assistant-bubble .bubble-timestamp {
  color: var(--arems-medium-gray);
}

/* File attachment bubble */
.chat-container .file-bubble .bubble-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding-bottom: 24px; /* Space for timestamp */
}

.chat-container .file-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.chat-container .file-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.chat-container .file-icon svg {
  width: 40px;
  height: 40px;
  fill: var(--arems-blue);
  margin-bottom: 5px;
}

.chat-container .file-name {
  font-size: 12px;
  font-weight: bold;
  padding: 2px 4px;
}

.chat-container .file-bubble .bubble-timestamp {
  position: absolute;
  bottom: 8px;
  right: 12px;
  margin-top: 0;
}

.chat-container .chat-input-area {
  display: flex;
  align-items: center;
  padding: 16px 16px;
  border-top: 1px solid var(--border-color);
  background-color: #fff;
  position: relative;
  border-radius: 0 0 12px 12px;
}

.chat-container .chat-input {
  flex: 1;
  border: 1px solid var(--arems-light-gray);
  border-radius: 20px;
  padding: 8px 15px; /* Adjusted padding for better centering */
  font-size: 14px;
  background-color: var(--arems-white);
  outline: none;
  resize: none;
  line-height: 24px; /* Fixed line height for better centering */
  height: 40px; /* Fixed height instead of max-height */
  overflow-x: auto; /* Allow horizontal scrolling */
  overflow-y: hidden; /* Hide vertical overflow */
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center; /* Center text vertically */
  white-space: nowrap; /* Prevent text from wrapping */
  text-overflow: ellipsis; /* Add ellipsis for overflow text */
  scrollbar-width: none; /* Hide scrollbar for Firefox */
}

.chat-container .chat-submit-button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--arems-blue);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: var(--space-xs);
  cursor: pointer;
  border: none;
  padding: 0;
}

.chat-container .chat-submit-button svg {
  width: 18px;
  height: 18px;
  fill: white;
}

/* Typing cursor animation */
.chat-container .typing-cursor {
  display: inline-block;
  width: 2px;
  height: 16px;
  background-color: var(--arems-blue);
  vertical-align: middle;
  margin-left: 2px;
  animation: blink-cursor 0.7s infinite;
}

/* Button press animation */
.chat-container .chat-submit-button.active {
  transform: scale(0.95);
  background-color: #094780; /* Darker blue when pressed */
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.1s ease, background-color 0.1s ease;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.chat-container .chat-input::-webkit-scrollbar {
  display: none;
} 

/* Override responsive styles to keep chat consistent across all devices */
@media (max-width: 992px), (max-width: 767px) {
  .chat-container {
    position: relative;
    width: 100%;
    max-width: 400px; /* Adjusted width from sample */
    height: 750px; /* Adjusted height from sample */
    background-color: var(--arems-white);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 36px; /* Rounder corners like sample */
    box-shadow: 0 15px 15px rgba(0, 0, 0, 0.1); /* Matched shadow */
    border: 1px solid var(--arems-dark-gray); /* Darker border for bezel */
    margin: 24px auto; /* Center if needed */
  }
  
  /* Ensure consistent inner elements */
  .chat-container .chat-area {
    flex: 1;
    overflow-y: hidden; /* Hide overflow since we're manually positioning */
    padding: 15px; /* Matched padding */
    position: relative;
    display: block; /* Change from flex to block for absolute positioning */
    height: calc(100% - 116px); /* Subtract header and input area heights */
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    background-image: linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px); /* Subtle background lines */
    background-size: 100% 20px;
  }
  
  .chat-container .bubble {
    max-width: 80% !important;
  }
  
  .chat-container .chat-input-area {
    padding: 16px 16px !important;
    height: auto !important;
  }
  
  .chat-container .chat-input {
    font-size: 14px !important;
  }
  
  .ai-assistant-highlight {
    flex-direction: column-reverse;
  }
  
  .assistant-image {
    width: 100% !important;
    margin: 0 auto 40px !important;
    display: flex !important;
    justify-content: center !important;
  }
} 

@media (max-width: 428px)  {
  .chat-container {
    position: relative;
    width: 100%;
    max-width: 261px; /* Adjusted width from sample */
    height: 490px; /* Adjusted height from sample */
    background-color: var(--arems-white);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 36px; /* Rounder corners like sample */
    box-shadow: 0 0px 0px rgba(0, 0, 0, 0.1); /* Matched shadow */
    border: 1px solid var(--arems-dark-gray); /* Darker border for bezel */
    margin: 0 auto; /* Center if needed */
  }
  
  /* Ensure consistent inner elements */
  .chat-container .chat-area {
    flex: 1;
    overflow-y: hidden; /* Hide overflow since we're manually positioning */
    padding: 15px; /* Matched padding */
    position: relative;
    display: block; /* Change from flex to block for absolute positioning */
    height: calc(100% - 116px); /* Subtract header and input area heights */
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    background-image: linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px); /* Subtle background lines */
    background-size: 100% 20px;
  }
} 

.footer-contact h4 {
  margin-bottom: var(--space-md);
  font-size: 16px;
}

.footer-contact .contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer-contact .contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.2s ease;
}

.footer-contact a.contact-item:hover {
  color: var(--arems-light-blue);
}

.footer-contact .contact-icon {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-contact .contact-icon img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

.footer-contact .contact-detail p {
  color: inherit;
  margin-bottom: 0;
  font-size: 15px;
}

@media (max-width: 767px) {
  .footer-contact {
    margin-top: var(--space-lg);
  }
  
  .footer-contact .contact-item {
    margin-bottom: var(--space-sm);
  }
} 

/* Form Success and Error Messages */
.success-message {
    background-color: #e7f4e4;
    border-left: 4px solid #6AA84F;
    padding: 20px;
    margin: 20px 0;
    border-radius: 4px;
    animation: fadeIn 0.5s ease-out;
    max-width: 100%;
    box-sizing: border-box;
}

.success-message h3 {
    color: #2d6a29;
    margin-top: 0;
    margin-bottom: 10px;
}

.error-message {
    background-color: #ffe8e6;
    border-left: 4px solid #d23f31;
    padding: 15px;
    margin-bottom: 20px;
    color: #d23f31;
    border-radius: 4px;
    font-weight: 500;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
  }
} 

/* Ensure form is fully hidden when display:none is applied */
#waitlist-form[style*="display: none"],
#contact-form[style*="display: none"],
#trial-form[style*="display: none"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
} 

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    background-color: var(--arems-white);
    max-width: 900px;
    width: 85%;
    padding: 36px 42px;
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    transform: translateY(-50px);
    transition: transform 0.3s ease;
    margin: auto;
    max-height: 80vh; /* Restored a sensible max-height */
    overflow-y: auto;
    /* max-height: none !important; */ /* Removed problematic override */
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 24px;
    font-weight: bold;
    color: var(--arems-medium-gray);
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-modal:hover {
    color: var(--arems-dark-gray);
}

.success-modal-content h3 {
    color: var(--arems-green);
    margin-bottom: 15px;
}

.error-modal-content h3 {
    color: var(--arems-red);
    margin-bottom: 15px;
}

.modal .close-btn {
    margin-top: 20px;
    display: block;
    width: 100%;
}

/* Base styles for the inner content wrappers of success and error modals (Desktop/Medium) */
#success-modal .success-modal-content,
#error-modal .error-modal-content {
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically centers flex items */
    align-items: center;     /* Horizontally centers flex items */
    text-align: center;      /* Centers text within block elements */
    min-height: 200px;       /* Min-height for the content area on larger screens */
    width: 100%;             /* Inner container takes full width of parent .modal-content's padded area */
    padding: 20px;           /* Add some default padding for larger screens too */
}

/* Headings within these specific modals (Desktop/Medium) */
#success-modal .success-modal-content h3,
#error-modal .error-modal-content h3 {
    /* text-align: center; is inherited from parent div */
    margin-bottom: 15px; /* Retain default margin from .success-modal-content h3 */
}

@media (max-width: 767px) {
    .modal {
        align-items: stretch;
        justify-content: stretch;
        padding: 0;
        /* overflow: hidden; */ /* Removed this */
        overflow-y: auto; /* Allow modal itself to scroll if content is too tall */
    }
    .modal.show {
        display: flex;
        align-items: stretch;
        justify-content: stretch;
        /* overflow: hidden; */ /* Removed this */
        overflow-y: auto; /* Allow modal itself to scroll if content is too tall */
    }
    .modal-content {
        position: relative;
        width: 100vw;
        max-width: 100vw;
        /* height: 100vh; */
        /* max-height: 100vh; */ 
        margin: 0;
        padding: 20px 10px 10px 10px;
        border-radius: 0;
        overflow-y: auto;
        box-sizing: border-box;
        max-height: 95vh; /* Set a sensible max-height for mobile */
        /* max-height: none !important; */ /* Removed problematic override */
    }
    .close-modal {
        position: sticky;
        top: 0;
        right: 0;
        float: right;
        font-size: 2.2rem;
        color: #333;
        background: none;
        border: none;
        z-index: 10;
        cursor: pointer;
        padding: 16px 20px 8px 20px;
        margin: -20px -10px 0 0;
        background: rgba(255,255,255,0.95);
        border-bottom-left-radius: 18px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }
    .datenschutz-modal-content {
        font-size: 14px;
    }
    .datenschutz-modal-content h2 {
        font-size: 20px;
    }
    .datenschutz-modal-content h3 {
        font-size: 18px;
    }
    .datenschutz-modal-content h4 {
        font-size: 16px;
    }

    /* Specific styles for success and error modal content on mobile */
    #success-modal .success-modal-content,
    #error-modal .error-modal-content {
        text-align: center; /* Center the text */
        /* padding-top: 50px;  /* Add more top padding to avoid overlap with close button */
        /* vertical-align: middle; */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100%;
        padding: 24px;
        min-height: 50vh;
    }

    /* Ensure headings within these modals are also centered */
    #success-modal .success-modal-content h3,
    #error-modal .error-modal-content h3 {
        margin-left: auto;
        margin-right: auto;
        /* vertical-align: middle; */
        /* text-align: center; will be inherited if h3 is inline-block or display:inline, but margin auto is safer for block */
    }
} 