
/* quiz\public\css\Footer.css */
:root {
  --bottom-theme: linear-gradient(135deg, #621c9f, #2a0248, #621c9f);
  --container-padding: clamp(10px, 3vw, 30px);
}

.footer {
  background: #212121;
  color: white;
  border-top: 1px solid var(--border-color);
  padding: var(--container-padding);
  position: relative !important;
  width: 100%;
  z-index: 1 !important;
  margin-top: auto;
  flex-shrink: 0;
}

/* Footer Content Container - Using Flexbox with proper spacing */
.footerContent {
  max-width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 20px;
}

/* Copyright Text - Force Left Alignment */
.footerText {
  font-size: clamp(0.75rem, 1.7vw, 0.9rem);
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0.85;
  white-space: nowrap;
  flex: 0 0 auto;
  order: 1;
}

/* Quiz Links Container - Force Center with flex-grow */
.footerQuizLink {
  display: flex !important;
  justify-content: center !important;
  align-items: center;
  margin: 0 !important;
  padding: 0 !important;
  flex: 1 1 auto;
  order: 2;
}

.footerNavMenu {
  list-style: none;
  display: flex !important;
  gap: clamp(8px, 2vw, 18px);
  flex-wrap: wrap;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  align-items: center;
}

.footerNavItem {
  flex-shrink: 0;
  display: inline-block !important;
  margin: 0 !important;
  padding: 0 !important;
}

.footerLink {
  color: #ffffff;
  font-size: clamp(0.75rem, 1.6vw, 0.95rem);
  text-decoration: none;
  font-weight: 500;
  padding: clamp(6px, 1.5vw, 8px) clamp(10px, 2vw, 14px);
  border-radius: clamp(6px, 1.5vw, 8px);
  position: relative;
  transition: all 0.3s ease;
  opacity: 0.85;
  display: inline-block !important;
  white-space: nowrap;
  margin: 0 !important;
}

/* Hover Effects */
.footerLink:hover {
  opacity: 1;
  color: #fff !important;
  background: var(--bottom-theme);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.25);
}

.footerLink:hover::after {
  width: 80%;
}

/* Active Link Style */
.footerLink:global(.active) {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  opacity: 1;
  transform: translateY(-1px) scale(1.03);
}

/* Social Icons Container - Force Right Alignment */
.footerSocialLinks {
  display: flex !important;
  gap: clamp(8px, 2vw, 12px);
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 auto;
  order: 3;
}

a.footerSocialLink {
  width: clamp(32px, 5vw, 38px);
  height: clamp(32px, 5vw, 38px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  text-decoration: none !important;
  transition: all 0.3s ease;
  flex-shrink: 0;
  margin: 0 !important;
}

.footerSocialLink:focus-visible {
  outline: 2px solid #6f60bf;
  outline-offset: 4px;
}

/* Social Icon Hover Effects */
.footerSocialLink.facebook:hover {
  background: #1877f2;
  color: white;
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 6px 16px rgba(24, 119, 242, 0.4);
}

.footerSocialLink.instagram:hover {
  background: radial-gradient(
    circle at 30% 30%,
    #fdf497,
    #fd5949,
    #d6249f,
    #285aeb
  );
  color: white;
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 6px 16px rgba(214, 36, 159, 0.4);
}

.footerSocialLink.twitter:hover {
  background: #000000;
  color: white;
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.footerSocialLink.playstore:hover {
  background: #3ddc84;
  color: white;
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 6px 16px rgba(61, 220, 132, 0.4);
}

.footerSocialLink.linkedin:hover {
  background: #0077b5;
  color: white;
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 6px 16px rgba(0, 119, 181, 0.4);
}

.footerSocialLink.appstore:hover {
  background: #000000;
  color: white;
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* ==========================================
   RESPONSIVE BREAKPOINTS
   ========================================== */

/* Large Desktops (1920px+) */
@media (min-width: 1920px) {
  .footerContent {
    max-width: 1600px;
    padding: 0 40px !important;
    margin: 0 auto !important;
  }

  .footerSocialLinks {
    gap: 14px;
  }
}

/* Medium Desktops/Tablets (992px - 1200px) */
@media (max-width: 1200px) {
  .footerContent {
    max-width: 960px;
    gap: 18px;
  }

  .footerNavMenu {
    gap: 12px;
  }
}

/* Tablets (768px - 992px) - Switch to Column */
@media (max-width: 992px) {
  .footerContent {
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center;
    gap: 16px;
  }

  .footerText {
    order: 3 !important;
    width: 100%;
    margin: 8px 0 0 0 !important;
    text-align: center;
    white-space: normal;
  }

  .footerQuizLink {
    order: 1 !important;
    width: 100%;
    margin: 0 0 10px 0 !important;
    flex: initial;
  }

  .footerNavMenu {
    width: 100%;
    flex-wrap: wrap;
  }

  .footerSocialLinks {
    order: 2 !important;
    margin: 0 !important;
    flex: initial;
  }
}

/* Mobile Landscape / Small Tablets (640px - 768px) */
@media (max-width: 768px) {
  .footer {
    padding: clamp(16px, 3vw, 20px) clamp(10px, 2vw, 15px);
  }

  .footerContent {
    gap: 14px;
  }

  .footerNavMenu {
    gap: 10px;
  }

  .footerLink {
    padding: 7px 12px;
    font-size: 0.85rem;
  }

  .footerSocialLinks {
    gap: 10px;
  }

  .footerSocialLink {
    width: 34px;
    height: 34px;
    font-size: 1.05rem;
  }
}

/* Mobile Portrait (480px - 640px) */
@media (max-width: 640px) {
  .footer {
    padding: 16px 10px;
  }

  .footerContent {
    gap: 12px;
  }

  .footerNavMenu {
    gap: 8px;
    flex-wrap: wrap;
  }

  .footerNavItem {
    margin: 2px !important;
  }

  .footerLink {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  .footerSocialLinks {
    gap: 8px;
  }

  .footerText {
    font-size: 0.75rem;
  }
}

/* Small Mobile (380px - 480px) */
@media (max-width: 480px) {
  .footer {
    padding: 14px 8px;
  }

  .footerContent {
    gap: 10px;
  }

  .footerText {
    font-size: 0.72rem;
  }

  .footerNavMenu {
    gap: 6px;
  }

  .footerLink {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  .footerSocialLinks {
    gap: 7px;
  }

  .footerSocialLink {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
  }

  .footerLink:hover,
  .footerSocialLink:hover {
    transform: translateY(-1px) scale(1.03);
  }
}

/* Extra Small Mobile (320px - 380px) */
@media (max-width: 380px) {
  .footer {
    padding: 12px 6px;
  }

  .footerContent {
    gap: 8px;
  }

  .footerText {
    font-size: 0.68rem;
    line-height: 1.4;
  }

  .footerNavMenu {
    gap: 5px;
  }

  .footerLink {
    padding: 5px 9px;
    font-size: 0.7rem;
    border-radius: 6px;
  }

  .footerSocialLinks {
    gap: 6px;
  }

  .footerSocialLink {
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
  }
}

/* Ultra Small Devices (280px - 320px) */
@media (max-width: 320px) {
  .footer {
    padding: 10px 5px;
  }

  .footerText {
    font-size: 0.62rem;
    line-height: 1.3;
  }

  .footerLink {
    padding: 4px 7px;
    font-size: 0.65rem;
  }

  .footerSocialLink {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
  }
}

/* ==========================================
   ACCESSIBILITY & SPECIAL STATES
   ========================================== */

/* Reduce Motion */
@media (prefers-reduced-motion: reduce) {
  .footerLink,
  .footerSocialLink,
  .footerLink::after {
    transition: none !important;
  }

  .footerLink:hover,
  .footerSocialLink:hover {
    transform: none !important;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .footer {
    border-top: 2px solid currentColor;
  }

  .footerLink {
    border: 1px solid currentColor;
  }

  .footerSocialLink {
    border: 1px solid currentColor;
  }
}

/* Touch Device Optimization */
@media (hover: none) and (pointer: coarse) {
  .footerLink,
  .footerSocialLink {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .footerLink:active,
  .footerSocialLink:active {
    transform: scale(0.95);
    opacity: 0.8;
  }
}

/* Mobile Landscape */
@media (max-width: 768px) and (orientation: landscape) {
  .footer {
    padding: 12px 15px;
  }

  .footerContent {
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: 10px;
  }

  .footerText {
    order: 1 !important;
    width: auto;
    margin: 0 !important;
    text-align: left;
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .footerQuizLink {
    order: 2 !important;
    width: auto;
    margin: 0 !important;
    flex: 1 1 auto;
  }

  .footerSocialLinks {
    order: 3 !important;
    margin: 0 !important;
    flex: 0 0 auto;
  }
}

/* Dark Mode Adjustments */
@media (prefers-color-scheme: dark) {
  .footer {
    box-shadow: 0 -4px 22px rgba(0, 0, 0, 0.3);
  }

  .footerSocialLink {
    background: rgba(255, 255, 255, 0.08);
  }
}

/* Overflow Protection */
.footer * {
  box-sizing: border-box;
}

.footer {
  max-width: 100vw;
  overflow-x: hidden;
}

.footerContent {
  overflow-wrap: break-word;
  word-wrap: break-word;
  max-width: 100%;
}

/* Ensure links are always visible */
.footerLink {
  visibility: visible !important;
  opacity: 0.85 !important;
}

.footerLink:hover {
  opacity: 1 !important;
}

.footerText {
  max-width: 100%;
}

/* Specific Fix for 900px and below */
@media (max-width: 900px) {
  .footerContent {
    flex-direction: column !important;
  }

  .footerQuizLink {
    width: 100%;
    flex: initial !important;
  }

  .footerNavMenu {
    flex-wrap: wrap;
    justify-content: center !important;
    width: 100%;
  }

  .footerNavItem {
    display: inline-block !important;
    visibility: visible !important;
    margin: 0 !important;
  }

  .footerLink {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 0.85 !important;
  }

  .footerText {
    order: 3 !important;
  }

  .footerQuizLink {
    order: 1 !important;
  }

  .footerSocialLinks {
    order: 2 !important;
    flex: initial !important;
  }
}
