/* ============================================
   Mathematics Course - Main Stylesheet
   Modern Mathematical Design System
   ============================================ */

:root {
  /* Color Palette - Mathematical Precision */
  --primary-color: #1a4d7a;
  --primary-dark: #0f2e4a;
  --accent-color: #e67e22;
  --accent-light: #f39c12;
  --secondary-color: #27ae60;
  --background: #fafbfc;
  --surface: #ffffff;
  --text-primary: #2c3e50;
  --text-secondary: #5d6d7e;
  --border-color: #e0e6ed;
  --shadow-light: rgba(0, 0, 0, 0.05);
  --shadow-medium: rgba(0, 0, 0, 0.1);
  --shadow-heavy: rgba(0, 0, 0, 0.15);
  
  /* Spacing System */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}
#backToTop{
  width: 50px!important;
  height: 50px!important;
  max-width: 50px!important;
  min-width: 50px!important;
  display: flex!important;
  padding: 0;
  justify-content: center;
  align-items: center;
}
/* ============================================
   Reset & Base Styles
   ============================================ */

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Nunito Sans', 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--background);
  overflow-x: hidden;
  position: relative;
}

/* Geometric Background Pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(135deg, transparent 45%, rgba(26, 77, 122, 0.02) 50%, transparent 55%),
    linear-gradient(45deg, transparent 45%, rgba(230, 126, 34, 0.02) 50%, transparent 55%);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: -1;
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: 1.5rem;
}

p {
  margin-bottom: var(--spacing-sm);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition-base);
}

a:hover {
  color: var(--accent-color);
}

/* ============================================
   Navigation
   ============================================ */

.navbar {
  background: var(--surface);
  box-shadow: 0 2px 20px var(--shadow-light);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition-base);
}

.navbar-brand {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color) !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-brand i {
  color: var(--accent-color);
  font-size: 1.8rem;
}

.nav-link {
  font-weight: 600;
  color: var(--text-primary) !important;
  padding: 0.5rem 1rem !important;
  position: relative;
  transition: var(--transition-base);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--accent-color);
  transform: translateX(-50%);
  transition: var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 60%;
}

.nav-link:hover {
  color: var(--primary-color) !important;
}

/* ============================================
   Hero Section
   ============================================ */

.hero-section {
  min-height: 85vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1a4d7a 0%, #2c5f8d 50%, #3d7ba8 100%);
  color: white;
  padding: var(--spacing-xl) 0;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 20s infinite ease-in-out;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(230, 126, 34, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 15s infinite ease-in-out reverse;
}

@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-30px) translateX(20px); }
}

.hero-content {
  position: relative;
  z-index: 2;
  animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  font-size: clamp(2rem, 6vw, 4rem);
  margin-bottom: var(--spacing-md);
  color: white;
}

.hero-subtitle {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-weight: 300;
  margin-bottom: var(--spacing-md);
  opacity: 0.95;
}

.hero-image {
  position: relative;
  z-index: 2;
  animation: fadeInRight 1s ease 0.3s backwards;
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  padding: 0.875rem 2rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: var(--transition-base);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-color);
  color: white;
  box-shadow: 0 4px 15px rgba(230, 126, 34, 0.3);
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230, 126, 34, 0.4);
  color: white;
}

.btn-outline-light {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.btn-outline-light:hover {
  background: white;
  color: var(--primary-color);
}

.btn-outline-primary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: white;
}

/* ============================================
   Section Styles
   ============================================ */

.section {
  padding: var(--spacing-xl) 0;
  position: relative;
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-lg);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--accent-color);
  margin: var(--spacing-sm) auto 0;
  border-radius: 2px;
}

.section-subtitle {
  text-align: center;
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto var(--spacing-lg);
}

/* Alternating Section Backgrounds */
.section:nth-child(even) {
  background: var(--surface);
}

/* ============================================
   Cards
   ============================================ */

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  box-shadow: 0 4px 20px var(--shadow-light);
  transition: var(--transition-base);
  border: 1px solid var(--border-color);
  height: 100%;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px var(--shadow-medium);
}

.card-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  margin-bottom: var(--spacing-sm);
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

.card-text {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   Feature Cards with Accent
   ============================================ */

.feature-card {
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-color), var(--accent-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition-base);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

/* ============================================
   Course Cards
   ============================================ */

.course-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow-light);
  transition: var(--transition-base);
  border: 1px solid var(--border-color);
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px var(--shadow-medium);
}

.course-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: var(--transition-base);
}

.course-card:hover .course-image {
  transform: scale(1.05);
}

.course-content {
  padding: var(--spacing-md);
}

.course-badge {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background: var(--accent-color);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
}

.course-meta {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
  padding-top: var(--spacing-sm);
  border-top: 1px solid var(--border-color);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.course-meta i {
  color: var(--accent-color);
}

/* ============================================
   Stats Section
   ============================================ */

.stats-section {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  position: relative;
  overflow: hidden;
}

.stats-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.3;
}

.stat-box {
  text-align: center;
  position: relative;
  z-index: 1;
  padding: var(--spacing-md);
}

.stat-number {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: var(--spacing-xs);
  display: block;
  color: var(--accent-color);
}

.stat-label {
  font-size: 1.1rem;
  opacity: 0.95;
}

/* ============================================
   Timeline / Learning Path
   ============================================ */

.timeline {
  position: relative;
  padding: var(--spacing-md) 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--spacing-lg);
  display: flex;
  align-items: center;
}

.timeline-item:nth-child(odd) {
  flex-direction: row;
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-content {
  flex: 1;
  padding: var(--spacing-md);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px var(--shadow-light);
  position: relative;
  margin: 0 var(--spacing-md);
}

.timeline-item:nth-child(odd) .timeline-content {
  text-align: right;
}

.timeline-marker {
  width: 50px;
  height: 50px;
  background: var(--accent-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  box-shadow: 0 0 0 8px var(--background);
  position: relative;
  z-index: 2;
}

/* ============================================
   Interactive Math Visualization
   ============================================ */

.math-visual {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  box-shadow: 0 4px 20px var(--shadow-light);
  position: relative;
  overflow: hidden;
}

.math-formula {
  font-family: 'Courier New', monospace;
  font-size: 1.5rem;
  text-align: center;
  padding: var(--spacing-md);
  background: var(--background);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--accent-color);
  margin: var(--spacing-sm) 0;
}

.geometric-shape {
  position: absolute;
  opacity: 0.1;
  pointer-events: none;
}

.shape-circle {
  width: 150px;
  height: 150px;
  border: 3px solid var(--primary-color);
  border-radius: 50%;
}

.shape-triangle {
  width: 0;
  height: 0;
  border-left: 75px solid transparent;
  border-right: 75px solid transparent;
  border-bottom: 130px solid var(--accent-color);
}

.shape-square {
  width: 120px;
  height: 120px;
  background: var(--secondary-color);
  transform: rotate(45deg);
}

/* ============================================
   Profession Cards
   ============================================ */

.profession-card {
  text-align: center;
  padding: var(--spacing-md);
  background: var(--surface);
  border-radius: var(--radius-lg);
  transition: var(--transition-base);
  border: 2px solid var(--border-color);
}

.profession-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-5px);
}

.profession-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--spacing-sm);
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
}

/* ============================================
   Footer
   ============================================ */

footer {
  background: var(--primary-dark);
  color: white;
  padding: var(--spacing-lg) 0 var(--spacing-md);
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.3;
}

footer h5 {
  color: white;
  margin-bottom: var(--spacing-sm);
  font-size: 1.3rem;
}

footer a {
  color: rgba(255, 255, 255, 0.8);
  display: block;
  margin-bottom: 0.5rem;
  transition: var(--transition-fast);
}

footer a:hover {
  color: var(--accent-color);
  padding-left: 5px;
}

.footer-bottom {
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

.social-links {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
}

.social-link {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-base);
}

.social-link:hover {
  background: var(--accent-color);
  transform: translateY(-3px);
}

/* ============================================
   Contact Form
   ============================================ */

.form-control {
  border-radius: var(--radius-md);
  border: 2px solid var(--border-color);
  padding: 0.875rem;
  transition: var(--transition-base);
}

.form-control:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.1);
  outline: none;
}

.form-label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

/* ============================================
   Cookie Consent Banner
   ============================================ */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--primary-dark);
  color: white;
  padding: var(--spacing-md);
  box-shadow: 0 -4px 20px var(--shadow-medium);
  z-index: 9999;
  transform: translateY(100%);
  transition: var(--transition-base);
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-banner p {
  margin-bottom: 0;
}

/* ============================================
   Breadcrumb
   ============================================ */

.breadcrumb {
  background: transparent;
  padding: var(--spacing-sm) 0;
  margin-bottom: var(--spacing-md);
}

.breadcrumb-item.active {
  color: var(--text-secondary);
}

/* ============================================
   Badge & Pills
   ============================================ */

.badge {
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
}

.badge-primary {
  background: var(--primary-color);
  color: white;
}

.badge-success {
  background: var(--secondary-color);
  color: white;
}

.badge-warning {
  background: var(--accent-color);
  color: white;
}

/* ============================================
   Article Styles
   ============================================ */

.article-header {
  margin-bottom: var(--spacing-lg);
}

.article-meta {
  display: flex;
  gap: var(--spacing-sm);
  color: var(--text-secondary);
  margin-top: var(--spacing-sm);
  font-size: 0.95rem;
}

.article-meta i {
  color: var(--accent-color);
}

.article-content {
  font-size: 1.1rem;
  line-height: 1.8;
}

.article-content h3 {
  margin-top: var(--spacing-md);
  color: var(--primary-color);
}

.article-content ul,
.article-content ol {
  margin: var(--spacing-sm) 0;
  padding-left: var(--spacing-md);
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  margin: var(--spacing-md) 0;
  box-shadow: 0 8px 30px var(--shadow-light);
}

/* ============================================
   Pricing Section
   ============================================ */

.pricing-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: 0 8px 30px var(--shadow-light);
  text-align: center;
  border: 3px solid var(--border-color);
  transition: var(--transition-base);
}

.pricing-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-10px);
}

.price {
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-color);
  margin: var(--spacing-sm) 0;
}

.price-currency {
  font-size: 1.5rem;
  vertical-align: super;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: var(--spacing-md) 0;
}

.pricing-features li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.pricing-features li:last-child {
  border-bottom: none;
}

.pricing-features i {
  color: var(--secondary-color);
  margin-right: 0.5rem;
}

/* ============================================
   Alert Messages
   ============================================ */

.alert {
  padding: var(--spacing-sm);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-sm);
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* ============================================
   Map Container
   ============================================ */

.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 30px var(--shadow-light);
  height: 400px;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 992px) {
  .timeline::before {
    left: 30px;
  }
  
  .timeline-item {
    flex-direction: row !important;
  }
  
  .timeline-item .timeline-content {
    text-align: left !important;
  }
  
  .timeline-marker {
    position: absolute;
    left: 5px;
  }
}

@media (max-width: 768px) {
  :root {
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
  }
  
  .hero-section {
    min-height: auto;
    padding: var(--spacing-lg) 0;
  }
  
  .section {
    padding: var(--spacing-lg) 0;
  }
  
  .navbar-brand {
    font-size: 1.25rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
}

/* ============================================
   Utility Classes
   ============================================ */

.text-gradient {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shadow-sm {
  box-shadow: 0 2px 10px var(--shadow-light);
}

.shadow-md {
  box-shadow: 0 4px 20px var(--shadow-medium);
}

.shadow-lg {
  box-shadow: 0 8px 40px var(--shadow-heavy);
}

.overflow-hidden {
  overflow: hidden;
}

.position-relative {
  position: relative;
}

/* ============================================
   Animation Classes
   ============================================ */

.fade-in {
  animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.slide-up {
  animation: slideUp 0.6s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll Animation Trigger */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}




.navbar-brand img{
    max-width: 250px;
    width: 250px;
    object-fit: contain;
}

html{
    overflow-x: hidden;
}


footer .navbar-brand img{
    filter: brightness(0) invert(1);
}

.footer-text{
    margin-top: 20px;
}


footer .container{
  position: relative;
  z-index: 10;
}

.card{
  height: auto;
}