/* Shared Header and Footer Styles for All Quizzes */
/* Optimized for compact mobile view matching Tutoring page */

:root {
  --primary-color: #3a6ea5;
  --secondary-color: #2c3e50;
  --background-color: #f4f7f6;
  --text-color: #333;
  --accent-color: #2980b9;
  --light-background: #ffffff;
  --soft-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&family=Montserrat:wght@400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

header {
  font-family: 'Inter', sans-serif;
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0.5rem 0;
  transition: all 0.3s ease;
  width: 100%;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 0 1rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding-right: 0.5rem;
  flex-shrink: 0;
}

.profile-image {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--primary-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  margin: 0.5rem;
}

.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.headline h1 {
  font-family: 'Dancing Script', cursive;
  font-size: 2.2rem;
  color: #0077b5;
  white-space: nowrap;
  margin: 0;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.headline p {
  color: var(--secondary-color);
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.3;
  margin: 0;
  margin-top: 0.3rem;
  letter-spacing: 0.1px;
  white-space: nowrap;
}

.headline .highlight {
  background: linear-gradient(135deg, #2c3e50 0%, #3498db 50%, #e74c3c 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 600;
  font-size: 0.9rem;
  animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.nav-social-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: flex-end;
}

header nav {
  display: flex;
  justify-content: flex-end;
}

header nav ul {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  flex-wrap: nowrap;
  align-items: center;
}

header nav ul li a {
  text-decoration: none;
  color: var(--secondary-color);
  font-weight: 500;
  padding: 0.5rem 0.6rem;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border-radius: 6px;
  position: relative;
  white-space: nowrap;
}

header nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transition: width 0.3s ease, left 0.3s ease;
}

header nav ul li a:hover {
  color: var(--primary-color);
}

header nav ul li a:hover::after {
  width: 80%;
  left: 10%;
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin-left: auto; /* Push to far right */
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  transition: all 0.3s ease;
  font-size: 1.2rem;
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border: 2px solid transparent;
}

.social-icon:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.social-icon.linkedin { color: #0077B5; border-color: rgba(0, 119, 181, 0.3); }
.social-icon.youtube { color: #FF0000; border-color: rgba(255, 0, 0, 0.3); }
.social-icon.facebook { color: #1877F2; border-color: rgba(24, 119, 242, 0.3); }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--secondary-color);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 2002;
}

@media (max-width: 768px) {
  header { padding: 0.5rem 1rem; }
  .header-content { flex-direction: row; justify-content: space-between; min-height: 60px; }
  .menu-toggle { display: flex; }
  
  .nav-social-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    z-index: 2000;
    backdrop-filter: blur(10px);
  }

  .nav-social-container.active { display: flex; }
  header nav ul { flex-direction: column; align-items: center; }
  .social-icons { margin-left: 0; margin-top: 1rem; }
}

/* Footer Styles */
footer {
  font-family: 'Inter', sans-serif;
  background-color: #2c3e50;
  color: white;
  padding: 3rem 0 1rem 0;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 0 2rem;
}

.footer-logo { font-family: 'Dancing Script', cursive; font-size: 2.5rem; margin-bottom: 1rem; }
.footer-info p { color: rgba(255, 255, 255, 0.8); }
.footer-social h4, .footer-share h4 { margin-bottom: 1.5rem; font-size: 1.2rem; }
.social-icons-footer, .share-buttons { display: flex; gap: 1rem; }

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  text-decoration: none;
  cursor: pointer;
}

.share-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

.share-btn.facebook:hover { background-color: #1877f2; }
.share-btn.twitter:hover { background-color: #1da1f2; }
.share-btn.linkedin:hover { background-color: #0077b5; }
.share-btn.email:hover { background-color: #ea4335; }

.social-icons-footer .social-icon {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  width: 40px;
  height: 40px;
  box-shadow: none;
  border: none;
}

.social-icons-footer .social-icon:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.social-icons-footer .linkedin:hover { background-color: #0077b5; }
.social-icons-footer .youtube:hover { background-color: #ff0000; }
.social-icons-footer .facebook:hover { background-color: #1877f2; }
.social-icons-footer .github:hover { background-color: #333; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2rem;
  padding-top: 1rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .footer-content { grid-template-columns: 1fr; text-align: center; }
  .footer-social-icons, .share-buttons { justify-content: center; }
}