@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Lexend:wght@300;400;500&display=swap');

html, body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

html.loading-lock, body.loading-lock {
  overflow: hidden !important;
  height: 100% !important;
}

body { font-family: 'Inter', sans-serif; transition: background-color 0.3s ease, color 0.3s ease; }

/* Dyslexia Font Support */
.dyslexia-font {
  font-family: 'Lexend', 'Comic Sans MS', sans-serif !important;
}

/* Light Mode Variables */
.light-mode {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

.light-mode header {
  background-color: #ffffff !important;
  border-bottom-color: #e2e8f0 !important;
}

.light-mode .text-white {
  color: #0f172a !important;
}

.light-mode .bg-black {
  background-color: #f8fafc !important;
}

.light-mode .bg-zinc-900,
.light-mode .bg-zinc-900\/40, 
.light-mode .bg-zinc-900\/30,
.light-mode .bg-zinc-900\/20 {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1) !important;
}

.light-mode #modal-close-btn {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

.light-mode #modal-close-btn:hover {
  background-color: #18852c !important;
  border-color: #18852c !important;
  color: #ffffff !important;
}

.light-mode .bg-black\/40 {
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}

.light-mode .text-zinc-100,
.light-mode .text-zinc-200,
.light-mode .text-zinc-300 {
  color: #334155 !important;
}

.light-mode .prose-invert {
  color: #334155 !important;
  --tw-prose-body: #334155;
  --tw-prose-headings: #0f172a;
  --tw-prose-lead: #475569;
  --tw-prose-links: #18852c;
  --tw-prose-bold: #0f172a;
  --tw-prose-counters: #64748b;
  --tw-prose-bullets: #cbd5e1;
  --tw-prose-hr: #e2e8f0;
  --tw-prose-quotes: #0f172a;
  --tw-prose-quote-borders: #e2e8f0;
  --tw-prose-captions: #64748b;
  --tw-prose-code: #0f172a;
  --tw-prose-pre-code: #e2e8f0;
  --tw-prose-pre-bg: #0f172a;
  --tw-prose-th-borders: #cbd5e1;
  --tw-prose-td-borders: #e2e8f0;
}

.light-mode .prose-invert p,
.light-mode .prose-invert li {
  color: #334155 !important;
}

.light-mode .prose-invert h2,
.light-mode .prose-invert h3 {
  color: #0f172a !important;
}

/* Ensure green headers remain green */
.light-mode .prose-invert h2.text-\[\#18852c\],
.light-mode .prose-invert h3.text-\[\#18852c\] {
  color: #18852c !important;
}

.light-mode .bg-white\/20 {
  background-color: #cbd5e1 !important;
}

.light-mode .bg-white\/10,
.light-mode .bg-white\/5 {
  background-color: #f1f5f9 !important;
}

.light-mode .hover\:bg-white\/5:hover {
  background-color: #f1f5f9 !important;
}

.light-mode .text-white\/90,
.light-mode .text-white\/80,
.light-mode .text-white\/70,
.light-mode .text-white\/60 {
  color: #1e293b !important;
}

.light-mode .border-white\/10 {
  border-color: #cbd5e1 !important;
}

.light-mode .border-white\/5 {
  border-color: #e2e8f0 !important;
}

/* Reduced Motion Support */
.reduced-motion *,
.reduced-motion *:before,
.reduced-motion *:after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}

.toggle-active {
  background-color: #1db441 !important;
}

.logo-container-fluid {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem;
  padding: 0 !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  transition: all 0.3s ease;
  overflow: visible !important;
}

.logo-container-fluid:hover {
  background-color: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.light-mode .logo-container-fluid {
  background-color: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.light-mode .logo-container-fluid:hover {
  background-color: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.logo-fluid {
  width: clamp(1.75rem, 4vw, 2.5rem);
  height: clamp(1.75rem, 4vw, 2.5rem);
  max-width: 100%;
  max-height: 100%;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.text-fluid {
  font-size: clamp(1rem, 2.2vw, 1.5rem);
  white-space: nowrap;
}

.btn-shrink {
  transition: all 0.3s ease;
}

@media (max-width: 1280px) {
  .btn-shrink:not(.w-11):not(.w-8) {
    padding: 0.35rem 0.65rem !important;
    font-size: 0.6rem !important;
    gap: 0.2rem !important;
  }
  
  .btn-shrink:not(.w-11):not(.w-8) svg {
    width: 12px !important;
    height: 12px !important;
  }
}

@media (max-width: 1024px) {
  header nav {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
}

@media (max-width: 640px) {
  .btn-shrink:not(.w-11):not(.w-8) {
    padding: 0.2rem 0.4rem !important;
    font-size: 0.55rem !important;
  }
}

.reduced-motion .logo-animate,
.reduced-motion .shadow-\[0_0_15px_rgba\(29\,180\,65\,0\.5\)\],
.reduced-motion .shadow-\[0_0_20px_rgba\(29\,180\,65\,0\.4\)\],
.reduced-motion .hover\:shadow-\[0_0_15px_rgba\(29\,180\,65\,0\.3\)\] {
  box-shadow: none !important;
  filter: none !important;
}

.reduced-motion .loader-pulse-ring,
.reduced-motion .loader-ring {
  display: none !important;
}

#mobile-menu {
  transition: all 0.3s ease-in-out;
}

#mobile-menu:not(.hidden) {
  display: block;
  animation: slide-down 0.3s ease-out forwards;
}

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

button[onclick="openSettings()"]:hover svg {
  transform: rotate(45deg);
}

button[onclick="openSettings()"] svg {
  transition: transform 0.4s ease;
}

@keyframes logo-wobble {
  0% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(15deg) scale(1.05); }
  50% { transform: rotate(5deg) scale(1.05); }
  75% { transform: rotate(12deg) scale(1.05); }
  100% { transform: rotate(10deg) scale(1.05); }
}

@keyframes logo-pulse {
  0% { 
    box-shadow: 0 0 0 0 rgba(29, 180, 65, 0.6), 0 0 8px rgba(29, 180, 65, 0.3); 
  }
  70% { 
    box-shadow: 0 0 0 10px rgba(29, 180, 65, 0), 0 0 12px rgba(29, 180, 65, 0.4); 
  }
  100% { 
    box-shadow: 0 0 0 0 rgba(29, 180, 65, 0), 0 0 8px rgba(29, 180, 65, 0.3); 
  }
}

.logo-animate {
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

.group:hover .logo-animate {
  animation: logo-wobble 0.6s ease-out forwards, logo-pulse 2s ease-in-out infinite;
}

/* Loading Screen Styles */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease-in-out, visibility 0.8s;
}

#loading-screen.hidden-loader {
  opacity: 0;
  visibility: hidden;
}

.loader-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2px solid rgba(29, 180, 65, 0.1);
  border-top-color: #1db441;
  animation: spin 1.5s linear infinite;
  position: absolute;
}

.loader-pulse-ring {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 1px solid #1db441;
  opacity: 0;
  animation: pulse-ring 2s ease-out infinite;
  position: absolute;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(1.5); opacity: 0; }
}

#loading-text {
  margin-top: 40px;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.1em;
  font-weight: 300;
  color: #1db441;
  text-transform: uppercase;
  font-size: 0.75rem;
  transition: opacity 0.5s ease;
}

/* Cookie Banner Light Mode */
.light-mode #cookie-banner .bg-zinc-900\/95 {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}

.light-mode #cookie-warning-modal .bg-zinc-900 {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}

.light-mode #cookie-banner h4,
.light-mode #cookie-banner p,
.light-mode #cookie-warning-modal h3,
.light-mode #cookie-warning-modal p {
  color: #1e293b !important;
}

/* Burger Menu & Mobile Toggle Light Mode Navigation */
.light-mode #mobile-menu {
  background-color: #ffffff !important;
  border-top-color: #e2e8f0 !important;
}

.light-mode #mobile-menu a {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
}

.light-mode #mobile-menu a:hover {
  background-color: rgba(29, 180, 65, 0.1) !important;
  border-color: #1db441 !important;
  color: #18852c !important;
  box-shadow: 0 0 15px rgba(29, 180, 65, 0.2) !important;
}

.light-mode #mobile-menu-toggle {
  color: #1e293b !important;
  border-color: #cbd5e1 !important;
}

.light-mode #mobile-menu-toggle:hover {
  color: #1db441 !important;
  border-color: rgba(29, 180, 65, 0.3) !important;
  background-color: rgba(29, 180, 65, 0.05) !important;
}


