/* Base Styles */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #0d9488;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: #0d9488;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 0.5rem 0.5rem;
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

/* Smooth image loading */
img {
  transition: opacity 0.3s ease;
}

img[src=""] {
  background: linear-gradient(135deg, #e7e5e4 0%, #d6d3d1 100%);
  min-height: 80px;
}

/* Form validation states */
input.error,
textarea.error {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

input.success,
textarea.success {
  border-color: #059669 !important;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

/* Mobile menu animation */
#mobile-menu {
  transition: opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

#mobile-menu.active {
  opacity: 1;
  pointer-events: auto;
}

#mobile-menu > div:last-child {
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.active > div:last-child {
  transform: translateX(0);
}

/* Cookie consent animation */
#cookie-consent {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
  transform: translateY(20px);
  opacity: 0;
}

#cookie-consent.visible {
  transform: translateY(0);
  opacity: 1;
}

/* Prose typography for content blocks */
.prose p + p {
  margin-top: 1rem;
}

.prose strong {
  color: #1c1917;
}

.prose em {
  color: #57534e;
}

/* Card hover enhancement */
.group:hover img {
  transform: scale(1.02);
  transition: transform 0.3s ease;
}

/* Gradient text utility */
.gradient-text {
  background: linear-gradient(135deg, #0d9488, #065f46);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* FAQ accordion styles */
.faq-item {
  border-bottom: 1px solid #e7e5e4;
}

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

.faq-question {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-size: 1rem;
  font-weight: 500;
  color: #1c1917;
  transition: color 0.2s ease;
}

.faq-question:hover {
  color: #0d9488;
}

.faq-question .icon-indicator {
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 1rem;
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
  padding: 0;
}

.faq-answer.open {
  max-height: 500px;
  padding-bottom: 1.25rem;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f5f5f4;
}

::-webkit-scrollbar-thumb {
  background: #a8a29e;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #78716c;
}

/* Selection color */
::selection {
  background: rgba(13, 148, 136, 0.2);
  color: #0d9488;
}

/* Print styles */
@media print {
  header,
  footer,
  #cookie-consent,
  #mobile-menu,
  .no-print {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  a {
    text-decoration: underline;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .prose {
    font-size: 1rem;
  }
}

@media (min-width: 1280px) {
  .prose {
    font-size: 1.125rem;
  }
}