/* Base Styles */
:root {
  --black: #000000;
  --white: #ffffff;
  --khaki: #bdb76b;
  --olive: #556b2f;
  --light-khaki: #f0e68c;
  --dark-olive: #3a4d1f;
  --light-gray: #f5f5f5;
  --medium-gray: #e0e0e0;
  --dark-gray: #333333;
  --text-color: #333333;
  --text-muted: #666666;
  --border-color: #dddddd;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --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);
  --radius: 0.25rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-color);
  line-height: 1.5;
  font-size: 16px;
  background-color: var(--white);
  background-image: url('../images/photo-1563810242717-f594259f3cf9.jpeg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  min-height: 100vh;
  width: 100%;
  padding-top: 0;
}

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

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

a:hover {
  color: var(--dark-olive);
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.divider {
  width: 60px;
  height: 3px;
  background-color: var(--khaki);
  margin: 0.5rem auto 1.5rem;
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-header h2 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--dark-gray);
  margin-bottom: 0.2rem;
  width: 100%;
  text-align: center;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.section-header .divider {
  width: 60px;
  height: 2px;
  background-color: var(--dark-gray);
  margin: 0.1rem auto 0.3rem;
  display: block;
}

.section-header p {
  color: var(--dark-gray);
  font-size: 1.125rem;
  margin-top: 0.2rem;
  width: 100%;
  text-align: center;
  font-weight: 500;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.6);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  border: none;
}

.btn i {
  margin-left: 0.5rem;
}

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

.btn-primary:hover {
  background-color: var(--dark-olive);
  color: var(--white);
}

.btn-outline {
  background-color: transparent;
  color: var(--olive);
  border: 2px solid var(--olive);
}

.btn-outline:hover {
  background-color: var(--olive);
  color: var(--white);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.95);
  box-shadow: var(--shadow);
}

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

.logo a {
  text-decoration: none;
}

.logo h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.5px;
}

.logo span {
  color: var(--khaki);
  font-weight: 400;
}

.nav-desktop {
  display: none;
}

.nav-desktop ul {
  display: flex;
  gap: 2rem;
}

.nav-desktop a {
  color: var(--white);
  font-size: 1rem;
  font-weight: 500;
  position: relative;
}

.nav-desktop a:hover {
  color: var(--khaki);
}

.nav-desktop a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--khaki);
  transition: width 0.3s ease;
}

.nav-desktop a:hover::after {
  width: 100%;
}

/* Dropdown Menu */
.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  right: 0; /* Changed from left:0 to right:0 to ensure it doesn't go off-screen */
  background-color: var(--black);
  min-width: 200px;
  box-shadow: var(--shadow-md);
  z-index: 1;
  border-radius: var(--radius);
  margin-top: 0.5rem;
  /* Add padding to create a bigger hit area */
  padding: 0.5rem 0;
  /* Add invisible buffer space at top to bridge the gap */
  transform: translateY(-8px);
  padding-top: 16px; /* Add extra padding at top to compensate for transform */
}

.dropdown-content a {
  color: var(--white);
  padding: 0.75rem 1rem;
  display: block;
  font-size: 0.9rem;
}

.dropdown-content a:hover {
  background-color: rgba(189, 183, 107, 0.1);
}

/* Improve dropdown interaction with delayed display transitions */
.dropdown:hover .dropdown-content {
  display: block;
  animation: fadeInDropdown 0.15s ease-in;
}

.dropdown .dropdown-content {
  visibility: hidden;
  opacity: 0;
  display: block; /* Always display but hidden */
  transition: visibility 0s 0.3s, opacity 0.3s ease; /* 0.3s delay before hiding */
}

.dropdown:hover .dropdown-content {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.15s ease;
}

@keyframes fadeInDropdown {
  from {
    opacity: 0;
    transform: translateY(-4px) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateY(-8px);
  }
}

/* Mobile Menu Styles */
.mobile-menu {
  display: none;
  position: fixed;
  top: 5rem;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
  padding: 1rem 0;
  z-index: 1001;
  max-height: calc(100vh - 5rem);
  overflow-y: auto;
  transform: translateZ(0); /* Force new stacking context */
}

.mobile-menu.active {
  display: block;
}

.mobile-menu ul {
  display: flex;
  flex-direction: column;
}

.mobile-menu a {
  display: block;
  color: var(--white);
  font-size: 1rem;
  font-weight: 500;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu a:hover {
  background-color: rgba(189, 183, 107, 0.1);
  color: var(--khaki);
}

.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--white);
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .nav-desktop {
    display: none;
  }

  /* How it works section - horizontal layout */
  .how-it-works-card {
    display: flex;
    flex-direction: column;
    padding: 1rem;
  }

  .works-top {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
  }

  .how-it-works-icon {
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1rem;
    margin-bottom: 0;
    margin-right: 0.8rem;
    flex-shrink: 0;
  }

  .how-it-works-card h3 {
    font-size: 1rem;
    margin-bottom: 0;
  }

  .how-it-works-card p {
    font-size: 0.85rem;
    margin-bottom: 0;
  }

  /* Technology section - horizontal layout */
  .tech-item {
    display: flex;
    flex-direction: column;
    padding: 1.2rem;
    text-align: left;
  }

  .tech-top {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
  }

  .tech-icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.1rem;
    margin-bottom: 0;
    margin-right: 0.8rem;
    flex-shrink: 0;
  }

  .tech-item h3 {
    font-size: 1rem;
    margin-bottom: 0;
  }

  .tech-item p {
    font-size: 0.85rem;
    margin-top: 0;
  }

  /* Service card button optimization */
  .service-card .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    align-self: flex-start;
    margin-top: 0.5rem;
  }

  /* Service includes spacing adjustment */
  .service-card .service-includes {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(85, 107, 47, 0.1);
  }

  .service-card .service-includes p {
    font-size: 0.8rem;
  }

  /* Make all card content more compact */
  .service-card, .tech-item, .how-it-works-card {
    margin-bottom: 1rem;
  }

  /* Hero section text alignment */
  .hero-content {
    max-width: 90%;
  }

  /* Even more compact service details modal */
  .modal-content {
    padding: 1rem;
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }

  /* Smaller modal close button */
  .close-modal {
    top: 0.5rem;
    right: 0.5rem;
    font-size: 1rem;
    width: 1.8rem;
    height: 1.8rem;
  }

  /* Compact service detail header */
  .service-detail-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .service-detail-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 0.5rem;
  }

  .service-detail-icon i {
    font-size: 1rem;
  }

  .service-detail-header h2 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    text-align: center;
  }

  .service-detail-header p {
    font-size: 0.8rem;
    text-align: center;
    line-height: 1.3;
  }

  /* Compact service detail sections */
  .service-detail-section {
    margin-bottom: 1rem;
    padding: 0.75rem;
  }

  .service-detail-section h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
  }

  .service-detail-section p {
    font-size: 0.8rem;
    line-height: 1.3;
    margin-bottom: 0;
  }

  /* More compact service detail list layout */
  .service-detail-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.5rem;
  }

  .service-detail-list li {
    padding: 0.5rem;
    font-size: 0.8rem;
    border-radius: var(--radius);
    display: flex;
    align-items: flex-start;
    margin-bottom: 0;
  }

  .service-detail-list li i {
    font-size: 0.9rem;
    margin-right: 0.5rem;
    min-width: 12px;
  }

  .service-detail-list li span {
    flex: 1;
    line-height: 1.3;
  }

  /* For lists that need to be kept as a single column (process steps, etc.) */
  .service-detail-section:nth-of-type(3) .service-detail-list {
    grid-template-columns: 1fr;
  }

  /* Modal action buttons */
  .detail-actions {
    margin-top: 0.5rem;
    gap: 0.5rem;
  }

  .detail-actions .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    min-height: 36px;
  }
}

@media (min-width: 769px) {
  .mobile-menu-toggle {
    display: none;
  }

  .nav-desktop {
    display: block;
  }
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  width: 100%;
  background-image: url('../images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding: 2rem;
  margin-top: -5rem;
  z-index: 1;
  transform: translateZ(0); /* Force new stacking context */
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5); /* Dark overlay */
  z-index: 1;
}

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

.hero-content h2 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* About Section */
.about {
  padding: 5rem 0;
  background-color: var(--white);
}

.about-content {
  display: grid;
  gap: 2rem;
}

.about-text p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.about-image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

/* How It Works Section */
.how-it-works {
  padding: 5rem 0;
  background-color: var(--light-gray);
}

.how-it-works-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.how-it-works-card {
  background-color: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.how-it-works-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.how-it-works-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background-color: rgba(85, 107, 47, 0.1);
  color: var(--olive);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.how-it-works-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--black);
}

.how-it-works-card p {
  color: var(--text-muted);
  margin-bottom: 0;
  flex-grow: 1;
}

/* Services Section */
.services {
  padding: 5rem 0;
  background-color: var(--white);
}

.services-grid {
  display: grid;
  gap: 2rem;
}

.service-card {
  background-color: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.service-card .service-top {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.service-card .service-icon {
  margin-bottom: 0;
  margin-right: 1rem;
  flex-shrink: 0;
}

.service-card h3 {
  margin: 0;
}

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

.primary-service {
  background-color: var(--light-gray);
  border: 2px solid var(--olive);
}

.service-includes {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(85, 107, 47, 0.2);
}

.service-includes p {
  font-size: 0.9rem;
  color: var(--olive);
}

.services-intro {
  margin-bottom: 2rem;
}

.services-note {
  background-color: rgba(85, 107, 47, 0.05);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.services-note i {
  color: var(--olive);
  font-size: 1.5rem;
  margin-top: 0.25rem;
}

.services-note p {
  margin: 0;
  color: var(--text-muted);
}

.coming-soon-section {
  margin-top: 3rem;
  padding: 2rem;
  background-color: rgba(85, 107, 47, 0.05);
  border-radius: var(--radius);
  text-align: center;
}

.coming-soon-section h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--black);
}

.investment-note {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background-color: rgba(85, 107, 47, 0.1);
  border-radius: var(--radius);
  text-align: left;
}

.investment-note p {
  margin: 0;
  color: var(--text-muted);
}

/* Technology Section */
.technology {
  padding: 5rem 0;
  background-color: var(--light-gray);
}

.tech-grid {
  display: grid;
  gap: 2rem;
}

.tech-item {
  text-align: center;
  padding: 1.5rem;
  background-color: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.tech-item .tech-top {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.tech-item .tech-icon {
  margin-bottom: 0;
  margin-right: 1rem;
  flex-shrink: 0;
}

.tech-item h3 {
  margin: 0;
}

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

/* Testimonials Section */
.testimonials {
  padding: 5rem 0;
  background-color: var(--white);
}

.testimonials-slider {
  position: relative;
  overflow: hidden;
  max-width: 800px;
  margin: 0 auto;
}

.testimonial {
  display: none;
  animation: fadeEffect 1s;
}

.testimonial.active {
  display: block;
}

@keyframes fadeEffect {
  from {
    opacity: 0.4;
  }
  to {
    opacity: 1;
  }
}

.testimonial-content {
  background-color: var(--light-gray);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  position: relative;
}

.testimonial-content:after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 30px;
  border-width: 10px 10px 0;
  border-style: solid;
  border-color: var(--light-gray) transparent;
}

.testimonial-content p {
  font-style: italic;
  color: var(--text-color);
}

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

.testimonial-author img {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--khaki);
}

.testimonial-author h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.testimonial-author p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.testimonial-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
}

.prev-testimonial,
.next-testimonial {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--olive);
  cursor: pointer;
  padding: 0.5rem;
}

.testimonial-dots {
  display: flex;
  gap: 0.5rem;
  margin: 0 1rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--medium-gray);
  cursor: pointer;
}

.dot.active {
  background-color: var(--olive);
}

/* Demo Request Section */
.demo-request {
  padding: 5rem 0;
  background-color: var(--light-gray);
}

.demo-form-container {
  display: grid;
  gap: 2rem;
}

.map-container {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background-color: var(--white);
  padding: 1rem;
}

#farm-map {
  width: 100%;
  height: 400px;
  border-radius: var(--radius);
  z-index: 1; /* Lower z-index than header */
}

.map-instructions {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

.privacy-notice {
  margin-top: 1rem;
  padding: 1rem;
  background-color: rgba(85, 107, 47, 0.05);
  border-radius: var(--radius);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.privacy-notice i {
  color: var(--olive);
  font-size: 1.25rem;
  margin-top: 0.25rem;
}

.privacy-notice p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form-container {
  background-color: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--olive);
  box-shadow: 0 0 0 2px rgba(85, 107, 47, 0.2);
}

/* Footer */
.footer {
  padding: 4rem 0 2rem;
  background-color: var(--black);
  color: var(--white);
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

.footer h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--khaki);
}

.footer-info p {
  margin-bottom: 1rem;
}

.tagline {
  font-style: italic;
  color: var(--khaki);
}

.footer-contact p {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.footer-contact i {
  margin-right: 0.75rem;
  color: var(--khaki);
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--white);
  opacity: 0.8;
}

.footer-links a:hover {
  color: var(--khaki);
  opacity: 1;
}

.copyright {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: var(--white);
  opacity: 0.6;
  font-size: 0.9rem;
}

/* Leaflet Customization */
.leaflet-draw-toolbar a {
  background-image: url("https://unpkg.com/leaflet-draw@1.0.4/dist/images/spritesheet.png");
}

.leaflet-draw-toolbar a.leaflet-draw-draw-polygon {
  background-position: -31px -2px;
}

.leaflet-draw-actions a {
  background: var(--black);
  color: var(--white);
}

.leaflet-draw-actions a:hover {
  background: var(--olive);
}

.leaflet-draw-tooltip {
  background: var(--black);
  color: var(--white);
  border: none;
  box-shadow: var(--shadow);
}

.leaflet-draw-tooltip:before {
  border-right-color: var(--black);
}

/* Thank You Page */
.thank-you-section {
  padding: 8rem 0;
  background-color: var(--light-gray);
  min-height: 60vh;
  display: flex;
  align-items: center;
}

.thank-you-content {
  background-color: var(--white);
  border-radius: var(--radius);
  padding: 3rem;
  box-shadow: var(--shadow-lg);
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.thank-you-icon {
  font-size: 4rem;
  color: var(--olive);
  margin-bottom: 1.5rem;
}

.thank-you-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--black);
}

.thank-you-content p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.thank-you-actions {
  margin-top: 2rem;
}

/* Code Block */
.code-block {
  background-color: var(--light-gray);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0;
  font-family: monospace;
  overflow-x: auto;
  position: relative;
}

.code-block pre {
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background-color: var(--olive);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.copy-btn:hover {
  opacity: 1;
}

/* Responsive Styles */
@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (min-width: 768px) {
  .nav-desktop {
    display: block;
  }

  .mobile-menu-toggle {
    display: none;
  }

  .about-content {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

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

  .demo-form-container {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

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

@media (max-width: 768px) {
  body {
    background-attachment: scroll;
    background-position: center;
    background-size: cover;
    min-height: 100vh;
    font-size: 15px; /* Slightly smaller base font size for mobile */
  }

  /* Hero section - smaller heading */
  .hero-content h2 {
    font-size: 1.8rem;
    line-height: 1.2;
    margin-bottom: 1rem;
  }

  .hero-content p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  /* How it works section - horizontal layout */
  .how-it-works-card {
    display: flex;
    flex-direction: column;
    padding: 1rem;
  }

  .works-top {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
  }

  .how-it-works-icon {
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1rem;
    margin-bottom: 0;
    margin-right: 0.8rem;
    flex-shrink: 0;
  }

  .how-it-works-card h3 {
    font-size: 1rem;
    margin-bottom: 0;
  }

  .how-it-works-card p {
    font-size: 0.85rem;
    margin-bottom: 0;
  }

  /* Services section - better horizontal layout */
  .service-card {
    display: flex;
    flex-direction: column;
    padding: 1.2rem;
  }

  .service-card .service-top {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
  }

  .service-icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.1rem;
    margin-bottom: 0;
    margin-right: 1rem;
    flex-shrink: 0;
  }

  .service-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0;
  }

  .service-card p {
    font-size: 0.9rem;
    margin: 0.2rem 0 0.5rem;
  }

  /* Technology section - horizontal layout */
  .tech-item {
    display: flex;
    flex-direction: column;
    padding: 1.2rem;
    text-align: left;
  }

  .tech-top {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
  }

  .tech-icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.1rem;
    margin-bottom: 0;
    margin-right: 0.8rem;
    flex-shrink: 0;
  }

  .tech-item h3 {
    font-size: 1rem;
    margin-bottom: 0;
  }

  .tech-item p {
    font-size: 0.85rem;
    margin-top: 0;
  }

  /* Make modal more compact */
  .modal-content {
    padding: 1.5rem;
    margin: 1rem;
  }

  .service-detail-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
  }

  .service-detail-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
  }

  .service-detail-icon i {
    font-size: 1.5rem;
  }

  .service-detail-header h2 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
  }

  .service-detail-header p {
    font-size: 0.9rem;
  }

  .service-detail-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
  }

  .service-detail-section h3 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
  }

  .service-detail-list {
    gap: 0.8rem;
  }

  .service-detail-list li {
    padding: 0.7rem;
    font-size: 0.85rem;
  }

  .service-detail-list li i {
    font-size: 1rem;
    margin-right: 0.7rem;
  }

  .service-detail-list li span {
    flex: 1;
    line-height: 1.5;
  }

  .detail-actions {
    margin-top: 1rem;
  }

  .detail-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  /* Ensure sections are still readable on mobile */
  main > section::before {
    background-color: rgba(255, 255, 255, 0.9);
  }

  .hero::before {
    background-color: rgba(0, 0, 0, 0.6);
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .nav-desktop {
    display: none;
  }

  /* Improve mobile button tap targets */
  .btn,
  .service-details-btn,
  .mobile-menu a {
    padding: 1rem 1.5rem;
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Improve modal scrolling on mobile */
  .modal-content {
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Reduce section spacing on mobile */
  section {
    padding: 2rem 0;
  }

  .section-header {
    margin-bottom: 1.5rem;
  }

  .section-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.1rem;
  }

  .section-header p {
    font-size: 1rem;
  }

  /* More compact form on mobile */
  .form-group {
    margin-bottom: 1rem;
  }

  .form-group label {
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 0.6rem;
    font-size: 0.9rem;
  }

  /* Make detail modal more space-efficient */
  .close-modal {
    top: 0.7rem;
    right: 0.7rem;
    font-size: 1.2rem;
    width: 2rem;
    height: 2rem;
  }

  /* Detail modal fixes */
  .detail-actions {
    margin-top: 1rem;
  }

  .detail-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  /* Adjust modal layout for better mobile view */
  .service-detail-list {
    display: block;
  }

  .service-detail-list li {
    margin-bottom: 0.5rem;
  }

  /* Final refinements for service details modal */
  .modal {
    padding: 0;
  }

  .modal-content {
    padding: 0.6rem;
    margin: 0.2rem;
    border-radius: 0.2rem;
    max-width: calc(100% - 0.4rem);
  }

  /* Improve the icon layout in service detail lists */
  .service-detail-list li i {
    font-size: 0.8rem;
    margin-right: 0.4rem;
    min-width: 10px;
    margin-top: 0.1rem;
  }

  /* Reduce borders and dividers */
  .service-detail-header {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(221, 221, 221, 0.5);
  }

  .service-detail-section h3 {
    border-bottom: 1px solid rgba(221, 221, 221, 0.5);
  }

  /* Make the list items even more compact */
  .service-detail-list li {
    background-color: rgba(245, 245, 245, 0.5);
    padding: 0.4rem 0.5rem;
  }

  /* Add horizontal scrolling for super long content */
  .service-detail-section {
    overflow-x: auto;
  }

  /* Faster, more subtle modal animation */
  @keyframes modalFadeIn {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .modal-content {
    animation: modalFadeIn 0.2s ease-out;
  }
}

@media (min-width: 769px) {
  .mobile-menu-toggle {
    display: none;
  }

  .nav-desktop {
    display: block;
  }
}

/* Section Styles */
main > section {
  position: relative;
  z-index: 1;
}

main > section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.85);
  z-index: -1;
}

.hero::before {
  background-color: rgba(0, 0, 0, 0.5);
}

.how-it-works::before,
.technology::before {
  background-color: rgba(245, 245, 245, 0.95);
}

/* Flash Messages */
.flash-messages {
  position: fixed;
  top: 5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: 90%;
  max-width: 600px;
}

.flash-message {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: slideDown 0.3s ease-out forwards;
}

.flash-message.success {
  background-color: #d4edda;
  color: #155724;
  border-left: 4px solid #28a745;
}

.flash-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border-left: 4px solid #dc3545;
}

.flash-message-content {
  flex: 1;
}

.flash-message-close {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.flash-message-close:hover {
  opacity: 1;
}

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

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1100;
    overflow-y: auto;
    padding: 1rem;
}

.modal-content {
    position: relative;
    background-color: var(--white);
    margin: 1rem auto;
    padding: 0;
    border-radius: 12px;
    max-width: 800px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Service Detail Styles */
.service-detail {
    padding: 0;
}

.service-detail-header {
    background-color: var(--olive);
    color: var(--white);
    padding: 2rem;
    text-align: center;
    position: relative;
    margin: 0;
}

.service-detail-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.service-detail-header p {
    color: var(--white);
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 90%;
    margin: 0 auto;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.service-detail-icon {
    width: 80px;
    height: 80px;
    background-color: var(--white);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.service-detail-icon i {
    font-size: 2.5rem;
    color: var(--olive);
}

/* Close button styling */
.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.close-modal:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Service Content */
.service-detail-content {
    padding: 2rem;
    background-color: var(--white);
}

.service-detail-section {
    background-color: var(--light-gray);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.service-detail-section h3 {
    color: var(--olive);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.service-detail-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.service-detail-list li {
    background-color: var(--white);
    border-radius: var(--radius);
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    transition: transform 0.2s ease;
    border-left: 3px solid var(--olive);
    box-shadow: var(--shadow);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .modal {
        padding: 0.5rem;
    }

    .modal-content {
        margin: 0.5rem auto;
        max-width: calc(100% - 1rem);
    }

    .service-detail-header {
        padding: 1.5rem;
    }

    .service-detail-header h2 {
        font-size: 2rem;
    }

    .service-detail-header p {
        font-size: 1.1rem;
        max-width: 95%;
    }

    .service-detail-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }

    .service-detail-icon i {
        font-size: 2rem;
    }

    .close-modal {
        top: 0.75rem;
        right: 0.75rem;
        width: 2rem;
        height: 2rem;
    }
}

/* Extra Small Screens */
@media (max-width: 480px) {
    .service-detail-header h2 {
        font-size: 1.75rem;
    }

    .service-detail-header p {
        font-size: 1rem;
    }

    .service-detail-content {
        padding: 1.5rem;
    }
}
