/* ========================================
   Arabic Learning Platform - Main Styles
   Modern Islamic Aesthetic Design System
======================================== */

:root {
  /* Light Mode Colors */
  --primary-beige: #F5E6D3;
  --primary-brown: #8B4513;
  --secondary-brown: #A0522D;
  --accent-gold: #DAA520;
  --pure-white: #FFFFFF;
  --off-white: #FEFEFE;
  --light-beige: #FAF0E6;
  --text-dark: #2C1810;
  --text-light: #6B4423;
  --border-light: #E5D4C1;
  --shadow-light: rgba(139, 69, 19, 0.1);
  --bg-primary: var(--off-white);
  --bg-secondary: var(--primary-beige);
  --bg-card: var(--pure-white);
  --text-primary: var(--text-dark);
  --text-secondary: var(--text-light);
  --border-color: var(--border-light);
  --shadow-color: var(--shadow-light);
}

[data-theme="dark"] {
  /* Dark Mode Colors - Enhanced */
  --primary-beige: #1E1A15;
  --primary-brown: #703a13;
  --secondary-brown: #9f6221;
  --accent-gold: #F4D03F;
  --pure-white: #0F0D0A;
  --off-white: #161410;
  --light-beige: #1A1713;
  --text-dark: #F2E8D9;
  --text-light: #C9B99A;
  --border-light: #2A2520;
  --shadow-light: rgba(0, 0, 0, 0.4);
  --bg-primary: var(--pure-white);
  --bg-secondary: var(--primary-beige);
  --bg-card: var(--off-white);
  --text-primary: var(--text-dark);
  --text-secondary: var(--text-light);
  --border-color: var(--border-light);
  --shadow-color: var(--shadow-light);

  /* Dark mode specific improvements */
  --input-bg: #1A1713;
  --input-border: #2A2520;
  --input-focus: #F4D03F;
  --btn-hover-bg: rgba(244, 208, 63, 0.1);
}

/* ========================================
   Base Styles & Typography
======================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: all 0.3s ease;
  overflow-x: hidden;
}

/* Typography Hierarchy */
.display-1 { font-size: 3.5rem; font-weight: 700; line-height: 1.2; }
.display-2 { font-size: 3rem; font-weight: 600; line-height: 1.3; }
h1 { font-size: 2.5rem; font-weight: 600; margin-bottom: 1rem; }
h2 { font-size: 2rem; font-weight: 500; margin-bottom: 0.8rem; }
h3 { font-size: 1.5rem; font-weight: 500; margin-bottom: 0.6rem; }
h4 { font-size: 1.25rem; font-weight: 500; margin-bottom: 0.5rem; }
p { font-size: 1rem; margin-bottom: 1rem; }
.lead { font-size: 1.125rem; font-weight: 300; }

/* ========================================
   RTL & Text Direction Support
======================================== */

/* LTR Force - Remove RTL Support */
/* Force LTR layout for all content */
* {
  direction: ltr !important;
  text-align: left;
}

/* Override any RTL classes that might exist */
.text-right,
.text-end {
  text-align: left !important;
}

/* Force specific elements to be LTR */
.auth-container,
.auth-form,
.auth-feature-item,
.navbar-nav,
.input-group,
.form-control,
.btn {
  direction: ltr !important;
  text-align: left;
}

/* Remove any Arabic font families */
.arabic-text,
.english-text {
  direction: ltr !important;
  text-align: left !important;
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

/* Ensure consistent text alignment */
.text-start-responsive,
.text-end-responsive {
  text-align: left !important;
}

/* ========================================
   Islamic Pattern SVG Background
======================================== */

.islamic-pattern-bg {
  position: relative;
  overflow: hidden;
}

.islamic-pattern-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="islamic" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><polygon points="10,1 4,7 10,13 16,7" fill="none" stroke="rgba(218,165,32,0.05)" stroke-width="1"/><circle cx="10" cy="7" r="2" fill="rgba(218,165,32,0.03)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23islamic)"/></svg>');
  opacity: 0.3;
  z-index: -1;
}

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

.navbar {
  background-color: var(--bg-card);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 0;
  transition: all 0.3s ease;
}

@media (min-width: 768px) {
  .navbar {
    padding: 0.75rem 0;
  }
}

@media (min-width: 992px) {
  .navbar {
    padding: 1rem 0;
  }
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary-brown) !important;
  text-decoration: none;
  padding: 0.5rem 0;
}

@media (min-width: 576px) {
  .navbar-brand {
    font-size: 1.5rem;
  }
}

.navbar-brand:hover {
  color: var(--accent-gold) !important;
}

.navbar-toggler {
  border: none;
  padding: 0.5rem;
  border-radius: 0.375rem;
  font-size: 1.25rem;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.25rem rgba(139, 99, 70, 0.25);
}

.navbar-nav .nav-link {
  color: var(--text-primary) !important;
  font-weight: 500;
  padding: 0.75rem 1rem !important;
  margin: 0.25rem 0;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  font-size: 1.1rem;
  min-height: 48px;
  display: flex;
  align-items: center;
}

@media (min-width: 992px) {
  .navbar-nav .nav-link {
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    font-size: 1rem;
    min-height: auto;
  }
}

@media (max-width: 991.98px) {
  .navbar-nav .nav-link {
    background: rgba(139, 99, 70, 0.05);
    border: 1px solid transparent;
  }

  .navbar-nav .nav-link:hover,
  .navbar-nav .nav-link.active {
    background: rgba(139, 99, 70, 0.1);
    border-color: var(--primary-brown);
    color: var(--accent-gold) !important;
  }
}

@media (min-width: 992px) {
  .navbar-nav .nav-link:hover,
  .navbar-nav .nav-link.active {
    color: var(--accent-gold) !important;
    background-color: var(--bg-secondary);
  }

  .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, var(--accent-gold), var(--primary-brown));
    transition: all 0.3s ease;
    transform: translateX(-50%);
  }

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

/* Theme Toggle Button */
.theme-toggle {
  background: linear-gradient(45deg, var(--primary-brown), var(--secondary-brown));
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

@media (max-width: 575.98px) {
  .theme-toggle {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

.theme-toggle:hover {
  box-shadow: 0 4px 15px var(--shadow-color);
}

@media (min-width: 768px) {
  .theme-toggle:hover {
    transform: scale(1.05);
  }
}

/* ========================================
   Button Styles
======================================== */

.btn-primary {
  background: linear-gradient(45deg, var(--primary-brown), var(--secondary-brown));
  border: none;
  border-radius: 50px;
  padding: 14px 24px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

@media (min-width: 768px) {
  .btn-primary {
    padding: 12px 30px;
  }
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.125rem;
  min-height: 52px;
}

@media (min-width: 768px) {
  .btn-lg {
    padding: 15px 40px;
    font-size: 1.1rem;
  }
}

.btn-outline-primary {
  background: transparent;
  border: 2px solid var(--primary-brown);
  color: var(--primary-brown);
  border-radius: 50px;
  padding: 14px 24px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

@media (min-width: 768px) {
  .btn-outline-primary {
    padding: 12px 30px;
  }
}

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

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  background: linear-gradient(45deg, var(--secondary-brown), var(--accent-gold));
}

@media (min-width: 768px) {
  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-color);
  }
}

@media (min-width: 768px) {
  .btn-outline-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-color);
  }
}

.btn-gold {
  background: linear-gradient(45deg, var(--accent-gold), #B8860B);
  border: none;
  border-radius: 50px;
  padding: 12px 30px;
  color: var(--text-dark);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(218, 165, 32, 0.3);
  filter: brightness(1.1);
}

/* ========================================
   Card Styles
======================================== */

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  box-shadow: 0 5px 20px var(--shadow-color);
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
}

@media (min-width: 768px) {
  .card {
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-color);
  }
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(45deg, var(--accent-gold), var(--primary-brown));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

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

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px var(--shadow-color);
}

.card-body {
  padding: 2rem;
}

.card-title {
  color: var(--text-primary) !important;
  font-weight: 600;
  margin-bottom: 1rem;
}

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

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

.hero-section {
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  background: linear-gradient(45deg, var(--primary-brown), var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.25rem;
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease 0.2s both;
}

.hero-buttons {
  animation: fadeInUp 1s ease 0.4s both;
}

.hero-image {
  position: relative;
  animation: float 6s ease-in-out infinite;
}

.hero-decoration {
  position: absolute;
  top: 50%;
  right: -50px;
  width: 200px;
  height: 200px;
  background: linear-gradient(45deg, var(--accent-gold), transparent);
  border-radius: 50%;
  opacity: 0.1;
  animation: pulse 4s ease-in-out infinite;
}

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

.section {
  padding: 60px 0;
  position: relative;
}

@media (min-width: 768px) {
  section {
    padding: 80px 0;
  }
}

@media (min-width: 992px) {
  section {
    padding: 100px 0;
  }
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary) !important;
}

@media (min-width: 768px) {
  .section-title {
    margin-bottom: 2.5rem;
    font-size: 2.5rem;
  }
}

@media (min-width: 992px) {
  .section-title {
    margin-bottom: 3rem;
    font-size: 3rem;
  }
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(45deg, var(--accent-gold), var(--primary-brown));
  border-radius: 2px;
}

@media (min-width: 768px) {
  .section-title::after {
    width: 80px;
    height: 4px;
  }
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  text-align: center;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .section-subtitle {
    font-size: 1.1rem;
    margin-bottom: 4rem;
    padding: 0;
  }
}

/* ========================================
   Features Section
======================================== */

.feature-card {
  text-align: center;
  padding: 1.5rem 1rem;
  height: 100%;
}

@media (min-width: 768px) {
  .feature-card {
    padding: 2rem 1rem;
  }
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(45deg, var(--primary-brown), var(--accent-gold));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: white;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

@media (min-width: 768px) {
  .feature-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    font-size: 2rem;
  }
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
}

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

.course-card {
  position: relative;
  overflow: hidden;
  height: 100%;
}

.course-image {
  height: 180px;
  background: linear-gradient(45deg, var(--primary-brown), var(--accent-gold));
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .course-image {
    height: 200px;
  }
}

.course-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.3);
  transition: all 0.3s ease;
}

@media (min-width: 768px) {
  .course-card:hover .course-image::before {
    background: rgba(0,0,0,0.1);
  }
}

.course-level {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--accent-gold);
  color: var(--text-dark);
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
}

@media (min-width: 768px) {
  .course-level {
    padding: 4px 12px;
    font-size: 0.8rem;
  }
}

.course-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

@media (min-width: 576px) {
  .course-meta {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0;
  }
}

.course-price {
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 1.25rem;
}

.course-rating {
  color: var(--accent-gold);
}

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

.teacher-card {
  text-align: center;
  position: relative;
}

.teacher-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--primary-brown), var(--accent-gold));
  margin: 0 auto 1.5rem;
  position: relative;
  overflow: hidden;
  border: 4px solid var(--bg-card);
  box-shadow: 0 10px 30px var(--shadow-color);
}

.teacher-name {
  color: var(--primary-brown);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.teacher-expertise {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.teacher-social {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.teacher-social a {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--bg-secondary);
  color: var(--primary-brown);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

.teacher-social a:hover {
  background: var(--accent-gold);
  color: white;
  transform: translateY(-2px);
}

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

.footer {
  background: linear-gradient(135deg, var(--primary-brown), var(--secondary-brown));
  color: white;
  padding: 60px 0 20px;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(45deg, var(--accent-gold), transparent, var(--accent-gold));
}

.footer h5 {
  color: var(--accent-gold);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: all 0.3s ease;
}

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

.social-icons {
  display: flex;
  gap: 15px;
}

.social-icons a {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  background: var(--accent-gold);
  transform: translateY(-3px);
}

/* ========================================
   Animations
======================================== */

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

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

@keyframes pulse {
  0%, 100% {
    opacity: 0.1;
    transform: scale(1);
  }
  50% {
    opacity: 0.3;
    transform: scale(1.05);
  }
}

/* Scroll Animation Classes */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in-up.animate {
  opacity: 1;
  transform: translateY(0);
}

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

@media (max-width: 768px) {
  .display-1 { font-size: 2.5rem; }
  .display-2 { font-size: 2rem; }
  h1 { font-size: 2rem; }

  .hero-section {
    min-height: 80vh;
    text-align: center;
  }

  .hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .section {
    padding: 60px 0;
  }

  .navbar-nav {
    text-align: center;
    padding-top: 1rem;
  }

  .theme-toggle {
    margin-left: 0;
    margin-top: 1rem;
  }
}

@media (max-width: 576px) {
  .card-body {
    padding: 1.5rem;
  }

  .feature-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .teacher-avatar {
    width: 100px;
    height: 100px;
  }

  .course-image {
    height: 160px;
  }
}

/* ========================================
   Form Styles
======================================== */

.form-control {
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 16px;
  background-color: var(--bg-card);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 0.2rem rgba(218, 165, 32, 0.25);
  background-color: var(--bg-card);
  color: var(--text-primary);
}

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

/* Dark Mode Form Enhancements */
[data-theme="dark"] .form-control {
  background-color: var(--input-bg, var(--bg-card));
  border-color: var(--input-border, var(--border-color));
  color: var(--text-primary);
}

[data-theme="dark"] .form-control:focus {
  background-color: var(--input-bg, var(--bg-card));
  border-color: var(--input-focus, var(--accent-gold));
  box-shadow: 0 0 0 0.2rem rgba(244, 208, 63, 0.25);
}

[data-theme="dark"] .form-control::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

[data-theme="dark"] .btn-outline-secondary {
  border-color: var(--border-color);
  color: var(--text-secondary);
}

[data-theme="dark"] .btn-outline-secondary:hover {
  background-color: var(--btn-hover-bg, rgba(244, 208, 63, 0.1));
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

[data-theme="dark"] .alert {
  background-color: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-primary);
}

[data-theme="dark"] .alert-danger {
  background-color: rgba(220, 53, 69, 0.1);
  border-color: rgba(220, 53, 69, 0.3);
  color: #ff6b6b;
}

[data-theme="dark"] .alert-success {
  background-color: rgba(40, 167, 69, 0.1);
  border-color: rgba(40, 167, 69, 0.3);
  color: #51cf66;
}

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

.text-gold { color: var(--accent-gold); }
.text-brown { color: var(--primary-brown); }
.bg-light-beige { background-color: var(--light-beige); }
.bg-card { background-color: var(--bg-card); }
.border-gold { border-color: var(--accent-gold); }

.shadow-soft {
  box-shadow: 0 10px 30px var(--shadow-color);
}

.rounded-lg {
  border-radius: 20px;
}

.transition-all {
  transition: all 0.3s ease;
}

/* ========================================
   Mobile-First Responsive Improvements
======================================== */

/* Hide resource-intensive elements on mobile for performance */
@media (max-width: 767.98px) {
  .islamic-pattern-bg::before {
    display: none !important;
  }

  .hero-decoration {
    display: none !important;
  }
}

/* Enhanced mobile typography scaling */
@media (max-width: 575.98px) {
  .display-1 { font-size: 2.25rem !important; }
  .display-4 { font-size: 1.75rem !important; }
  .h1, h1 { font-size: 1.75rem !important; }
  .h2, h2 { font-size: 1.5rem !important; }
  .h3, h3 { font-size: 1.25rem !important; }
  .lead { font-size: 1rem !important; }
}

/* Touch-friendly minimum sizes for interactive elements */
@media (max-width: 767.98px) {
  .btn,
  .nav-link,
  .form-control,
  button,
  input,
  select,
  textarea {
    min-height: 44px;
  }

  .form-control {
    font-size: 16px; /* Prevent iOS zoom */
    border-radius: 10px;
  }

  .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
    margin: 0.25rem 0;
    font-size: 1.1rem;
  }
}

/* Disable hover effects on mobile for better performance */
@media (max-width: 767.98px) {
  .card:hover,
  .btn:hover,
  .feature-card:hover .feature-icon {
    transform: none !important;
    box-shadow: inherit !important;
  }
}

/* Mobile container and spacing improvements */
@media (max-width: 575.98px) {
  .container,
  .container-fluid {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .rounded-lg {
    border-radius: 15px !important;
  }

  .shadow-soft {
    box-shadow: 0 5px 20px var(--shadow-color) !important;
  }
}

/* Performance optimizations for mobile devices */
@media (max-width: 767.98px) {
  * {
    animation-duration: 0.3s !important;
  }

  .fade-in-up {
    transition: all 0.3s ease !important;
  }
}

/* Mobile hero section improvements */
@media (max-width: 767.98px) {
  .hero-section {
    min-height: auto !important;
    padding-top: 100px !important;
    padding-bottom: 3rem !important;
  }
}

/* Mobile course and feature improvements */
@media (max-width: 575.98px) {
  .course-price {
    font-size: 1.125rem !important;
  }

  .course-rating {
    font-size: 0.875rem !important;
  }

  .feature-icon {
    width: 60px !important;
    height: 60px !important;
    font-size: 1.5rem !important;
  }
}

/* Mobile footer improvements */
@media (max-width: 767.98px) {
  .footer {
    text-align: center;
    padding: 3rem 0 2rem !important;
  }

  .footer .row > div {
    margin-bottom: 2rem;
  }

  .footer h5 {
    margin-bottom: 1.5rem;
    text-align: center;
  }

  .footer ul {
    text-align: center;
  }
}

/* Mobile image improvements */
@media (max-width: 767.98px) {
  img {
    max-width: 100% !important;
    height: auto !important;
  }
}

/* Mobile form improvements */
@media (max-width: 767.98px) {
  .contact-form {
    padding: 1.5rem !important;
    border-radius: 15px !important;
  }
}

/* ========================================
   Enhanced Navigation Styles
======================================== */

/* Main Navigation */
.navbar {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(245, 230, 211, 0.95) 100%) !important;
  backdrop-filter: blur(15px);
  border-bottom: 2px solid var(--accent-gold);
  box-shadow: 0 2px 20px var(--shadow-color);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
  /* background: rgba(255, 255, 255, 0.95) !important; */
  backdrop-filter: blur(20px);
  padding: 0.5rem 0;
}

/* Enhanced Brand */
.navbar-brand {
  font-weight: 800 !important;
  font-size: 1.75rem !important;
  color: var(--primary-brown) !important;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.navbar-brand:hover {
  color: var(--accent-gold) !important;
  transform: translateY(-2px);
}

.text-gold {
  color: var(--accent-gold) !important;
}

/* Navigation Links */
.navbar-nav .nav-link {
  color: var(--text-primary) !important;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.75rem 1rem !important;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  margin: 0 0.25rem;
}

.navbar-nav .nav-link:hover {
  color: var(--accent-gold) !important;
  background: rgba(218, 165, 32, 0.1);
  transform: translateY(-2px);
}

.navbar-nav .nav-link.active {
  color: var(--accent-gold) !important;
  background: rgba(218, 165, 32, 0.15);
  box-shadow: 0 2px 8px rgba(218, 165, 32, 0.3);
}

/* Enhanced Buttons */
.btn-gold {
  background: linear-gradient(135deg, var(--accent-gold), #B8860B);
  border: 2px solid var(--accent-gold);
  color: var(--text-dark) !important;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(218, 165, 32, 0.3);
}

.btn-gold:hover {
  background: linear-gradient(135deg, #B8860B, var(--accent-gold));
  border-color: #B8860B;
  color: white !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(218, 165, 32, 0.4);
}

.btn-outline-gold {
  border: 2px solid var(--accent-gold);
  color: var(--accent-gold) !important;
  background: transparent;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-outline-gold:hover {
  background: var(--accent-gold);
  color: var(--text-dark) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(218, 165, 32, 0.3);
}

/* Language Switcher */
.dropdown-toggle::after {
  margin-left: 0.5rem;
}

.dropdown-menu {
  border: 2px solid var(--accent-gold);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  padding: 0.5rem;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
}

.dropdown-item {
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
  color: var(--text-primary) !important;
}

.dropdown-item:hover {
  background: rgba(218, 165, 32, 0.1);
  color: var(--accent-gold) !important;
  transform: translateX(5px);
}

.dropdown-header {
  color: var(--text-primary) !important;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

/* Theme Toggle Button */
.btn-outline-gold {
  position: relative;
  overflow: hidden;
}

.btn-outline-gold::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(218, 165, 32, 0.2), transparent);
  transition: left 0.5s;
}

.btn-outline-gold:hover::before {
  left: 100%;
}

/* Mobile Enhancements */
@media (max-width: 991.98px) {
  .navbar-brand {
    font-size: 1.5rem !important;
  }

  .navbar-nav {
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    margin-top: 1rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  }

  .navbar-nav .nav-link {
    margin: 0.25rem 0;
    text-align: center;
  }

  .d-flex.gap-2 {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem !important;
    padding: 1rem 0;
  }

  .btn-gold, .btn-outline-gold {
    width: 100%;
    justify-content: center;
  }
}

/* Scroll Effects */
@media (min-width: 992px) {
  .navbar.navbar-shrink {
    padding: 0.5rem 0;
  }

  .navbar.navbar-shrink .navbar-brand {
    font-size: 1.5rem !important;
  }
}

/* ========================================
   Dark Mode Text Fixes
======================================== */

/* Fix all headings in dark mode */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary) !important;
}

/* Fix course content items */
.course-content li,
.course-features li,
.course-curriculum li,
ul li {
  color: var(--text-primary) !important;
}

/* Fix text elements that use text-dark class */
.text-dark {
  color: var(--text-primary) !important;
}

/* Fix form labels */
.form-label,
label {
  color: var(--text-primary) !important;
}

/* Fix contact section elements */
#contact h5,
#contact p {
  color: var(--text-primary) !important;
}

/* Fix card content */
.card p,
.card-text {
  color: var(--text-secondary) !important;
}

/* Fix course features */
.course-meta,
.course-price,
.course-rating {
  color: var(--text-primary) !important;
}

/* Fix specific course content */
.course-includes ul li,
.what-you-learn ul li,
.course-requirements ul li {
  color: var(--text-primary) !important;
}

/* Fix feature icons and content */
.feature-icon {
  color: var(--accent-gold) !important;
}

.feature-card h5,
.feature-card p {
  color: var(--text-primary) !important;
}

/* Fix materials section */
.materials-grid .card h5,
.materials-grid .card p {
  color: var(--text-primary) !important;
}

/* Fix teachers section */
.teacher-card h5,
.teacher-card p,
.teacher-info h5,
.teacher-info p {
  color: var(--text-primary) !important;
}

/* Fix levels section */
.level-card h5,
.level-card p,
.level-info h5,
.level-info p {
  color: var(--text-primary) !important;
}

/* Ensure text secondary is properly applied */
.text-secondary {
  color: var(--text-secondary) !important;
}

/* Fix breadcrumbs and navigation elements */
.breadcrumb-item,
.nav-link {
  color: var(--text-primary) !important;
}

/* Fix dropdown menus */
.dropdown-item {
  color: var(--text-primary) !important;
}

.dropdown-item:hover {
  color: var(--accent-gold) !important;
}

/* Fix alerts and notifications */
.alert {
  color: var(--text-primary) !important;
}

/* Fix table content */
table,
.table,
td,
th {
  color: var(--text-primary) !important;
}
