/* Fix for duplicated navbar elements on desktop */
@media (min-width: 992px) {
  .navbar-modern-inner,
  .navbar-collapse-clone,
  .navbar-toggler-clone,
  .mobile-menu-overlay,
  .mobile-backdrop {
    display: none !important;
  }
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

img,
video,
iframe,
svg,
canvas {
  max-width: 100%;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 991px) {
  .navbar-toggler {
    width: 44px;
    height: 44px;
    padding: 0;
  }

  .navbar-collapse {
    max-height: calc(100vh - 76px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .navbar-modern-inner {
    z-index: 3000;
  }

  .navbar-show-modern-bg {
    z-index: 2990;
    background: rgba(0, 0, 0, 0.55);
  }

  .navbar-toggler-clone {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.08);
  }

  .navbar-collapse-clone {
    max-height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: calc(72px + env(safe-area-inset-top)) 16px calc(18px + env(safe-area-inset-bottom));
    background: #fff;
  }

  .navbar-collapse-clone .nav-link {
    padding: 12px 12px;
    font-weight: 700;
    font-size: 1.05rem;
    border-radius: 12px;
  }

  .navbar-collapse-clone .nav-link:hover {
    background: rgba(0, 0, 0, 0.04);
  }

  .navbar-collapse-clone .dropdown-menu {
    position: static !important;
    float: none;
    box-shadow: none;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
  }

  .sidebar-menu {
    padding: 16px !important;
  }

  .sidebar-menu hr {
    margin: 12px 0;
  }

  .sidebar-menu ul.nav {
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: 8px;
  }

  .sidebar-menu .nav-item {
    flex: 1 1 auto;
  }

  .sidebar-menu .nav-link {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 12px;
    white-space: nowrap;
  }
}

/* --- Global Animations --- */
@keyframes float-slow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, -20px); }
}

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

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(38, 137, 101, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(38, 137, 101, 0); }
    100% { box-shadow: 0 0 0 0 rgba(38, 137, 101, 0); }
}

@keyframes gradient-x {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-float {
    animation: float-slow 6s ease-in-out infinite;
}

/* --- Dark Mode Support --- */
:root {
    --bg-body: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --navbar-bg-scrolled: rgba(255, 255, 255, 0.98);
}

body.dark-mode {
    --bg-body: #111827;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --card-bg: #1f2937;
    --border-color: #374151;
    
    /* Override Navbar Variables */
    --brand-secondary: #e5e7eb; /* Make dark text light */
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --bg-glass: rgba(17, 24, 39, 0.92);
    --navbar-bg-scrolled: rgba(17, 24, 39, 0.98);
    --shadow-soft: 0 10px 40px -10px rgba(0,0,0,0.5);
    
    background-color: var(--bg-body);
    color: var(--text-main);
}

/* Apply variables to common elements in Dark Mode */
body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode h3, 
body.dark-mode h4, 
body.dark-mode h5, 
body.dark-mode h6 {
    color: var(--text-main) !important;
}

body.dark-mode p, 
body.dark-mode span, 
body.dark-mode li {
    color: var(--text-muted);
}

body.dark-mode .card, 
body.dark-mode .bg-white {
    background-color: var(--card-bg) !important;
    color: var(--text-main);
    border-color: var(--border-color);
}

body.dark-mode .navbar-premium.scrolled {
    background: var(--navbar-bg-scrolled) !important;
}

body.dark-mode .dropdown-menu-premium {
    background: var(--card-bg);
    border-color: var(--border-color);
}

body.dark-mode .dropdown-item-premium:hover {
    background: rgba(255,255,255,0.05);
}

body.dark-mode .btn-light {
    background: #374151;
    color: #fff;
    border-color: #4b5563;
}

body.dark-mode .text-dark {
    color: #f3f4f6 !important;
}

body.dark-mode .bg-light {
    background-color: #1f2937 !important;
}

body.dark-mode .border {
    border-color: var(--border-color) !important;
}

/* Specific fix for dropdown text in dark mode */
body.dark-mode .dropdown-item-premium {
    color: var(--text-main);
}

/* Creative Scope Theme (Trainers Section) */
.scope-badge-creative {
    background: #38a9a8;
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    width: 144px;
    align-items: center;
}
.scope-badge-creative i {
    margin-left: 10px;
}

.scope-title-creative {
    font-size: 48px;
    font-weight: 800;
    color: #000;
    line-height: 1.3;
}

.highlight-creative {
    position: relative;
    z-index: 1;
    display: inline-block;
}

.highlight-creative::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 15px;
    background: #58bebc;
    z-index: -1;
    opacity: 0.6;
}

.scope-desc-creative {
    font-size: 18px;
    color: #666;
    line-height: 1.8;
    max-width: 500px;
}

.btn-creative-dark {
    background: #1a1a1a;
    color: #fff;
    padding: 15px 24px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s;
    width: 346px;
    justify-content: center;
}

.btn-creative-dark:hover {
    background: #38a9a8;
    color: #000;
    transform: translateY(-3px);
}
.btn-creative-dark i {
    font-weight: 900;
    margin-right: 15px;
}

.scope-image-composition {
    position: relative;
    padding: 20px;
}

.scope-main-image-wrapper {
    border-radius: 30px 100px 30px 100px;
    overflow: hidden;
    position: relative;
    z-index: 1;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

.scope-main-img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    transition: transform 0.5s;
}

.scope-floating-icon {
    position: absolute;
    top: 50px;
    right: -20px;
    width: 80px;
    height: 80px;
    background: #fff;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    z-index: 2;
}

.scope-floating-card {
    position: absolute;
    bottom: 50px;
    left: -20px;
    width: 180px;
    background: #38a9a8;
    color: #ffffff;    
    border-radius: 30px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    z-index: 2;
    box-shadow: 0 15px 40px rgba(209, 243, 75, 0.4);
}

@media (max-width: 991px) {
    .scope-main-img {
        height: 350px;
    }
    .scope-title-creative {
        font-size: 32px;
    }
    .scope-content {
        text-align: center;
    }
    .scope-desc-creative {
        margin: 0 auto 30px;
    }
    .scope-image-composition {
        margin-top: 30px;
    }
    .scope-floating-icon {
        right: 0;
    }
    .scope-floating-card {
        left: 0;
        width: 140px;
        height: 140px;
    }
}
