/*
Theme Name: Twenty Twenty-Five AI
Theme URI: https://example.com
Description: Child theme of Twenty Twenty-Five that applies the AI Empire LMS designs (dashboard, login, course detail, checkout) while keeping Tutor LMS and WooCommerce logic intact.
Author: AI Empire
Template: twentytwentyfive
Version: 1.0.0
Text Domain: twentytwentyfive-ai
*/

/* ============================
 * AI Empire Design Tokens (CSS Variables)
 * ============================ */
:root {
  /* Gradients */
  --ai-grad:        linear-gradient(240.67deg, #F61B47 -7.27%, #43021D 89.3%);
  --ai-grad-alt:    linear-gradient(135deg, #F61B47 0%, #43021D 90%);

  /* Brand colours */
  --ai-white:        #ffffff;
  --ai-bg:           #FFF8FA;
  --ai-rose:         #BC094E;
  --ai-dark-maroon:  #43021D;
  --ai-red:          #F61B47;
  --ai-green:        #1CB275;
  --ai-beige:        #FEF5EE;
  --ai-light-pink:   #FFF3F6;

  /* Text */
  --ai-black:        #000000;
  --ai-text-dark:    #272727;
  --ai-text-medium:  #333333;
  --ai-text-muted:   #A7A7AA;
  --ai-text-slate:   #0C1421;
  --ai-avatar-bg:    #D9D9D9;

  /* Borders */
  --ai-border:       #EFEFF2;

  /* Radius */
  --ai-radius-sm:    8px;
  --ai-radius-md:    12px;
  --ai-radius-lg:    16px;
  --ai-radius-xl:    20px;
  --ai-radius-full:  999px;

  /* Shadows */
  --ai-shadow-sm:    0 4px 10px rgba(0,0,0,0.08);
  --ai-shadow-md:    0 14px 42px rgba(8,15,52,0.06);
  --ai-shadow-nav:   0 10px 25px rgba(0,0,0,0.07);
  --ai-shadow-card:  0 10px 30px rgba(0,0,0,0.05);

  /* Font */
  --ai-font: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Apply Inter globally to all AI Empire pages */
.ai-course-page,
.ai-lesson-page,
.ai-checkout-page,
.ai-dashboard { font-family: var(--ai-font); }

/* Simple base overrides; more layout-specific styles are below. */

/* Reuse the logo mark styling from earlier design */
.ai-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f61b47 0%, #43021d 90%);
}

/* Hide Droip header/footer on Tutor LMS frontend dashboard (includes login state) */
body.tutor-screen-frontend-dashboard .droip-s35-workademy_dpywzo6x,
body.tutor-screen-frontend-dashboard footer#footer[data-droip] {
  display: none !important;
}

/* Hide Droip header/footer on AI Empire front-page login */
body.wp-child-theme-twentytwentyfive-ai.home .droip-s35-workademy_dpywzo6x,
body.wp-child-theme-twentytwentyfive-ai.home footer#footer[data-droip] {
  display: none !important;
}

/* Hide default site header on Tutor course detail and lesson view (we use custom navbar) */
body.wp-child-theme-twentytwentyfive-ai.single-courses .wp-site-blocks > *:first-child,
body.wp-child-theme-twentytwentyfive-ai.page-template-page-course-detail .wp-site-blocks > *:first-child,
body.wp-child-theme-twentytwentyfive-ai.ai-lesson-view-page .wp-site-blocks > *:first-child {
  display: none !important;
}

/* Also hide the core Site Title block on those pages */
body.wp-child-theme-twentytwentyfive-ai.single-courses .wp-block-site-title,
body.wp-child-theme-twentytwentyfive-ai.page-template-page-course-detail .wp-block-site-title {
  display: none !important;
}

/* Remove extra top margin/padding from main content on course detail, single course, lesson view */
body.wp-child-theme-twentytwentyfive-ai.single-courses .wp-site-blocks,
body.wp-child-theme-twentytwentyfive-ai.page-template-page-course-detail .wp-site-blocks,
body.wp-child-theme-twentytwentyfive-ai.ai-lesson-view-page .wp-site-blocks {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

body.wp-child-theme-twentytwentyfive-ai.single-courses main.wp-block-group,
body.wp-child-theme-twentytwentyfive-ai.page-template-page-course-detail main.wp-block-group,
body.wp-child-theme-twentytwentyfive-ai.ai-lesson-view-page main.wp-block-group {
  margin-top: 0 !important;
}

/* Explicitly hide legacy #header / #headerimg banner on course detail, single course, lesson view */
body.wp-child-theme-twentytwentyfive-ai.single-courses #header,
body.wp-child-theme-twentytwentyfive-ai.single-courses #headerimg,
body.wp-child-theme-twentytwentyfive-ai.page-template-page-course-detail #header,
body.wp-child-theme-twentytwentyfive-ai.page-template-page-course-detail #headerimg,
body.wp-child-theme-twentytwentyfive-ai.ai-lesson-view-page #header,
body.wp-child-theme-twentytwentyfive-ai.ai-lesson-view-page #headerimg {
  display: none !important;
}

/* Inside #page, remove the legacy #header block and the <hr> directly after it on course + lesson layouts */
body.wp-child-theme-twentytwentyfive-ai.single-courses #page > #header,
body.wp-child-theme-twentytwentyfive-ai.page-template-page-course-detail #page > #header,
body.wp-child-theme-twentytwentyfive-ai.ai-lesson-view-page #page > #header {
  display: none !important;
}

body.wp-child-theme-twentytwentyfive-ai.single-courses #page > #header + hr,
body.wp-child-theme-twentytwentyfive-ai.page-template-page-course-detail #page > #header + hr,
body.wp-child-theme-twentytwentyfive-ai.ai-lesson-view-page #page > #header + hr {
  display: none !important;
  margin: 0 !important;
  border: 0 !important;
  height: 0 !important;
}

/* Hide legacy header image block on AI Empire front-page login */
body.wp-child-theme-twentytwentyfive-ai.home #headerimg {
  display: none !important;
}

/* Hide stray top <hr> on AI Empire front-page login */
body.wp-child-theme-twentytwentyfive-ai.home .wp-site-blocks > hr:first-of-type {
  display: none !important;
}

/* Remove "AI Empire is proudly powered by WordPress" footer and the <hr> above it */
#footer[role="contentinfo"],
div#footer {
  display: none !important;
}
#page > *:has(+ #footer) {
  display: none !important;
  margin: 0 !important;
  border: 0 !important;
  height: 0 !important;
}

/* Fallback: hide all <hr> on the AI Empire front-page login */
body.wp-child-theme-twentytwentyfive-ai.home hr {
  display: none !important;
  margin: 0 !important;
  border: 0 !important;
  height: 0 !important;
}

/* Hide stray top <hr> just under header on single course + course detail templates */
body.wp-child-theme-twentytwentyfive-ai.single-courses .wp-site-blocks > hr:first-of-type,
body.wp-child-theme-twentytwentyfive-ai.page-template-page-course-detail .wp-site-blocks > hr:first-of-type {
  display: none !important;
  margin: 0 !important;
  border: 0 !important;
  height: 0 !important;
}

/* ============================
 * AI Empire Login Page
 * ============================ */
body.wp-theme-twentytwentyfive.wp-child-theme-twentytwentyfive-ai .ai-login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #f4ecef 0%, #efe7ea 100%);
  position: relative;
  overflow: hidden;
  margin: 0;
}

.ai-login-page::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 50%;
  opacity: 1;
  border-width: 1.2px;
  border-style: solid;
  border-image-slice: 1;
  border-image-source: radial-gradient(47.67% 47.86% at 50% 50%, rgba(67, 2, 29, 0.1) 66.58%, rgba(67, 2, 29, 0) 100%);
  mix-blend-mode: hard-light;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  z-index: 0;
  background-image: url('http://localhost:8083/wp-content/uploads/2026/02/Pattern.png');
}

.ai-login-page::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(to top, rgba(180, 140, 150, 0.08), transparent);
  pointer-events: none;
}

.ai-login-navbar {
  width: 92%;
  margin: 20px auto 0;
  z-index: 1;
}

.ai-login-navbar-inner {
  background: #ffffff;
  border-radius: 18px;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.07);
}

.ai-login-logo {
  display: inline-block;
  text-decoration: none;
  line-height: 0;
}

.ai-login-logo-img {
  display: block;
  width: 129px;
  height: auto;
  max-width: 100%;
  max-height: 59px;
  object-fit: contain;
  opacity: 1;
  transform: none;
}

.ai-login-nav-links {
  display: flex;
  gap: 28px;
  font-size: 0.95rem;
}

.ai-login-nav-links a {
  text-decoration: none;
  color: #333333;
  font-weight: 500;
}

.ai-login-navbar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 164px;
  height: 40px;
  background: linear-gradient(240.67deg, #F61B47 -7.27%, #43021D 89.3%);
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 6px 15px rgba(211, 19, 69, 0.3);
}

.ai-login-navbar-button i[class^="ai-"],
.ai-login-navbar-button i[class*=" ai-"] {
  font-size: 16px;
  line-height: 1;
  display: inline-block;
}

.ai-login-navbar-button span {
  display: inline-block;
}

.ai-login-wrapper {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 60px;
  position: relative;
  z-index: 1;
}

.ai-login-card {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  padding: 40px 40px 44px;
  border-radius: 22px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.08);
}

.ai-login-title {
  text-align: center;
  font-size: 1.75rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.ai-login-subtitle {
  text-align: center;
  color: #555555;
  margin-bottom: 30px;
  line-height: 1.5;
  font-size: 0.98rem;
}

/* Style Tutor login fields inside our card */
.ai-login-card .tutor-login-form-wrapper {
  margin: 0;
}

.ai-login-card .tutor-form-control {
  width: 100%;
  border-radius: 14px;
  border: 1px solid #e5e5e5;
  padding: 14px 16px;
  font-size: 0.94rem;
}

.ai-login-card .tutor-form-control:focus {
  border-color: #d31345;
  box-shadow: 0 0 0 3px rgba(211, 19, 69, 0.12);
}

.ai-password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.ai-password-input-wrap .tutor-form-control {
  padding-right: 42px;
}

.ai-password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: #999999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ai-password-toggle i[class^="ai-"],
.ai-password-toggle i[class*=" ai-"] {
  font-size: 18px;
  line-height: 1;
}

.ai-password-toggle:focus-visible {
  outline: 2px solid #d31345;
  outline-offset: 2px;
}

.ai-login-card .tutor-mb-20,
.ai-login-card .tutor-mb-32 {
  margin-bottom: 22px !important;
}

.ai-login-card .tutor-d-flex.tutor-justify-between.tutor-align-center.tutor-mb-40 {
  margin: 12px 0 24px !important;
  font-size: 0.9rem;
}

.ai-login-card .tutor-btn-primary.tutor-btn-block {
  width: 100%;
  border-radius: 14px;
  padding: 14px 0;
  background: linear-gradient(240.67deg, #F61B47 -7.27%, #43021D 89.3%);
  box-shadow: 0 10px 25px rgba(211, 19, 69, 0.3);
  border: none;
  font-size: 1rem;
}

.ai-login-card .tutor-text-center.tutor-fs-6.tutor-color-secondary.tutor-mt-20 {
  margin-top: 24px !important;
  font-size: 0.9rem;
}

.ai-login-card .tutor-btn-link {
  color: #d31345;
  text-decoration: none;
  font-weight: 600;
}

/* Login form labels */
.ai-login-form-group .ai-login-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: #333333;
  margin-bottom: 6px;
}

/* Responsive tweaks for login layout */
@media (max-width: 900px) {
  .ai-login-navbar {
    width: 96%;
    margin-top: 5px;
  }

  .ai-login-navbar-inner {
    padding: 12px 18px;
    gap: 12px;
    flex-wrap: wrap;
  }

  .ai-login-nav-links {
    gap: 18px;
    font-size: 0.9rem;
    flex-wrap: wrap;
  }

  .ai-login-wrapper {
    padding: 2rem 16px 44px;
  }

  /* Slightly shrink the login card on mobile (~80% of original size) */
  .ai-login-card {
    transform: scale(0.8);
    transform-origin: top center;
  }

  .ai-login-card {
    padding: 30px 24px 34px;
  }

  .ai-login-title {
    font-size: 1.55rem;
  }
}

@media (max-width: 640px) {
  .ai-login-navbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .ai-login-nav-links {
    width: 100%;
    justify-content: flex-start;
    row-gap: 6px;
  }

  .ai-login-navbar-button {
    align-self: stretch;
    text-align: center;
  }

  .ai-login-logo-img {
    width: 120px;
    max-width: 60vw;
  }

  .ai-login-wrapper {
    padding: 2rem 14px 36px;
  }

  .ai-login-card {
    padding: 26px 18px 30px;
    border-radius: 18px;
  }

  .ai-login-subtitle {
    font-size: 0.9rem;
  }
}

/* ============================
 * Tutor LMS Dashboard (AI Empire) — reference design
 * ============================ */
.ai-dashboard {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
  background: #f5eef1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Right side: topbar (full width) + main content */
.ai-dashboard .dashboard-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

/* Topbar to the right of sidebar, full width of right area, white like sidebar */
.ai-dashboard .topbar {
  width: 100%;
  flex-shrink: 0;
  background: #fff;
  padding: 16px 24px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.ai-dashboard .topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 100%;
  margin: 0 auto;
}

/* Remove ::before on .ai-dashboard that takes space on the left */
.ai-dashboard::before {
  display: none !important;
  content: none !important;
}

.ai-dashboard .sidebar {
  width: 240px;
  background: #fff;
  padding: 16px 20px 30px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

/* Remove any ::before that steals left space in sidebar */
.ai-dashboard .sidebar::before,
.ai-dashboard .sidebar .menu::before,
.ai-dashboard .sidebar .menu a::before,
.ai-dashboard .sidebar .logo::before,
.ai-dashboard .sidebar .menu-title::before {
  display: none !important;
  content: none !important;
}

.ai-dashboard .logo {
  margin-bottom: 40px;
  text-align: center;
}

.ai-dashboard .logo a {
  display: inline-block;
  text-decoration: none;
}

.ai-dashboard .logo .logo-img {
  display: block;
  height: 56px;
  width: auto;
  object-fit: contain;
  margin-left: auto;
  margin-right: auto;
}

.ai-dashboard .menu {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ai-dashboard .menu a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #444;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 15px;
  transition: 0.2s;
}

.ai-dashboard .menu .menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: #666;
  transition: color 0.2s;
  line-height: 1;
  margin-top: -0.15em;
}

.ai-dashboard .menu a:hover .menu-icon,
.ai-dashboard .menu a.active .menu-icon {
  color: #b3002d;
}

.ai-dashboard .menu a:hover {
  background: #f8dce3;
}

.ai-dashboard .menu a.active {
  background: #f8dce3;
  color: #b3002d;
  font-weight: 600;
}

.ai-dashboard .menu-title {
  margin-top: 30px;
  margin-bottom: 10px;
  font-size: 12px;
  color: #999;
  text-transform: uppercase;
}

.ai-dashboard .main {
  flex: 1;
  padding: 16px 40px 30px;
  overflow: auto;
}


.ai-dashboard .search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 32.5rem;
}

.ai-dashboard .search-wrap .search {
  width: 100%;
  height: 3.125rem;      /* 50px */
  padding: 0.875rem 2.5rem 0.875rem 1rem; /* space on right for icon */
  border-radius: 0.75rem; /* 12px */
  border: 1px solid #ddd;
  background: white;
  font-size: 0.9375rem; /* 15px */
  box-sizing: border-box;
}

.ai-dashboard .search-wrap .search-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.125rem;
  color: #888;
  pointer-events: none;
}

.ai-dashboard .profile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.ai-dashboard .profile img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.ai-dashboard .profile span {
  font-weight: 500;
  color: #333;
}

.ai-dashboard .dropdown {
  position: absolute;
  top: 55px;
  right: 0;
  background: white;
  width: 180px;
  border-radius: 14px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
  padding: 10px 0;
  display: none;
  animation: aiDashboardDropdownFade 0.2s ease;
  z-index: 50;
}

@keyframes aiDashboardDropdownFade {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.ai-dashboard .dropdown a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 10px 16px;
  text-decoration: none;
  color: #333;
  font-size: 14px;
}

.ai-dashboard .dropdown a i {
  font-size: 1rem;
  width: 1rem;
  flex-shrink: 0;
  opacity: 0.85;
}

.ai-dashboard .dropdown a:hover {
  background: #f5f5f5;
}

.ai-dashboard .dropdown a.logout {
  color: #d31345;
  font-weight: 500;
}

.ai-dashboard .dropdown a.logout i {
  opacity: 1;
}

.ai-dashboard .header {
  margin-bottom: 20px;
}

.ai-dashboard .header p {
  font-size: 15px;
  color: #555;
  margin: 0 0 5px 0;
}

.ai-dashboard .header h2 {
  font-size: 28px;
  color: #b3002d;
  margin: 0 0 20px 0;
  font-weight: 700;
}

.ai-dashboard .banner {
  position: relative;
  background: linear-gradient(240.67deg, #F61B47 -7.27%, #43021D 89.3%);
  padding: 40px;
  border-radius: 20px;
  color: white;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.ai-dashboard .banner-content {
  flex: 1;
  min-width: 0;
}

.ai-dashboard .banner small {
  opacity: 0.8;
  letter-spacing: 1px;
  font-size: 12px;
  text-transform: uppercase;
}

.ai-dashboard .banner h1 {
  margin: 10px 0 20px 0;
  font-size: 30px;
  font-weight: 700;
}

.ai-dashboard .banner-btn {
  display: inline-block;
  padding: 12px 22px;
  border: none;
  border-radius: 14px;
  background: white;
  color: #7a001c;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-size: 15px;
  transition: opacity 0.2s;
}

.ai-dashboard .banner-btn:hover {
  opacity: 0.95;
  color: #7a001c;
}

/* Right 50% of banner: container for randomly placed sparkles (half icons at edges) */
.ai-dashboard .banner-icons-right {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 50%;
  pointer-events: none;
  overflow: hidden;
}

.ai-dashboard .banner-sparkle {
  position: absolute;
  color: rgba(255, 255, 255, 0.22);
  font-weight: 100;
  -webkit-text-stroke: 0.125px rgba(255, 255, 255, 0.22);
  text-stroke: 0.125px rgba(255, 255, 255, 0.22);
}

/* Half thickness: minimal stroke */
.ai-dashboard .banner .banner-sparkle {
  font-weight: 100;
}

/* Sizes doubled; shifted right; some at top/bottom so half icon is clipped */
.ai-dashboard .banner-sparkle-1 { left: 30%;  top: -16%; font-size: 4rem; }
.ai-dashboard .banner-sparkle-2 { left: 58%; top: 52%; font-size: 5rem; }
.ai-dashboard .banner-sparkle-3 { left: 78%; top: -14%; font-size: 4.4rem; }
.ai-dashboard .banner-sparkle-4 { left: 94%; top: 38%; font-size: 4.8rem; }
.ai-dashboard .banner-sparkle-5 { left: 96%; bottom: -18%; font-size: 4.2rem; }

.ai-dashboard .stats {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.ai-dashboard .stats .card.stat-card {
  flex: 1;
  min-width: 160px;
  background: white;
  padding: 1.5rem 1.25rem;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  position: relative;
}

.ai-dashboard .stat-card-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.ai-dashboard .stat-card-icon i {
  font-size: 1.25rem;
  color: #fff;
}

.ai-dashboard .stat-card-icon-enrolled {
  background: linear-gradient(135deg, #7a001c, #d31345);
}

.ai-dashboard .stat-card-icon-active {
  background: linear-gradient(135deg, #1a5f4a, #1CB275);
}

.ai-dashboard .stat-card-icon-completed {
  background: linear-gradient(135deg, #2d3748, #4a5568);
}

.ai-dashboard .stats .card h3 {
  font-size: 0.9375rem;
  margin-bottom: 0.5rem;
  color: #555;
  font-weight: 500;
}

.ai-dashboard .stats .card .number {
  font-size: 1.75rem;
  font-weight: 700;
  color: #222;
}

/* Dashboard section + Popular Courses */
.ai-dashboard .dashboard-section {
  margin-top: 1.5rem;
}

.ai-dashboard .dashboard-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ai-dashboard .dashboard-section-title i {
  font-size: 1.25rem;
  color: #b3002d;
}

.ai-dashboard .popular-courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.ai-dashboard .course-card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.ai-dashboard .course-card:hover {
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
}

.ai-dashboard .course-card-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f0f0f0;
}

.ai-dashboard .course-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ai-dashboard .course-card-thumb-placeholder {
  width: 100%;
  height: 100%;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8e0e3 0%, #f5eef1 100%);
}

.ai-dashboard .course-card-thumb-placeholder i {
  font-size: 2.5rem;
  color: rgba(179, 0, 45, 0.35);
}

.ai-dashboard .course-card-body {
  padding: 1rem 1.25rem;
}

.ai-dashboard .course-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-dashboard .course-card-title a {
  display: block;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-dashboard .course-card-title a:hover {
  color: #b3002d;
}

.ai-dashboard .course-card-learn-btn {
  display: block;
  width: 100%;
  padding: 0.75rem 1.25rem;
  text-align: center;
  border-radius: 0 0 1rem 1rem;
  background: linear-gradient(135deg, #7a001c, #d31345);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}

.ai-dashboard .course-card-learn-btn:hover {
  opacity: 0.92;
  color: #fff;
}

.ai-dashboard .course-card-progress {
  height: 6px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.ai-dashboard .course-card-progress-bar {
  height: 100%;
  background: linear-gradient(135deg, #7a001c, #d31345);
  border-radius: 4px;
  transition: width 0.3s;
}

.ai-dashboard .course-card-meta {
  font-size: 0.8125rem;
  color: #777;
  margin-bottom: 0.5rem;
}

.ai-dashboard .course-card-link {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #b3002d;
  text-decoration: none;
}

.ai-dashboard .course-card-link:hover {
  text-decoration: underline;
}

.ai-dashboard .course-card-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.ai-dashboard .course-card-author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.ai-dashboard .course-card-author-name {
  font-size: 0.8125rem;
  color: #555;
  font-weight: 500;
}

/* Remove global padding/margins around Tutor dashboard/layout */
body.tutor-screen-frontend-dashboard .wp-site-blocks {
  padding: 0;
}

body.tutor-screen-frontend-dashboard main.wp-block-group {
  margin-top: 0 !important;
}

@media (max-width: 767px) {
  body.tutor-screen-frontend-dashboard {
    padding-bottom: 0;
  }
}

.tutor-dashboard.tutor-frontend-dashboard .tutor-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0;
}

/* ── Dashboard sidebar: mobile header (logo + hamburger) ── */
/* Hidden on desktop */
.ai-dashboard .sidebar-mobile-header {
  display: none;
}

/* Hamburger toggle button */
.ai-dashboard .sidebar-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1.5px solid #e5c0cd;
  border-radius: 10px;
  cursor: pointer;
  color: #b3002d;
  font-size: 1.25rem;
  line-height: 1;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}
.ai-dashboard .sidebar-toggle-btn:hover,
.ai-dashboard .sidebar-toggle-btn[aria-expanded="true"] {
  background: #f8dce3;
  border-color: #b3002d;
}

/* Icon visibility: show burger SVG by default, hide Akar cross */
.ai-dashboard .sidebar-toggle-btn .sidebar-icon-open  { display: block; }
.ai-dashboard .sidebar-toggle-btn .sidebar-icon-close { display: none;  }

/* Swap when the menu is open */
.ai-dashboard .sidebar.is-open .sidebar-toggle-btn .sidebar-icon-open  { display: none;   }
.ai-dashboard .sidebar.is-open .sidebar-toggle-btn .sidebar-icon-close { display: inline; }

@media (max-width: 900px) {
  .ai-dashboard {
    flex-direction: column;
  }

  /* Sidebar becomes a sticky top bar */
  .ai-dashboard .sidebar {
    width: 100%;
    flex-direction: column;
    padding: 0;
    margin-bottom: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }

  /* Show mobile header row: logo on the left, burger on the right */
  .ai-dashboard .sidebar-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff;
  }

  .ai-dashboard .logo {
    margin-bottom: 0;
    width: auto;
  }

  /* Menu: hidden by default on mobile */
  .ai-dashboard .menu {
    display: none;
    flex-direction: column;
    flex-wrap: nowrap;
    width: 100%;
    background: #fff;
    border-top: 1px solid #f0e0e6;
    padding: 12px 16px 16px;
    gap: 6px;
    box-shadow: 0 4px 16px rgba(180, 0, 60, 0.07);
    animation: aiMenuSlideDown 0.22s ease;
  }

  /* Revealed when sidebar gains .is-open */
  .ai-dashboard .sidebar.is-open .menu {
    display: flex;
  }

  @keyframes aiMenuSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .ai-dashboard .menu a,
  .ai-dashboard .menu .menu-link-settings {
    width: 100%;
    box-sizing: border-box;
  }

  .ai-dashboard .menu-title {
    width: 100%;
    margin-top: 8px;
  }

  .ai-dashboard .main {
    padding: 20px 16px;
  }

  .ai-dashboard .dashboard-section.popular-courses {
    margin-bottom: 2rem;
  }

  .ai-dashboard .topbar {
    padding: 12px 16px;
  }
  .ai-dashboard .topbar-inner {
    flex-wrap: wrap;
    gap: 12px;
  }

  .ai-dashboard .search {
    width: 100%;
    max-width: 100%;
  }

  .ai-dashboard .stats {
    flex-direction: column;
  }

  .ai-dashboard .stats .card {
    min-width: 0;
  }
}


/* ============================
 * Hide Droip header/footer on AI Empire custom page templates
 * ============================ */
body.page-template-page-course-detail .droip-s35-workademy_dpywzo6x,
body.page-template-page-course-detail footer#footer[data-droip],
/* Hide default site header and <hr> on AI Dashboard (we use our own sidebar + main). */
body.page-template-page-ai-dashboard .wp-site-blocks > *:first-child,
body.page-template-page-ai-dashboard #header,
body.page-template-page-ai-dashboard #headerimg,
body.page-template-page-ai-dashboard #page > #header,
body.page-template-page-ai-dashboard #page > #header + hr,
body.page-template-page-ai-dashboard .wp-site-blocks > hr:first-of-type {
  display: none !important;
  margin: 0 !important;
}
body.page-template-page-ai-dashboard .wp-site-blocks {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Remove empty space above dashboard: main and block wrappers */
body.page-template-page-ai-dashboard main,
body.page-template-page-ai-dashboard .wp-block-group {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Compensate for WordPress admin bar so sidebar/searchbar sit at top */
body.admin-bar.page-template-page-ai-dashboard .ai-dashboard {
  margin-top: -32px;
}
@media screen and (max-width: 782px) {
  body.admin-bar.page-template-page-ai-dashboard .ai-dashboard {
    margin-top: -46px;
  }
}

/* Hide default page header and <hr> on regular pages (body.page). */
body.page .wp-site-blocks > *:first-child,
body.page #header,
body.page #headerimg,
body.page #page > #header,
body.page #page > #header + hr,
body.page .wp-site-blocks > hr:first-of-type {
  display: none !important;
  margin: 0 !important;
}
body.page .wp-site-blocks {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

body.page-template-page-ai-dashboard .droip-s35-workademy_dpywzo6x,
body.page-template-page-ai-dashboard footer#footer[data-droip],
body.page-template-page-lesson-view .droip-s35-workademy_dpywzo6x,
body.page-template-page-lesson-view footer#footer[data-droip],
body.ai-lesson-view-page .droip-s35-workademy_dpywzo6x,
body.ai-lesson-view-page footer#footer[data-droip],
body.ai-lesson-view-page #page > footer,
body.ai-lesson-view-page footer[role="contentinfo"],
body.ai-lesson-view-page .wp-site-blocks > footer,
body.ai-lesson-view-page footer {
  display: none !important;
}
body.page-template-page-checkout-custom .droip-s35-workademy_dpywzo6x,
body.page-template-page-checkout-custom footer#footer[data-droip] {
  display: none !important;
}

/* ============================
 * AI Shared Navbar (used on Course Detail, Dashboard, Lesson, Checkout)
 * ============================ */
.ai-nav-wrapper {
  width: 92%;
  margin: 20px auto 0;
  position: relative;
  z-index: 100;
}

.ai-nav-inner {
  background: var(--ai-white);
  border-radius: var(--ai-radius-xl);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--ai-shadow-nav);
  gap: 16px;
}

.ai-nav-logo { display: inline-block; flex-shrink: 0; }

.ai-nav-logo-img {
  display: block;
  height: 44px;
  width: auto;
  object-fit: contain;
}

.ai-nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  justify-content: center;
}

.ai-nav-link {
  text-decoration: none;
  color: var(--ai-black);
  font-size: 16px;
  font-weight: 400;
  font-family: var(--ai-font);
  transition: color 0.2s;
}

.ai-nav-link:hover,
.ai-nav-link.is-active { color: var(--ai-rose); }

.ai-nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.ai-nav-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ai-black);
  font-size: 22px;
  text-decoration: none;
  width: 40px;
  height: 40px;
}

.ai-nav-cart-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--ai-dark-maroon);
  color: var(--ai-white);
  font-size: 10px;
  font-weight: 400;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ai-font);
}

.ai-nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.ai-nav-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--ai-avatar-bg);
  flex-shrink: 0;
}

.ai-nav-username {
  font-size: 16px;
  font-weight: 400;
  color: var(--ai-black);
  font-family: var(--ai-font);
  white-space: nowrap;
}

.ai-nav-chevron { font-size: 16px; color: var(--ai-black); }

.ai-nav-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ai-grad);
  color: var(--ai-white) !important;
  padding: 10px 20px;
  border-radius: var(--ai-radius-md);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 6px 15px rgba(211,19,69,0.3);
  font-family: var(--ai-font);
}

.ai-nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--ai-black);
  cursor: pointer;
  padding: 4px;
  align-items: center;
  justify-content: center;
}

@media (max-width: 900px) {
  .ai-nav-wrapper { width: 96%; margin-top: 16px; }
  .ai-nav-inner   { padding: 12px 20px; flex-wrap: wrap; gap: 12px; }
  .ai-nav-links   { order: 3; width: 100%; justify-content: flex-start; flex-wrap: wrap; gap: 16px; display: none; }
  .ai-nav-links.is-open { display: flex; }
  .ai-nav-actions { margin-left: auto; }
  .ai-nav-toggle  { display: inline-flex; }
}

@media (max-width: 640px) {
  .ai-nav-links    { gap: 12px; }
  .ai-nav-username { display: none; }
  .ai-nav-chevron  { display: none; }
}

/* ============================
 * Shared Buttons
 * ============================ */
.ai-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ai-white);
  color: var(--ai-dark-maroon);
  font-size: 16px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--ai-radius-md);
  text-decoration: none;
  font-family: var(--ai-font);
  transition: opacity 0.2s;
}
.ai-btn-primary:hover { opacity: 0.92; color: var(--ai-dark-maroon); }

.ai-btn-gradient {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ai-grad);
  color: var(--ai-white) !important;
  font-size: 16px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--ai-radius-md);
  text-decoration: none;
  font-family: var(--ai-font);
  box-shadow: 0 10px 25px rgba(211,19,69,0.3);
  transition: opacity 0.2s;
  border: none;
  cursor: pointer;
}
.ai-btn-gradient:hover { opacity: 0.9; color: var(--ai-white); }

/* ============================
 * Course Detail Page
 * ============================ */
.ai-course-page {
  min-height: 100vh;
  background: #f4eff1;
}

/* When logged in, WordPress adds a 32px (or 46px on small screens) top margin
   to the <html> element for the admin bar. That creates visible empty space
   above our hero. Counteract that only on AI course layouts so the hero
   aligns with the top of the viewport. */
body.admin-bar.wp-child-theme-twentytwentyfive-ai.single-courses .ai-course-page,
body.admin-bar.wp-child-theme-twentytwentyfive-ai.page-template-page-course-detail .ai-course-page {
  margin-top: -32px;
}

@media (max-width: 782px) {
  body.admin-bar.wp-child-theme-twentytwentyfive-ai.single-courses .ai-course-page,
  body.admin-bar.wp-child-theme-twentytwentyfive-ai.page-template-page-course-detail .ai-course-page {
    margin-top: -46px;
  }
}

/* Hero */
.ai-course-hero {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 520px;
  display: block;
  margin-top: 0;
}

.ai-course-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(120,0,30,0.9) 0%,
    rgba(120,0,30,0.85) 40%,
    rgba(120,0,30,0.6) 70%,
    rgba(120,0,30,0.2) 100%
  );
}

.ai-course-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 30px 0 80px;
}

/* On course detail view, pull the navbar up to the very top of the hero */
.ai-course-page .ai-nav-wrapper {
  margin-top: 0;
}

.ai-course-hero-grid {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 0 1rem;
}

.ai-course-hero-left {
  flex: 1 1 360px;
  max-width: 520px;
}

/* Breadcrumb */
.ai-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  margin-bottom: 20px;
  font-family: var(--ai-font);
}
.ai-breadcrumb a { color: rgba(255,255,255,0.65); text-decoration: none; }
.ai-breadcrumb a:hover { color: var(--ai-white); }
.ai-breadcrumb-sep { opacity: 0.5; font-size: 12px; }

/* Course title & description */
.ai-course-hero-title {
  font-family: var(--ai-font);
  font-weight: 600;
  font-size: 72px;
  line-height: 1;
  letter-spacing: 0.06em;
  margin: 0 0 25px;
  background: linear-gradient(97.67deg, #ffffff 8.18%, rgba(255,255,255,0.4) 119.82%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ai-course-hero-desc {
  font-family: var(--ai-font);
  font-weight: 500;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.9);
  margin: 0 0 30px;
  max-width: 520px;
}

/* Metadata pills row */
.ai-course-meta-pills {
  display: flex;
  gap: 25px;
  font-size: 14px;
  margin-bottom: 35px;
  opacity: 0.9;
}

.ai-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--ai-font);
}
.ai-meta-pill i { font-size: 14px; }

.ai-meta-divider {
  display: inline-block;
  width: 1px;
  height: 24px;
  background: rgba(255,255,255,0.40);
  margin: 0 8px;
  vertical-align: middle;
}

/* Price + CTA */
.ai-course-hero-footer {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.ai-course-price {
  font-size: 32px;
  font-weight: 700;
  color: var(--ai-white);
  font-family: var(--ai-font);
}

.ai-course-hero-btn {
  width: 307px;
  height: 56px;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 12px;
}

.ai-course-video-card {
  position: relative;
  flex: 1 1 420px;
  max-width: 592px;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  background-color: #111111;
  background-size: cover;
  background-position: center;
  box-shadow: 0 30px 70px rgba(0,0,0,0.35);
  overflow: hidden;
}

.ai-course-video-inner,
.ai-course-video-inner iframe,
.ai-course-video-inner video {
  width: 100%;
  height: 100%;
}

.ai-course-video-inner iframe,
.ai-course-video-inner video {
  display: block;
}

/* Mobile duplicate video block (above lessons) */
.ai-course-video-card-mobile {
  display: none;
  position: relative;
  width: 100%;
  max-width: 960px;
  margin: 24px auto 32px auto;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  background-color: #111111;
  background-size: cover;
  background-position: center;
  box-shadow: 0 30px 70px rgba(0,0,0,0.35);
  overflow: hidden;
}

.ai-course-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  cursor: pointer;
}

/* Course body (below hero) */
.ai-course-body { padding: 0 0 64px; }

.ai-course-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Overview / Description */
.ai-course-description {
  font-size: 16px;
  line-height: 1.8;
  color: var(--ai-text-medium);
  font-family: var(--ai-font);
  max-width: 720px;
}

/* Lessons block (curriculum) */
.ai-lessons {
  margin: 2rem auto 80px auto;
}

.ai-lessons-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.ai-lessons-title {
  font-size: 28px;
  font-weight: 600;
  font-family: var(--ai-font);
  color: var(--ai-text-dark);
}

.ai-lessons-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-family: var(--ai-font);
}

.ai-lessons-progress-text {
  font-size: 14px;
  color: var(--ai-text-medium);
}

.ai-lessons-progress-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 4px solid rgba(161, 0, 44, 0.18);
  position: relative;
  overflow: hidden;
}

.ai-lessons-progress-circle::before {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  background:
    conic-gradient(
      #a1002c var(--ai-progress, 0%),
      transparent 0
    );
}

.ai-lesson-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px 25px;
  margin-bottom: 20px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.ai-lesson-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.ai-lesson-card-title {
  font-size: 16px;
  font-weight: 600;
  font-family: var(--ai-font);
  color: var(--ai-text-dark);
}

.ai-lesson-card-meta {
  font-size: 14px;
  color: #777777;
  margin-top: 4px;
  font-family: var(--ai-font);
}

.ai-lesson-card-toggle {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
}

.ai-lesson-items {
  margin-top: 20px;
  list-style: none;
  padding: 0;
  display: none;
}

.ai-lesson-items.is-open {
  display: block;
}

.ai-lesson-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #eeeeee;
  font-size: 14px;
  font-family: var(--ai-font);
  color: var(--ai-text-medium);
}

.ai-lesson-row:last-child {
  border-bottom: none;
}

.ai-lesson-row-title {
  text-decoration: none;
  color: inherit;
}

.ai-lesson-row-meta {
  color: var(--ai-text-muted);
}

.ai-lesson-row.is-quiz .ai-lesson-row-title {
  color: #a1002c;
  font-weight: 600;
}

.ai-lessons-empty {
  font-family: var(--ai-font);
  color: var(--ai-text-muted);
}

/* Let Tutor's course-topics markup visually match our card style */
.ai-lessons-topics .tutor-accordion-item {
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  border: none;
  margin-bottom: 20px;
}

.ai-lessons-topics .tutor-accordion-item-header {
  font-family: var(--ai-font);
  font-size: 16px;
  padding: 18px 20px;
  margin: 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.ai-topic-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ai-topic-icon {
  width: 57px;
  height: 57px;
  border-radius: 10px;
  background: linear-gradient(240.67deg, #F61B47 -7.27%, #43021D 89.3%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
}

.ai-topic-icon i {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.ai-topic-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-topic-title {
  font-family: var(--ai-font);
  font-weight: 500;
  font-size: 24px;
  line-height: 32px;
  letter-spacing: 0;
  color: #111111;
}

.ai-topic-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-family: var(--ai-font);
  font-weight: 400;
  font-size: 18px;
  line-height: 24px;
  letter-spacing: 0;
  color: #777777;
}

.ai-topic-meta-sep {
  margin: 0 4px;
}

@media (max-width: 640px) {
  .ai-lessons-topics .tutor-accordion-item-header {
    padding: 14px 14px 16px;
  }

  .ai-topic-title {
    font-size: 18px;
    line-height: 24px;
  }

  .ai-topic-meta {
    font-size: 14px;
    line-height: 20px;
  }

  .ai-topic-icon {
    width: 48px;
    height: 48px;
  }
}

.ai-lessons-topics .tutor-course-content-list-item {
  font-family: var(--ai-font);
}

/* Course Detail — top navbar (inside hero) */
.ai-course-page .navbar-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 25px;
  margin-bottom: 24px;
  padding: 0 16px;
}

.ai-course-page .navbar {
  width: 100%;
  max-width: 1280px;
  min-height: 64px;
  padding: 10px 24px;
  gap: 10px;

  background: #ffffff;
  border-radius: 20px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.ai-course-page .logo {
  text-align: center;
}

.ai-course-page .logo img {
  width: 120px;
  height: auto;
}

.ai-course-page .nav-links a {
  text-decoration: none;
  margin: 0 18px;
  color: #333333;
  font-weight: 500;
  font-family: var(--ai-font);
}

.ai-course-page .nav-links a.is-active {
  color: var(--ai-rose);
}

.ai-course-page .nav-right {
  display: flex;
  align-items: center;
  gap: 25px;
}

.ai-course-page .cart-icon {
  color: #000000;
  font-size: 20px;
}

.ai-course-page .cart-icon a {
  color: inherit;
  text-decoration: none;
}

.ai-course-page .profile {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
  font-family: var(--ai-font);
  color: #333333;
  text-decoration: none;
}

/* Extend hover area below avatar so moving into dropdown
   doesn't immediately leave the .profile hover zone */
.ai-course-page .profile::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 56px;
}

.ai-course-page .profile img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.ai-course-page .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  margin-top: 8px;
  right: 0;
  background: #ffffff;
  border-radius: 12px;
  padding: 10px 0;
  width: 150px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  z-index: 10;
}

.ai-course-page .dropdown a {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
  color: #333333;
  font-size: 14px;
}

.ai-course-page .dropdown a:hover {
  background: #f5f5f5;
}

.ai-course-page .profile:hover .dropdown,
.ai-course-page .profile .dropdown:hover {
  display: block;
}

/* Navbar responsive behaviour on smaller screens */
@media (max-width: 900px) {
  .ai-course-page .navbar-wrapper {
    margin-top: 16px;
    padding: 0 12px;
  }

  .ai-course-page .navbar {
    padding: 10px 16px;
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .ai-course-page .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    margin-top: 4px;
    column-gap: 16px;
    row-gap: 4px;
    text-align: center;
  }

  .ai-course-page .nav-right {
    margin-left: auto;
  }
}

@media (max-width: 640px) {
  .ai-course-page .navbar {
    padding: 8px 12px;
  }

  .ai-course-page .nav-links a {
    margin: 0 10px;
    font-size: 14px;
  }

  .ai-course-page .nav-right {
    gap: 16px;
  }

  .ai-course-page .profile span {
    display: none;
  }
}

/* Instructor card */
.ai-instructor-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--ai-white);
  border-radius: var(--ai-radius-xl);
  padding: 24px;
  box-shadow: var(--ai-shadow-card);
  max-width: 580px;
}
.ai-instructor-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--ai-avatar-bg);
  flex-shrink: 0;
}
.ai-instructor-name  { font-size: 18px; font-weight: 600; color: var(--ai-text-dark); margin: 0 0 4px; font-family: var(--ai-font); }
.ai-instructor-role  { font-size: 14px; color: var(--ai-text-muted); margin: 0 0 12px; font-family: var(--ai-font); }
.ai-instructor-bio   { font-size: 14px; line-height: 1.7; color: var(--ai-text-medium); margin: 0; font-family: var(--ai-font); }

/* Course detail responsive */
@media (max-width: 1024px) {
  /* On tablets & smaller, always move video out of hero */
  .ai-course-hero .ai-course-video-card {
    display: none !important;
  }
  .ai-course-video-card-mobile {
    display: block !important;
  }
}

@media (max-width: 900px) {
  .ai-course-hero         { min-height: 360px; }
  .ai-course-hero-inner   { margin: 40px auto 0 auto; padding: 24px 16px 64px; }
  .ai-course-hero-grid    { flex-direction: column; gap: 24px; margin: 0; }
  .ai-course-hero-left    { max-width: 80%; margin: 0 auto; }
  .ai-course-hero-title   { font-size: 36px; }
  .ai-course-hero-desc    { font-size: 16px; }
  .ai-course-container    { padding: 0 20px; }
  .ai-course-body         { padding: 32px 0 40px; }
  .ai-lessons             { margin: 80px auto 60px auto; }
}
@media (max-width: 640px) {
  .ai-course-hero-inner   { padding: 24px 12px 56px; }
  .ai-course-hero-grid    { margin: 0; }
  .ai-course-hero-left    { max-width: 80%; margin: 0 auto; }
  .ai-course-hero-title   { font-size: 30px; }
  .ai-course-price        { font-size: 24px; }
  .ai-btn-primary         { padding: 12px 20px; font-size: 14px; }
  .ai-lessons-header      { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ============================
 * Dashboard — stat card icon
 * (enhances existing .ai-dashboard-stat-card styles)
 * ============================ */
.ai-stat-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ai-light-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--ai-rose);
  margin-bottom: 10px;
}

.ai-dashboard-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.ai-dashboard-hero-play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ai-light-pink);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--ai-rose);
  transition: background 0.2s;
}
.ai-dashboard-hero-play:hover { background: #ffd6e3; }

/* Dashboard search icon wrapper */
.ai-dashboard-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 520px;
}
.ai-dashboard-search-wrap i {
  position: absolute;
  left: 14px;
  font-size: 18px;
  color: var(--ai-text-muted);
  pointer-events: none;
}
.ai-dashboard-search-input { padding-left: 40px; }

/* Dashboard user dropdown area */
.ai-dashboard-user { cursor: pointer; }

/* ============================
 * Lesson View Page
 * ============================ */
.ai-lesson-page {
  min-height: 100vh;
  background: var(--ai-bg);
  display: flex;
  flex-direction: column;
}

/* New layout: course content design (header + page title + content grid) */
.ai-lesson-view-layout {
  background: #f5f1f2;
  font-family: var(--ai-font);
}

.ai-lesson-view-layout .ai-lesson-header-wrapper {
  padding: 25px 2% 0 2%;
}

/* Match course page navbar size and style */
.ai-lesson-view-layout .ai-lesson-header-wrapper .ai-nav-inner {
  max-width: 1280px;
  width: 100%;
  min-height: 64px;
  height: auto;
  margin: 0 auto;
  padding: 10px 24px;
  gap: 10px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.ai-lesson-view-layout .ai-lesson-header-wrapper .ai-nav-logo-img {
  width: 120px;
  height: auto;
}

.ai-lesson-container {
  width: 96%;
  max-width: none;
  margin: 40px auto;
  padding: 0 2%;
}

.ai-lesson-page-title {
  font-size: 40px;
  font-weight: 600;
  margin-bottom: 30px;
  color: #111;
  font-family: var(--ai-font);
}

.ai-lesson-content-grid {
  display: grid;
  grid-template-columns: 55% 1fr;
  gap: 40px;
  align-items: start;
}

/* Left: video card (only when has media) */
.ai-lesson-view-layout .ai-lesson-main {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ai-lesson-video-card {
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  overflow: hidden;
}

.ai-lesson-video-player {
  width: 100%;
  height: 420px;
  border-radius: 16px;
  background: #000;
  position: relative;
  overflow: hidden;
}

.ai-lesson-video-player iframe,
.ai-lesson-video-player video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
}

.ai-lesson-image-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.ai-lesson-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  cursor: pointer;
  transition: background 0.2s;
}

.ai-lesson-play-overlay:hover {
  background: rgba(0,0,0,0.2);
}

.ai-lesson-play-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: #fff;
}

.ai-lesson-video-info {
  margin-top: 20px;
  padding: 0 4px;
}

.ai-lesson-video-info-title {
  font-size: 20px;
  font-weight: 600;
  color: #111;
  margin: 0 0 4px;
  font-family: var(--ai-font);
}

.ai-lesson-video-info-meta {
  font-size: 14px;
  color: #777;
  font-family: var(--ai-font);
}

.ai-lesson-course-description {
  margin-top: 20px;
  color: #444;
  line-height: 1.6;
  font-size: 15px;
  font-family: var(--ai-font);
}

.ai-lesson-view-layout .ai-lesson-mark-complete {
  margin-top: 20px;
}

.ai-lesson-view-layout .ai-lesson-nav {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

/* Right: sidebar – modules with lessons */
/* Course Content as separate component (no card wrapper) */
.ai-lesson-view-layout .ai-lesson-sidebar {
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  height: fit-content;
  position: sticky;
  top: 24px;
  border: none;
  max-height: none;
}

.ai-lesson-module {
  border-bottom: 1px solid #eee;
  padding: 15px 0;
}

.ai-lesson-module:last-child {
  border-bottom: none;
}

.ai-lesson-module-title {
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 15px;
  color: #111;
  font-family: var(--ai-font);
  user-select: none;
}

.ai-lesson-module-title:hover {
  color: var(--ai-rose);
}

.ai-lesson-module-chevron {
  font-size: 14px;
  color: #777;
  transition: transform 0.2s;
}

.ai-lesson-module.is-open .ai-lesson-module-chevron {
  transform: rotate(-180deg);
}

.ai-lesson-lesson-list {
  margin-top: 10px;
  padding-left: 10px;
}

.ai-lesson-sidebar-lesson {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  padding: 8px 0;
  color: #555;
  text-decoration: none;
  font-family: var(--ai-font);
  transition: color 0.15s;
}

.ai-lesson-sidebar-lesson:hover {
  color: var(--ai-rose);
}

.ai-lesson-sidebar-lesson.is-active {
  font-weight: 500;
  color: #000;
}

.ai-lesson-sidebar-lesson-duration {
  font-size: 13px;
  color: #777;
  margin-left: 8px;
  flex-shrink: 0;
}

.ai-lesson-view-layout .ai-lesson-list-empty {
  padding: 20px 0;
  color: #777;
  font-size: 14px;
  margin: 0;
}

/* Lesson sidebar: reuse Course Content style (same as course detail) */
.ai-lesson-sidebar-course-content .ai-lessons-topics {
  margin: 0;
}

.ai-lesson-sidebar-course-content .tutor-course-content-title {
  font-family: var(--ai-font);
  font-size: 1.25rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 1.5rem;
}

.ai-lesson-sidebar-course-content .tutor-accordion-item-header {
  cursor: pointer;
}

.ai-lesson-sidebar-course-content .tutor-accordion-item {
  margin-bottom: 16px;
}

.ai-lesson-sidebar-course-content .tutor-course-content-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ai-lesson-sidebar-course-content .tutor-course-content-list-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.ai-lesson-sidebar-course-content .tutor-course-content-list-item:last-child {
  border-bottom: none;
}

.ai-lesson-sidebar-course-content .tutor-course-content-list-item .tutor-d-flex:first-child {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.ai-lesson-sidebar-course-content .tutor-course-content-list-item-title {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.ai-lesson-sidebar-course-content .tutor-course-content-list-item-title a {
  color: #333;
  text-decoration: none;
}

.ai-lesson-sidebar-course-content .tutor-course-content-list-item-title a:hover,
.ai-lesson-sidebar-course-content .tutor-course-content-list-item-title a.is-active {
  color: var(--ai-rose);
}

.ai-lesson-sidebar-course-content .tutor-course-content-list-item-duration {
  font-size: 13px;
  color: #777;
  white-space: nowrap;
}

.ai-lesson-sidebar-course-content .tutor-course-content-list-item-status {
  margin-left: 8px;
  font-size: 14px;
}

/* Responsive: new lesson layout */
@media (max-width: 1100px) {
  .ai-lesson-content-grid {
    grid-template-columns: 1fr;
  }

  .ai-lesson-view-layout .ai-lesson-sidebar {
    position: static;
  }

  .ai-lesson-container {
    padding: 0 20px;
  }

  .ai-lesson-view-layout .ai-lesson-header-wrapper {
    padding: 20px 20px 0;
  }

  .ai-lesson-page-title {
    font-size: 28px;
  }

  .ai-lesson-video-player {
    height: 280px;
  }
}

.ai-lesson-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 0;
  flex: 1;
  max-width: 1440px;
  margin: 24px auto 0;
  width: 92%;
  align-items: start;
}

/* Main video area */
.ai-lesson-main { display: flex; flex-direction: column; gap: 1.25rem; }

/* Breadcrumb row: back button + course name */
.ai-lesson-breadcrumb-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}
.ai-lesson-breadcrumb {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ai-text-dark);
  font-family: var(--ai-font);
}
.ai-lesson-back-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--ai-radius-md);
  background: var(--ai-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  color: var(--ai-text-dark);
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.ai-lesson-back-btn:hover {
  background: var(--ai-light-pink);
  color: var(--ai-rose);
}

/* Video player card */
.ai-video-card {
  background: var(--ai-white);
  border-radius: var(--ai-radius-xl);
  overflow: hidden;
  box-shadow: var(--ai-shadow-card);
}

.ai-video-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0C1421;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.ai-video-player video,
.ai-video-player iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Play overlay for thumbnail-only state */
.ai-video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(12,20,33,0.55);
  cursor: pointer;
  transition: background 0.2s;
}
.ai-video-play-overlay:hover { background: rgba(12,20,33,0.40); }

.ai-video-play-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--ai-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--ai-white);
  box-shadow: 0 8px 24px rgba(246,27,71,0.4);
}

.ai-video-play-label {
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  font-family: var(--ai-font);
}

/* Video controls bar */
.ai-video-controls {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--ai-border);
}

.ai-video-progress-wrap {
  flex: 1;
  min-width: 120px;
  height: 6px;
  background: #EEEEEE;
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
}
.ai-video-progress-bar {
  height: 100%;
  background: var(--ai-grad);
  border-radius: 3px;
  width: 0%;
  transition: width 0.2s;
}

.ai-video-ctrl-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--ai-text-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: color 0.2s;
}
.ai-video-ctrl-btn:hover { color: var(--ai-rose); }

.ai-video-time {
  font-size: 13px;
  color: var(--ai-text-muted);
  font-family: var(--ai-font);
  white-space: nowrap;
}

/* Lesson info below video */
.ai-lesson-info {
  background: var(--ai-white);
  border-radius: var(--ai-radius-xl);
  padding: 24px;
  box-shadow: var(--ai-shadow-card);
}
.ai-lesson-info-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--ai-text-dark);
  margin: 0 0 8px;
  font-family: var(--ai-font);
}
.ai-lesson-info-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--ai-text-muted);
  font-family: var(--ai-font);
  margin-bottom: 16px;
}
.ai-lesson-info-desc {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--ai-text-medium);
  font-family: var(--ai-font);
}

/* Mark complete button (Tutor) */
.ai-lesson-mark-complete {
  margin-top: 1rem;
  margin-bottom: 1rem;
}
.ai-lesson-mark-complete .tutor-button,
.ai-lesson-mark-complete button[type="submit"],
.ai-lesson-mark-complete .tutor-topbar-mark-btn,
.ai-lesson-mark-complete .tutor-btn-primary {
  padding: 0.625rem 1.25rem;
  border-radius: var(--ai-radius-md);
  background: var(--ai-grad);
  color: var(--ai-white);
  border: none;
  font-family: var(--ai-font);
  font-weight: 500;
  cursor: pointer;
  font-size: 0.875rem;
}
.ai-lesson-mark-complete .tutor-topbar-mark-btn:hover,
.ai-lesson-mark-complete .tutor-btn-primary:hover {
  opacity: 0.95;
  color: var(--ai-white);
}

/* Prev/Next lesson navigation */
.ai-lesson-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--ai-border);
}
.ai-lesson-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ai-rose);
  font-family: var(--ai-font);
  text-decoration: none;
  border-radius: var(--ai-radius-md);
  transition: background 0.2s, color 0.2s;
}
.ai-lesson-nav-btn:hover {
  background: var(--ai-light-pink);
  color: var(--ai-dark-maroon);
}
.ai-lesson-nav-btn.is-disabled {
  color: var(--ai-text-muted);
  cursor: default;
  pointer-events: none;
}

/* Lesson sidebar */
.ai-lesson-sidebar {
  background: var(--ai-white);
  border-radius: var(--ai-radius-xl);
  box-shadow: var(--ai-shadow-card);
  overflow: hidden;
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
}

.ai-lesson-sidebar-header {
  padding: 1.25rem 1.25rem;
  border-bottom: 1px solid var(--ai-border);
  flex-shrink: 0;
}
.ai-lesson-sidebar-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ai-text-dark);
  margin: 0 0 0.25rem;
  font-family: var(--ai-font);
}
.ai-lesson-sidebar-meta {
  font-size: 0.8125rem;
  color: var(--ai-text-muted);
  font-family: var(--ai-font);
}
.ai-lesson-sidebar-progress {
  height: 4px;
  background: var(--ai-border);
  border-radius: 2px;
  margin-top: 0.5rem;
  overflow: hidden;
}
.ai-lesson-sidebar-progress-fill {
  height: 100%;
  background: var(--ai-grad);
  border-radius: 2px;
  transition: width 0.3s ease;
}
.ai-lesson-topic-heading {
  padding: 0.75rem 1.25rem 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ai-text-muted);
  font-family: var(--ai-font);
}
.ai-lesson-list-empty {
  padding: 1.25rem;
  color: var(--ai-text-muted);
  font-family: var(--ai-font);
  font-size: 0.875rem;
  margin: 0;
}

.ai-lesson-list-scroll {
  overflow-y: auto;
  flex: 1;
}

.ai-lesson-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  font-size: 14px;
  color: var(--ai-text-medium);
  font-family: var(--ai-font);
  text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: background 0.15s;
}
.ai-lesson-list-item:hover           { background: #fafafa; }
.ai-lesson-list-item.is-active       { background: var(--ai-light-pink); color: var(--ai-rose); }
.ai-lesson-list-item.is-completed .ai-lesson-list-icon { color: var(--ai-green); }

.ai-lesson-list-icon { font-size: 16px; color: var(--ai-rose); flex-shrink: 0; }
.ai-lesson-list-body { flex: 1; }
.ai-lesson-list-title { font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.ai-lesson-list-duration { font-size: 12px; color: var(--ai-text-muted); }

/* Lesson page responsive */
@media (max-width: 1100px) {
  .ai-lesson-layout { grid-template-columns: minmax(0,1fr) 300px; }
}
@media (max-width: 900px) {
  .ai-lesson-layout {
    grid-template-columns: minmax(0,1fr);
    width: 96%;
  }
  .ai-lesson-sidebar { position: static; max-height: none; }
}

/* ============================
 * Checkout Page
 * ============================ */
.ai-checkout-page {
  min-height: 100vh;
  background: var(--ai-bg);
}

.ai-checkout-body {
  max-width: 520px;
  margin: 40px auto 64px;
  padding: 0 20px;
}

/* Timer banner */
.ai-checkout-timer {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ai-beige);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-family: var(--ai-font);
}
.ai-checkout-timer-icon { font-size: 20px; color: #E46400; flex-shrink: 0; }
.ai-checkout-timer-label { font-size: 15px; font-weight: 500; color: var(--ai-text-medium); flex: 1; }
.ai-checkout-timer-value {
  font-size: 18px;
  font-weight: 700;
  color: #E46400;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}

/* Product card */
.ai-checkout-product {
  background: var(--ai-white);
  border: 1px solid var(--ai-border);
  border-radius: var(--ai-radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}

.ai-checkout-product-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.ai-checkout-thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--ai-radius-md);
  object-fit: cover;
  background: var(--ai-avatar-bg);
  flex-shrink: 0;
}

.ai-checkout-product-info { flex: 1; }
.ai-checkout-product-title {
  font-size: 18px;
  font-weight: 500;
  color: #202020;
  margin: 0 0 4px;
  font-family: var(--ai-font);
  line-height: 1.3;
}

.ai-checkout-product-remove {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: #E46400;
  display: inline-flex;
  flex-shrink: 0;
  padding: 4px;
  transition: color 0.2s;
}
.ai-checkout-product-remove:hover { color: var(--ai-rose); }

/* Product metadata pills */
.ai-checkout-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--ai-border);
}

.ai-checkout-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--ai-black);
  font-family: var(--ai-font);
}
.ai-checkout-meta-divider { color: var(--ai-text-muted); }

/* Price row */
.ai-checkout-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}
.ai-checkout-price-label { font-size: 14px; color: var(--ai-text-muted); font-family: var(--ai-font); }
.ai-checkout-price-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--ai-black);
  font-family: var(--ai-font);
}

/* Checkout form */
.ai-checkout-form { display: flex; flex-direction: column; gap: 16px; }

.ai-checkout-form-group { display: flex; flex-direction: column; gap: 6px; }

.ai-checkout-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--ai-text-slate);
  font-family: var(--ai-font);
}

.ai-checkout-input {
  background: var(--ai-white);
  border: 1px solid var(--ai-border);
  border-radius: 10px;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ai-text-dark);
  font-family: var(--ai-font);
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ai-checkout-input::placeholder { color: var(--ai-text-muted); }
.ai-checkout-input:focus {
  outline: none;
  border-color: var(--ai-rose);
  box-shadow: 0 0 0 3px rgba(188,9,78,0.10);
}

/* CTA + security */
.ai-checkout-cta {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-checkout-btn {
  width: 100%;
  padding: 16px;
  background: var(--ai-grad);
  color: var(--ai-white);
  border: none;
  border-radius: var(--ai-radius-md);
  font-size: 18px;
  font-weight: 500;
  font-family: var(--ai-font);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 25px rgba(211,19,69,0.3);
  transition: opacity 0.2s;
}
.ai-checkout-btn:hover { opacity: 0.9; }

.ai-checkout-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ai-green);
  font-family: var(--ai-font);
}
.ai-checkout-secure i { font-size: 18px; }

@media (max-width: 640px) {
  .ai-checkout-body { margin: 24px auto 40px; }
  .ai-checkout-product-title { font-size: 16px; }
  .ai-checkout-price-value { font-size: 24px; }
}

/* ============================
 * Whop Checkout shortcode overrides
 * Reskin the [whop_checkout] output to match AI Empire design.
 * These target the classes emitted by the whop-checkout plugin.
 * ============================ */

/* Wrapper — remove the plugin's default max-width / centering so our
   .ai-checkout-body container handles layout instead. */
.ai-whop-checkout-wrap .whop-checkout-wrapper,
.ai-whop-checkout-wrap .whop-checkout-card {
  max-width: 100% !important;
  margin: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
}

/* Form fields */
.ai-whop-checkout-wrap .whop-form-group { margin-bottom: 16px !important; }

.ai-whop-checkout-wrap .whop-form-group label,
.ai-whop-checkout-wrap label[for^="whop-"] {
  display: block !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  color: var(--ai-text-slate) !important;
  font-family: var(--ai-font) !important;
  margin-bottom: 6px !important;
}

.ai-whop-checkout-wrap input[type="text"],
.ai-whop-checkout-wrap input[type="email"],
.ai-whop-checkout-wrap #whop-first-name,
.ai-whop-checkout-wrap #whop-last-name,
.ai-whop-checkout-wrap #whop-email {
  background: var(--ai-white) !important;
  border: 1px solid var(--ai-border) !important;
  border-radius: 10px !important;
  padding: 13px 16px !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  color: var(--ai-text-dark) !important;
  font-family: var(--ai-font) !important;
  width: 100% !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}
.ai-whop-checkout-wrap input::placeholder { color: var(--ai-text-muted) !important; }
.ai-whop-checkout-wrap input:focus {
  outline: none !important;
  border-color: var(--ai-rose) !important;
  box-shadow: 0 0 0 3px rgba(188,9,78,0.10) !important;
}

/* Proceed to payment button */
.ai-whop-checkout-wrap #whop-proceed-btn,
.ai-whop-checkout-wrap .whop-proceed-btn,
.ai-whop-checkout-wrap button[type="submit"] {
  width: 100% !important;
  padding: 16px !important;
  background: var(--ai-grad) !important;
  color: var(--ai-white) !important;
  border: none !important;
  border-radius: var(--ai-radius-md) !important;
  font-size: 18px !important;
  font-weight: 500 !important;
  font-family: var(--ai-font) !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  box-shadow: 0 10px 25px rgba(211,19,69,0.3) !important;
  transition: opacity 0.2s !important;
  margin-top: 8px !important;
}
.ai-whop-checkout-wrap #whop-proceed-btn:hover,
.ai-whop-checkout-wrap .whop-proceed-btn:hover { opacity: 0.9 !important; }

/* "Pay safe & secure" label */
.ai-whop-checkout-wrap .whop-secure-text,
.ai-whop-checkout-wrap .whop-secure {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  font-size: 13px !important;
  color: var(--ai-green) !important;
  font-family: var(--ai-font) !important;
  margin-top: 10px !important;
}

/* Whop payment modal — keep plugin's own z-index/positioning,
   just ensure the border-radius matches our design language. */
.ai-whop-checkout-wrap .whop-modal,
.whop-modal {
  border-radius: var(--ai-radius-xl) !important;
}
.ai-whop-checkout-wrap .whop-modal-content,
.whop-modal-content {
  border-radius: var(--ai-radius-xl) !important;
}

/* ============================
 * AI Profile Page
 * ============================ */

.ai-dashboard .ai-profile-hero {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 28px;
  background: var(--ai-white);
  border-radius: var(--ai-radius-xl);
  box-shadow: var(--ai-shadow-card);
  padding: 32px;
  margin-bottom: 24px;
}

.ai-dashboard .ai-profile-avatar-wrap {
  width: 128px;
  height: 128px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--ai-grad);
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-dashboard .ai-profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.ai-dashboard .ai-profile-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.ai-dashboard .ai-profile-name {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ai-text-dark);
  margin: 0;
  line-height: 1.2;
}

.ai-dashboard .ai-profile-username {
  font-size: 0.9375rem;
  color: var(--ai-text-muted);
  margin: 0;
}

.ai-dashboard .ai-profile-bio {
  font-size: 0.9375rem;
  color: var(--ai-text-medium);
  margin: 4px 0 0;
  max-width: 520px;
  line-height: 1.5;
}

.ai-dashboard .ai-profile-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.ai-dashboard .ai-profile-info-card {
  background: var(--ai-white);
  border-radius: var(--ai-radius-lg);
  box-shadow: var(--ai-shadow-card);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-dashboard .ai-profile-info-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ai-text-muted);
}

.ai-dashboard .ai-profile-info-label i {
  color: var(--ai-rose);
  font-size: 0.9375rem;
}

.ai-dashboard .ai-profile-info-value {
  font-size: 0.9375rem;
  color: var(--ai-text-dark);
  font-weight: 500;
  word-break: break-all;
}

.ai-dashboard .ai-profile-stats-heading {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ai-text-dark);
  margin: 0 0 16px;
}

@media (max-width: 600px) {
  .ai-dashboard .ai-profile-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 20px;
  }
  .ai-dashboard .ai-profile-avatar-wrap {
    width: 88px;
    height: 88px;
  }
  .ai-dashboard .ai-profile-bio {
    max-width: 100%;
  }
}

/* ============================
 * AI Settings Page
 * ============================ */

.ai-dashboard .ai-settings-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--ai-border);
  margin-bottom: 24px;
}

.ai-dashboard .ai-settings-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ai-text-muted);
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s;
  font-family: var(--ai-font);
}

.ai-dashboard .ai-settings-tab i {
  font-size: 1rem;
}

.ai-dashboard .ai-settings-tab:hover {
  color: var(--ai-rose);
}

.ai-dashboard .ai-settings-tab.is-active {
  color: var(--ai-rose);
  border-bottom-color: var(--ai-rose);
  font-weight: 600;
}

.ai-dashboard .ai-settings-panel {
  background: var(--ai-white);
  border-radius: var(--ai-radius-xl);
  box-shadow: var(--ai-shadow-card);
  padding: 32px;
}

.ai-dashboard .ai-settings-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.ai-dashboard .ai-settings-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.ai-dashboard .ai-settings-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ai-text-medium);
}

.ai-dashboard .ai-settings-input {
  height: 50px;
  padding: 0 16px;
  border: 1px solid var(--ai-border);
  border-radius: var(--ai-radius-md);
  font-size: 0.9375rem;
  font-family: var(--ai-font);
  color: var(--ai-text-dark);
  background: var(--ai-white);
  box-sizing: border-box;
  transition: border-color 0.18s, box-shadow 0.18s;
  width: 100%;
}

.ai-dashboard .ai-settings-input:focus {
  outline: none;
  border-color: var(--ai-rose);
  box-shadow: 0 0 0 3px rgba(188, 9, 78, 0.12);
}

.ai-dashboard .ai-settings-textarea {
  height: auto;
  padding: 12px 16px;
  resize: vertical;
}

.ai-dashboard .ai-settings-save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 32px;
  height: 50px;
  background: var(--ai-grad);
  color: var(--ai-white);
  border: none;
  border-radius: var(--ai-radius-md);
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--ai-font);
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(211, 19, 69, 0.25);
  transition: opacity 0.18s;
  margin-top: 4px;
}

.ai-dashboard .ai-settings-save-btn:hover {
  opacity: 0.92;
}

.ai-dashboard .ai-settings-save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ai-dashboard .ai-settings-msg {
  padding: 12px 16px;
  border-radius: var(--ai-radius-md);
  font-size: 0.875rem;
  margin-bottom: 20px;
  font-weight: 500;
}

.ai-dashboard .ai-settings-msg--success {
  background: #e6f9f1;
  border: 1px solid #a3dfc0;
  color: #1a7a4a;
}

.ai-dashboard .ai-settings-msg--error {
  background: #fff0f3;
  border: 1px solid #f5a0b0;
  color: #9b1c35;
}

@media (max-width: 640px) {
  .ai-dashboard .ai-settings-panel {
    padding: 20px 16px;
  }
  .ai-dashboard .ai-settings-form-row {
    grid-template-columns: 1fr;
  }
}
