/**
 * Professional Header & Footer Styles
 * Modern, clean, elegant design for Sophia College STARS
 * Version: 1.2.0
 * Date: November 14, 2025
 * 
 * Changelog v1.2.0 (High Contrast Edition):
 * - Footer links now PURE WHITE (#ffffff) for maximum readability
 * - Stronger blue gradient backgrounds for links
 * - Increased link font weight to 700 (bold)
 * - Enhanced link padding and size (0.9rem)
 * - Dramatic hover effects with scale and glow
 * - All text elements brightened to white/near-white
 * - Letter spacing improved for clarity
 * - Multiple shadow layers for depth and contrast
 * 
 * Changelog v1.1.0:
 * - Enhanced footer contrast with darker slate background
 * - Footer links vibrant blue with background panels
 * - Increased link padding and font weight
 * - Brighter accent line with glow effect
 * - Enhanced badges with white text and stronger shadows
 */

/* ================================
   MODERN PROFESSIONAL HEADER
   ================================ */

.header-section {
  background: linear-gradient(135deg, 
    rgba(0, 48, 87, 0.98) 0%, 
    rgba(0, 35, 65, 0.98) 50%,
    rgba(0, 48, 87, 0.98) 100%
  );
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border: none;
  border-bottom: 2px solid rgba(96, 165, 250, 0.3);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.2),
    0 4px 12px rgba(0, 0, 0, 0.15),
    0 1px 3px rgba(96, 165, 250, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
  padding: 1.75rem 2rem;
  margin-bottom: 0;
  border-radius: 0;
  transition: box-shadow 0.3s ease;
}

/* Refined shimmer overlay for premium depth */
.header-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.02) 30%,
    rgba(96, 165, 250, 0.08) 50%,
    rgba(255, 255, 255, 0.02) 70%,
    transparent 100%
  );
  animation: shimmer 12s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes shimmer {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(50%);
  }
}

/* Elegant top accent line */
.header-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    transparent 0%,
    rgba(59, 130, 246, 0.8) 20%,
    rgba(96, 165, 250, 1) 50%,
    rgba(59, 130, 246, 0.8) 80%,
    transparent 100%
  );
  box-shadow: 0 2px 12px rgba(59, 130, 246, 0.5);
  animation: header-glow 3s ease-in-out infinite;
}

@keyframes header-glow {
  0%, 100% { 
    opacity: 0.75;
    filter: brightness(1);
  }
  50% { 
    opacity: 1;
    filter: brightness(1.15);
  }
}

/* Subtle background pattern */
.header-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(96, 165, 250, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(96, 165, 250, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.home-logo,
.home-logo.compact {
  height: 75px;
  width: auto;
  object-fit: contain;
  filter: 
    drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4))
    drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3))
    drop-shadow(0 0 8px rgba(96, 165, 250, 0.15));
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-bottom: 0;
  position: relative;
  z-index: 2;
}

.home-logo:hover,
.home-logo.compact:hover {
  transform: scale(1.05) translateY(-3px) rotate(-1deg);
  filter: 
    drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5))
    drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4))
    drop-shadow(0 0 24px rgba(96, 165, 250, 0.5))
    drop-shadow(0 0 12px rgba(96, 165, 250, 0.3));
}

.header-text {
  text-align: center;
  flex: 1;
  min-width: 280px;
}

.dashboard-greeting,
.dashboard-greeting.compact {
  color: #ffffff;
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
  text-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.6),
    0 4px 16px rgba(0, 0, 0, 0.4),
    0 1px 2px rgba(96, 165, 250, 0.2);
  line-height: 1.2;
  background: linear-gradient(135deg, 
    #ffffff 0%,
    rgba(255, 255, 255, 0.98) 50%,
    #ffffff 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  position: relative;
  z-index: 2;
}

.dashboard-greeting span {
  background: linear-gradient(135deg, 
    rgba(96, 165, 250, 1) 0%,
    rgba(147, 197, 253, 1) 50%,
    rgba(96, 165, 250, 1) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  display: inline-block;
  animation: subtle-pulse 4s ease-in-out infinite;
}

@keyframes subtle-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.01); opacity: 0.95; }
}

.welcome-subtitle,
.welcome-subtitle.compact {
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
  margin: 0.5rem 0 0 0 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
  letter-spacing: 0.03em !important;
}

/* ================================
   ENHANCED APP HEADER (Navigation)
   ================================ */

.enhanced-app-header {
  background: linear-gradient(135deg, 
    rgba(0, 48, 87, 0.98) 0%, 
    rgba(0, 35, 65, 0.98) 100%
  ) !important;
  backdrop-filter: blur(32px) saturate(200%) !important;
  -webkit-backdrop-filter: blur(32px) saturate(200%) !important;
  border-bottom: 2px solid rgba(96, 165, 250, 0.3) !important;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.2),
    0 4px 12px rgba(0, 0, 0, 0.15),
    0 1px 3px rgba(96, 165, 250, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  transition: box-shadow 0.3s ease, transform 0.3s ease !important;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.875rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.header-logo {
  height: 48px !important;
  width: auto !important;
  object-fit: contain !important;
  filter: 
    drop-shadow(0 3px 8px rgba(0, 0, 0, 0.5))
    drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3))
    drop-shadow(0 0 4px rgba(96, 165, 250, 0.2)) !important;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.header-logo:hover {
  transform: scale(1.08) translateY(-2px) !important;
  filter: 
    drop-shadow(0 6px 16px rgba(0, 0, 0, 0.6))
    drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4))
    drop-shadow(0 0 12px rgba(96, 165, 250, 0.4)) !important;
}

.header-title-section {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.header-title {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  margin: 0 !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4) !important;
  line-height: 1.2 !important;
  letter-spacing: -0.01em !important;
}

.title-stars {
  background: linear-gradient(135deg, 
    rgba(96, 165, 250, 1) 0%,
    rgba(147, 197, 253, 1) 50%,
    rgba(96, 165, 250, 1) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

.title-subtitle {
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  color: rgba(255, 255, 255, 0.75) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
  letter-spacing: 0.02em !important;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.user-badge:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 
    0 6px 20px rgba(0, 0, 0, 0.25),
    0 2px 8px rgba(96, 165, 250, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.staff-name {
  color: rgba(255, 255, 255, 0.95) !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.enhanced-logout-btn,
.logout-footer-btn {
  background: rgba(239, 68, 68, 0.15);
  color: rgba(254, 202, 202, 1) !important;
  padding: 0.5rem 1rem;
  border-radius: 100px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  white-space: nowrap;
  box-shadow: 
    0 2px 8px rgba(239, 68, 68, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.enhanced-logout-btn:hover,
.logout-footer-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  color: rgba(254, 240, 240, 1) !important;
  border-color: rgba(239, 68, 68, 0.5);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 6px 20px rgba(239, 68, 68, 0.4),
    0 2px 8px rgba(239, 68, 68, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* ================================
   MODERN PROFESSIONAL FOOTER
   ================================ */

.footer {
  position: relative !important;
  bottom: auto !important;
  margin-top: 3rem !important;
  padding: 2rem 2rem !important;
  background: linear-gradient(135deg, 
    rgba(15, 23, 42, 0.98) 0%, 
    rgba(30, 41, 59, 0.98) 50%,
    rgba(15, 23, 42, 0.98) 100%
  ) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border-top: 1px solid rgba(96, 165, 250, 0.25) !important;
  box-shadow: 
    0 -4px 20px rgba(0, 0, 0, 0.15),
    0 -1px 4px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(96, 165, 250, 0.15) !important;
  color: rgba(255, 255, 255, 0.95) !important;
  overflow: hidden;
}

/* Elegant top accent line for footer with subtle pulse */
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    transparent 0%,
    rgba(96, 165, 250, 0.9) 20%,
    rgba(147, 197, 253, 1) 50%,
    rgba(96, 165, 250, 0.9) 80%,
    transparent 100%
  );
  opacity: 1;
  box-shadow: 0 2px 12px rgba(96, 165, 250, 0.6), 0 4px 20px rgba(96, 165, 250, 0.3);
  animation: footerPulse 4s ease-in-out infinite;
}

@keyframes footerPulse {
  0%, 100% {
    opacity: 0.8;
    box-shadow: 0 2px 12px rgba(96, 165, 250, 0.5), 0 4px 20px rgba(96, 165, 250, 0.2);
  }
  50% {
    opacity: 1;
    box-shadow: 0 2px 12px rgba(96, 165, 250, 0.7), 0 4px 20px rgba(96, 165, 250, 0.4);
  }
}

/* Subtle background pattern for footer */
.footer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 30% 50%, rgba(96, 165, 250, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 70% 50%, rgba(59, 130, 246, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  gap: 2rem;
  position: relative;
  z-index: 1;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: flex-start;
}

.footer-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: flex-end;
}

.footer-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  filter: 
    drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4))
    drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3))
    brightness(1.05);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}

.footer-crest:hover {
  transform: scale(1.05) translateY(-2px);
  filter: 
    drop-shadow(0 6px 16px rgba(0, 0, 0, 0.6))
    drop-shadow(0 3px 8px rgba(0, 0, 0, 0.4))
    drop-shadow(0 0 20px rgba(96, 165, 250, 0.4))
    brightness(1.08);
}

.footer-text {
  color: rgba(255, 255, 255, 1);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.3);
}

.footer-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 24px rgba(147, 197, 253, 0.5);
  letter-spacing: -0.01em;
}

.footer-tagline {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 1);
  margin: 0.25rem 0 0 0;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8), 0 1px 3px rgba(0, 0, 0, 0.6);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.footer-quick-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  color: #ffffff !important;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.625rem 1.125rem;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(96, 165, 250, 0.3) 100%);
  border: 1px solid rgba(147, 197, 253, 0.4);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.5);
  position: relative;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.footer-link:hover {
  color: #ffffff !important;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.5) 0%, rgba(96, 165, 250, 0.5) 100%);
  border-color: rgba(147, 197, 253, 0.7);
  transform: translateY(-2px) scale(1.02);
  text-shadow: 0 3px 12px rgba(96, 165, 250, 0.9), 0 2px 6px rgba(0, 0, 0, 0.7);
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.4), 0 0 20px rgba(147, 197, 253, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.footer-separator {
  color: rgba(147, 197, 253, 0.5);
  font-size: 0.875rem;
  user-select: none;
  font-weight: 400;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.version-badge {
  background: rgba(96, 165, 250, 0.25);
  color: rgba(255, 255, 255, 1);
  padding: 0.5rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid rgba(96, 165, 250, 0.45);
  backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6), 0 1px 2px rgba(0, 0, 0, 0.4);
  box-shadow: 0 2px 8px rgba(96, 165, 250, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.version-badge:hover {
  background: rgba(96, 165, 250, 0.4);
  border-color: rgba(96, 165, 250, 0.7);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 20px rgba(96, 165, 250, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.5);
}

.performance-indicator {
  background: rgba(34, 197, 94, 0.25);
  color: rgba(255, 255, 255, 1);
  padding: 0.5rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid rgba(34, 197, 94, 0.45);
  backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6), 0 1px 2px rgba(0, 0, 0, 0.4);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.performance-indicator:hover {
  background: rgba(34, 197, 94, 0.4);
  border-color: rgba(34, 197, 94, 0.7);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */

@media (max-width: 1024px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }
  
  .footer-left,
  .footer-right {
    justify-content: center;
  }
  
  .footer-quick-links {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .header-container {
    padding: 0.875rem 1.5rem;
  }
}

@media (max-width: 768px) {
  .header-content {
    gap: 1rem;
  }
  
  .home-logo,
  .home-logo.compact {
    height: 60px !important;
  }
  
  .dashboard-greeting,
  .dashboard-greeting.compact {
    font-size: 1.5rem !important;
  }
  
  .welcome-subtitle,
  .welcome-subtitle.compact {
    font-size: 0.875rem !important;
  }
  
  .header-container {
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.875rem 1rem;
  }
  
  .header-logo {
    height: 40px !important;
  }
  
  .header-title {
    font-size: 1rem !important;
  }
  
  .user-badge,
  .enhanced-logout-btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
  
  /* Hide footer on mobile devices */
  .footer {
    display: none !important;
  }
  
  .footer-quick-links {
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .header-section {
    padding: 1.25rem 1rem !important;
  }
  
  .header-content {
    flex-direction: column;
    text-align: center;
  }
  
  .home-logo,
  .home-logo.compact {
    height: 50px !important;
  }
  
  .dashboard-greeting,
  .dashboard-greeting.compact {
    font-size: 1.25rem !important;
  }
  
  .header-left {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .header-right {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
  }
  
  .staff-name {
    font-size: 0.75rem !important;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .footer-crest {
    height: 28px !important;
  }
  
  .footer-title {
    font-size: 0.9rem !important;
  }
  
  .footer-credits {
    font-size: 0.75rem !important;
  }
}

/* ================================
   ACCESSIBILITY ENHANCEMENTS
   ================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .header-section::before,
  .footer::before {
    animation: none !important;
  }
  
  .dashboard-greeting span,
  .home-logo,
  .header-logo {
    animation: none !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .header-section,
  .enhanced-app-header,
  .footer {
    border-width: 2px !important;
  }
  
  .footer-link:hover,
  .user-badge:hover,
  .enhanced-logout-btn:hover {
    border-width: 2px !important;
  }
}

/* Print styles */
@media print {
  .header-section::before,
  .footer::before,
  .header-section::after,
  .footer::after {
    display: none !important;
  }
  
  .enhanced-logout-btn,
  .logout-footer-btn,
  .version-badge,
  .performance-indicator {
    display: none !important;
  }
}
