/* Additional Components and Animations for Bella Speak */

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-light);
  border-top: 4px solid var(--primary-green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Notifications */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  max-width: 400px;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: var(--shadow-hover);
  z-index: 1002;
  animation: slideInRight 0.3s ease;
}

.notification-success {
  background-color: #4CAF50;
  color: white;
}

.notification-error {
  background-color: #f44336;
  color: white;
}

.notification-info {
  background-color: var(--primary-green);
  color: white;
}

.notification-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notification-close {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: 1rem;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-green);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  background-color: var(--primary-green-dark);
  transform: translateY(-3px);
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-green);
  color: white;
  padding: 8px;
  z-index: 1000;
  text-decoration: none;
  border-radius: 4px;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 6px;
}

/* Page Transitions */
body {
  opacity: 0;
  transition: opacity 0.3s ease;
}

body.page-loaded {
  opacity: 1;
}

/* Scroll Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.animate-on-scroll.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Image Lazy Loading */
img.lazy {
  opacity: 0;
  transition: opacity 0.3s;
}

img.lazy.loaded {
  opacity: 1;
}

/* Feature Cards Enhanced */
.feature-card {
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(107, 142, 90, 0.1), transparent);
  transition: left 0.6s;
}

.feature-card:hover::before {
  left: 100%;
}

/* Blog Article Styles */
.blog-article {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
}

.blog-article img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 2rem 0;
}

.blog-article h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary-green);
}

.blog-article h3 {
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  color: var(--text-dark);
}

.blog-article p {
  margin-bottom: 1.5rem;
  text-align: justify;
}

.blog-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
  color: var(--text-light);
}

.blog-tag {
  background-color: var(--primary-green);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  text-decoration: none;
}

.blog-tag:hover {
  background-color: var(--primary-green-dark);
  color: white;
}

/* Contact Form Enhancements */
.contact-form {
  background-color: #F8F9FA;
  padding: 2rem;
  border-radius: 12px;
}

.form-group.required label::after {
  content: ' *';
  color: var(--accent-red);
}

.form-group input:valid,
.form-group textarea:valid {
  border-color: #4CAF50;
}

.form-group input:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
  border-color: var(--accent-red);
}

/* Map Container */
.map-container {
  height: 300px;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 2rem;
}

.map-placeholder {
  width: 100%;
  height: 100%;
  background-color: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
}

/* FAQ Styles */
.faq-item {
  border: 1px solid var(--border-light);
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 1rem;
  background-color: var(--background-white);
  border: none;
  text-align: left;
  font-family: var(--font-family);
  font-weight: var(--font-normal);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease;
}

.faq-question:hover {
  background-color: #F8F9FA;
}

.faq-question.active {
  background-color: var(--primary-green);
  color: white;
}

.faq-answer {
  padding: 0 1rem;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  background-color: #F8F9FA;
}

.faq-answer.active {
  padding: 1rem;
  max-height: 500px;
}

.faq-icon {
  transition: transform 0.3s ease;
}

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

/* Breadcrumbs */
.breadcrumbs {
  padding: 1rem 0;
  background-color: #F8F9FA;
}

.breadcrumbs ul {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.breadcrumbs li::after {
  content: '/';
  margin-left: 0.5rem;
  color: var(--text-light);
}

.breadcrumbs li:last-child::after {
  display: none;
}

.breadcrumbs a {
  color: var(--primary-green);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 4px;
  background-color: var(--border-light);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: var(--primary-green);
  width: 0%;
  transition: width 0.3s ease;
}

/* Testimonials */
.testimonial {
  background-color: #F8F9FA;
  padding: 2rem;
  border-radius: 12px;
  position: relative;
  margin-bottom: 2rem;
}

.testimonial::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 20px;
  font-size: 4rem;
  color: var(--primary-green);
  line-height: 1;
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 1rem;
  color: var(--text-light);
}

.testimonial-author {
  font-weight: var(--font-bold);
  color: var(--primary-green);
}

/* Course Levels */
.level-indicator {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}

.level-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--border-light);
}

.level-dot.filled {
  background-color: var(--primary-green);
}

/* Cookie Preferences Modal */
.cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  z-index: 1002;
  align-items: center;
  justify-content: center;
}

.cookie-modal.show {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.cookie-modal-content {
  background-color: white;
  border-radius: 12px;
  padding: 2rem;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  margin: 1rem;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.cookie-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.cookie-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.cookie-modal-close:hover {
  background-color: var(--border-light);
  color: var(--text-dark);
}

.cookie-category {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border: 1px solid var(--border-light);
  border-radius: 8px;
}

.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.cookie-category h4 {
  margin: 0;
  color: var(--primary-green);
}

.cookie-toggle {
  position: relative;
  width: 50px;
  height: 24px;
  background-color: #ccc;
  border-radius: 24px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.cookie-toggle.active {
  background-color: var(--primary-green);
}

.cookie-toggle.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cookie-toggle::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: white;
  top: 2px;
  left: 2px;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-toggle.active::after {
  transform: translateX(26px);
}

.cookie-category-description {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.4;
}

.cookie-modal-buttons {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

/* Cookie Settings Link */
.cookie-settings-link {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background-color: var(--primary-green);
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  text-decoration: none;
  z-index: 1000;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.cookie-settings-link:hover {
  opacity: 1;
  transform: translateY(-2px);
  color: white;
}

.cookie-settings-link.hidden {
  display: none;
}

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

/* Mobile Responsive Enhancements */
@media (max-width: 768px) {
  .notification {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .scroll-to-top {
    bottom: 80px;
    right: 15px;
  }
  
  .blog-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .contact-form {
    padding: 1rem;
  }
  
  .cookie-modal-content {
    padding: 1rem;
    margin: 0.5rem;
  }
  
  .cookie-modal-buttons {
    flex-direction: column;
  }
  
  .cookie-category {
    padding: 0.75rem;
  }
  
  .cookie-settings-link {
    bottom: 80px;
    left: 15px;
    font-size: 0.7rem;
    padding: 6px 10px;
  }
}