/* This is the CSS file which will be used for styling */

/* Poppins Fonts */
@font-face {
  font-family: 'Poppins-Black';
  src: url('../fonts/Poppins-Black.ttf') format('truetype');
  font-style: normal;
}
@font-face {
  font-family: 'Poppins-BlackItalic';
  src: url('../fonts/Poppins-BlackItalic.ttf') format('truetype');
  font-style: italic;
}
@font-face {
  font-family: 'Poppins-Bold';
  src: url('../fonts/Poppins-Bold.ttf') format('truetype');
  font-style: normal;
}
@font-face {
  font-family: 'Poppins-BoldItalic';
  src: url('../fonts/Poppins-BoldItalic.ttf') format('truetype');
  font-style: italic;
}
@font-face {
  font-family: 'Poppins-ExtraBold';
  src: url('../fonts/Poppins-ExtraBold.ttf') format('truetype');
  font-style: normal;
}
@font-face {
  font-family: 'Poppins-ExtraBoldItalic';
  src: url('../fonts/Poppins-ExtraBoldItalic.ttf') format('truetype');
  font-style: italic;
}
@font-face {
  font-family: 'Poppins-ExtraLight';
  src: url('../fonts/Poppins-ExtraLight.ttf') format('truetype');
  font-style: normal;
}
@font-face {
  font-family: 'Poppins-ExtraLightItalic';
  src: url('../fonts/Poppins-ExtraLightItalic.ttf') format('truetype');
  font-style: italic;
}
@font-face {
  font-family: 'Poppins-Italic';
  src: url('../fonts/Poppins-Italic.ttf') format('truetype');
  font-style: italic;
}
@font-face {
  font-family: 'Poppins-Light';
  src: url('../fonts/Poppins-Light.ttf') format('truetype');
  font-style: normal;
}
@font-face {
  font-family: 'Poppins-LightItalic';
  src: url('../fonts/Poppins-LightItalic.ttf') format('truetype');
  font-style: italic;
}
@font-face {
  font-family: 'Poppins-Medium';
  src: url('../fonts/Poppins-Medium.ttf') format('truetype');
  font-style: normal;
}
@font-face {
  font-family: 'Poppins-MediumItalic';
  src: url('../fonts/Poppins-MediumItalic.ttf') format('truetype');
  font-style: italic;
}
@font-face {
  font-family: 'Poppins-Regular';
  src: url('../fonts/Poppins-Regular.ttf') format('truetype');
  font-style: normal;
}
@font-face {
  font-family: 'Poppins-SemiBold';
  src: url('../fonts/Poppins-SemiBold.ttf') format('truetype');
  font-style: normal;
}
@font-face {
  font-family: 'Poppins-SemiBoldItalic';
  src: url('../fonts/Poppins-SemiBoldItalic.ttf') format('truetype');
  font-style: italic;
}
@font-face {
  font-family: 'Poppins-Thin';
  src: url('../fonts/Poppins-Thin.ttf') format('truetype');
  font-style: normal;
}
@font-face {
  font-family: 'Poppins-ThinItalic';
  src: url('../fonts/Poppins-ThinItalic.ttf') format('truetype');
  font-style: italic;
}

/* ==========================================================================
   Global Styles
   ========================================================================== */

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background-color: #ffffff;
  font-family: 'Poppins', sans-serif;
  color: #002671;
}

header {
  padding: 0.3125rem calc(1rem + 2vw) 0;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */

header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 38, 113, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0.625rem calc(1rem + 2vw) 0.625rem;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  max-width: 1200px;
  margin: 0 auto;
}

/* --- Navigation Left --- */
.nav-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

@media (max-width: 430px) {
  .nav-left {
    gap: 0.625rem;
  }
}

.logo {
  display: inline-block;
  width: 35vw;
  max-width: 140px;
  height: 2.5rem;
  background-image: url('../materials/logos/T-LearnLogoThin.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  padding-top: 0.3125rem;
  transition: all 0.3s ease;
}

.logo:hover {
  background-image: url('../materials/logos/T-LearnLogoOrangeThin.png');
  transform: scale(1.05);
}

.faq-link {
  font-size: clamp(1.25rem, 4vw, 1.6875rem);
  font-family: 'Poppins-Black';
  color: #002671;
  text-decoration: none;
  padding-top: 0.5625rem;
  transition: all 0.3s ease;
  position: relative;
}

.faq-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #ffa500, #ffb84d);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.faq-link:hover {
  color: #ffa500;
  transform: scale(1.05);
}

.faq-link:hover::after {
  width: 100%;
}

.theme-toggle {
  width: clamp(1.8rem, 6vw, 2.1875rem);
  height: clamp(1.8rem, 6vw, 2.1875rem);
  background-image: url('../materials/icons/DarkModeIcon.png');
  background-size: contain;
  background-repeat: no-repeat;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 0.625rem;
}

.theme-toggle:hover {
  transform: scale(1.05) rotate(180deg);
  background-image: url('../materials/icons/DarkModeIconOrange.png') !important;
}

/* --- Navigation Right --- */
.nav-right {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
}

.nav-stats {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-back-btn {
  font-family: 'Poppins-Medium';
  color: #002671;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  border: 2px solid #002671;
  transition: all 0.3s ease;
}

.nav-back-btn:hover {
  background: #002671;
  color: #ffffff;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .nav-back-btn {
    display: block !important;
    position: fixed !important;
    top: 1rem !important;
    right: 1rem !important;
    background: #002671 !important;
    color: #ffffff !important;
    z-index: 9999 !important;
    font-size: 0.9rem !important;
    padding: 0.5rem 1rem !important;
    border: none !important;
  }
}

.nav-actions a {
  font-family: 'Poppins-Medium';
  color: #002671;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-actions a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 165, 0, 0.2), transparent);
  transition: left 0.5s ease;
}

.nav-actions a:hover {
  color: #ffa500;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 165, 0, 0.2);
}

.nav-actions a:hover::before {
  left: 100%;
}

.settings-link {
  background: linear-gradient(135deg, #002671 0%, #003d8a 100%);
  color: #ffffff !important;
  font-family: 'Poppins-SemiBold';
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  box-shadow: 0 4px 15px rgba(0, 38, 113, 0.2);
}

.settings-link::before {
  background: linear-gradient(90deg, transparent, rgba(255, 165, 0, 0.2), transparent);
}

.settings-link:hover {
  background: linear-gradient(135deg, #ffa500 0%, #ffb84d 100%) !important;
  color: #002671 !important;
  box-shadow: 0 8px 25px rgba(255, 165, 0, 0.3);
}

.signin-btn {
  font-size: 1rem;
  font-family: 'Poppins-Medium';
  color: #002671;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.signin-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 165, 0, 0.2), transparent);
  transition: left 0.5s ease;
}

.signin-btn:hover {
  color: #ffa500;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 165, 0, 0.2);
}

.signin-btn:hover::before {
  left: 100%;
}

.signup-btn {
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  font-family: 'Poppins-Bold';
  background: linear-gradient(135deg, #002671 0%, #003d8a 100%);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 38, 113, 0.2);
  position: relative;
  overflow: hidden;
}

.signup-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ffa500 0%, #ffb84d 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.signup-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 165, 0, 0.3);
  outline: none;
}

.signup-btn:hover::before {
  opacity: 1;
}

.signup-btn:focus {
  outline: none;
}

.signup-btn span {
  position: relative;
  z-index: 1;
  color: #ffffff;
}

/* --- Navigation Misc --- */
.nav-divider {
  display: none;
}

/* Hamburger Menu */
.hamburger-menu {
  display: none;
  cursor: pointer;
  padding: 0.5rem;
  transition: transform 0.3s ease;
}
.hamburger-menu:hover img {
  content: url('../materials/icons/HamburgerMenuOrange.png');
}
.hamburger-menu.active img {
  content: url('../materials/icons/HamburgerMenuOrange.png');
}
.hamburger-menu img {
  width: 24px;
  height: 24px;
  transition: all 0.3s linear;
  content: url('../materials/icons/HamburgerMenuBlue.png');
}
.mobile-menu {
  display: flex;
  flex-direction: column;
  background-color: var(--primary-color, #FFFFFF);
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.mobile-menu.active {
  max-height: 300px;
  padding: 1rem 0;
}
.mobile-menu a {
  padding: 0.75rem 2rem;
  color: var(--text-color);
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}
.mobile-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color, #FFA500);
  transition: width 0.3s ease;
}
.mobile-menu a:hover::after {
  width: 100%;
}
.mobile-menu a:hover {
  color: var(--accent-color, #FFA500);
}
@media (max-width: 768px) {
  .nav-left .faq-link, .nav-right {
    display: none;
  }
  
  .nav-right .nav-back-btn {
    display: block !important;
    position: fixed !important;
    top: 1rem;
    right: 1rem;
    background: #002671;
    color: #ffffff !important;
    border-radius: 25px;
    z-index: 1000;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    font-family: 'Poppins-Medium';
    box-shadow: 0 4px 15px rgba(0, 38, 113, 0.3);
    transition: all 0.3s ease;
  }
  
  .nav-right .nav-back-btn:hover {
    background: #ffa500;
    color: #002671 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 165, 0, 0.3);
  }
  
  .hamburger-menu {
    display: block;
  }
  .mobile-menu.active {
    display: flex;
  }
}

/* ==========================================================================
   Page Specific Styles
   ========================================================================== */

/* --- Home Page --- */
.hero {
  text-align: center;
  padding: 4rem 5vw;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 165, 0, 0.05) 0%, transparent 70%);
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(120deg); }
  66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-family: 'Poppins-Bold';
  margin: 0 0 1rem 0;
  line-height: 1.2;
  position: relative;
  z-index: 1;
}

.subtitle {
  font-size: clamp(1.1rem, 4vw, 1.25rem);
  color: #002671;
  margin-bottom: 2rem;
  font-family: 'Poppins-Medium';
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

.highlight {
  background: linear-gradient(135deg, #ffa500 0%, #ffb84d 50%, #ffa500 100%);
  background-size: 200% 200%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.getstarted-btn {
  background: linear-gradient(135deg, #002671 0%, #003d8a 100%);
  color: #ffffff;
  text-decoration: none;
  padding: 1.2rem 2.5rem;
  border-radius: 50px;
  font-family: 'Poppins-Bold';
  font-size: clamp(1.1rem, 4vw, 1.25rem);
  display: inline-block;
  margin-top: 1rem;
  transition: all 0.4s ease;
  box-shadow: 0 8px 25px rgba(0, 38, 113, 0.3);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.getstarted-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ffa500 0%, #ffb84d 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.getstarted-btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 35px rgba(0, 38, 113, 0.4);
}

.getstarted-btn:hover::before {
  opacity: 1;
}

.stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 3rem 5vw;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  margin-bottom: 3rem;
}

.stat {
  width: clamp(280px, 30vw, 320px);
  height: 200px;
  perspective: 1000px;
  transition: transform 0.3s ease;
}

.stat[onclick] {
  cursor: pointer;
}

.stat:hover {
  transform: scale(1.05);
}

.stat-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.stat.flipped .stat-inner {
  transform: rotateY(180deg);
}

.stat-front, .stat-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 38, 113, 0.2);
  box-sizing: border-box;
}

.stat-front {
  background: linear-gradient(135deg, #002671 0%, #003d8a 100%);
  color: #ffffff;
}

.stat-back {
  background: linear-gradient(135deg, #ffa500 0%, #ffb84d 100%);
  color: #002671;
  transform: rotateY(180deg);
}

.stat-front h2 {
  margin: 0 0 0.5rem 0;
  font-size: clamp(3.5rem, 8vw, 4.5rem);
  font-family: 'Poppins-Bold';
  background: linear-gradient(135deg, #ffa500 0%, #ffb84d 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  line-height: 1;
}

.stat-front p {
  margin: 0;
  font-size: clamp(1.2rem, 4vw, 1.5rem);
  font-family: 'Poppins-SemiBold';
  color: #ffffff;
  opacity: 0.95;
}

.stat-back h3 {
  margin: 0 0 1rem 0;
  font-size: clamp(1.3rem, 4vw, 1.5rem);
  font-family: 'Poppins-Bold';
  color: #002671;
}

.stat-back p {
  margin: 0;
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  font-family: 'Poppins-Regular';
  color: #002671;
  line-height: 1.4;
  text-align: center;
}

/* Features Section */
.features {
  padding: 4rem 5vw;
  text-align: center;
}

.features h2 {
  font-size: clamp(2rem, 6vw, 2.5rem);
  font-family: 'Poppins-Bold';
  color: #002671;
  margin-bottom: 3rem;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature {
  padding: 2rem 1rem;
  border-radius: 1rem;
  background-color: #f8f9fa;
  transition: transform 0.25s linear;
}

.feature:hover {
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature h3 {
  font-size: 1.25rem;
  font-family: 'Poppins-Bold';
  color: #002671;
  margin-bottom: 1rem;
}

.feature p {
  font-family: 'Poppins-Regular';
  color: #666;
  line-height: 1.6;
}

.content-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.content-links a {
  font-family: 'Poppins-Medium';
  color: #002671;
  text-decoration: none;
  padding: 0.75rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  position: relative;
}

.content-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #ffa500;
  transition: width 0.3s ease;
}

.content-links a:hover {
  color: #ffa500;
  padding-left: 1rem;
}

.content-links a:hover::after {
  width: 100%;
}

/* Timeline Styles */
.story-intro {
  max-width: 800px;
  margin: 0 auto 3rem;
  text-align: center;
}

.story-intro p {
  font-size: clamp(1.1rem, 3vw, 1.25rem);
  font-family: 'Poppins-Medium';
  color: #666;
  line-height: 1.7;
  font-style: italic;
  position: relative;
  padding: 2rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 38, 113, 0.1);
  border-left: 4px solid #ffa500;
}

.timeline-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 0;
}

.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, #ffa500 0%, #002671 50%, #ffa500 100%);
  transform: translateX(-50%);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(255, 165, 0, 0.3);
}

.timeline-item {
  position: relative;
  margin-bottom: 4rem;
  display: flex;
  align-items: center;
}

.timeline-item:nth-child(odd) {
  flex-direction: row;
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-marker {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}

.timeline-dot {
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #ffa500 0%, #ffb84d 100%);
  border-radius: 50%;
  border: 4px solid #ffffff;
  box-shadow: 0 0 0 4px #ffa500, 0 4px 15px rgba(255, 165, 0, 0.4);
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}

.timeline-dot.active {
  background: linear-gradient(135deg, #002671 0%, #003d8a 100%);
  box-shadow: 0 0 0 4px #002671, 0 4px 15px rgba(0, 38, 113, 0.4);
  animation: activePulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes activePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 4px #002671, 0 4px 15px rgba(0, 38, 113, 0.4); }
  50% { transform: scale(1.2); box-shadow: 0 0 0 8px rgba(0, 38, 113, 0.3), 0 8px 25px rgba(0, 38, 113, 0.6); }
}

.timeline-date {
  margin-top: 1rem;
  font-family: 'Poppins-Bold';
  color: #ffa500;
  font-size: 0.9rem;
  background: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(255, 165, 0, 0.2);
  border: 2px solid #ffa500;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .timeline-date {
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
  }
}

.timeline-content {
  flex: 1;
  max-width: 400px;
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: 3rem;
  text-align: left;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-right: 3rem;
  text-align: right;
}

.timeline-card {
  background: #ffffff;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 38, 113, 0.1);
  border: 1px solid rgba(255, 165, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.timeline-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ffa500 0%, #ffb84d 100%);
}

.timeline-card.active {
  background: linear-gradient(135deg, #002671 0%, #003d8a 100%);
  color: #ffffff;
  transform: scale(1.05);
  box-shadow: 0 15px 40px rgba(0, 38, 113, 0.3);
}

.timeline-card.active::before {
  background: linear-gradient(90deg, #ffa500 0%, #ffb84d 100%);
}

.timeline-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 38, 113, 0.2);
}

.timeline-card.active:hover {
  transform: scale(1.05) translateY(-5px);
}

.timeline-card h3 {
  font-family: 'Poppins-Bold';
  color: #002671;
  font-size: 1.4rem;
  margin: 0 0 1rem 0;
  position: relative;
}

.timeline-card.active h3 {
  color: #ffffff;
}

.timeline-card p {
  font-family: 'Poppins-Regular';
  color: #666;
  line-height: 1.6;
  margin: 0;
  font-size: 1rem;
}

.timeline-card.active p {
  color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
  .timeline::before {
    left: 2rem;
  }
  
  .timeline-item {
    flex-direction: row !important;
    margin-bottom: 3rem;
  }
  
  .timeline-marker {
    left: 2rem;
  }
  
  .timeline-content {
    margin-left: 4rem !important;
    margin-right: 0 !important;
    text-align: left !important;
    max-width: none;
  }
  
  .timeline-date {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
  }
}

/* Testimonials Section */
.testimonials {
  padding: 4rem 5vw;
  background-color: #f8f9fa;
  text-align: center;
}

.testimonials h2 {
  font-size: clamp(2rem, 6vw, 2.5rem);
  font-family: 'Poppins-Bold';
  color: #002671;
  margin-bottom: 3rem;
}

.testimonials-container {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.testimonial {
  display: none;
  padding: 2rem;
  background-color: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.testimonial.active {
  display: block;
}

.testimonial-content p {
  font-size: clamp(1rem, 3vw, 1.125rem);
  font-family: 'Poppins-Regular';
  color: #333;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.testimonial-author strong {
  font-family: 'Poppins-Bold';
  color: #002671;
  font-size: 1.125rem;
}

.testimonial-author span {
  font-family: 'Poppins-Regular';
  color: #ffa500;
  font-size: 0.9rem;
}

.testimonial-nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.nav-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #ccc;
  border: none;
  cursor: pointer;
  transition: background-color 0.25s linear;
}

.nav-dot.active {
  background-color: #002671;
}

/* Learning Path Section */
.learning-path {
  padding: 4rem 5vw;
  text-align: center;
}

.learning-path h2 {
  font-size: clamp(2rem, 6vw, 2.5rem);
  font-family: 'Poppins-Bold';
  color: #002671;
  margin-bottom: 3rem;
}

.path-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.step {
  padding: 2rem 1rem;
  text-align: center;
}

.step-number {
  width: 60px;
  height: 60px;
  background-color: #002671;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-family: 'Poppins-Bold';
  margin: 0 auto 1rem;
}

.step h3 {
  font-size: 1.25rem;
  font-family: 'Poppins-Bold';
  color: #002671;
  margin-bottom: 1rem;
}

.step p {
  font-family: 'Poppins-Regular';
  color: #666;
  line-height: 1.6;
}

/* Video Section */
.video-section {
  padding: 4rem 5vw;
  text-align: center;
  background-color: #f8f9fa;
}

.video-section h2 {
  font-size: clamp(2rem, 6vw, 2.5rem);
  font-family: 'Poppins-Bold';
  color: #002671;
  margin-bottom: 2rem;
}

/* CTA Section */
.cta-section {
  padding: 4rem 5vw;
  text-align: center;
  background-color: #ffffff;
  color: #002671;
}

.cta-section h2 {
  font-size: clamp(2rem, 6vw, 2.5rem);
  font-family: 'Poppins-Bold';
  margin-bottom: 1rem;
  color: #002671;
}

.cta-section p {
  font-size: clamp(1rem, 3vw, 1.125rem);
  font-family: 'Poppins-Regular';
  margin-bottom: 2rem;
  opacity: 0.9;
  color: #002671;
}

.cta-btn {
  background-color: #ffa500;
  color: #002671;
  text-decoration: none;
  padding: 1rem 2rem;
  border-radius: 2.5rem;
  font-family: 'Poppins-Bold';
  font-size: clamp(1rem, 3vw, 1.125rem);
  display: inline-block;
  transition: background-color, transform 0.25s linear;
}

.cta-btn:hover {
  background-color: #002671;
  color: #ffffff;
  transform: scale(1.05);
}

/* --- Role Selection Page --- */
.role-selection-hero {
  text-align: center;
  padding: 4rem 5vw 2rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  position: relative;
  overflow: hidden;
}

.role-selection-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 165, 0, 0.05) 0%, transparent 70%);
  animation: float 20s ease-in-out infinite;
}

.role-selection-hero h1 {
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-family: 'Poppins-Bold';
  color: #002671;
  margin: 0 0 1rem 0;
  position: relative;
  z-index: 1;
}

.role-selection-subtitle {
  font-size: clamp(1.1rem, 4vw, 1.25rem);
  color: #002671;
  font-family: 'Poppins-Medium';
  opacity: 0.9;
  position: relative;
  z-index: 1;
  margin: 0;
}

.role-selection-container {
  display: flex;
  justify-content: center;
  padding: 2rem 5vw 4rem;
}

.role-selection-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 3rem 2rem;
  box-shadow: 0 10px 40px rgba(0, 38, 113, 0.1);
  width: 100%;
  max-width: 500px;
  transition: all 0.4s ease;
}

.role-selection-card:hover {
  transform: translateY(-5px);
}

.role-selection-card h3 {
  font-family: 'Poppins-Bold';
  color: #002671;
  font-size: clamp(1.25rem, 4vw, 1.5rem);
  margin-bottom: 2rem;
  text-align: center;
}

.role-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.role-option-btn {
  font-family: 'Poppins-Bold';
  font-size: clamp(1rem, 3vw, 1.1rem);
  padding: 1.5rem 1rem;
  border-radius: 15px;
  border: 2px solid #e1e5e9;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  color: #002671;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.role-option-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 165, 0, 0.1), transparent);
  transition: left 0.5s ease;
}

.role-option-btn:hover {
  border-color: #ffa500;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 165, 0, 0.2);
}

.role-option-btn:hover::before {
  left: 100%;
}

.role-option-btn.selected {
  background: linear-gradient(135deg, #002671 0%, #003d8a 100%);
  color: #ffffff;
  border-color: #002671;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 38, 113, 0.3);
}

.role-option-btn.selected::before {
  background: linear-gradient(90deg, transparent, rgba(255, 165, 0, 0.2), transparent);
}

.year-selection {
  margin-top: 2rem;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

.year-selection.show {
  opacity: 1;
  max-height: 300px;
  transform: translateY(0);
}

.year-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.continue-btn {
  background: linear-gradient(135deg, #ffa500 0%, #ffb84d 100%);
  color: #002671;
  border: none;
  padding: 1.2rem 2rem;
  border-radius: 50px;
  font-family: 'Poppins-Bold';
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  position: relative;
  overflow: hidden;
  opacity: 0;
  max-height: 0;
  transform: translateY(20px);
  margin-top: 0;
}

.continue-btn.show {
  opacity: 1;
  max-height: 100px;
  transform: translateY(0);
  margin-top: 1rem;
}

.continue-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #002671 0%, #003d8a 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.continue-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 165, 0, 0.4);
}

.continue-btn:hover::before {
  opacity: 1;
}

.continue-btn span {
  position: relative;
  z-index: 1;
  color: #002671;
  transition: color 0.3s ease;
}

.continue-btn:hover span {
  color: #ffffff;
}
.auth-hero {
  text-align: center;
  padding: 4rem 5vw 2rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  position: relative;
  overflow: hidden;
}

.auth-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 165, 0, 0.05) 0%, transparent 70%);
  animation: float 20s ease-in-out infinite;
}

.auth-hero h1 {
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-family: 'Poppins-Bold';
  color: #002671;
  margin: 0 0 1rem 0;
  position: relative;
  z-index: 1;
}

.auth-subtitle {
  font-size: clamp(1.1rem, 4vw, 1.25rem);
  color: #002671;
  font-family: 'Poppins-Medium';
  opacity: 0.9;
  position: relative;
  z-index: 1;
  margin: 0;
}

.auth-container {
  display: flex;
  justify-content: center;
  padding: 2rem 5vw 4rem;
}

.auth-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 3rem 2rem;
  box-shadow: 0 10px 40px rgba(0, 38, 113, 0.1);
  width: 100%;
  max-width: 450px;
  transition: transform 0.3s ease;
}

.auth-card:hover {
  transform: translateY(-5px);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.name-row {
  display: flex;
  gap: 1rem;
}

.name-field {
  flex: 1;
}

.form-label {
  display: block;
  font-family: 'Poppins-SemiBold';
  color: #002671;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.auth-form input {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  font-size: 1rem;
  font-family: 'Poppins-Regular';
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.auth-form input:focus {
  outline: none;
  border-color: #ffa500;
  box-shadow: 0 0 0 3px rgba(255, 165, 0, 0.1);
}

.form-button {
  background: linear-gradient(135deg, #002671 0%, #003d8a 100%);
  color: #ffffff;
  border: none;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-family: 'Poppins-Bold';
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.form-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ffa500 0%, #ffb84d 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.form-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 38, 113, 0.3);
  color: #002671;
}

.form-button:hover::before {
  opacity: 0;
}

.form-button span {
  position: relative;
  z-index: 1;
}

.divider {
  text-align: center;
  margin: 2rem 0;
  position: relative;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e1e5e9;
}

.divider span {
  background: #ffffff;
  padding: 0 1rem;
  color: #666;
  font-family: 'Poppins-Medium';
  position: relative;
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: #ffffff;
  color: #444;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  padding: 1rem;
  font-family: 'Poppins-Medium';
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.google-btn:hover {
  border-color: #ffa500;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 165, 0, 0.2);
}

.google-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.auth-link {
  text-align: center;
  font-family: 'Poppins-Regular';
  color: #666;
  margin: 1.5rem 0 0;
}

.anchor-link {
  color: #ffa500;
  text-decoration: none;
  font-family: 'Poppins-SemiBold';
  transition: color 0.3s ease;
}

.anchor-link:hover {
  color: #002671;
  text-decoration: underline;
}

.password-container {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  cursor: pointer;
  user-select: none;
}

/* --- Legal Pages --- */
.legal-hero {
  text-align: center;
  padding: 4rem 5vw 2rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  position: relative;
  overflow: hidden;
}

.legal-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 165, 0, 0.05) 0%, transparent 70%);
  animation: float 20s ease-in-out infinite;
}

.legal-hero h1 {
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-family: 'Poppins-Bold';
  color: #002671;
  margin: 0 0 1rem 0;
  position: relative;
  z-index: 1;
}

.legal-subtitle {
  font-size: clamp(1rem, 3vw, 1.125rem);
  color: #666;
  font-family: 'Poppins-Medium';
  position: relative;
  z-index: 1;
  margin: 0;
}

.legal-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 5vw 4rem;
}

.legal-content {
  background: #ffffff;
  border-radius: 20px;
  padding: 3rem 2rem;
  box-shadow: 0 10px 40px rgba(0, 38, 113, 0.1);
  line-height: 1.7;
  max-width: 1000px;
  margin: 0 auto;
}

.intro-text {
  font-size: 1.125rem;
  color: #002671;
  font-family: 'Poppins-Medium';
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  border-left: 4px solid #ffa500;
}

.legal-content h2 {
  font-family: 'Poppins-Bold';
  font-size: clamp(1.5rem, 4vw, 1.75rem);
  color: #002671;
  margin: 2rem 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #ffa500;
}

.legal-content h3 {
  font-family: 'Poppins-SemiBold';
  font-size: clamp(1.25rem, 3vw, 1.375rem);
  color: #002671;
  margin: 1.5rem 0 0.75rem 0;
}

.legal-content h4 {
  font-family: 'Poppins-SemiBold';
  font-size: 1.125rem;
  color: #002671;
  margin: 1rem 0 0.5rem 0;
}

.legal-content p {
  font-family: 'Poppins-Regular';
  color: #333;
  margin-bottom: 1rem;
}

.legal-content ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.legal-content li {
  font-family: 'Poppins-Regular';
  color: #333;
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.legal-content strong {
  color: #002671;
  font-family: 'Poppins-SemiBold';
}

/* --- New Dashboard Design --- */
.hero-section {
  padding: 4rem 5vw 3rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

.welcome-area {
  text-align: center;
}

.dynamic-welcome {
  font-family: 'Poppins-Bold';
  color: #002671;
  margin: 0 0 1rem 0;
  font-size: clamp(2rem, calc(2rem + (100vw - 320px) / (1200 - 320) * (3.5 - 2)), 3.5rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dynamic-welcome .highlight {
  display: inline;
}

.subtitle {
  font-family: 'Poppins-Medium';
  font-size: clamp(1.1rem, 3vw, 1.25rem);
  color: #666;
  margin: 0 0 2rem 0;
}

.user-tags {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.tag {
  background: linear-gradient(135deg, #002671 0%, #003d8a 100%);
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-family: 'Poppins-Medium';
  font-size: 0.9rem;
  box-shadow: 0 4px 15px rgba(0, 38, 113, 0.2);
}

.level-progress-container {
  width: 100%;
  margin-top: 1.5rem;
}

.level-progress-card {
  background: linear-gradient(135deg, #002671 0%, #003d8a 100%);
  padding: 1.5rem;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 38, 113, 0.2);
  width: 100%;
  box-sizing: border-box;
}

.level-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-family: 'Poppins-SemiBold';
  color: #ffa500;
  font-size: 0.9rem;
}

.level-xp-text {
  color: #ffa500;
  font-family: 'Poppins-Bold';
}

.level-progress-bar-bg {
  width: 100%;
  height: 10px;
  background: rgba(255, 165, 0, 0.3);
  border-radius: 25px;
  overflow: hidden;
}

.level-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffa500 0%, #ffb84d 100%);
  border-radius: 25px;
  transition: width 0.8s ease;
  box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
  width: 0%;
  min-width: 0;
}

.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  background: #ffffff;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 38, 113, 0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-icon {
  width: 3rem;
  height: 3rem;
  min-width: 3rem;
  min-height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.xp-icon {
  background: linear-gradient(135deg, #ffa500 0%, #ffb84d 100%);
}

.streak-icon {
  background: linear-gradient(135deg, #002671 0%, #003d8a 100%);
}

.stat-content h3 {
  font-family: 'Poppins-Bold';
  font-size: 1.5rem;
  color: #002671;
  margin: 0;
}

.stat-content p {
  font-family: 'Poppins-Medium';
  color: #666;
  margin: 0;
  font-size: 0.9rem;
}

.progress-section {
  padding: 2rem 5vw;
}

.progress-card {
  max-width: 1200px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(0, 38, 113, 0.1);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.progress-header h2 {
  font-family: 'Poppins-Bold';
  font-size: 1.5rem;
  color: #002671;
  margin: 0;
}

.edit-btn {
  background: linear-gradient(135deg, #ffa500 0%, #ffb84d 100%);
  color: #002671;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-family: 'Poppins-SemiBold';
  cursor: pointer;
  transition: all 0.3s ease;
}

.edit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 165, 0, 0.3);
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.current-xp {
  font-family: 'Poppins-Bold';
  font-size: 1.25rem;
  color: #002671;
}

.goal-text {
  font-family: 'Poppins-Medium';
  color: #666;
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: #f0f0f0;
  border-radius: 25px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffa500 0%, #ffb84d 100%);
  border-radius: 25px;
  transition: width 0.8s ease;
  box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
}

.week-overview h4 {
  font-family: 'Poppins-SemiBold';
  color: #002671;
  margin: 1rem 0 1rem 0;
  text-align: center;
}

.week-days {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.day-item {
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins-Bold';
  color: #666;
  transition: all 0.3s ease;
}

.day-item.active {
  background: linear-gradient(135deg, #ffa500 0%, #ffb84d 100%);
  color: #002671;
  transform: scale(1.1);
}

.modules-section {
  padding: 2rem 5vw 4rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-family: 'Poppins-Bold';
  font-size: clamp(2rem, 5vw, 2.5rem);
  color: #002671;
  margin: 0 0 1rem 0;
}

.section-header p {
  font-family: 'Poppins-Medium';
  color: #666;
  font-size: 1.1rem;
  margin: 0;
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.module-card {
  height: 400px;
  perspective: 1000px;
  cursor: pointer;
}

.module-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.module-card.flipped .module-inner {
  transform: rotateY(180deg);
}

.module-front, .module-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(0, 38, 113, 0.1);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.module-front {
  background: linear-gradient(135deg, #002671 0%, #003d8a 100%);
  color: #ffffff;
  justify-content: space-between;
  align-items: center;
  text-align: center;
}

.module-back {
  background: linear-gradient(135deg, #ffa500 0%, #ffb84d 100%);
  color: #002671;
  transform: rotateY(180deg);
  justify-content: flex-start;
  gap: 1rem;
}

.module-info h3 {
  font-family: 'Poppins-Bold';
  font-size: 1.5rem;
  margin: 1rem 0 0.5rem 0;
}

.module-info p {
  font-family: 'Poppins-Medium';
  opacity: 0.9;
  margin: 0 0 1rem 0;
}

.progress-indicator {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-family: 'Poppins-Medium';
  font-size: 0.9rem;
}

.module-btn {
  background: linear-gradient(135deg, #ffa500 0%, #ffb84d 100%);
  color: #002671;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-family: 'Poppins-Bold';
  font-size: 1.1rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.module-link {
  background: linear-gradient(135deg, #ffa500 0%, #ffb84d 100%);
  color: #002671;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-family: 'Poppins-Bold';
  font-size: 1.1rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.module-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.module-btn:hover::before {
  opacity: 1;
}

.module-btn span {
  position: relative;
  z-index: 1;
}

.module-btn:hover span {
  color: #ffa500;
}

.module-back h3 {
  font-family: 'Poppins-Bold';
  font-size: 1.25rem;
  margin: 0 0 1rem 0;
}

.module-back p {
  font-family: 'Poppins-Regular';
  line-height: 1.5;
  margin: 0 0 1rem 0;
}

.module-back ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
}

.module-back li {
  font-family: 'Poppins-Medium';
  padding: 0.25rem 0;
  position: relative;
  padding-left: 1rem;
}

.module-back li::before {
  content: '•';
  position: absolute;
  left: 0;
  font-weight: bold;
}

.module-meta {
  display: flex;
  gap: 1rem;
  margin-top: auto;
}

.module-meta span {
  background: rgba(0, 38, 113, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-family: 'Poppins-Medium';
  font-size: 0.8rem;
}

@media (min-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr 1fr;
    text-align: left;
  }
  
  .welcome-area {
    text-align: left;
  }
  
  .user-tags {
    justify-content: flex-start;
  }
}

.guest-dashboard-header-container {
  display: flex;
  align-items: center;
  margin-top: 6.25rem;
  justify-content: center;
}

.guest-dashboard-header {
  display: flex;
  flex-direction: column;
  font-family: 'poppins-Bold';
  align-content: left;
  margin-top: -2.5rem;
  margin-left: -2.5rem;
  padding-left: -1.25rem;
}

.guest-dashboard-title {
  font-family: 'Poppins-Bold';
  font-size: 3.75rem;
  color: #002671;
  margin-bottom: -1.875rem;
  padding-top: -0.625rem;
  padding-left: 2.8125rem;
  align-items: center;
  text-align: center;
}


.guest-dashboard-subtitle {
  padding: 0 5vw;
}

.guest-dashboard-bottom-title {
  font-family: 'Poppins-Bold';
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  color: #002671;
  margin: 0;
  text-align: center;
}

.guest-dashboard-header-divider {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 90vw;
  margin: 1rem 0; /* Add some vertical spacing */
}

.guest-dashboard-divider {
  flex-grow: 1;
  height: 0.0625rem;
  background-color: #002671;
}

/* --- Settings Page --- */
.settings-hero {
  text-align: center;
  padding: 4rem 5vw 2rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  position: relative;
  overflow: hidden;
}

.settings-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 165, 0, 0.05) 0%, transparent 70%);
  animation: float 20s ease-in-out infinite;
}

.settings-hero h1 {
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-family: 'Poppins-Bold';
  color: #002671;
  margin: 0 0 1rem 0;
  position: relative;
  z-index: 1;
}

.settings-subtitle {
  font-size: clamp(1.1rem, 4vw, 1.25rem);
  color: #002671;
  font-family: 'Poppins-Medium';
  opacity: 0.9;
  position: relative;
  z-index: 1;
  margin: 0;
}

.settings-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 5vw 4rem;
}

.settings-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 40px rgba(0, 38, 113, 0.1);
  transition: transform 0.3s ease;
}

.settings-card:hover {
  transform: translateY(-5px);
}

.settings-card h2 {
  font-family: 'Poppins-Bold';
  font-size: clamp(1.5rem, 5vw, 1.75rem);
  color: #002671;
  margin: 0 0 1.5rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #ffa500;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.setting-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.setting-group label {
  font-family: 'Poppins-SemiBold';
  color: #002671;
  font-size: 1rem;
  margin: 0;
}

.settings-form input {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  font-size: 1rem;
  font-family: 'Poppins-Regular';
  transition: all 0.3s ease;
  box-sizing: border-box;
  background: #ffffff;
}

.settings-form input:focus {
  outline: none;
  border-color: #ffa500;
  box-shadow: 0 0 0 3px rgba(255, 165, 0, 0.1);
}

.settings-form select {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  font-size: 1rem;
  font-family: 'Poppins-Regular';
  transition: all 0.3s ease;
  box-sizing: border-box;
  background: #ffffff;
  color: #333;
  appearance: none;
  background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
}

.settings-form select:focus {
  outline: none;
  border-color: #ffa500;
  box-shadow: 0 0 0 3px rgba(255, 165, 0, 0.1);
}

.settings-form select:disabled {
  background: #f8f9fa;
  color: #666;
  cursor: not-allowed;
}

.settings-form input:disabled {
  background: #f8f9fa;
  color: #666;
  cursor: not-allowed;
}

.setting-help-text {
  font-size: 0.875rem;
  color: #666;
  font-family: 'Poppins-Regular';
  margin: 0.5rem 0 0 0;
  line-height: 1.4;
}

.setting-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.danger-zone {
  border: 2px solid #dc2626;
  background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
}

.danger-zone h2 {
  color: #dc2626;
  border-bottom-color: #dc2626;
}

.danger-text {
  font-family: 'Poppins-Regular';
  color: #dc2626;
  font-size: 1rem;
  margin: 0 0 1rem 0;
  line-height: 1.5;
}

/* --- Static Content Pages (Privacy, Terms) --- */

.privacy-policy-container,
.terms-conditions-container {
  display: flex;
  flex-direction: column;
  padding: 0 5vw; /* Use horizontal padding for spacing */
  margin: 1.5rem auto; /* Center the container on the page */
  max-width: 80ch; /* Set a max-width for readability on large screens */
  width: 100%;
  box-sizing: border-box;
}

/* ==========================================================================
   Component Styles
   ========================================================================== */

/* --- Forms & Inputs --- */
.form-config {
  width: 100%;
  max-width: 31.25rem;
  text-align: center;
}

#sign-up-form {
  margin-top: 2rem; /* Reduced margin for mobile */
}

.sign-fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.name-row {
  display: flex;
  flex-wrap: wrap; /* Allows fields to stack on very small screens */
  gap: 0.625rem;
}

/* The label itself isn't a flex container, so this rule is not needed */
/* #first_name-label, #last_name-label {
  flex-direction: column;
} */

.name-row > div {
    flex: 1 1 10rem; /* Allows items to grow and shrink, with a base size */
}

.form-label {
  font-family:'Poppins-Bold';
  display: block;
  text-align: left;
  color: #002671;
  font-size: 1rem;
  font-weight: 500;
  margin: 1rem 0 0.5rem 0;
}

#email, #password, #first_name, #last_name, #confirm_password {
  width: 100%;
  padding: 0.875rem;
  border: 0.0625rem solid #002671;
  border-radius: 0.375rem;
  font-size: 1rem;
  background-color: #ffffff;
  transition: border-color 0.25s linear;
  margin-bottom: 0.5rem;
  box-sizing: border-box;
}

#email:focus, #password:focus, #first_name:focus, #last_name:focus, #confirm_password:focus {
  outline: none;
  border-color: #FFA500;
}

.password-container {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 0.625rem;
  top: 65%;
  transform: translateY(-50%);
  cursor: pointer;
  user-select: none;
}
.password-rule-row {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.password-rule {
  font-family: 'Poppins-Regular';
  color: #FFA500;
  font-size: clamp(0.7rem, 2vw, 0.75rem); /* Responsive font-size */
  margin-top: -0.3125rem;
  text-align: left;
  margin-bottom: 0;
}

/* --- Buttons --- */
.form-button {
  width: 100%;
  height: 3.125rem;
  padding: 0.875rem;
  background-color: #002671;
  color: #ffffff;
  border: 0.0625rem solid #002671;
  border-radius: 0.375rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 1.5rem;
  transition: background-color 0.25s linear, border-color 0.25s linear;
  box-sizing: border-box;
}

.form-button:hover {
  background-color: #FFA500;
  border-color: #FFA500;
  color: #ffffff;
}

#sign-upButton {
  height: 3.125rem;
  margin-top: 0.3125rem;
}

.google-signUp-container,
.google-signIn-container {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 1.25rem;
}

.google-signIn-container {
  padding-top: 0.3125rem;
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background-color: #ffffff;
  color: #444;
  border: 0.0625rem solid #dddddd;
  border-radius: 0.375rem;
  padding: 0.875rem;
  font-size: clamp(0.9rem, 2.5vw, 1rem); /* Responsive font-size */
  font-family: 'Poppins-Medium', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  width: 100%;
  box-sizing: border-box;
}

.google-btn:hover {
  background-color: #f9f9f9;
  border-color: #ccc;
  box-shadow: 0 0.125rem 0.5rem rgba(0,0,0,0.1);
}

.settings-button {
  font-family: 'Poppins-SemiBold';
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  border: 2px solid #002671;
  background-color: #ffffff;
  color: #002671;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.settings-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 38, 113, 0.1), transparent);
  transition: left 0.5s ease;
}

.settings-button:hover {
  background-color: #002671;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 38, 113, 0.2);
}

.settings-button:hover::before {
  left: 100%;
}

.settings-button.button-primary {
  background: linear-gradient(135deg, #002671 0%, #003d8a 100%);
  color: #ffffff;
  border-color: #002671;
  box-shadow: 0 4px 15px rgba(0, 38, 113, 0.2);
}

.settings-button.button-primary::before {
  background: linear-gradient(90deg, transparent, rgba(255, 165, 0, 0.2), transparent);
}

.settings-button.button-primary:hover {
  background: linear-gradient(135deg, #ffa500 0%, #ffb84d 100%);
  border-color: #ffa500;
  box-shadow: 0 8px 25px rgba(255, 165, 0, 0.3);
}

.settings-button.button-danger {
  border-color: #dc2626;
  color: #dc2626;
}

.settings-button.button-danger::before {
  background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.1), transparent);
}

.settings-button.button-danger:hover {
  background-color: #dc2626;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.2);
}

.goal-options {
  display: grid;
  grid-template-columns: 1fr; /* Single column for mobile */
  gap: 1rem;
  margin-bottom: 1.5625rem;
}

.goal-option-btn {
  font-family: 'Poppins-Bold', sans-serif;
  font-size: clamp(1rem, 4vw, 1.1rem);
  padding: 0.9375rem 0.625rem;
  border-radius: 0.5rem;
  border: 0.125rem solid #ddd;
  background-color: #f9f9f9;
  color: #002671;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.goal-option-btn:hover {
  border-color: #FFA500;
  transform: translateY(-0.125rem);
}

.goal-option-btn.selected {
  background-color: #002671;
  color: #ffffff;
  border-color: #002671;
}

/* --- Larger Screen Styles --- */
@media (min-width: 768px) {
  .goal-options {
    grid-template-columns: repeat(3, 1fr); /* Back to three columns on desktop */
  }
}

/* --- Dashboard Components (XP, Streak, Progress) --- */
.xp-container,
.daily-streak-container {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#streak-writing, 
#xp-writing {
  font-family: 'Poppins-Bold';
  color: #002671;
  font-size: clamp(0.85rem, 2.5vw, 0.95rem);
  margin: 0;
}

.stat-card .xp-container,
.stat-card .daily-streak-container {
  background: rgba(255, 255, 255, 0.2);
}

.stat-card #xp-writing,
.stat-card #streak-writing {
  color: #ffffff;
}

.badges-title {
  font-family: 'Poppins-Bold';
  font-size: clamp(1.1rem, 4vw, 1.25rem);
  color: #002671;
  margin-bottom: 0.75rem;
  margin-top: -0.625rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  justify-content: flex-start; /* Better for wrapping */
}

.daily-goal-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.daily-goal-title {
  font-family: 'Poppins-Bold';
  font-size: clamp(1.25rem, 5vw, 1.5rem);
  color: #ffffff;
  margin: 0;
}

.daily-goal-progress-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.progress-text-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.daily-goal-progress-text1,
.daily-goal-progress-text2 {
  font-family: 'Poppins-Medium';
  color: #ffffff;
  font-size: clamp(0.9rem, 3vw, 1rem);
  margin: 0;
}

.progress-bar-background {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffa500 0%, #ffb84d 100%);
  border-radius: 25px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
}

.weekday-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.streak-info {
  text-align: center;
}

.streak-text {
  font-family: 'Poppins-Medium';
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.85rem, 2.5vw, 0.95rem);
  margin: 0;
}

.streak-text span {
  font-family: 'Poppins-Bold';
  color: #ffa500;
}

.weekday-progress {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.weekday-item {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-radius: 50%;
  width: 2.2rem;
  height: 2.2rem;
  min-width: 2.2rem;
  min-height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins-Bold';
  font-size: 0.85rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.weekday-item.active {
  background: linear-gradient(135deg, #ffa500 0%, #ffb84d 100%);
  color: #002671;
  transform: scale(1.1);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 15px rgba(255, 165, 0, 0.4);
}

/* --- Modules & Content --- */
.modules-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 2rem 5vw;
  max-width: 1200px;
  margin: 0 auto;
}

.module-item {
  background: linear-gradient(135deg, #002671 0%, #003d8a 100%);
  color: #ffffff;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  box-shadow: 0 10px 40px rgba(0, 38, 113, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  transition: all 0.3s ease;
  min-height: 320px;
  position: relative;
  overflow: hidden;
}

.module-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ffa500 0%, #ffb84d 100%);
}

.module-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 38, 113, 0.3);
}

.module-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.module-item.flipped .module-inner {
  transform: rotateY(180deg);
}

.module-front, .module-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 38, 113, 0.2);
  box-sizing: border-box;
}

.module-front {
  background: linear-gradient(135deg, #002671 0%, #003d8a 100%);
}

.module-back {
  background: linear-gradient(135deg, #ffa500 0%, #ffb84d 100%);
  color: #002671;
  transform: rotateY(180deg);
  text-align: left;
  justify-content: flex-start;
  gap: 1rem;
}

.module-back h3 {
  font-family: 'Poppins-Bold';
  font-size: 1.25rem;
  margin: 0;
  text-align: center;
}

.module-back p {
  font-family: 'Poppins-Regular';
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0;
}

.module-back ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.module-back li {
  font-family: 'Poppins-Medium';
  font-size: 0.85rem;
  padding: 0.25rem 0;
  position: relative;
  padding-left: 1rem;
}

.module-back li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #002671;
  font-weight: bold;
}

.module-title {
  font-family: 'Poppins-Bold';
  font-size: clamp(1.5rem, 5vw, 1.75rem);
  color: #ffffff;
  margin: 1.5rem 0 0.5rem 0;
  position: relative;
  z-index: 1;
}

.module-progress {
  font-family: 'Poppins-Medium';
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  margin: 0 0 2rem 0;
  position: relative;
  z-index: 1;
}

.module-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ffa500 0%, #ffb84d 100%);
  color: #002671;
  font-family: 'Poppins-Bold';
  font-size: clamp(1.1rem, 4vw, 1.25rem);
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 165, 0, 0.3);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.module-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.module-link:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(255, 165, 0, 0.4);
}

.module-link:hover::before {
  opacity: 1;
}

.module-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ffa500 0%, #ffb84d 100%);
  color: #002671;
  font-family: 'Poppins-Bold';
  font-size: clamp(1.1rem, 4vw, 1.25rem);
  padding: 1.2rem 2.5rem;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 165, 0, 0.3);
  position: relative;
  z-index: 1;
  overflow: hidden;
  min-width: 120px;
}

.module-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.module-link:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(255, 165, 0, 0.4);
}

.module-link:hover::before {
  opacity: 1;
}

.module-link span {
  position: relative;
  z-index: 1;
}

.module-link:hover span {
  color: #ffa500;
}

/* --- Content Areas --- */
.core-papers-bottom-title {
  font-family: 'Poppins-Bold';
  font-size: 2.5rem;
  color: #002671;
  margin-left: 8.125rem;
  margin-bottom: 0rem;
}

.content-areas-container {
  background-color: #ffffff;
  border-radius: 20px;
  padding: 2rem;
  margin: 0 auto 2rem;
  max-width: 1200px;
  box-shadow: 0 10px 40px rgba(0, 38, 113, 0.1);
  transition: transform 0.3s ease;
}

.content-areas-container:hover {
  transform: translateY(-5px);
}

.content-area-title {
  font-family: 'Poppins-Bold';
  color: #002671;
  font-size: 1.5rem;
  font-weight: bold;
  text-align: left;
  margin: 0 0 1.5rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid #ffa500;
}

.content-areas-container .subtopic-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem 2.5rem;
}

.subtopic-row-container {
  display: contents;
}

.subtopic-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem 2rem;
}

@media (min-width: 768px) {
  .subtopic-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .subtopic-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

.subtopic-container a {
  font-family: 'Poppins-Medium';
  color: #002671;
  text-decoration: none;
  padding: 0.75rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  position: relative;
}

.subtopic-container a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #ffa500;
  transition: width 0.3s ease;
}

.subtopic-container a:hover {
  color: #ffa500;
  padding-left: 1rem;
}

.subtopic-container a:hover::after {
  width: 100%;
}

/* --- Learning Criteria & Lesson Content --- */
.learning-criteria-container {
  width: 90vw;
  max-width: 62.5rem;
  margin: 1rem auto;
  background-color: #002671;
  border-radius: 0.75rem;
  padding: 0.5rem 0;
}

.criteria-title {
  font-family: 'Poppins-Bold';
  color: #ffa500;
  font-size: clamp(1.2rem, 5vw, 1.5rem);
  padding: 0.3125rem 5vw;
  margin-bottom: 0.5rem;
}

.learning-criteria {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 5vw;
}

.criteria-item {
  background-color: #ffffff;
  font-family: 'Poppins-Bold';
  color: #002671;
  border-radius: 50%;
  width: clamp(1.8rem, 8vw, 2.1875rem);
  height: clamp(1.8rem, 8vw, 2.1875rem);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.learning-criteria p{
  font-family: 'Poppins-Medium';
  color: #ffa500;
  font-size: clamp(1rem, 3vw, 1.125rem);
  margin: 0;
  padding: 0.7813rem 0;
}

.learning-criteria-estimated-time-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3125rem 5vw 0.625rem;
}

.learning-criteria-time-pill {
  background-color: #ffffff;
  color: #002671;
  border-radius: 3.125rem;
  width: auto; /* Let content define width */
  padding: 0 1rem;
  height: 2.1875rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.learning-criteria-estimated-time {
  font-family: 'Poppins-Bold';
  color: #002671;
  font-size: clamp(1rem, 3vw, 1.125rem);
  margin: 0;
}

.learning-video {
  width: 90vw;
  max-width: 62.5rem;
  aspect-ratio: 16 / 9;
  height: auto;
  margin: 1rem auto;
  display: block; /* Simpler than flex for a single item */
  border-radius: 0.75rem;
}

/* --- Notes --- */
.notes-container {
  width: 90vw;
  max-width: 62.5rem;
  margin: 1rem auto;
  background-color: #002671;
  border-radius: 0.75rem;
  padding: 1.5rem 5vw;
  box-sizing: border-box;
  color: white;
}

.notes-title {
  font-size: clamp(1.5rem, 6vw, 1.6875rem);
  font-family: 'Poppins-Black';
  color: #FFA500;
  margin: 0.3125rem auto;
  padding-top: 0;
  text-align: center;
}

.notes-subtitle {
  font-size: clamp(1.1rem, 5vw, 1.25rem);
  font-family: 'Poppins-Black';
  color: #FFA500;
  margin: 1rem 0 0.5rem;
  text-align: left;
}

.notes-subtopic-subtitle {
  font-size: clamp(1rem, 4vw, 1.125rem);
  font-family: 'Poppins-Bold';
  color: #FFA500;
  margin: 1rem 0 0.5rem;
  text-align: left;
}

.notes-paragraph,
.notes-paragraph-list {
  font-size: clamp(0.9rem, 2.5vw, 0.9375rem);
  font-family: 'Poppins-Medium';
  color: #ffffff;
  margin: 0.3125rem auto;
  text-align: left;
  line-height: 1.6;
}

/* --- Responsive Table Wrapper --- */
.table-wrapper {
  overflow-x: auto; /* Allows horizontal scrolling on small screens */
  margin-top: 0.9375rem;
}

.notes-table, .notes-table-3headings {
  text-align: left;
  width: 100%;
  font-family: poppins-medium;
  border-collapse: collapse;
  border: 0.1875rem solid #FFA500;
}

.notes-table th,
.notes-table td {
  width: 50%;
  border: 0.0625rem solid #FFA500;
  padding: 0.5rem;
  border-left: 0.1875rem solid #FFA500;
}

.notes-table-3headings th,
.notes-table-3headings td {
  border: 0.0625rem solid #FFA500;
  padding: 0.5rem;
  width: 33%;
  border-left: 0.1875rem solid #FFA500;
  font-size: clamp(0.8rem, 2.2vw, 0.9rem);
  white-space: nowrap; /* Prevents text from wrapping awkwardly */
}

#lesson-1-2-3-table {
  margin-bottom: 1.6875rem;
}

/* --- Media Queries for Larger Screens --- */
@media (min-width: 600px) {
  .modules-container {
    flex-direction: row; /* Horizontal layout for tablets */
    flex-wrap: wrap;
    justify-content: center;
  }
  .content-areas-container .subtopic-container {
    grid-template-columns: repeat(2, 1fr); /* Two columns */
  }
}

@media (min-width: 992px) {
  .content-areas-container .subtopic-container {
    grid-template-columns: repeat(3, 1fr); /* Three columns on desktop */
  }
}

/* --- Mobile Optimization for Software Development Pages --- */
@media (max-width: 768px) {
  .content-areas-container {
    margin: 0 1rem 2rem;
    padding: 1.5rem;
  }
  
  .subtopic-container {
    grid-template-columns: 1fr !important;
    gap: 0.5rem;
  }
  
  .subtopic-container a {
    font-size: 0.9rem;
    padding: 0.5rem 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .legal-container {
    padding: 1rem 2vw 2rem;
  }
  
  .legal-content {
    padding: 1.5rem 1rem;
  }
  
  .legal-content h2 {
    font-size: 1.25rem;
  }
  
  .legal-content h3 {
    font-size: 1.1rem;
  }
  
  .legal-content pre {
    font-size: 0.8rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
  }
  
  .quiz1-wrapper {
    padding: 1rem 2vw 2rem;
  }
  
  .quiz1-container {
    padding: 1.5rem 1rem;
  }
  
  .quiz1-options-inline {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .quiz1-option {
    font-size: 0.9rem;
    padding: 0.75rem 0.5rem;
  }
  
  .nav-right {
    display: none !important;
  }
  
  .nav-back-btn {
    display: block !important;
    font-size: 0.9rem !important;
    padding: 0.5rem 1rem !important;
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: #002671;
    color: #ffffff !important;
    border-radius: 25px;
    z-index: 1000;
    text-decoration: none;
    font-family: 'Poppins-Medium';
    box-shadow: 0 4px 15px rgba(0, 38, 113, 0.3);
    transition: all 0.3s ease;
  }
  
  .nav-back-btn:hover {
    background: #ffa500;
    color: #002671 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 165, 0, 0.3);
  }
}

/* --- Code, Algorithms & Flowcharts --- */
/* --- General Wrapper for Code/Flowcharts --- */
.media-wrapper {
  width: 100%;
  overflow-x: auto; /* Allows horizontal scrolling for wide content */
  margin-bottom: 1.6875rem;
}

/* --- Containers --- */
.algorithm-container-1-2-2,
.algorithm-container-1-2-6,
.algorithm-container-1-2-8 {
  display: flex;
  flex-direction: column; /* Stack vertically on mobile */
  align-items: center;
  gap: 1.5rem; /* Add space between stacked items */
  margin-bottom: 1.6875rem;
}

.code-container-1-2-7,
.flowchart-container-1-2-7 {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.6875rem;
}

.code4-container-1-2-6 {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0 auto 1.6875rem;
}

/* --- Code Snippets --- */
.code-example-1-2-2,
.code-example-1-2-6,
.code-example-1-2-7,
.code-example-1-2-8,
.code4-example-1-2-6 {
  font-size: clamp(0.8rem, 2.5vw, 0.9375rem);
  font-family: 'Poppins-Medium';
  max-width: 100%; /* Prevent overflow */
  box-sizing: border-box;
}

/* --- Media Query for Larger Screens --- */
@media (min-width: 768px) {
  .algorithm-container-1-2-2,
  .algorithm-container-1-2-6,
  .algorithm-container-1-2-8 {
    flex-direction: row; /* Return to side-by-side layout */
    justify-content: space-evenly;
    align-items: flex-start; /* Align to the top */
  }
}

/* --- FAQ --- */
.faq-hero {
  text-align: center;
  padding: 4rem 5vw;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  position: relative;
  overflow: hidden;
}

.faq-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 165, 0, 0.05) 0%, transparent 70%);
  animation: float 20s ease-in-out infinite;
}

.faq-hero h1 {
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-family: 'Poppins-Bold';
  color: #002671;
  margin: 0 0 1rem 0;
  position: relative;
  z-index: 1;
}

.faq-subtitle {
  font-size: clamp(1.1rem, 4vw, 1.25rem);
  color: #002671;
  font-family: 'Poppins-Medium';
  opacity: 0.9;
  position: relative;
  z-index: 1;
  margin: 0;
}

.faq-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 5vw;
}

@media (max-width: 768px) {
  .faq-container {
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

.faq-category {
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .faq-category {
    width: 100%;
  }
}

.faq-category h2 {
  font-family: 'Poppins-Bold';
  font-size: clamp(1.5rem, 5vw, 2rem);
  color: #002671;
  margin-bottom: 1.5rem;
  text-align: center;
}

.faq-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 38, 113, 0.1);
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .faq-items {
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
  }
  
  .faq-item {
    width: 100%;
  }
  
  .faq-question {
    padding: 1rem;
    gap: 0.5rem;
  }
  
  .faq-answer {
    padding: 0 1rem;
  }
  
  .faq-answer.open {
    padding: 0 1rem 1rem;
  }
}

.faq-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 38, 113, 0.15);
}

.faq-question {
  width: 100%;
  padding: 1.5rem;
  background: none;
  border: none;
  text-align: left;
  font-family: 'Poppins-SemiBold';
  font-size: clamp(1rem, 3vw, 1.125rem);
  color: #002671;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.3s ease;
}

.faq-question:hover {
  color: #ffa500;
}

.faq-toggle {
  transition: transform 0.3s ease;
}

.faq-item.open .faq-toggle {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.5rem;
  font-family: 'Poppins-Regular';
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  color: #666;
  line-height: 1.6;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-answer.open {
  padding: 0 1.5rem 1.5rem;
  max-height: 200px;
}

/* --- Schools Page --- */
.schools-hero {
  text-align: center;
  padding: 4rem 5vw;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  position: relative;
  overflow: hidden;
}

.schools-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 165, 0, 0.05) 0%, transparent 70%);
  animation: float 20s ease-in-out infinite;
}

.schools-hero h1 {
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-family: 'Poppins-Bold';
  color: #002671;
  margin: 0 0 1rem 0;
  position: relative;
  z-index: 1;
}

.schools-subtitle {
  font-size: clamp(1.1rem, 4vw, 1.25rem);
  color: #002671;
  font-family: 'Poppins-Medium';
  opacity: 0.9;
  position: relative;
  z-index: 1;
  margin: 0;
}

.schools-benefits {
  padding: 4rem 5vw;
  background: #ffffff;
}

.schools-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.schools-container h2 {
  font-family: 'Poppins-Bold';
  font-size: clamp(2rem, 6vw, 2.5rem);
  color: #002671;
  margin-bottom: 3rem;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.benefit-item {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 15px;
  transition: transform 0.3s ease;
}

.benefit-item:hover {
  transform: translateY(-5px);
}

.benefit-item h3 {
  font-family: 'Poppins-Bold';
  color: #002671;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.benefit-item p {
  font-family: 'Poppins-Regular';
  color: #666;
  line-height: 1.6;
  margin: 0;
}

.schools-contact-section {
  padding: 4rem 5vw;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.schools-contact-container {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.schools-contact-container h2 {
  font-family: 'Poppins-Bold';
  font-size: clamp(2rem, 6vw, 2.5rem);
  color: #002671;
  margin-bottom: 1rem;
}

.schools-contact-container p {
  font-family: 'Poppins-Regular';
  color: #666;
  margin-bottom: 3rem;
  font-size: 1.1rem;
}

.schools-contact-form {
  background: #ffffff;
  padding: 3rem 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 38, 113, 0.1);
  text-align: left;
  max-width: 900px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.schools-contact-form .form-group {
  margin-bottom: 1.5rem;
}

.schools-contact-form label {
  display: block;
  font-family: 'Poppins-SemiBold';
  color: #002671;
  margin-bottom: 0.5rem;
}

.schools-contact-form input,
.schools-contact-form select,
.schools-contact-form textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  font-family: 'Poppins-Regular';
  font-size: 1rem;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.schools-contact-form select {
  appearance: none;
  background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
  cursor: pointer;
}

.schools-contact-form select option {
  background: #ffffff;
  color: #333;
  padding: 0.5rem;
}

.schools-contact-form textarea {
  resize: vertical;
}

.schools-contact-form input:focus,
.schools-contact-form select:focus,
.schools-contact-form textarea:focus {
  outline: none;
  border-color: #ffa500;
}

.schools-submit-btn {
  background: linear-gradient(135deg, #002671 0%, #003d8a 100%);
  color: #ffffff;
  border: none;
  padding: 1.2rem 2rem;
  border-radius: 12px;
  font-family: 'Poppins-Bold';
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.schools-submit-btn:hover {
  background: linear-gradient(135deg, #ffa500 0%, #ffb84d 100%);
  transform: translateY(-2px);
}
.contact-section {
  padding: 3rem 5vw;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.contact-container {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.contact-container h2 {
  font-family: 'Poppins-Bold';
  font-size: clamp(1.5rem, 5vw, 2rem);
  color: #002671;
  margin-bottom: 1rem;
}

.contact-container p {
  font-family: 'Poppins-Regular';
  color: #666;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.contact-form {
  background: #ffffff;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 38, 113, 0.1);
  text-align: left;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-form .form-group {
  margin-bottom: 1.5rem;
}

.contact-form label {
  display: block;
  font-family: 'Poppins-SemiBold';
  color: #002671;
  margin-bottom: 0.5rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  font-family: 'Poppins-Regular';
  font-size: 1rem;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #ffa500;
}

.contact-submit-btn {
  background: linear-gradient(135deg, #002671 0%, #003d8a 100%);
  color: #ffffff;
  border: none;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-family: 'Poppins-Bold';
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.contact-submit-btn:hover {
  background: linear-gradient(135deg, #ffa500 0%, #ffb84d 100%);
  transform: translateY(-2px);
}

/* --- Quiz --- */
.quiz1-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 5vw 4rem;
}

.quiz1-container {
  background: #ffffff;
  border-radius: 20px;
  padding: 3rem 2rem;
  box-shadow: 0 10px 40px rgba(0, 38, 113, 0.1);
  line-height: 1.7;
}

.quiz1-title {
  font-family: 'Poppins-Bold';
  font-size: clamp(1.5rem, 4vw, 1.75rem);
  color: #002671;
  margin: 0 0 2rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #ffa500;
}

.quiz1-question {
  font-family: 'Poppins-SemiBold';
  color: #002671;
  font-size: clamp(1.25rem, 3vw, 1.375rem);
  margin: 1.5rem 0 0.75rem 0;
}

.quiz1-question-text {
  font-family: 'Poppins-Regular';
  color: #333;
  margin-bottom: 1rem;
}

.quiz1-option {
  font-family: 'Poppins-Regular';
  color: #333;
  margin-bottom: 0.5rem;
  line-height: 1.6;
  display: block;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  position: relative;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.quiz1-option::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #ffa500;
  transition: width 0.3s ease;
}

.quiz1-option:hover {
  color: #ffa500;
  background-color: transparent;
}

.quiz1-option:hover::after {
  width: 100%;
}

.quiz1-option input[type="radio"]:checked + * {
  color: #ffa500;
}

.quiz1-option input[type="radio"]:checked {
  accent-color: #ffa500;
}

.quiz1-option:has(input[type="radio"]:checked) {
  color: #ffa500;
}

.quiz1-option:has(input[type="radio"]:checked)::after {
  width: 100%;
}

.quiz1-options .quiz1-option,
.quiz1-options-inline .quiz1-option {
  font-family: 'Poppins-Regular';
  color: #333;
  margin-bottom: 0.5rem;
  line-height: 1.6;
  display: block;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  position: relative;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.quiz1-option:active {
  transform: scale(0.98);
}

.quiz1-option input[type="radio"] {
  margin: 0;
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0; /* Prevent the radio button from shrinking */
}

.quiz1-option.option-correct {
  background-color: #16a34a;
  color: #ffffff;
  box-shadow: 0 0.125rem 0.5rem rgba(22,163,74,0.14);
}

.quiz1-option.option-wrong {
  background-color: #dc2626;
  color: #ffffff;
  box-shadow: 0 0.125rem 0.5rem rgba(220,38,38,0.12);
}

.quiz1-option.option-correct input,
.quiz1-option.option-wrong input {
  accent-color: #ffffff;
}

.quiz1-btn {
  background-color: #ffa500;
  color: #ffffff;
  font-family: 'Poppins-Bold';
  font-size: clamp(1rem, 3vw, 1.125rem);
  padding: 0.75rem 1.875rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color, transform 0.25s linear;
}

.quiz1-btn:active {
  transform: scale(0.98);
}

#quiz-check-btn1,
#quiz-retry-btn1 {
  background-color: #FFA500;
  color: #002671;
  border: none;
  padding: 0.625rem 1.125rem;
  border-radius: 0.5rem;
  font-family: 'Poppins-Bold';
  cursor: pointer;
  transition: transform 0.12s linear, background-color 0.12s linear;
}

#quiz-check-btn1:hover,
#quiz-retry-btn1:hover {
  background-color: #ffb84d;
  transform: scale(1.03);
}

#quiz-check-btn1:active,
#quiz-retry-btn1:active {
  transform: scale(0.99);
}

#quiz-retry-btn1 {
  display: none;
  margin-left: 0.625rem;
}

#quiz-results1 {
  color: #FFA500;
  font-weight: 700;
  font-size: clamp(1rem, 3vw, 1.1rem);
  margin-top: 1rem; /* Increased margin */
  text-align: center;
}

.quiz1-message {
  font-family: 'Poppins-Bold';
  color: #FFA500;
  font-size: clamp(1.2rem, 5vw, 1.375rem);
  margin-top: 1.25rem;
  text-align: center;
}

/* --- Modals & Notifications --- */
.xp-notification {
  position: fixed;
  bottom: 1.875rem;
  left: 50%;
  transform: translateX(-50%);
  background-color: #002671;
  color: #FFA500;
  padding: 0.9375rem clamp(1.2rem, 5vw, 1.875rem); /* Responsive padding */
  border-radius: 3.125rem;
  font-family: 'Poppins-Bold', sans-serif;
  font-size: clamp(1rem, 4vw, 1.2rem); /* Responsive font size */
  box-shadow: 0 0.25rem 0.9375rem rgba(0, 0, 0, 0.2);
  z-index: 2000;
  opacity: 1;
  transition: opacity 0.5s ease-out 2.5s;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 38, 113, 0.6);
  z-index: 1999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 1rem; /* Add padding to prevent modal from touching edges */
  box-sizing: border-box;
}

.modal-content {
  background-color: #ffffff;
  padding: 1.875rem 6vw; /* Responsive padding */
  border-radius: 0.75rem;
  box-shadow: 0 0.3125rem 1.5625rem rgba(0, 0, 0, 0.2);
  width: 100%; /* Full width within overlay padding */
  max-width: 28.125rem;
  text-align: center;
  font-family: 'Poppins-Regular', sans-serif;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-content h3 {
  font-family: 'Poppins-Bold', sans-serif;
  color: #002671;
  margin-top: 0;
  margin-bottom: 0.9375rem;
  font-size: clamp(1.25rem, 5vw, 1.5rem); /* Responsive font size */
}

.modal-content p {
  color: #333;
  font-size: clamp(0.9rem, 2.5vw, 1rem); /* Responsive font size */
  line-height: 1.6;
  margin-bottom: 1.5625rem;
}

.modal-input {
  width: 100%;
  padding: 0.75rem;
  border: 0.0625rem solid #ccc;
  border-radius: 0.375rem;
  font-size: 1rem; /* Keep at 1rem to prevent iOS auto-zoom */
  margin-bottom: 1.5625rem;
  box-sizing: border-box;
}

.modal-input:focus {
  outline: none;
  border-color: #FFA500;
}

.modal-buttons {
  display: flex;
  flex-wrap: wrap; /* Allow buttons to wrap on small screens */
  justify-content: center;
  gap: 0.9375rem;
}

.modal-button {
  font-family: 'Poppins-SemiBold', sans-serif;
  font-size: clamp(0.85rem, 2.5vw, 0.9rem); /* Responsive font size */
  padding: 0.625rem 1.25rem;
  border-radius: 0.375rem;
  border: 0.0625rem solid #002671;
  background-color: #ffffff;
  color: #002671;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  flex-grow: 1; /* Allow buttons to grow and fill space */
  flex-basis: 6.25rem; /* Set a base width before growing */
}
.modal-button:hover {
  background-color: #f0f0f0;
}

.modal-button.primary {
  background-color: #002671;
  color: #ffffff;
}
.modal-button.primary:hover {
  background-color: #001f5c;
}

.custom-notification {
  position: fixed;
  bottom: 1.875rem;
  left: 50%;
  transform: translateX(-50%);
  background-color: #002671;
  color: #ffffff;
  padding: 0.9375rem clamp(1.2rem, 5vw, 1.875rem); /* Responsive padding */
  border-radius: 3.125rem;
  font-family: 'Poppins-Bold', sans-serif;
  font-size: clamp(0.9rem, 2.5vw, 1rem); /* Responsive font size */
  box-shadow: 0 0.25rem 0.9375rem rgba(0, 0, 0, 0.2);
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.5s ease, bottom 0.5s ease;
  width: 90vw; /* Ensure it doesn't overflow on small screens */
  max-width: fit-content; /* Allow it to shrink to content width */
  text-align: center;
  box-sizing: border-box;
}

.custom-notification.error {
    background-color: #dc2626;
}

.custom-notification.success {
    background-color: #16a34a;
    color: #ffffff;
}

.custom-notification.show {
    opacity: 1;
    bottom: 1.875rem;
}

/* ==========================================================================
   Icons
   ========================================================================== */

.theme-toggle {
  margin-top: 0.625rem;
  width: clamp(1.8rem, 6vw, 2.1875rem); /* Responsive width */
  height: clamp(1.8rem, 6vw, 2.1875rem); /* Responsive height */
  background-image: url('../materials/icons/DarkModeIcon.png');
  background-size: contain;
  background-repeat: no-repeat;
  cursor: pointer;
  transition: transform, background-image 0.25s linear;
}

.theme-toggle:hover {
  transform: scale(1.05);
  background-image: url('../materials/icons/DarkModeIconOrange.png') !important;
}

.settings-icon {
  background-color: transparent;
  border: none;
  padding: 0;
  width: clamp(2rem, 7vw, 2.5rem); /* Responsive width */
  height: clamp(2rem, 7vw, 2.5rem); /* Responsive height */
  background-image: url('../materials/icons/SettingsIcon.png');
  background-size: contain;
  background-repeat: no-repeat;
  cursor: pointer;
  transition: transform 0.25s linear;
}

.settings-icon:hover {
  transform: scale(1.05) rotate(45deg);
}

.check-icon {
  margin: 0;
  padding: 0;
  vertical-align: middle;
}

.google-icon {
  width: clamp(1rem, 4vw, 1.25rem); /* Responsive width */
  height: clamp(1rem, 4vw, 1.25rem); /* Responsive height */
}

.faq-toggle img {
  margin-left: 0.625rem;
  display: block;
}

.streak-logo {
  width: clamp(1.5rem, 4vw, 1.8rem);
  height: clamp(1.5rem, 4vw, 1.8rem);
  background-image: url('../materials/icons/StreakIconOrange.png');
  background-size: contain;
  background-repeat: no-repeat;
}

.xp-logo {
  width: clamp(1.5rem, 4vw, 1.8rem);
  height: clamp(1.5rem, 4vw, 1.8rem);
  background-image: url('../materials/icons/XPIconBlue.png');
  background-size: contain;
  background-repeat: no-repeat;
}

.daily-goal-streak-logo {
  padding-bottom: 0.3125rem;
  width: clamp(2rem, 7vw, 2.5rem); /* Responsive width */
  height: clamp(2rem, 7vw, 2.5rem); /* Responsive height */
}

.clock-icon {
  width: clamp(1.25rem, 5vw, 1.5625rem); /* Responsive width */
  height: clamp(1.25rem, 5vw, 1.5625rem); /* Responsive height */
  background-image: url('../materials/icons/OrangeClockIcon.png');
  background-size: contain;
  background-repeat: no-repeat;
}

.lesson-x-button {
  position: fixed;
  top: 4vw; /* Responsive position */
  right: 4vw; /* Responsive position */
  width: clamp(2.5rem, 8vw, 3.125rem); /* Responsive width */
  height: clamp(2.5rem, 8vw, 3.125rem); /* Responsive height */
  background-image: url('../materials/icons/XIcon.png');
  background-size: contain;
  background-position: center;
  display: inline-block;
  padding-top: 0.3125rem;
  transition: background-image, transform 0.25s linear;
}

.lesson-x-button:hover {
  transform: scale(1.05);
  background-image: url('../materials/icons/XIconOrange.png');
}

/* --- Module & Content Icons --- */
.module-icon {
  display: flex;
  align-items: center;
  justify-content: center; /* Center the icon within its container */
}

.software-dev-icon,
#sd-esp-icon,
#sd-osp-icon,
.sd-core-paper1-dev-icon,
.sd-core-paper2-dev-icon,
.sd-esp-dev-icon {
  width: 30vw; /* Responsive width */
  max-width: 9.375rem; /* Cap the size on larger screens */
  height: auto; /* Let aspect-ratio handle the height */
  aspect-ratio: 9.375 / 7.8125; /* Maintain original proportions */
  background-size: contain;
  background-repeat: no-repeat;
  padding-bottom: 0.625rem;
}

#sd-paper1-icon,
#sd-paper2-icon {
  width: 25vw; /* Responsive width */
  max-width: 7.8125rem; /* Cap the size */
  height: auto;
  aspect-ratio: 1 / 1; /* Maintain square proportion */
  background-size: contain;
  background-repeat: no-repeat;
}

/* --- Set specific background images --- */
.software-dev-icon { background-image: url('../materials/icons/SoftwareDevelopmentIconLightMode.png'); }
#sd-paper1-icon { background-image: url('../materials/icons/SDCore1Icon.png'); }
#sd-paper2-icon { background-image: url('../materials/icons/SDCore2Icon.png'); }
#sd-esp-icon { background-image: url('../materials/icons/ESPIcon.png'); }
#sd-osp-icon { background-image: url('../materials/icons/OSPIcon.png'); }
.sd-core-paper1-dev-icon { background-image: url('../materials/icons/SDCore1IconOrange.png'); }
.sd-core-paper2-dev-icon { background-image: url('../materials/icons/SDCore2IconOrange.png'); }
.sd-esp-dev-icon { background-image: url('../materials/icons/ESPIconBlue.png'); }

.flowchart-example-1-2-2 {
  width: 70vw; /* Responsive width */
  max-width: 18.75rem; /* Cap the size */
  height: auto;
  aspect-ratio: 18.75 / 25; /* Maintain original proportions */
  background-image: url('../diagrams/flowchart-1.2.2.png');
  background-size: contain;
  background-repeat: no-repeat;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
  background-color: #002671;
  color: #ffffff;
  padding: 2rem 0;
  margin-top: 3rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  padding: 0 2rem;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  .footer-logo {
    margin: 0.5rem auto 0.2rem auto !important;
  }
  .footer-contact, .footer-location {
    justify-content: center;
  }
}

.footer-column h4 {
  margin-bottom: 1rem;
  color: #ffa500;
  font-family: 'Poppins-Bold';
  font-size: 1.1rem;
}

.footer-column a {
  display: block;
  color: #ffffff;
  text-decoration: none;
  margin-bottom: 0.5rem;
  font-family: 'Poppins-Regular';
  transition: color 0.3s ease;
}

.footer-column a:hover {
  color: #ffa500;
}

.footer-logo {
  width: 180px;
  height: 60px;
  background-image: url('../materials/logos/T-LearnLogoOrangeThin.png');
  background-size: contain;
  background-repeat: no-repeat;
  margin-bottom: 0.2rem;
  margin-left: -1rem;
  margin-top: 0.5rem;
}

.footer-mission, .footer-contact, .footer-location {
  margin-bottom: 0.5rem;
  line-height: 1.5;
  color: #ffffff;
  font-family: 'Poppins-Regular';
}

.footer-contact {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-contact::before {
  content: '';
  width: 16px;
  height: 16px;
  background-image: url('../materials/icons/EmailIconWhite.png');
  background-size: contain;
  background-repeat: no-repeat;
}

.footer-location {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-location::before {
  content: '';
  width: 16px;
  height: 16px;
  background-image: url('../materials/icons/MapIconWhite.png');
  background-size: contain;
  background-repeat: no-repeat;
}

.footer-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin: 2rem auto 1rem;
  grid-column: 1 / -1;
  width: 80%;
}

.footer-social {
  grid-column: 1 / -1;
  text-align: center;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.social-icons a {
  display: inline-block;
  transition: transform 0.3s ease;
}

.social-icons a:hover {
  transform: scale(1.2);
}

.social-icon {
  width: 24px;
  height: 24px;
  display: block;
}

.social-icons a:nth-child(1):hover .social-icon {
  content: url('../materials/icons/InstagramIconOrange.png');
}

.social-icons a:nth-child(2):hover .social-icon {
  content: url('../materials/icons/LinkedInIconOrange.png');
}

.social-icons a:nth-child(3):hover .social-icon {
  content: url('../materials/icons/TikTokIconOrange.png');
}

.footer-copyright {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #ffffff;
  font-family: 'Poppins-Regular';
}

.footer-text {
  font-family: 'Poppins-Medium';
  color: #002671;
  font-size: clamp(0.9rem, 2.5vw, 1rem); /* Responsive font size */
  text-align: center;
  margin: 0;
  padding: 1.25rem 5vw; /* Responsive horizontal padding */
  line-height: 1.5;
}

/* ==========================================================================
   Miscellaneous
   ========================================================================== */

.normal-divider {
  border: none;
  border-top: 0.0625rem solid #eeeeee;
  margin: 1.5625rem 0 0.625rem 0;
  width: 100%; /* Let the divider fill its parent container */
}

/* ESP Lesson Styles */
.content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 5vw;
}

.learning-objectives,
.topic-section,
.best-practices,
.common-mistakes,
.quiz-section {
  background: #ffffff;
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 40px rgba(0, 38, 113, 0.1);
}

.learning-objectives h2,
.topic-section h2,
.best-practices h2,
.common-mistakes h2,
.quiz-section h2 {
  font-family: 'Poppins-Bold';
  color: #002671;
  font-size: 1.5rem;
  margin: 0 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #ffa500;
}

.topic-section h3 {
  font-family: 'Poppins-SemiBold';
  color: #002671;
  font-size: 1.25rem;
  margin: 1.5rem 0 1rem 0;
}

.topic-section p,
.learning-objectives p,
.best-practices p,
.common-mistakes p {
  font-family: 'Poppins-Regular';
  color: #333;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.learning-objectives ul,
.best-practices ul,
.common-mistakes ul {
  font-family: 'Poppins-Regular';
  color: #333;
  line-height: 1.8;
  padding-left: 2rem;
}

.learning-objectives li,
.best-practices li,
.common-mistakes li {
  margin-bottom: 0.5rem;
}

.code-block {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
  overflow-x: auto;
  border-left: 4px solid #ffa500;
}

.code-block pre {
  margin: 0;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #002671;
}

.code-block code {
  font-family: 'Courier New', monospace;
}

.quiz-container {
  margin-top: 1.5rem;
}

.question {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.question p {
  font-family: 'Poppins-SemiBold';
  color: #002671;
  margin-bottom: 1rem;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.options label {
  font-family: 'Poppins-Regular';
  color: #333;
  cursor: pointer;
  padding: 0.75rem;
  border-radius: 8px;
  transition: background 0.3s ease;
}

.options label:hover {
  background: #e9ecef;
}

.submit-btn {
  background: linear-gradient(135deg, #002671 0%, #003d8a 100%);
  color: #ffffff;
  border: none;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-family: 'Poppins-Bold';
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 38, 113, 0.3);
}

#quiz-results {
  margin-top: 1.5rem;
}

.quiz-result {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}

.quiz-result h3 {
  font-family: 'Poppins-Bold';
  color: #002671;
  margin: 0 0 1rem 0;
}

.quiz-result p {
  font-family: 'Poppins-Regular';
  color: #333;
  margin: 0.5rem 0;
}

.quiz-result .success {
  color: #16a34a;
  font-family: 'Poppins-SemiBold';
}

.quiz-result .warning {
  color: #dc2626;
  font-family: 'Poppins-SemiBold';
}

.xp-alert {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: linear-gradient(135deg, #ffa500 0%, #ffb84d 100%);
  color: #002671;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-family: 'Poppins-Bold';
  font-size: 1.1rem;
  box-shadow: 0 8px 25px rgba(255, 165, 0, 0.4);
  z-index: 9999;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ==========================================================================
   Mobile
   ========================================================================== */

  @media (max-width: 435px) {

  .nav-left, .nav-right {
    gap: 0.6rem;
  }

  .signin-btn .signup-btn {
    font-size: 0.65rem;
  }

  .theme-toggle {
    width: 1.5rem;
    height: 1.5rem;
  }
  
  .logo {
    width: 6.1rem;
    margin-bottom: -0.25rem;
  }

  /* FAQ */

  .faq-section h2 {
    padding-right: 0.625rem;
    font-size: 1.5rem;
  }

  .faq-help {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .faq-help h1 {
    font-size: 1.1rem;
    padding-top: 0.8rem;
    margin-bottom: -0.9375rem;
  }

  .faq-help p {
    font-size: 0.8rem;
    padding-bottom: 1rem;
    line-height: 1.25rem;
  }

  .faq-item {
    max-width: 90%;
  }

  .faq-question, .first-question, .last-question {
    font-size: 1rem;
    padding-left: 0.625rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
  }

  .faq-answer {
    font-size: 0.875rem;
    padding: 0 0.625rem;
  }

  .faq-answer.open {
    max-height: 6.25rem;
    line-height: 1.125rem;
    padding-top: 0.3125rem;
    padding-bottom: 0.625rem;
  }

}

.adsterra-banner {
  max-width: 728px;
  margin: 2rem auto;
  text-align: center;
  padding: 1rem;
  border-radius: 8px;
  color: #002671;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.adsterra-banner a {
  color: #ffa500;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.adsterra-banner a:hover {
  color: #FFA500;
}