/* ==============================================
   LAYOUT FIXES & IMPROV  .newsletter-form {
    flex-direction: column;
    width: 100%;
    min-width: auto !important;
  }

  .newsletter-form input {
    width: 100% !important;
    min-width: auto !important;
    margin-bottom: 0.75rem;
  }

  .newsletter-form .btn-newsletter {
    width: 100% !important;
    justify-content: center;
  }n Online
   Additional CSS for better mobile layout and full-width sections
   ============================================== */

/* Full-width footer and newsletter fixes - Override conflicting styles */
.footer-newsletter {
  width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  position: relative;
  background: linear-gradient(135deg, #374151 0%, #1f2937 100%) !important;
  border-bottom: 1px solid #374151 !important;
  padding: 2rem 0 !important;
  margin-bottom: 0 !important;
}

footer {
  width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  position: relative;
}

/* Ensure container inside full-width sections stays centered */
.footer-newsletter .container,
footer > .container {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 1.5rem !important;
  position: relative;
  z-index: 2;
}

/* Reset any nested container issues */
.footer-newsletter .container .container {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

/* Newsletter content improvements */
.newsletter-content {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 2rem !important;
  flex-wrap: wrap !important;
}

.newsletter-form {
  display: flex !important;
  gap: 0.75rem !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  min-width: 320px !important;
}

/* Footer content grid fix */
.footer-content {
  display: grid !important;
  grid-template-columns: 2fr 1fr 1fr 1fr !important;
  gap: 2rem !important;
  margin: 2.5rem 0 !important;
}

@media (max-width: 768px) {
  .newsletter-content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .newsletter-form {
    flex-direction: column;
    width: 100%;
    min-width: auto;
  }

  .newsletter-form input {
    width: 100% !important;
    min-width: auto !important;
  }

  .newsletter-form .btn-newsletter {
    width: 100% !important;
    justify-content: center;
  }
}

/* Hero background improvements for mobile */
@media (max-width: 768px) {
  .hero {
    background-attachment: scroll !important;
    min-height: calc(100vh - 70px);
    padding-top: 80px;
  }

  .hero-content {
    padding: 2rem 1rem;
  }
}

/* Mobile menu improvements */
@media (max-width: 768px) {
  body.mobile-menu-open {
    overflow: hidden;
  }

  .nav-links.active {
    display: flex !important;
    animation: slideDown 0.3s ease-out;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Improve mobile dropdown styling */
  .nav-item .dropdown {
    position: static !important;
    box-shadow: none !important;
    border: none !important;
    background: var(--bg-tertiary) !important;
    margin-top: 0.5rem !important;
    border-radius: var(--radius) !important;
    overflow: hidden !important;
    transition: max-height 0.3s ease !important;
  }

  .nav-item.mobile-dropdown-open .dropdown {
    max-height: 300px !important;
  }
}

/* Resource card improvements */
.resource-card {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: 1px solid transparent;
}

.resource-card:hover {
  border-color: var(--primary-color);
  background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
}

/* Button improvements */
.btn,
.btn-secondary {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* CTA section improvements */
.cta {
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 70%
  );
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Scroll behavior improvements */
html {
  scroll-behavior: smooth;
}

/* Loading states */
.loading {
  pointer-events: none;
  opacity: 0.7;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--primary-light);
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Focus improvements for accessibility */
*:focus-visible {
  outline: 2px solid var(--primary-color) !important;
  outline-offset: 2px !important;
  border-radius: var(--radius-sm);
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print styles */
@media print {
  .hero-network,
  .floating-icon,
  .mobile-toggle,
  .theme-toggle,
  .admin-toggle,
  .back-to-top {
    display: none !important;
  }

  .hero {
    background: none !important;
    color: black !important;
    min-height: auto !important;
    padding: 2rem 0 !important;
  }

  .nav-links {
    display: flex !important;
    position: static !important;
    background: none !important;
    flex-direction: row !important;
    gap: 1rem !important;
  }
}

/* Footer bottom alignment fix */
.footer-bottom {
  border-top: 1px solid #374151 !important;
  padding: 1.5rem 0 !important;
  display: grid !important;
  grid-template-columns: 1fr auto 1fr !important;
  align-items: center !important;
  gap: 1rem !important;
  color: #9ca3af !important;
  background: rgba(0, 0, 0, 0.2) !important;
  width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  position: relative;
}

/* Ensure footer bottom content is contained and properly spaced */
.footer-bottom > div {
  position: relative;
  z-index: 2;
}

.footer-bottom-left,
.footer-bottom-center,
.footer-bottom-right {
  padding: 0 1.5rem;
}

/* Center the footer links properly */
.footer-bottom-center {
  justify-self: center;
}

.footer-bottom-right {
  justify-self: end;
}

.footer-bottom-left {
  justify-self: start;
}

/* Clean up footer badges alignment */
.footer-badges {
  display: flex !important;
  gap: 0.75rem !important;
  justify-content: flex-end !important;
  align-items: center !important;
}

/* Clean up footer links alignment */
.footer-links {
  display: flex !important;
  gap: 1.5rem !important;
  justify-content: center !important;
  align-items: center !important;
}

/* Mobile responsive footer bottom */
@media (max-width: 1024px) {
  .footer-bottom {
    grid-template-columns: 1fr !important;
    text-align: center !important;
    gap: 1.5rem !important;
    padding: 2rem 0 !important;
  }

  .footer-bottom-left,
  .footer-bottom-center,
  .footer-bottom-right {
    justify-self: center !important;
    padding: 0 1rem !important;
  }

  .footer-links {
    flex-wrap: wrap !important;
    gap: 1rem !important;
  }

  .footer-badges {
    justify-content: center !important;
  }
}

@media (max-width: 768px) {
  .footer-bottom {
    padding: 1.5rem 0 !important;
  }

  .footer-links {
    flex-direction: column !important;
    gap: 0.75rem !important;
  }

  .footer-badges {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }
}
