/* REDESIGN: Modernized Design System for eVidhya */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Color Palette */
  --clr-mint: #C1F6ED;      /* Light Backgrounds */
  --clr-teal-dark: #02353C; /* Primary Text & Dark Backgrounds */
  --clr-forest: #449342;    /* Secondary / Active */
  --clr-emerald: #2EAF7D;   /* Primary Buttons / Important */
  --clr-turquoise: #3FD0C9; /* Hover States / Gradients / Badges */

  /* Neutral Scale */
  --clr-white: #ffffff;
  --clr-gray-100: #f8f9fa;
  --clr-gray-200: #e9ecef;
  --clr-gray-800: #343a40;
  --clr-text-main: var(--clr-teal-dark);
  --clr-text-muted: #6c757d;

  /* Typography */
  --font-primary: 'Inter', sans-serif;
  
  /* Layout & Spacing */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 50px;
  --shadow-sm: 0 2px 4px rgba(2, 53, 60, 0.05);
  --shadow-md: 0 4px 12px rgba(2, 53, 60, 0.1);
  --shadow-lg: 0 12px 24px rgba(2, 53, 60, 0.15);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

/* Base Overrides */
body {
  font-family: var(--font-primary) !important;
  color: var(--clr-text-main) !important;
  background-color: var(--clr-gray-100);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary) !important;
  color: var(--clr-teal-dark);
  font-weight: 700;
}

a {
  color: var(--clr-emerald);
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--clr-turquoise);
  text-decoration: none;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
#header {
  background: var(--clr-white);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  padding: 15px 0 !important;
}

#header.sticky {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 9999;
  padding: 10px 0 !important;
  box-shadow: var(--shadow-md);
}

.nav-menu a {
  font-family: var(--font-primary) !important;
  font-weight: 600 !important;
  color: var(--clr-teal-dark) !important;
  text-transform: uppercase;
  font-size: 14px !important;
  letter-spacing: 0.5px;
}

.nav-menu a:hover,
.nav-menu .active > a,
.nav-menu li:hover > a {
  color: var(--clr-emerald) !important;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle i {
  color: var(--clr-teal-dark);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 120px 0 80px;
  background: linear-gradient(135deg, var(--clr-mint) 0%, rgba(193, 246, 237, 0.2) 100%);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero-content h1 {
  font-size: 3rem !important;
  font-weight: 800;
  color: var(--clr-teal-dark);
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-content p.lead {
  font-size: 1.25rem;
  color: var(--clr-text-muted);
  max-width: 700px;
  margin: 0 auto 40px;
}

.hero-btns .btn-primary {
  background-color: var(--clr-emerald) !important;
  border-color: var(--clr-emerald) !important;
  color: var(--clr-white) !important;
  padding: 12px 30px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-md);
}

.hero-btns .btn-primary:hover {
  background-color: var(--clr-forest) !important;
  border-color: var(--clr-forest) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.hero-btns .btn-outline {
  background-color: transparent !important;
  border: 2px solid var(--clr-teal-dark) !important;
  color: var(--clr-teal-dark) !important;
  padding: 10px 28px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  transition: all var(--transition-normal);
  margin-left: 15px;
}

.hero-btns .btn-outline:hover {
  background-color: var(--clr-teal-dark) !important;
  color: var(--clr-white) !important;
}

/* ==========================================================================
   Feature Strip / Quick Links
   ========================================================================== */
.feature-strip {
  padding: 30px 0;
  background-color: var(--clr-white);
  box-shadow: var(--shadow-sm);
  margin-top: -30px;
  border-radius: var(--radius-lg);
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.feature-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background-color: var(--clr-gray-100);
  border-radius: var(--radius-pill);
  color: var(--clr-teal-dark);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none !important;
  transition: all var(--transition-fast);
}

.feature-pill i {
  margin-right: 8px;
  color: var(--clr-emerald);
}

.feature-pill:hover {
  background-color: var(--clr-mint);
  color: var(--clr-teal-dark);
  transform: translateY(-2px);
}

/* ==========================================================================
   Subject / Course Cards
   ========================================================================== */
.subject-card {
  background: var(--clr-white);
  border-radius: var(--radius-lg);
  border: none;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.subject-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.subject-card .card-img-top {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 3px solid var(--clr-turquoise);
}

.subject-card .card-body {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.subject-card .card-title {
  color: var(--clr-teal-dark);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 15px;
  line-height: 1.4;
}

.subject-card .card-features {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  flex-grow: 1;
}

.subject-card .card-features li {
  font-size: 0.9rem;
  color: var(--clr-text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
}

.subject-card .card-features li::before {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--clr-emerald);
  margin-right: 8px;
  font-size: 0.8rem;
  margin-top: 3px;
}

.subject-card .btn-start {
  width: 100%;
  background-color: var(--clr-mint);
  color: var(--clr-teal-dark);
  border: none;
  border-radius: var(--radius-md);
  padding: 10px;
  font-weight: 600;
  transition: all var(--transition-fast);
  text-align: center;
  text-decoration: none;
}

.subject-card .btn-start:hover {
  background-color: var(--clr-emerald);
  color: var(--clr-white);
}

/* ==========================================================================
   Rich Footer
   ========================================================================== */
.footer-modern {
  background-color: var(--clr-teal-dark);
  color: var(--clr-mint);
  padding: 60px 0 20px;
  font-family: var(--font-primary);
}

.footer-modern h4 {
  color: var(--clr-white);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-modern h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background-color: var(--clr-emerald);
}

.footer-modern p {
  color: rgba(193, 246, 237, 0.8);
  font-size: 0.95rem;
}

.footer-modern ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-modern ul li {
  margin-bottom: 10px;
}

.footer-modern ul li a {
  color: rgba(193, 246, 237, 0.8);
  text-decoration: none;
  transition: all var(--transition-fast);
  display: inline-block;
}

.footer-modern ul li a:hover {
  color: var(--clr-turquoise);
  transform: translateX(5px);
}

.footer-modern .social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--clr-white);
  margin-right: 10px;
  transition: all var(--transition-normal);
}

.footer-modern .social-links a:hover {
  background: var(--clr-turquoise);
  transform: translateY(-3px);
}

/* Newsletter Subscription Animation */
.newsletter-form {
  position: relative;
  display: flex;
  margin-top: 15px;
}

.newsletter-form input[type="email"] {
  width: 100%;
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius-pill) 0 0 var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  color: var(--clr-white);
  outline: none;
  transition: all var(--transition-normal);
}

.newsletter-form input[type="email"]:focus {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 2px var(--clr-turquoise);
}

.newsletter-form input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.newsletter-form .btn-subscribe {
  background: var(--clr-emerald);
  color: var(--clr-white);
  border: none;
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
  padding: 0 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.newsletter-form .btn-subscribe:hover {
  background: var(--clr-turquoise);
}

/* Subscription Button Click Animation */
.newsletter-form .btn-subscribe:active {
  transform: scale(0.95);
}

.newsletter-form .btn-subscribe.subscribing {
  color: transparent;
  pointer-events: none;
}

.newsletter-form .btn-subscribe.subscribing::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s infinite linear;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.85rem;
  color: rgba(193, 246, 237, 0.6);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.2rem !important;
  }
  
  .feature-strip {
    margin-top: 20px;
    padding: 15px;
    border-radius: var(--radius-md);
  }
  
  .footer-modern .col-md-3 {
    margin-bottom: 30px;
  }
}

/* ==========================================================================
   Internal Pages (Subjects & Chapters)
   ========================================================================== */
.page-mint-bg {
  background: linear-gradient(135deg, var(--clr-mint) 0%, rgba(68, 147, 66, 0.15) 100%);
  min-height: calc(100vh - 80px);
  padding: 60px 0;
}

.page-title h1 {
  font-weight: 800;
  color: var(--clr-teal-dark);
  margin-bottom: 30px;
  position: relative;
  display: inline-block;
  font-size: 2.5rem;
}

.page-title h1::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 60px;
  height: 4px;
  background-color: var(--clr-forest);
  border-radius: var(--radius-pill);
}

/* Chapter Reading Card */
.chapter-reading-card {
  background: var(--clr-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 50px;
  margin-top: 20px;
  margin-bottom: 40px;
}

.chapter-description {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--clr-gray-800);
}

.chapter-description h2, 
.chapter-description h3, 
.chapter-description h4 {
  color: var(--clr-teal-dark);
  margin-top: 35px;
  margin-bottom: 20px;
  font-weight: 700;
}

.chapter-description p, 
.chapter-description ul {
  margin-bottom: 25px;
}

.chapter-description ul {
  padding-left: 20px;
}

.chapter-description ul li {
  margin-bottom: 12px;
  position: relative;
  list-style-type: none;
}

.chapter-description ul li::before {
  content: '\f105';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--clr-forest);
  position: absolute;
  left: -20px;
  top: 2px;
}

.chapter-description a {
  color: var(--clr-forest);
  text-decoration: underline;
  font-weight: 600;
}

/* Animations for engaging content */
.fade-slide-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

@keyframes fadeSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
