/* Letoji Pedagogika — Custom CSS */
/* Colors + animations ported from frontend/src/app/globals.css */

:root {
  --background: #fdf8f4;
  --foreground: #3d2c2c;
  --text-body: #6b5c5c;
  --primary: #e8734a;
  --primary-dark: #d4623b;
  --primary-light: #fef0eb;
  --secondary: #5bb5a2;
  --secondary-dark: #4a9e8d;
  --secondary-light: #e8f5f1;
  --accent-yellow: #f6c944;
  --accent-yellow-light: #fef9e7;
  --accent-lavender: #b8a9d4;
  --accent-lavender-light: #f3f0f8;
  --warm-cream: #faf5ef;
  --warm-sand: #f2e8db;
}

html { scroll-behavior: smooth; }

body {
  background: var(--background);
  color: var(--foreground);
  font-family: 'Inter', sans-serif;
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Nunito', 'Inter', sans-serif;
}

/* Scroll animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-on-scroll {
  opacity: 0;
}

.animate-on-scroll.is-visible {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Buttons */
.btn-primary {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  border-radius: 1rem;
  font-weight: 600;
  transition: all 0.2s;
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(232, 115, 74, 0.3);
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: inherit;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  box-shadow: 0 6px 20px rgba(232, 115, 74, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  border-radius: 1rem;
  font-weight: 600;
  transition: all 0.2s;
  background-color: var(--secondary);
  color: white;
  box-shadow: 0 4px 14px rgba(91, 181, 162, 0.3);
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: var(--secondary-dark);
  box-shadow: 0 6px 20px rgba(91, 181, 162, 0.4);
  transform: translateY(-1px);
}

/* Decorative blob shapes */
.blob-shape {
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}

/* Soft card style */
.warm-card {
  border-radius: 1.5rem;
  transition: all 0.3s;
  background: white;
  border: 1px solid rgba(242, 232, 219, 0.8);
  box-shadow: 0 2px 12px rgba(61, 44, 44, 0.04);
}

.warm-card:hover {
  box-shadow: 0 8px 30px rgba(61, 44, 44, 0.08);
  transform: translateY(-2px);
}

/* Radio option selected state */
.radio-selected {
  border-color: var(--secondary) !important;
  background-color: var(--secondary-light) !important;
}

.radio-selected > div:first-child {
  border-color: var(--secondary) !important;
  background-color: var(--secondary);
  box-shadow: inset 0 0 0 2px white;
}

.radio-option:hover {
  border-color: var(--warm-sand);
  background-color: var(--warm-cream);
}

/* Prose */
.prose { color: var(--text-body); line-height: 1.75; }
.prose-lg { font-size: 1.125rem; line-height: 1.7778; }
.prose p { margin-top: 1.25em !important; margin-bottom: 1.25em !important; }
.prose-lg p { margin-top: 1.3333em !important; margin-bottom: 1.3333em !important; }
.prose h2, .prose h3, .prose h4 { color: var(--foreground); }
.prose h2 { margin-top: 1.5em; margin-bottom: 0.75em; }
.prose h3 { margin-top: 1.25em; margin-bottom: 0.5em; }
.prose a { color: var(--primary); }
.prose strong { color: var(--foreground); }
.prose blockquote { color: var(--secondary); border-left: 3px solid var(--secondary); padding-left: 1rem; }
.prose ul { list-style-type: disc; padding-left: 1.5rem; }
.prose ol { list-style-type: decimal; padding-left: 1.5rem; }
.prose li { margin-top: 0.5em; margin-bottom: 0.5em; }

/* Wave divider */
.wave-divider { position: relative; overflow: hidden; }
.wave-divider::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--background);
  clip-path: ellipse(55% 100% at 50% 100%);
}

/* Form focus styles */
input:focus, textarea:focus, select:focus {
  outline: none;
}

/* Selection color */
::selection {
  background-color: var(--primary-light);
  color: var(--foreground);
}

/* Header scroll state */
.header-scrolled {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(61, 44, 44, 0.06);
}

/* Mobile menu */
.mobile-menu-open {
  display: flex !important;
}

/* Input error state */
.input-error {
  border-color: var(--primary) !important;
}

/* Success modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  padding: 1rem;
  animation: modalFadeIn 0.2s ease-out;
}

.modal-card {
  background: white;
  border-radius: 1.5rem;
  padding: 2.5rem 2rem 2rem;
  max-width: 22rem;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  animation: modalSlideUp 0.3s ease-out;
}

.modal-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background-color: var(--secondary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.modal-icon svg {
  width: 2rem;
  height: 2rem;
  color: var(--secondary);
}

.modal-title {
  font-family: 'Nunito', 'Inter', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.modal-body {
  font-size: 0.9375rem;
  color: var(--text-body);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.modal-close-btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 0.875rem;
  font-weight: 600;
  font-size: 0.9375rem;
  background-color: var(--secondary);
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background-color: var(--secondary-dark);
  transform: translateY(-1px);
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Blog content — rich text from Quill editor */
.blog-content { color: var(--text-body); line-height: 1.8; font-size: 1.0625rem; }
.blog-content p { margin-top: 1.25em; margin-bottom: 1.25em; }
.blog-content h2 { font-size: 1.5rem; font-weight: 700; color: var(--foreground); margin-top: 2em; margin-bottom: 0.75em; }
.blog-content h3 { font-size: 1.25rem; font-weight: 700; color: var(--foreground); margin-top: 1.5em; margin-bottom: 0.5em; }
.blog-content a { color: var(--primary); text-decoration: underline; }
.blog-content a:hover { color: var(--primary-dark); }
.blog-content strong { color: var(--foreground); }
.blog-content blockquote { color: var(--secondary); border-left: 3px solid var(--secondary); padding-left: 1rem; margin: 1.5em 0; font-style: italic; }
.blog-content ul { list-style-type: disc; padding-left: 1.5rem; }
.blog-content ol { list-style-type: decimal; padding-left: 1.5rem; }
.blog-content li { margin-top: 0.5em; margin-bottom: 0.5em; }
.blog-content img { border-radius: 1rem; max-width: 100%; height: auto; margin: 1.5em 0; }
