/*
 * ds-website.css  (version 1.11)
 * Restyles the public layout (website.layouts.master) to match charismight.com.
 * Loaded AFTER style.css and learn-menu.css. Reads variables from shared-design-tokens.css.
 * Dark is the default; the header toggle switches <html data-ds-theme="light">.
 * In light mode the header, hero, stats band and footer turn light as well.
 * Remove the <link> to this file in master.blade.php to go back to the old look.
 */

:root {
    --ds-header-h: 70px;   /* height of the header bar */
    --ds-stats-h: 122px;   /* height of the stats band (200+, 80+, ...) */
}

/* ---------- Light / dark toggle: show one icon at a time ---------- */
html:not([data-ds-theme="light"]) #dark-mode-toggle {
    display: none !important;
}
html:not([data-ds-theme="light"]) #light-mode-toggle {
    display: inline-flex !important;
}
html[data-ds-theme="light"] #light-mode-toggle {
    display: none !important;
}
html[data-ds-theme="light"] #dark-mode-toggle {
    display: inline-flex !important;
}
body .header .dark-mode-toggle {
    align-items: center;
    justify-content: center;
    background: var(--ds-bg-subnav) !important;
    border: 1px solid var(--ds-border-on-dark) !important;
    color: var(--ds-on-dark) !important;
    border-radius: 10px !important;
}

/* ---------- Header (all public pages; follows the mode) ----------
   The theme paints the white bar on inner wrappers (.header-fixed, .header-nav, .navbar),
   so those are coloured as well as the <header> itself. */
body .header,
body .header-page,
body .header .header-fixed,
body .header .header-nav,
body .header .navbar,
body .header-nav.fixed-header,
body .header-nav.fixed {
    background: var(--ds-bg-header) !important;
    box-shadow: none !important;
}
body .header,
body .header-page {
    border-bottom: 1px solid var(--ds-border-on-dark);
}
body .header .main-nav > li > a {
    color: var(--ds-on-dark) !important;
}
body .header .main-nav > li > a:hover {
    color: var(--ds-accent-on-dark) !important;
}
body .header .header-sign {
    background: transparent !important;
    color: var(--ds-on-dark) !important;
    border: 1px solid var(--ds-border-on-dark) !important;
    border-radius: var(--ds-radius-pill) !important;
}
body .header .header-sign:hover {
    background: var(--ds-accent) !important;
    border-color: var(--ds-accent) !important;
    color: var(--ds-on-accent) !important;
}
/* Interim: the current logo has dark text, so in dark mode show it all white (see
   --ds-logo-filter in the tokens file). In light mode the original logo is used.
   Replace with a proper white-text logo file, then delete this rule. */
body .header .logo img,
body .header .menu-logo img {
    filter: var(--ds-logo-filter);
}
@media (max-width: 991.98px) {
    body .main-menu-wrapper {
        background: var(--ds-bg-header) !important;
    }
}

/* ---------- Learn menu (desktop dropdown; follows the mode) ---------- */
@media (min-width: 992px) {
    body .learn-menu {
        background: var(--ds-bg-card);
        border-color: var(--ds-border);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    }
    body .learn-menu-cats {
        background: var(--ds-bg-section);
        border-right-color: var(--ds-border);
    }
    body .main-nav .learn-menu a.learn-cat {
        color: var(--ds-text-soft);
    }
    body .main-nav .learn-menu a.learn-cat.active {
        background: var(--ds-bg-card-2);
        color: var(--ds-accent-2);
    }
    body .learn-panel-title {
        color: var(--ds-text);
    }
    body .main-nav .learn-menu .learn-panel-courses a {
        color: var(--ds-text-soft);
    }
    body .main-nav .learn-menu .learn-panel-courses a:hover {
        color: var(--ds-accent-2);
    }
    body .main-nav .learn-menu a.learn-viewall {
        color: var(--ds-accent-2);
        border-top-color: var(--ds-border);
    }
    body .learn-empty {
        color: var(--ds-text-muted);
    }
}

/* ---------- Light mode, phone drawer: the mobile Learn rules use white text ---------- */
@media (max-width: 991.98px) {
    html[data-ds-theme="light"] body .learn-menu {
        background: rgba(10, 58, 99, 0.06);
    }
    html[data-ds-theme="light"] body .main-nav .learn-menu a.learn-cat,
    html[data-ds-theme="light"] body .main-nav .learn-menu .learn-panel-courses a,
    html[data-ds-theme="light"] body .main-nav .learn-menu a.learn-viewall,
    html[data-ds-theme="light"] body .learn-panel-title {
        color: var(--ds-text-soft);
    }
    html[data-ds-theme="light"] body .main-nav .learn-menu a.learn-cat.active {
        background: rgba(10, 58, 99, 0.10);
        color: var(--ds-text);
    }
}

/* ---------- Buttons (all public pages) ---------- */
body .btn-primary {
    background: var(--ds-accent);
    border-color: var(--ds-accent);
    border-radius: var(--ds-radius-pill);
}
body .btn-primary,
body .btn-primary.text-white {
    color: var(--ds-on-accent) !important;
}
body .btn-primary:hover {
    filter: brightness(1.08);
}

/* ---------- Home page: page background ---------- */
body:has(.home-slide-five) {
    background: var(--ds-bg-page);
}

/* ---------- Home page: hero (photo with a dark or light overlay, by mode) ---------- */
body .home-slide-five {
    background:
        linear-gradient(90deg, var(--ds-hero-left) 0%, var(--ds-hero-mid) 45%, var(--ds-hero-right) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0) 70%, var(--ds-hero-bottom) 100%),
        url('../img/hero-ship.jpg') center / cover no-repeat,
        var(--ds-bg-stats) !important;
    padding: 56px 0 44px !important;
    min-height: 0 !important;
}
body .home-slide-five .home-slide-five-face,
body .home-slide-five .home-slide-five-text {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
/* desktop: hero + stats band fill the first screen, Featured Courses starts below the fold */
@media (min-width: 992px) {
    body .home-slide-five {
        display: flex;
        align-items: center;
        min-height: calc(100vh - var(--ds-header-h) - var(--ds-stats-h)) !important;
    }
    body .home-slide-five > .container {
        width: 100%;
    }
}
/* the old hero picture sits in the second column; hide it, the text takes the width */
body .home-slide-five .row > .col-lg-6:last-child {
    display: none;
}
body .home-slide-five .row > .col-lg-6:first-child {
    flex: 0 0 auto;
    width: 100%;
    max-width: 820px;
}
body .home-slide-five .home-slide-five-face,
body .home-slide-five .home-slide-five-text,
body .home-slide-five .home-slide-five-text h1 {
    width: 100%;
    max-width: 780px;
}
body .home-slide-five-text h5 {
    display: inline-block;
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ds-badge-text) !important;
    background: var(--ds-badge-bg);
    border: 1px solid var(--ds-border-on-dark);
    border-radius: var(--ds-radius-pill);
    padding: 8px 18px;
    margin-bottom: 16px;
}
body .home-slide-five-text h1 {
    font-size: clamp(30px, 4.2vw, 50px);
    line-height: 1.12;
    font-weight: 700;
    color: var(--ds-on-dark) !important;
    margin-bottom: 14px;
}
body .home-slide-five-text h1 .hl {
    color: var(--ds-accent-on-dark);
}
body .home-slide-five-text p {
    color: var(--ds-on-dark-soft) !important;
    font-size: 17px;
    margin-bottom: 20px;
}
/* search box: one border only (the theme's yellow ring is replaced) */
body .home-slide-five .banner-content-five {
    max-width: 620px;
}
body .home-slide-five .form-inner-five {
    background: var(--ds-search-bg) !important;
    border: 1px solid var(--ds-border-on-dark) !important;
    border-radius: var(--ds-radius-pill) !important;
    box-shadow: none !important;
    padding: 5px !important;
}
body .home-slide-five .form-inner-five .input-group {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}
body .home-slide-five .form-inner-five .form-control {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--ds-on-dark) !important;
}
body .home-slide-five .form-inner-five .form-control::placeholder {
    color: var(--ds-placeholder);
}
body .home-slide-five .sub-btn {
    background: var(--ds-accent) !important;
    border-color: var(--ds-accent) !important;
    color: var(--ds-on-accent) !important;
    border-radius: 50% !important;
}

/* ---------- Home page: stats band (follows the mode; colours only in this version) ---------- */
body .counter-section-five {
    background: var(--ds-bg-stats) !important;
    padding-top: 24px !important;
    padding-bottom: 24px !important;
}
body .counter-section-five h2,
body .counter-section-five h3,
body .counter-section-five .counterUp {
    color: var(--ds-accent-on-dark) !important;
}
body .counter-section-five p,
body .counter-section-five span {
    color: var(--ds-on-dark-soft) !important;
}

/* ---------- Home page: featured courses (follow the mode) ---------- */
body .featured-section-five {
    background: var(--ds-bg-page) !important;
}
body .featured-section-five .header-five-title h2 {
    color: var(--ds-text) !important;
}
body .featured-section-five .header-five-title p {
    color: var(--ds-text-soft) !important;
}
/* category tabs (Marine, Technical, PACT ...) stay where they are, only recoloured */
body .tablist-five a,
body .tablist-five li,
body .tablist-five button,
body .tablist-five span {
    color: var(--ds-text-soft) !important;
    background: transparent !important;
}
body .tablist-five a.active,
body .tablist-five li.active > a,
body .tablist-five .active > a,
body .tablist-five .active,
body .tablist-five button.active,
body .tablist-five [aria-selected="true"] {
    color: var(--ds-accent-2) !important;
    border-bottom-color: var(--ds-accent-2) !important;
}
body .tablist-five a.active::after,
body .tablist-five li.active > a::after,
body .tablist-five .active > a::after,
body .tablist-five .active::after,
body .tablist-five a.active::before,
body .tablist-five .active::before {
    background: var(--ds-accent-2) !important;
    border-color: var(--ds-accent-2) !important;
}
/* course cards */
body .course-box-five .product-five {
    background: var(--ds-bg-card) !important;
    border: 1px solid var(--ds-border) !important;
    border-radius: var(--ds-radius-card);
    box-shadow: none !important;
    overflow: hidden;
}
body .course-box-five .product-five-title,
body .course-box-five .product-five-title a {
    color: var(--ds-text) !important;
}
body .course-box-five .product-content-five p,
body .course-box-five .product-content-five span,
body .course-box-five .product-content-five li {
    color: var(--ds-text-soft);
}
body .course-box-five .joing-course-btn {
    background: var(--ds-accent) !important;
    border: 0 !important;
    color: var(--ds-on-accent) !important;
    border-radius: var(--ds-radius-pill) !important;
}

/* ---------- Home page: other sections (follow the mode; colours only in this version) ---------- */
body .master-section-five,
body .experienced-course-five,
body .transform-section-five {
    background: var(--ds-bg-page) !important;
}
body .master-section-five :is(h1, h2, h3, h4, h5, h6),
body .experienced-course-five :is(h1, h2, h3, h4, h5, h6),
body .transform-section-five :is(h1, h2, h3, h4, h5, h6) {
    color: var(--ds-text) !important;
}
body .master-section-five p,
body .experienced-course-five p,
body .transform-section-five p {
    color: var(--ds-text-soft) !important;
}

/* ---------- Footer (all public pages; follows the mode) ---------- */
body .footer-five {
    background: var(--ds-bg-footer) !important;
    border-top: 1px solid var(--ds-border-on-dark);
}
body .footer-five,
body .footer-five p,
body .footer-five li,
body .footer-five a {
    color: var(--ds-on-dark-soft);
}
body .footer-five a:hover {
    color: var(--ds-accent-on-dark);
}
body .footer-five :is(h1, h2, h3, h4, h5, h6) {
    color: var(--ds-on-dark);
}

/* ---------- Testimonials (v1.5) ----------
   The card is white, so its text must be dark. Class names are GUESSED from the word
   "testimonial"; the section title is left alone. Tighten once the markup has been seen. */
body [class*="testimonial"] :is(p, h3, h4, h5, h6):not(.header-five-title *) {
    color: #111827 !important;
}

/* ---------- Footer: newsletter box, button, bullets (v1.5, class names guessed) ---------- */
body .footer-five form,
body .footer-five .input-group {
    background: var(--ds-bg-card) !important;
    border-color: var(--ds-border-on-dark) !important;
}
body .footer-five input {
    background: transparent !important;
    color: var(--ds-on-dark) !important;
}
body .footer-five input::placeholder {
    color: var(--ds-on-dark-soft) !important;
}
body .footer-five button,
body .footer-five .btn {
    background: var(--ds-accent) !important;
    border-color: var(--ds-accent) !important;
    color: var(--ds-on-accent) !important;
    border-radius: var(--ds-radius-pill) !important;
}
body .footer-five li::before,
body .footer-five li::after {
    background-color: var(--ds-accent-on-dark) !important;
    border-color: var(--ds-accent-on-dark) !important;
}
body .footer-five li i,
body .footer-five p i {
    color: var(--ds-accent-on-dark) !important;
}

/* ---------- Logo: white-text version in dark mode, black-text version in light mode ---------- */
body .ds-logo-light {
    display: none !important;
}
html[data-ds-theme="light"] body .ds-logo-dark {
    display: none !important;
}
html[data-ds-theme="light"] body .ds-logo-light {
    display: inline-block !important;
}

/* ---------- Learn dropdown: full-strength text colour (white in dark mode) ---------- */
@media (min-width: 992px) {
    body .main-nav .learn-menu a.learn-cat,
    body .main-nav .learn-menu .learn-panel-courses a {
        color: var(--ds-text);
    }
    body .learn-panel-courses {
        scrollbar-width: thin;
        scrollbar-color: var(--ds-border-strong) transparent;
    }
}

/* ---------- Inner public pages (v1.6): page, cards, forms, tables (follow the mode) ----------
   Applies to every page that has the public footer, so it does not depend on the body class.
   Class names are GUESSED from Bootstrap; tighten them once the page markup has been seen. */
body:has(.footer-five) {
    background: var(--ds-bg-page);
    color: var(--ds-text-soft);
}
body:has(.footer-five) :is(h1, h2, h3, h4, h5, h6) {
    color: var(--ds-text);
}
body:has(.footer-five) :where(a:not(.btn)) {
    color: var(--ds-text);
}
body:has(.footer-five) :where(a:not(.btn):hover) {
    color: var(--ds-accent-2);
}
body:has(.footer-five) :is(.card, .modal-content, .dropdown-menu, .list-group-item, .accordion-item, .offcanvas) {
    background-color: var(--ds-bg-card);
    color: var(--ds-text-soft);
    border-color: var(--ds-border);
}
body:has(.footer-five) :is(.card-header, .card-footer, .modal-header, .modal-footer) {
    background: transparent;
    border-color: var(--ds-border);
}
body:has(.footer-five) .accordion-button {
    background-color: var(--ds-bg-card);
    color: var(--ds-text);
}
body:has(.footer-five) :is(.form-control, .form-select, .input-group-text, textarea, select) {
    background-color: var(--ds-bg-section);
    color: var(--ds-text);
    border-color: var(--ds-border-strong);
}
body:has(.footer-five) .form-control::placeholder {
    color: var(--ds-text-muted);
}
body:has(.footer-five) .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--ds-text-soft);
    --bs-table-border-color: var(--ds-border);
    color: var(--ds-text-soft);
}
/* safety net for common wrapper and utility classes */
body :is(.main-wrapper, .page-content, .page-wrapper, .content, .course-content, .inner-page, .wrapper) {
    background-color: transparent;
}
body :is(.bg-white, .bg-light, .white-bg) {
    background-color: var(--ds-bg-card) !important;
}
body :is(.text-dark, .text-black, .text-body) {
    color: var(--ds-text) !important;
}
body .text-muted {
    color: var(--ds-text-muted) !important;
}
body :is(.border, .border-top, .border-bottom, .border-start, .border-end) {
    border-color: var(--ds-border) !important;
}
/* the dark photo banner at the top of inner pages keeps white text in both modes (class names guessed) */
body :is(.inner-banner, .breadcrumb-bar) :is(h1, h2, h3, h4, h5, h6, p, span, li, a) {
    color: #ffffff !important;
}

/* ---------- List pages: Self Learning (search), Instructor-Led Courses, Wishlist (v1.7) ----------
   Real class names taken from searchCourse.blade.php; engage and wishlist look the same
   and are expected to share them. */
body .course-content.checkout-widget {
    background: transparent !important;
}
body .student-widget {
    background: var(--ds-bg-card) !important;
    border: 1px solid var(--ds-border) !important;
    border-radius: var(--ds-radius-card);
    box-shadow: none !important;
}
body .student-widget-group {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
body .cart-head {
    background: transparent !important;
    border-bottom: 1px solid var(--ds-border) !important;
}
body .cart-head h4,
body .cart-head h3 {
    color: var(--ds-text) !important;
}
body .cart-group {
    background: transparent !important;
}
body .course-box.list-course,
body .course-box.course-design {
    background: var(--ds-bg-section) !important;
    border: 1px solid var(--ds-border) !important;
    border-radius: var(--ds-radius-card);
    box-shadow: none !important;
}
body .list-course .product,
body .list-course .product-content,
body .list-course .head-course-title,
body .list-course .course-info {
    background: transparent !important;
}
body .list-course .title,
body .list-course .title a,
body .list-course .head-course-title a {
    color: var(--ds-text) !important;
}
body .list-course .title a:hover,
body .list-course .head-course-title a:hover {
    color: var(--ds-accent-2) !important;
}
body .list-course .course-info p,
body .list-course .rating-img p,
body .list-course .course-view p,
body .list-course .course-info span {
    color: var(--ds-text-soft) !important;
}
body .list-course .course-info {
    border-color: var(--ds-border) !important;
}
body .list-course .cart-remove a,
body .list-course .btn {
    border-radius: var(--ds-radius-pill) !important;
}

/* ---------- Course details and other content pages (v1.8): full-strength text ----------
   The "Course Highlights" list kept the theme's dim purple text, which is unreadable on navy.
   Selectors are structural (cards and their lists) because the page markup has not been seen. */
body:has(.footer-five) :is(.card, .course-content) :is(li, li span, li a:not(.btn), li strong, li b, p, label, dt, dd) {
    color: var(--ds-text) !important;
    opacity: 1 !important;
}
body:has(.footer-five) :is(.card, .course-content) li {
    border-color: var(--ds-border) !important;
}

/* ---------- Instructor-Led list: "Enroll Now" button (v1.9) ----------
   The theme gave it a white fill with white text, so the label vanished.
   Now: transparent fill, label in the mode's text colour (white in dark, dark navy in light),
   cyan outline, fills cyan on hover. Class names are guessed from the card structure. */
body .list-course .btn,
body .list-course .cart-remove a,
body .list-course :is(a, button):not(.product-img a, .head-course-title a, .title a) {
    background: transparent !important;
    color: var(--ds-text) !important;
    border: 1px solid var(--ds-accent) !important;
    border-radius: var(--ds-radius-pill) !important;
    min-width: 120px;
    height: auto !important;
    padding: 9px 20px !important;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
body .list-course .btn:hover,
body .list-course .cart-remove a:hover,
body .list-course :is(a, button):not(.product-img a, .head-course-title a, .title a):hover {
    background: var(--ds-accent) !important;
    color: var(--ds-on-accent) !important;
}

/* ---------- Footer text: white in dark mode, near-black in light mode (v1.10) ----------
   The theme sets white text on its own footer selectors, which win over the earlier rules,
   so these use !important. Social icons and buttons are left alone. */
body .footer-five {
    --ds-footer-text: #ffffff;
}
html[data-ds-theme="light"] body .footer-five {
    --ds-footer-text: #0b1220;
}
body .footer-five :is(p, li, address, span, small, label, a:not(.btn)):not([class*="social"] *, .btn *) {
    color: var(--ds-footer-text) !important;
}
body .footer-five :is(h1, h2, h3, h4, h5, h6) {
    color: var(--ds-footer-text) !important;
}
/* the small yellow dashes before the Support links, and the footer divider line */
body .footer-five li a::before,
body .footer-five li a::after {
    background-color: var(--ds-accent-on-dark) !important;
    border-color: var(--ds-accent-on-dark) !important;
}
body .footer-five hr,
body .footer-five [class*="footer-bottom"],
body .footer-five [class*="copyright"] {
    border-color: var(--ds-border-on-dark) !important;
}

/* ---------- Course card grid: Self Learning, Instructor-Led, Wishlist (v1.11) ----------
   Turns the one-per-line course rows into cards, 4 per row on desktop, like the home page.
   Uses the existing markup (.cart-group > .row > .list-course); no Blade change needed.
   Only applies when the page really has course rows, so empty pages are untouched. */
body .student-widget:has(.list-course) {
    background: transparent !important;
    border: 0 !important;
}
body .student-widget:has(.list-course) .cart-head {
    border-bottom: 0 !important;
    padding-left: 0 !important;
}
body .cart-group:has(.list-course) > .row {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    margin: 0 !important;
}
@media (max-width: 1199.98px) {
    body .cart-group:has(.list-course) > .row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 991.98px) {
    body .cart-group:has(.list-course) > .row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 575.98px) {
    body .cart-group:has(.list-course) > .row {
        grid-template-columns: minmax(0, 1fr);
    }
}
body .cart-group:has(.list-course) > .row > [class*="col-"] {
    width: auto !important;
    max-width: none !important;
    flex: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
body .list-course {
    flex-direction: column !important;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    transition: transform 0.18s ease, border-color 0.18s ease;
}
body .list-course:hover {
    transform: translateY(-3px);
    border-color: var(--ds-accent) !important;
}
body .list-course .product {
    display: flex !important;
    flex-direction: column;
    align-items: stretch !important;
    width: 100%;
    flex: 1;
    padding: 0 !important;
    margin: 0 !important;
}
body .list-course .product-img {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}
body .list-course .product-img a {
    display: block;
}
body .list-course .product-img img {
    width: 100% !important;
    height: 190px !important;
    object-fit: contain;
    background: #ffffff;
    border-radius: 0 !important;
}
body .list-course .product-content {
    flex: 1;
    width: 100%;
    padding: 14px 16px 6px !important;
}
body .list-course .head-course-title .title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.35;
}
body .list-course .course-info {
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 0 !important;
    border: 0 !important;
}
body .list-course .cart-remove {
    width: 100%;
    margin: auto 0 0 !important;
    padding: 0 16px 16px !important;
}
body .list-course .cart-remove a,
body .list-course .cart-remove .btn {
    width: 100%;
}
/* ---------- Course search bar on Self Learning and Instructor-Led (v1.12) ---------- */
body .ds-course-search {
    max-width: 560px;
    margin: 0 21px 24px auto;
}
body .ds-course-search form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 5px 5px 5px 20px;
    background: var(--ds-bg-section);
    border: 1px solid var(--ds-border-strong);
    border-radius: var(--ds-radius-pill);
}
body .ds-course-search form:focus-within {
    border-color: var(--ds-accent);
    box-shadow: 0 0 0 3px rgba(19, 182, 240, 0.18);
}
body .ds-course-search input {
    flex: 1;
    min-width: 0;
    height: 40px;
    padding: 0;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: 0;
    color: var(--ds-text) !important;
}
body .ds-course-search input::placeholder {
    color: var(--ds-text-muted);
}
body .ds-course-search button {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--ds-accent);
    color: var(--ds-on-accent);
    cursor: pointer;
}
body .ds-course-search-empty {
    margin: 14px 4px 0;
    color: var(--ds-text-soft);
}
/* ---------- Featured Courses: category list on the left, compact card grid (v1.13) ---------- */
body .featured-section-five > .container {
    max-width: 1680px !important;   /* wide enough for 8 cards per row on large monitors; use 1320px to align with the header */
}
body .featured-courses-five-tab > .tab-content {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}
/* category list */
body .featured-section-five .tablist-five {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    position: sticky;
    top: 90px;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}
body .featured-section-five .tablist-five .nav-tab {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0 !important;
    padding: 9px 12px !important;
    border: 0 !important;
    border-left: 3px solid transparent !important;
    border-radius: 8px;
    text-align: left;
    font-size: 15px;
}
body .featured-section-five .tablist-five .nav-tab::before,
body .featured-section-five .tablist-five .nav-tab::after {
    display: none !important;
}
body .featured-section-five .tablist-five .nav-tab.active {
    background: var(--ds-bg-card-2) !important;
    border-left-color: var(--ds-accent-2) !important;
}
body .featured-section-five .tablist-five .ds-cat-count {
    font-size: 12px;
    color: var(--ds-text-muted) !important;
}
/* course grid: as many cards per row as fit, at least 160px each */
body .featured-section-five .ux-design-five > .row {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin: 0 !important;
    --bs-gutter-x: 0;
}
body .featured-section-five .ux-design-five > .row > [class*="col-"] {
    width: auto !important;
    max-width: none !important;
    flex: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
/* compact card */
body .featured-section-five .product-img-five img {
    height: 120px !important;
}
body .featured-section-five .product-content-five {
    padding: 10px 12px 12px !important;
}
body .featured-section-five .product-five-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
    margin: 0 0 6px;
    font-size: 14px;
    line-height: 1.3;
}
body .featured-section-five .info-five-middle {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 10px;
    margin: 0 0 4px;
    padding: 0;
    border: 0;
}
body .featured-section-five .info-five-middle p {
    margin: 0;
    font-size: 11.5px;
}
body .featured-section-five .product-content-five > div:last-of-type {
    gap: 6px !important;
    margin-top: 8px !important;
}
body .featured-section-five .product-content-five .joing-course-btn {
    padding: 6px 12px !important;
    font-size: 12px !important;
}
/* the heart on the picture is enough; the second heart button is hidden */
body .featured-section-five .product-content-five > div:last-of-type > a:nth-child(2) {
    display: none !important;
}
/* phones and tablets: the category list becomes a row you scroll sideways */
@media (max-width: 991.98px) {
    body .featured-courses-five-tab > .tab-content {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
    body .featured-section-five .tablist-five {
        flex-direction: row;
        position: static;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 6px !important;
    }
    body .featured-section-five .tablist-five .nav-tab {
        flex: 0 0 auto;
        width: auto;
        border-left: 0 !important;
        border-bottom: 3px solid transparent !important;
        border-radius: 8px 8px 0 0;
    }
    body .featured-section-five .tablist-five .nav-tab.active {
        border-bottom-color: var(--ds-accent-2) !important;
    }
    body .featured-section-five .tablist-five .ds-cat-count {
        display: none;
    }
}
/* ---------- Featured Courses: 7 per row, readable titles, "Popular Category" heading (v1.14) ---------- */
body .featured-section-five .ux-design-five > .row {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px;
}
body .featured-section-five .product-img-five img {
    height: 130px !important;
}
body .featured-section-five .product-five-title {
    min-height: 2.7em;
    margin: 0 0 8px;
}
body .featured-section-five .product-five-title a {
    display: inline !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
    -webkit-line-clamp: unset !important;
}
body .featured-section-five .info-five-middle {
    gap: 2px 12px;
}
/* heading above the category list */
body .featured-section-five .tablist-five::before {
    content: "Popular Category";
    display: block;
    padding: 0 12px 10px;
    margin-bottom: 6px;
    font-size: 17px;
    font-weight: 700;
    color: var(--ds-text);
    border-bottom: 1px solid var(--ds-border);
}
@media (max-width: 991.98px) {
    body .featured-section-five .tablist-five::before {
        display: none;
    }
}
/* ---------- Featured Courses: card pops forward on hover (v1.15) ---------- */
body .featured-section-five .course-box-five .product-five {
    position: relative;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
body .featured-section-five .course-box-five .product-five:hover {
    transform: translateY(-6px) scale(1.05);
    z-index: 5;
    border-color: var(--ds-accent) !important;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4) !important;
}
html[data-ds-theme="light"] body .featured-section-five .course-box-five .product-five:hover {
    box-shadow: 0 16px 36px rgba(10, 58, 99, 0.22) !important;
}
/* the picture zooms very slightly inside its frame */
body .featured-section-five .product-img-five {
    overflow: hidden;
}
body .featured-section-five .product-img-five img {
    transition: transform 0.3s ease;
}
body .featured-section-five .course-box-five .product-five:hover .product-img-five img {
    transform: scale(1.06);
}
/* people who set "reduce motion" in their system do not get the animation */
@media (prefers-reduced-motion: reduce) {
    body .featured-section-five .course-box-five .product-five,
    body .featured-section-five .product-img-five img {
        transition: none;
    }
    body .featured-section-five .course-box-five .product-five:hover,
    body .featured-section-five .course-box-five .product-five:hover .product-img-five img {
        transform: none;
    }
}