* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #1f2937;
  overflow-x: hidden;
}

/* Hero grid layout with organic shapes */
.hero-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 1rem;
  position: relative;
  min-height: 500px;
}

.hero-grid-item {
  position: relative;
  overflow: hidden;
  z-index: 2;
}

.hero-item-1 {
  grid-column: 1;
  grid-row: 1;
}

.hero-item-2 {
  grid-column: 2;
  grid-row: 1;
}

.hero-item-3 {
  grid-column: 1;
  grid-row: 2;
}

.hero-item-4 {
  grid-column: 2;
  grid-row: 2;
}

.hero-shape {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: 60%;
  background: #15803d;
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  z-index: 1;
  opacity: 0.2;
}

/* Stat cards with hover effects */
.stat-card {
  transition: all 0.3s ease;
  background: #fafaf9;
  border-radius: 1.5rem;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Service cards with flip animation */
.service-card {
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.service-card:hover {
  transform: translateY(-5px) rotate(1deg);
}

.service-card.flipped {
  animation: cardFlip 0.6s ease;
}

@keyframes cardFlip {
  0% {
    transform: rotateY(0deg);
  }
  50% {
    transform: rotateY(90deg);
  }
  100% {
    transform: rotateY(0deg);
  }
}

/* Case cards */
.case-card {
  transition: all 0.4s ease;
}

/* Media cards */
.media-card {
  transition: all 0.3s ease;
}

.media-card:hover {
  transform: translateY(-5px);
}

/* Testimonial cards with curved decorative elements */
.testimonial-card-green {
  position: relative;
}

.testimonial-curve-top {
  position: absolute;
  top: 0;
  left: -50px;
  width: 100px;
  height: 100px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-right: none;
  border-bottom: none;
}

.testimonial-curve-bottom {
  position: absolute;
  bottom: 0;
  right: -50px;
  width: 150px;
  height: 150px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-left: none;
  border-top: none;
}

/* Team member cards */
.team-member img {
  transition: all 0.3s ease;
}

/* Partner logos */
.partner-logo {
  transition: all 0.3s ease;
  opacity: 0.6;
}

.partner-logo:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
}

.mobile-menu.active {
  display: block;
  max-height: 400px;
}

/* Cookie popup with green theme */
.cookie-popup {
  position: fixed;
  bottom: -200px;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 4px solid #15803d;
  padding: 1.5rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  transition: bottom 0.4s ease-in-out;
}

.cookie-popup.show {
  bottom: 0;
}

.cookie-popup-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Header scroll effects */
header.scroll-down {
  transform: translateY(-100%);
  transition: transform 0.3s ease-in-out;
}

header.scroll-up {
  transform: translateY(0);
  transition: transform 0.3s ease-in-out;
}

/* Form error states */
input.border-red-500,
textarea.border-red-500 {
  border-color: #ef4444 !important;
}

input:focus,
textarea:focus {
  outline: none;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Custom scrollbar with green accent */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #15803d;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #166534;
}

/* Image optimization */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive images */
@media (max-width: 768px) {
  .cookie-popup-content {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Links */
a {
  text-decoration: none;
  transition: all 0.3s ease;
}

/* Buttons */
button {
  cursor: pointer;
  transition: all 0.3s ease;
}

button:focus {
  outline: none;
}

/* Container */
.container {
  width: 100%;
  padding-right: 1rem;
  padding-left: 1rem;
  margin-right: auto;
  margin-left: auto;
}

@media (min-width: 640px) {
  .container {
    max-width: 640px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }
}

/* Utility classes */
.shadow-xl-hover:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Card hover effects */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Text balance */
h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus states with green accent */
*:focus-visible {
  outline: 2px solid #15803d;
  outline-offset: 2px;
}

/* Print styles */
@media print {
  header,
  footer,
  .cookie-popup {
    display: none;
  }
}

/* Smooth transitions */
a,
button,
.service-card,
.case-card,
.stat-card {
  transition: all 0.3s ease;
}

/* Rounded elements */
.rounded-3xl {
  border-radius: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 0.75rem;
    min-height: 400px;
  }

  .hero-item-1,
  .hero-item-2,
  .hero-item-3,
  .hero-item-4 {
    grid-column: 1;
    grid-row: auto;
  }

  .hero-shape {
    display: none;
  }

  .testimonial-curve-top,
  .testimonial-curve-bottom {
    display: none;
  }
}
