/* ============================================
   HEADER STYLES
   ============================================ */
#main-header {
  background: linear-gradient(135deg, var(--header-bg) 0%, #334155 100%);
  width: 100%;
  position: fixed;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
  transition: transform 1s ease;
}
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  max-width: 1400px;
  margin: 0 auto;
}
.logo-section {
  display: flex;
  align-items: center;
  gap: 15px;
}
.logo {
  border-radius: 5px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}
.logo:hover {
  transform: scale(1.05);
}
.brand-info h1,
.brand-info .brand-title {
  font-family: "Playfair Display", serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--background-white);
  letter-spacing: 1px;
  margin-bottom: 2px;
}
.brand-info p {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 400;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.menu-toggle {
  display: none;
  background: var(--primary-color);
  border: none;
  color: white;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 20px;
  transition: var(--transition);
}
.menu-toggle:hover {
  background: var(--primary-dark);
}
/* Navigation Styles */
#main-nav {
  background-color: var(--nav-bg);
  box-shadow: var(--shadow-md);
}
.nav-list {
  display: flex;
  justify-content: center;
  list-style: none;
  max-width: 1400px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 30px;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 15px;
  position: relative;
  transition: var(--transition);
  border-right: 1px solid rgba(0, 0, 0, 0.1);
}
.nav-link:last-child {
  border-right: none;
}
.nav-link:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-dark);
}
.nav-link.active {
  background: rgba(255, 255, 255, 0.3);
  font-weight: 700;
}
.nav-link i {
  font-size: 16px;
}




/* ============================================
   FOOTER STYLES
   ============================================ */



#main-footer {
  background: var(--footer-bg);
  color: white;
  margin-top: auto;
}
.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  padding: 50px 40px;
  max-width: 1400px;
  margin: 0 auto;
}
.footer-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-section h3 i {
  color: var(--secondary-color);
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 15px;
}
.footer-logo img {
  border-radius: 10px;
}
.footer-logo h3 {
  font-family: "Playfair Display", serif;
  font-size: 22px;
  margin-bottom: 5px;
}
.footer-logo p {
  font-size: 13px;
  color: var(--text-light);
}
.footer-links ul {
  list-style: none;
}
.footer-links li {
  margin-bottom: 10px;
}
.footer-links a {
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
  font-size: 14px;
}
.footer-links a:hover {
  color: var(--secondary-color);
  padding-left: 5px;
}
.footer-contact ul {
  list-style: none;
}
.footer-contact li {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-contact li i {
  color: var(--secondary-color);
  width: 20px;
}
.social-icons {
  display: flex;
  gap: 10px;
}
.social-link {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: var(--transition);
}
.social-link:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
}
.footer-bottom {
  background: rgba(0, 0, 0, 0.2);
  padding: 20px 40px;
  text-align: center;
}
.footer-legal {
  margin-bottom: 15px;
}
.footer-legal a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 13px;
  transition: var(--transition);
}
.footer-legal a:hover {
  color: var(--secondary-color);
}
.footer-legal .divider {
  margin: 0 15px;
  color: var(--text-light);
}
.footer-payment {
  margin-bottom: 15px;
  font-size: 13px;
  color: var(--text-light);
}
.payment-icons {
  display: inline-flex;
  gap: 10px;
  margin-left: 10px;
}
.payment-icons i {
  font-size: 24px;
  color: var(--text-light);
}
.copyright {
  font-size: 13px;
  color: var(--text-light);
}
/* ============================================
   RESPONSIVE STYLES
   ============================================ */
@media (max-width: 1024px) {
  .header-top {
    padding: 15px 20px;
  }

  .nav-link {
    padding: 12px 20px;
    font-size: 14px;
  }

  .nav-link span {
    display: none;
  }

  .nav-link i {
    font-size: 20px;
  }
}
@media (max-width: 768px) {
  .header-top {
    padding: 10px 15px;
  }

  .brand-info h1,
  .brand-info .brand-title {
    font-size: 20px;
  }

  .brand-info p {
    font-size: 11px;
  }

  .menu-toggle {
    display: block;
  }

  #main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--nav-bg);
  }

  #main-nav.active {
    display: block;
  }

  .nav-list {
    flex-direction: column;
  }

  .nav-link {
    padding: 15px 20px;
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    justify-content: flex-start;
  }

  .nav-link span {
    display: inline;
  }

  .hero-section {
    padding: 40px 20px;
  }

  .hero-content h2 {
    font-size: 28px;
  }

  .hero-content p {
    font-size: 15px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .founder-card {
    flex-direction: column;
    text-align: center;
  }

  .footer-content {
    grid-template-columns: 1fr;
    padding: 30px 20px;
  }
}

/* ============================================
   PAGE LOADER STYLES
   ============================================ */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--background-white, #ffffff);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(37, 99, 235, 0.2);
  border-top-color: var(--primary-color, #2563eb);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loader-text {
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  color: var(--text-medium, #334155);
  font-size: 16px;
  letter-spacing: 0.5px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

html {
  background-color: #f8fafc;
  transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] html {
  background-color: #0f1117;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color, #2563eb);
  color: white;
  padding: 8px 16px;
  z-index: 10000;
  text-decoration: none;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

button, a, .btn, .nav-link, .subject-link, .chapter-card, .video-card, .recent-card, .notice-item,
.feature-item, .book-cover-card, .dark-mode-btn, .menu-toggle {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

@media (max-width: 768px) {
  body {
    padding-top: 85px;
  }
}

/* ============================================
   THEME TRANSITIONS
   ============================================ */

/* ============================================
   DARK MODE TOGGLE BUTTON
   ============================================ */
.dark-mode-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e8eaf0;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}
.dark-mode-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
}

/* ============================================
   DARK MODE — HEADER / FOOTER / LOADER
   ============================================ */
[data-theme="dark"] {
  --primary-color: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --secondary-color: #f59e0b;
  --secondary-dark: #d97706;
  --accent-color: #10b981;
  --background-light: #0f1117;
  --background-white: #1a1d27;
  --surface-raised: #21253a;
  --surface-hover: #272b40;
  --text-dark: #e8eaf0;
  --text-medium: #9da5b4;
  --text-light: #636b7a;
  --border-color: #2a2f45;
  --header-bg: #0d1117;
  --nav-bg: #1a1d27;
  --footer-bg: #0a0d14;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] body {
  background: #0f1117;
  color: #e8eaf0;
}

[data-theme="dark"] #main-nav {
  background-color: #1a1d27;
  border-bottom: 1px solid #2a2f45;
}

[data-theme="dark"] .nav-link {
  color: #c9cdd6;
  border-right-color: rgba(255, 255, 255, 0.08);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

[data-theme="dark"] .dark-mode-btn {
  border-color: rgba(255, 255, 255, 0.15);
  color: #f59e0b;
}

[data-theme="dark"] .page-loader {
  background-color: #0f1117;
}

[data-theme="dark"] .loader-text {
  color: #9da5b4;
}

[data-theme="dark"] .spinner {
  border-color: rgba(59, 130, 246, 0.2);
  border-top-color: #3b82f6;
}

[data-theme="dark"] ::-webkit-scrollbar {
  width: 8px;
}
[data-theme="dark"] ::-webkit-scrollbar-track {
  background: #0f1117;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #2a2f45;
  border-radius: 4px;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: #3b82f6;
}