/* ============================================
   ENIHS ACADEMY - Home Page Styles
   Modern Educational Dashboard Theme
   ============================================ */
/* CSS Variables for Easy Customization */
:root {
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --secondary-color: #f59e0b;
  --secondary-dark: #d97706;
  --accent-color: #10b981;
  --background-light: #f8fafc;
  --background-white: #ffffff;
  --text-dark: #1e293b;
  --text-medium: #475569;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --header-bg: #1e293b;
  --nav-bg: #f59e0b;
  --footer-bg: #0f172a;
  --section-bg: #ffffff;
  --card-bg: #ffffff;
  --transition: all 0.3s ease;
  --border-radius: 12px;
  --border-radius-lg: 16px;
}

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

button, a, .btn, .nav-link, .subject-link, .chapter-card, .video-card, .recent-card, .notice-item,
.content-section, .recent-card, .hero-btn, .shop-card {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family:
    "DM Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  background-color: var(--background-light);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top:130px;
}
/* ============================================
   HEADER STYLES
   ============================================ */

/* ============================================
   MAIN CONTENT STYLES
   ============================================ */
#main-content {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 30px 20px;
}
/* Hero Section */
.hero-section {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  border-radius: var(--border-radius-lg);
  padding: 60px 40px;
  margin-bottom: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}
.hero-section::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}
.hero-content {
  position: relative;
  z-index: 1;
}
.hero-content h1,
.hero-content h2 {
  font-family: "Playfair Display", serif;
  font-size: 42px;
  font-weight: 700;
  color: white;
  margin-bottom: 15px;
}
.hero-content p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 30px;
}
.hero-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  padding: 12px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: var(--transition);
  display: inline-block;
}
.btn-primary {
  background: var(--secondary-color);
  color: var(--text-dark);
  border: 2px solid var(--secondary-color);
}
.btn-primary:hover {
  background: var(--secondary-dark);
  border-color: var(--secondary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid white;
}
.btn-secondary:hover {
  background: white;
  color: var(--primary-color);
  transform: translateY(-2px);
}
/* Content Section Styles */
.content-section {
  background: var(--section-bg);
  border-radius: var(--border-radius-lg);
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}
.content-section:hover {
  border-color: var(--primary-color);
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
}
.section-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-header h2 i {
  color: var(--primary-color);
}
.section-badge {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-light)
  );
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
/* Leaderboard Grid */
.leaderboard-coming-soon {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, #667eea11, #764ba211);
  border-radius: var(--border-radius);
  border: 2px dashed #667eea44;
}
.coming-soon-icon {
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  animation: pulse 2s infinite;
}
.coming-soon-icon i {
  font-size: 40px;
  color: white;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(102,126,234,0.4); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(102,126,234,0); }
}
.leaderboard-coming-soon h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
}
.leaderboard-coming-soon p {
  color: var(--text-medium);
  font-size: 15px;
  max-width: 500px;
  margin: 0 auto 30px;
  line-height: 1.7;
}
.coming-soon-features {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 35px;
}
.coming-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 25px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  box-shadow: var(--shadow-sm);
}
.coming-feature i {
  color: #667eea;
  font-size: 16px;
}
.leaderboard-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 14px 30px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(102,126,234,0.4);
}
.leaderboard-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102,126,234,0.5);
  color: white;
}
/* Events Grid */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.event-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}
.event-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.event-image {
  height: 120px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--accent-color)
  );
  display: flex;
  align-items: center;
  justify-content: center;
}
.event-image i {
  font-size: 40px;
  color: white;
}
.event-details {
  padding: 15px;
}
.event-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}
.event-date {
  font-size: 13px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 5px;
}
.events-placeholder {
  opacity: 0.6;
  pointer-events: none;
  grid-column: 1 / -1;       /* stretches across full grid width */
  max-width: 320px;
  margin: 0 auto;
}

.events-placeholder .event-image {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--accent-color)
  );
  opacity: 0.7;
}

.events-placeholder .event-title {
  color: var(--text-dark);
}

/* Shop Grid */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.shop-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 20px;
  text-align: center;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}
.shop-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}
.shop-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--secondary-dark)
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
}
.shop-icon i {
  font-size: 24px;
  color: white;
}
.shop-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}
.shop-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-color);
}
.shop-btn {
  margin-top: 12px;
  padding: 8px 20px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}
.shop-btn:hover {
  background: var(--primary-dark);
}
.shop-placeholder {
  opacity: 0.6;
  pointer-events: none;
  grid-column: 1 / -1;
  max-width: 260px;
  margin: 0 auto;
}

.shop-coming-note {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 10px;
  line-height: 1.5;
}
/* Recent Content Grid */
.recent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.recent-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 20px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}
.recent-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.recent-tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--primary-color);
  color: white;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 10px;
}
.recent-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.4;
}
.recent-meta {
  font-size: 12px;
  color: var(--text-light);
  display: flex;
  justify-content: space-between;
}
/* Notice List */
.notice-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.notice-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 15px;
  background: var(--background-light);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--primary-color);
  transition: var(--transition);
}
.notice-item:hover {
  background: white;
  box-shadow: var(--shadow-md);
}
.notice-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.notice-icon i {
  color: white;
  font-size: 16px;
}
.notice-content {
  flex: 1;
}
.notice-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 5px;
}
.notice-date {
  font-size: 12px;
  color: var(--text-light);
}
/* About Founder Section */
.founder-card {
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 30px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
}
.founder-image {
  width: 120px;
  height: 120px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-light)
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.founder-image i {
  font-size: 60px;
  color: white;
}
.founder-info h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 5px;
}
.founder-title {
  font-size: 14px;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 10px;
}
.founder-address {
  font-size: 14px;
  color: var(--text-medium);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.founder-description {
  font-size: 14px;
  color: var(--text-medium);
  line-height: 1.6;
}
/* ============================================
   FOOTER STYLES
   ============================================ */

/* ============================================
   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 {
    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 h1,
  .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;
  }
}
@media (max-width: 480px) {
  .logo {
    width: 40px;
    height: 40px;
  }

  .brand-info h1 {
    font-size: 18px;
  }

  .btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  .content-section {
    padding: 15px;
  }

  .leaderboard-grid,
  .events-grid,
  .shop-grid,
  .recent-grid {
    grid-template-columns: 1fr;
  }
}
/* Animation Keyframes */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.content-section {
  animation: fadeIn 0.5s ease forwards;
}
.content-section:nth-child(2) {
  animation-delay: 0.1s;
}
.content-section:nth-child(3) {
  animation-delay: 0.2s;
}
.content-section:nth-child(4) {
  animation-delay: 0.3s;
}
.content-section:nth-child(5) {
  animation-delay: 0.4s;
}
.content-section:nth-child(6) {
  animation-delay: 0.5s;
}
.content-section:nth-child(7) {
  animation-delay: 0.6s;
}

/* ============================================
   DARK MODE
   ============================================ */
[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;
  --section-bg: #1a1d27;
  --card-bg: #1a1d27;
  --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 !important;
  color: #e8eaf0;
}

[data-theme="dark"] .hero-section {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
}

[data-theme="dark"] .recent-card,
[data-theme="dark"] .card,
[data-theme="dark"] .content-card,
[data-theme="dark"] .note-card,
[data-theme="dark"] .chapter-card,
[data-theme="dark"] .subject-card,
[data-theme="dark"] .founder-card,
[data-theme="dark"] .notice-item,
[data-theme="dark"] .event-card,
[data-theme="dark"] .shop-card,
[data-theme="dark"] .content-section {
  background: #1a1d27;
  border-color: #2a2f45;
  color: #e8eaf0;
}

[data-theme="dark"] .recent-title,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 {
  color: #e8eaf0;
}

[data-theme="dark"] .recent-meta,
[data-theme="dark"] .notice-date,
[data-theme="dark"] p {
  color: #9da5b4;
}

[data-theme="dark"] .notice-item:hover {
  background: #21253a;
}

[data-theme="dark"] .coming-feature {
  background: #1a1d27;
  border-color: #2a2f45;
  color: #e8eaf0;
}

[data-theme="dark"] .founder-card {
  background: linear-gradient(135deg, #1a1d27 0%, #21253a 100%);
}

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

[data-theme="dark"] .nav-link {
  color: #c9cdd6;
}

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

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: #21253a;
  color: #e8eaf0;
  border-color: #2a2f45;
}

[data-theme="dark"] input::placeholder {
  color: #636b7a;
}

[data-theme="dark"] .katex,
[data-theme="dark"] .math-block,
[data-theme="dark"] .content-body {
  color: #e8eaf0;
}

[data-theme="dark"] pre,
[data-theme="dark"] code {
  background: #0d1117;
  color: #c9d1d9;
  border-color: #2a2f45;
}

[data-theme="dark"] table {
  color: #e8eaf0;
}
[data-theme="dark"] th {
  background: #21253a;
  color: #e8eaf0;
  border-color: #2a2f45;
}
[data-theme="dark"] td {
  border-color: #2a2f45;
}
[data-theme="dark"] tr:nth-child(even) {
  background: #1e2230;
}

[data-theme="dark"] .sidebar,
[data-theme="dark"] #sidebar {
  background: #1a1d27;
  border-color: #2a2f45;
}

[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;
}
