/*
    Frontend View CSS
    Extends and adapts admin styles (app.css) for frontend views.
*/

:root {
    --frontend-header-height: 90px;
    --osen-topbar-bg: #ffffff;
    --osen-body-font-size: 14px;
    --osen-body-bg: #ffffff;
}

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

body {
    background-color: var(--osen-body-bg) !important;
}

@media (min-width: 992px) {
    body {
        padding-top: var(--frontend-header-height) !important;
    }
}

.navbar-frontend {
    background-color: #ffffff !important;
    height: var(--frontend-header-height);
    border-bottom: 1px solid var(--osen-border-color, #eef2f7);
    padding: 0 !important;
    z-index: 1030;
}

.navbar-frontend .container {
    display: flex !important;
    align-items: center !important;
    height: 100%;
}

.navbar-frontend .navbar-brand img {
    max-height: 45px;
    width: auto;
}

.navbar-frontend .nav-link {
    color: var(--osen-gray-700);
    font-weight: 500;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease-in-out;
}

.navbar-frontend .nav-link:hover,
.navbar-frontend .nav-link.active {
    color: var(--osen-primary);
}

.navbar-frontend .nav-link i,
.navbar-frontend .nav-link .ti {
    font-size: 1.25rem;
}

.btn-login {
    background-color: var(--osen-primary);
    color: #fff;
    font-weight: 600;
}

.btn-login:hover {
    background-color: var(--osen-link-hover-color);
    color: #fff;
}

/* Global button style for frontend */
.btn {
    border-radius: 16px !important;
}

/* Card badges style */
.card .badge {
    padding: 13px !important;
    border-radius: 16px !important;
    font-weight: 600;
}

/* Course Card Styling */
.card .card-title {
    color: var(--osen-heading-color);
    font-weight: 600;
}

.card .card-text {
    color: var(--osen-heading-color);
    font-size: var(--osen-body-font-size);
    font-weight: var(--osen-body-font-weight);
    line-height: var(--osen-body-line-height);
}

.card-info {
    color: var(--osen-secondary-color, #9BA6B7);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 6px;
    line-height: 1.2;
}

.card-info i {
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-info span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.card {
    border-radius: 16px !important;
    overflow: hidden !important;
    margin-bottom: 0 !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.up-hover:hover {
    transform: translateY(-10px);
    box-shadow: var(--osen-box-shadow-lg) !important;
}

/* Courses and Categories Header Icons */
.courses-header-icon,
.categories-header-icon {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
    background-color: var(--osen-primary, #3C4FD9);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.courses-header-icon i,
.categories-header-icon i {
    font-size: 28px;
}

.courses-header-text h2,
.categories-header-text h2 {
    color: var(--osen-heading-color, #4C4C5C);
    font-size: 24px;
    font-weight: 600;
    line-height: normal;
    margin-bottom: 4px;
}

.courses-header-text p,
.categories-header-text p {
    color: var(--theme-muted-foreground, #62748E);
    font-size: 14px;
    font-weight: 400;
    line-height: normal;
}

.courses-section,
.categories-section,
.about-us-section {
    padding: 4rem 0;
    background-color: #ffffff;
}

@media (max-width: 991.98px) {

    /* Keep headers in row even on mobile */
    .courses-header,
    .categories-header {
        flex-direction: row !important;
        align-items: center !important;
        text-align: left;
        gap: 1rem !important;
    }
}

.upper-title {
    color: var(--osen-primary, #3C4FD9);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 21px;
    letter-spacing: 5px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.5rem;
}

.about-us-content h4 {
    color: var(--osen-heading-color, #4C4C5C);
    font-family: 'Inter', sans-serif;
    font-size: 35px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
}

.hero-img,
.about-us-image img {
    height: 476px;
    object-fit: cover;
    border-radius: 20px;
    width: 100%;
}

.courses-header-icon,
.categories-header-icon {
    width: 60px;
    height: 60px;
    background-color: var(--osen-primary-bg-subtle);
}

.courses-header-icon i,
.categories-header-icon i {
    color: var(--osen-primary);
}

.courses-header-text h2,
.categories-header-text h2 {
    color: var(--osen-heading-color);
}

.courses-header-text p,
.categories-header-text p {
    color: var(--osen-heading-color);
    font-size: var(--osen-body-font-size);
    font-weight: var(--osen-body-font-weight);
    line-height: var(--osen-body-line-height);
}

.courses-card-price {
    color: var(--osen-primary);
}

.courses-card-img {
    height: 255px;
    object-fit: cover;
}

.custom-indicators.position-relative {
    bottom: auto !important;
}

/* Header Spacer/Separator */
.header-separator {
    width: 1px;
    height: 24px;
    background-color: var(--osen-border-color);
    margin: 0 1rem;
}

/* Osen UI: Topbar Icons and Badges */
.navbar-frontend .topbar-item {
    display: flex;
    align-items: center;
}

.navbar-frontend .topbar-link {
    position: relative;
    padding: 0.6rem;
    color: var(--osen-heading-color, #4c4c5c);
    font-size: 1.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 50%;
    text-decoration: none !important;
}

.navbar-frontend .topbar-link:hover {
    color: var(--osen-primary, #3c4fd9);
    background-color: var(--osen-gray-100, #f6f7fb);
}

.navbar-frontend .topbar-link .badge-top-right {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: var(--osen-danger, #ff6d43);
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    min-width: 17px;
    height: 17px;
    padding: 0 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    border-radius: 50rem;
    line-height: 1;
}

/* Accessibility Toggle Active State */
.navbar-frontend .topbar-link.accessibility-toggle.active {
    background-color: var(--osen-primary, #3c4fd9);
    color: #ffffff;
}

.navbar-frontend .topbar-link.accessibility-toggle.active:hover {
    background-color: var(--osen-primary-dark, #2a3bc0);
}

.nav-link.position-relative {
    display: inline-flex;
}

/* Profiles */
.nav-profile-img .avatar-content {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: var(--osen-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
}

.nav-profile-img .avatar-content::before {
    content: var(--avatar-letter, "");
}

/* Mobile Toggler */
.navbar-frontend .navbar-toggler {
    border: none;
    padding: 0;
}

.navbar-frontend .navbar-toggler:focus {
    box-shadow: none;
}

@media (max-width: 991.98px) {
    .navbar-frontend {
        height: auto;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
        /*min-height: 60px;*/
    }

    .navbar-frontend .navbar-brand img {
        max-height: 35px;
    }

    .navbar-frontend .topbar-link {
        padding: 0.4rem;
        font-size: 1.15rem;
    }

    .navbar-frontend .navbar-collapse {
        padding: 1rem 0;
    }
}

/* --- HERO SECTION --- */
.hero-section {
    min-height: 70vh;
    display: flex;
    align-items: center;
    background-color: #fafdff;
    padding: 3rem 0;
}

/* --- CATALOG HERO --- */
.catalog-breadcrumbs {
    background-color: var(--osen-gray-100, #f6f7fb);
    width: 100%;
}

.catalog-breadcrumbs-list {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 0;
}

.catalog-breadcrumbs-list .breadcrumb-item {
    color: var(--osen-secondary-color, #9ba6b7);
    font-family: var(--osen-font-sans-serif, 'Inter', sans-serif);
    font-size: 13px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

.catalog-breadcrumbs-list .breadcrumb-item a {
    color: var(--osen-body-color, #4c4c5c);
    text-decoration: none;
}

.catalog-breadcrumbs-list .breadcrumb-item a:hover {
    color: var(--osen-primary, #3c4fd9);
    text-decoration: none;
}

.catalog-breadcrumbs-list .breadcrumb-item.active {
    color: var(--osen-secondary-color, #9ba6b7);
    font-weight: 500;
}

.catalog-breadcrumbs-list .breadcrumb-separator {
    display: inline-flex;
    align-items: center;
    padding: 0 6px;
    color: var(--osen-secondary-color, #9ba6b7);
}

.catalog-breadcrumbs-list .breadcrumb-separator .ti {
    color: var(--osen-secondary-color, #9ba6b7);
}

.catalog-hero {
    padding: 2.5rem 0 3rem;
    background-color: #ffffff;
}

.catalog-hero-banner {
    position: relative;
    padding: 90px 70px;
    border-radius: 20px;
    overflow: hidden;
    min-height: 360px;
    display: flex;
    align-items: center;
}

.catalog-hero-media {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: flex-end;
    align-items: stretch;
    z-index: 1;
}

.catalog-hero-media .carousel,
.catalog-hero-media .carousel-inner,
.catalog-hero-media .carousel-item {
    height: 100%;
    width: 100%;
}

.catalog-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
}

.catalog-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(70 93 255 / 95%) 45%, rgba(60, 79, 217, 0) 100%);
    z-index: 2;
}

.catalog-hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    height: 100%;
}

.catalog-hero-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
}

.catalog-hero-title {
    color: #ffffff;
    text-align: left;
    font-family: var(--osen-font-sans-serif, 'Inter', sans-serif);
    font-size: 35px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    margin-bottom: 12px;
}

.catalog-hero-subtitle {
    color: #ffffff;
    text-align: left;
    font-family: var(--osen-font-sans-serif, 'Inter', sans-serif);
    font-size: 18px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
}

/* --- CATALOG TOOLBAR --- */
.catalog-toolbar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.catalog-toolbar-main {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
    overflow: hidden;
}

.catalog-toolbar-actions {
    display: flex;
    align-items: center;
}

.catalog-filter-group {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem;
    border-radius: 999px;
    background-color: var(--osen-gray-200, #eef2f7);
}

.catalog-filter-pill {
    border: 0px;
    background-color: transparent;
    color: var(--osen-primary, #3c4fd9);
    border-radius: 999px;
    padding: 0.45rem 1.2rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
}

.catalog-filter-pill i {
    font-size: 1rem;
}

.catalog-filter-pill.is-active {
    background-color: var(--osen-primary, #3c4fd9);
    border-color: var(--osen-primary, #3c4fd9);
    color: #ffffff;
}

.catalog-category-buttons-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.95rem;
}

.catalog-category-button {
    font-weight: 600;
    white-space: nowrap;
}

.catalog-category-button.active,
.catalog-category-button:focus,
.catalog-category-button:active {
    background-color: var(--osen-primary, #3c4fd9) !important;
    border-color: var(--osen-primary, #3c4fd9) !important;
    color: #ffffff !important;
    box-shadow: none !important;
    outline: none !important;
}

.catalog-category-button.active .ti-xbox-x-filled {
    display: inline-block !important;
}

.catalog-category-button .ti-xbox-x-filled {
    color: #fff;
    vertical-align: middle;
}

.catalog-filter-categories {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.catalog-filter-categories::-webkit-scrollbar {
    display: none;
}

@media (min-width: 992px) {
    .catalog-toolbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .catalog-toolbar-main {
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
        gap: 1.5rem;
        flex: 1;
        min-width: 0;
    }
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-content h1 {
    line-height: 1.2;
}

.hero-content .btn {
    min-width: 180px;
}

.hero-content .lead {
    color: var(--osen-heading-color);
    font-size: var(--osen-body-font-size);
    font-weight: var(--osen-body-font-weight);
    line-height: var(--osen-body-line-height);
}

/* Hero Carousel Styling */
.hero-carousel .carousel-inner {
    border-radius: 20px;
}

/* Custom Carousel Indicators (Dots) */
.custom-indicators {
    bottom: -50px;
    /* Move indicators below the carousel */
    margin-bottom: 0;
}

/* Custom Carousel Indicators (Dots) */
.custom-indicators {
    bottom: -50px;
    /* Move indicators below the carousel */
    margin-bottom: 0;
}

/* Allow shadows to bleed out of the carousel safely */
.carousel-inner {
    overflow: visible;
}

.carousel {
    overflow: hidden;
    padding: 0 20px;
    margin: 0 -20px;
}

/* Ensure card info icons have the correct theme color */
.card-info i {
    color: var(--osen-primary, #3C4FD9) !important;
    font-size: 1.1rem;
}

.custom-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #dee2e6;
    border: none;
    margin: 0 4px;
    transition: all 0.3s ease;
    opacity: 1;
}

.custom-indicators .active {
    width: 24px;
    /* Pill shape */
    height: 8px;
    border-radius: 4px;
    background-color: var(--osen-primary);
}

/* Utility: rounded-20 */
.rounded-20 {
    border-radius: 20px !important;
}

/* Responsive adjustments for images */
@media (max-width: 1199.98px) {

    .hero-img,
    .about-us-image img {
        height: 380px;
        object-fit: cover;
    }
}

@media (max-width: 991.98px) {

    .courses-section,
    .categories-section,
    .about-us-section {
        padding: 2rem 0;
    }

    .hero-section {
        min-height: auto;
        padding: 0;
    }

    .catalog-hero {
        padding: 2rem 0 2.5rem;
    }

    .catalog-hero-banner {
        padding: 60px 32px;
        min-height: 320px;
    }

    #heroCarousel {
        padding-top: 100px !important;
    }

    .hero-img,
    .about-us-image img {
        height: 420px;
    }

    .courses-card-img {
        height: 300px;
    }

    .custom-indicators {
        bottom: 20px;
    }

    /* Force hero buttons in one row */
    .hero-content .d-flex.flex-wrap {
        flex-wrap: nowrap !important;
        gap: 0.5rem !important;
        overflow-x: auto;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .hero-content .d-flex.flex-wrap::-webkit-scrollbar {
        display: none;
    }

    .hero-content .btn {
        min-width: auto;
        flex: 1;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        font-size: 14px;
        white-space: nowrap;
    }

    .hero-content,
    .about-us-content {
        margin-top: 2rem !important;
        margin-bottom: 4rem !important;
    }

    /* Reduce vertical and horizontal gap between stacked columns on mobile to prevent overflow */
    .row.g-5 {
        --bs-gutter-y: 1.5rem !important;
        --bs-gutter-x: 1.5rem !important;
    }

    .row.g-4 {
        --bs-gutter-y: 1rem !important;
        --bs-gutter-x: 1rem !important;
    }
}

@media (max-width: 575.98px) {

    .hero-img,
    .about-us-image img {
        height: 350px;
    }

    .courses-card-img {
        height: 300px;
    }

    .catalog-toolbar {
        margin-bottom: 2rem;
    }

    .catalog-category-buttons {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.25rem;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .catalog-category-buttons::-webkit-scrollbar {
        display: none;
    }
}

/* Refactoring Utility Classes */
.category-grid-item {
    grid-column: auto/span 1;
}

.modal-dialog-custom-margin {
    margin-top: 14%;
}

.vat-dropdown-style {
    margin-right: 25%;
    margin-left: 25%;
}

.img-course-small {
    width: 24px;
    height: 24px;
    object-fit: cover;
}

.text-truncate-200 {
    max-width: 200px;
}

.btn-outline-primary {
    color: var(--osen-primary);
    border-color: var(--osen-primary);
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: var(--osen-primary);
    border-color: var(--osen-primary);
}

.custom-indicators {
    bottom: 20px;
    /* SPOSTALO PIU VICINO AL CAROSELLO */
    margin-bottom: 0;
}

/* Favorites Button States */
.btn-favorite.is-favorite,
.btn-favorite.is-favorite:focus,
.btn-favorite.is-favorite:active {
    box-shadow: none !important;
}

.btn-favorite:focus,
.btn-favorite:active,
.btn-soft-success:focus,
.btn-soft-success:active,
.btn-primary:focus,
.btn-primary:active {
    box-shadow: none !important;
}

.btn-favorite .ti-heart-filled,
.btn-favorite .ti-x {
    display: none !important;
}

.btn-favorite.is-favorite .ti-heart {
    display: none !important;
}

.btn-favorite.is-favorite .ti-heart-filled {
    display: flex !important;
}

.btn-favorite.is-favorite:hover .ti-heart-filled {
    display: none !important;
}

.btn-favorite.is-favorite:hover .ti-x {
    display: flex !important;
}

/* --- FOOTER SECTION --- */
footer.footer {
    background-color: #ffffff !important;
    padding: 4rem 0 2rem;
    border: 0px !important;
}

.footer-social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap !important;
    padding: 0 1rem;
}

.footer-social-links a {
    color: var(--osen-heading-color, #4C4C5C) !important;
    font-size: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--osen-gray-100, #f8f9fa);
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.footer-social-links a:hover {
    color: #ffffff !important;
    background-color: var(--osen-primary);
    transform: translateY(-3px);
}

.footer-menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
    list-style: none;
    padding: 0;
}

.footer-link,
.copyright,
.copyright a {
    color: var(--theme-muted-foreground, #62748E) !important;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 21px;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.footer-link,
.copyright a {
    text-decoration-line: underline !important;
    text-decoration-style: solid;
    text-decoration-skip-ink: none;
    text-decoration-thickness: auto;
    text-underline-offset: auto;
    text-underline-position: from-font;
}

.footer-link:hover,
.copyright a:hover {
    color: var(--osen-primary) !important;
}

.copyright i {
    font-style: normal;
}

/* Go to top button restyling */
.btn-go-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50% !important;
    background-color: var(--osen-primary);
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    /* No shadow - matches chat and chatbot buttons */
    transition: all 0.3s ease;
    z-index: 1050;
    border: none !important;
    padding: 0;
    text-decoration: none !important;
}

.btn-go-top:hover {
    background-color: var(--osen-link-hover-color);
    transform: translateY(-5px);
    /* No shadow on hover - unified flat style */
    color: #ffffff !important;
}

@media (max-width: 991.98px) {
    .btn-go-top:hover {
        transform: none !important;
    }
}

.btn-go-top i {
    font-size: 20px;
}

@media (max-width: 767.98px) {
    .footer-menu {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
}

/* ===================================
   SEARCH MODAL STYLES
   =================================== */

/* Modal Container */
.search-modal-content {
    border: none;
    border-radius: 20px;
    background-color: #ffffff;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-height: 90vh;
    overflow: hidden;
}

.search-modal-header {
    padding: 1.5rem 1.5rem 0.5rem;
}

.search-modal-body {
    padding: 1rem 1.5rem 1.5rem;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
    position: relative;
}

/* Close Button (Mobile) */
.btn-close-search,
.btn-primary-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--osen-gray-100, #f6f7fb);
    border: none;
    border-radius: 50%;
    color: var(--osen-heading-color, #4c4c5c);
    font-size: 1.25rem;
    z-index: 10;
    transition: all 0.2s ease;
    padding: 0;
}

.btn-close-search {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    display: none;
}

.btn-close-search:hover,
.btn-primary-close:hover {
    background-color: var(--osen-danger, #ff6d43);
    color: #ffffff;
}

@media (max-width: 991.98px) {
    .btn-close-search {
        display: flex;
    }

    .search-input-wrapper {
        margin-top: 3.5rem;
    }
}

/* Search Input */
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-icon {
    position: absolute;
    left: 1.25rem;
    font-size: 1.5rem;
    color: var(--osen-primary, #3c4fd9);
    z-index: 1;
}

.search-input {
    padding: 1.25rem 3.5rem;
    font-size: 1.125rem;
    border: 2px solid var(--osen-border-color, #eef2f7);
    border-radius: 16px;
    background-color: var(--osen-gray-100, #f6f7fb);
    transition: all 0.2s ease;
}

.search-input:focus {
    border-color: var(--osen-primary, #3c4fd9);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(60, 79, 217, 0.1);
    outline: none;
}

.search-input::placeholder {
    color: var(--osen-secondary-color, #9ba6b7);
}

.btn-clear-search {
    position: absolute;
    right: 1rem;
    padding: 0.5rem;
    border: none;
    background: transparent;
    color: var(--osen-secondary-color, #9ba6b7);
    cursor: pointer;
    transition: color 0.2s ease;
}

.btn-clear-search:hover {
    color: var(--osen-danger, #ff6d43);
}

/* Sort Buttons */
.search-sort-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.search-sort-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--osen-secondary-color, #9ba6b7);
}

.search-sort-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-sort {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--osen-heading-color, #4c4c5c);
    background-color: var(--osen-gray-100, #f6f7fb);
    border: 1px solid transparent;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.btn-sort:hover {
    background-color: var(--osen-gray-200, #eef2f7);
}

.btn-sort.active {
    background-color: var(--osen-primary, #3c4fd9);
    color: #ffffff;
}

.btn-sort i {
    font-size: 1rem;
}

/* Loading State */
.search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--osen-secondary-color, #9ba6b7);
}

/* No Results */
.search-no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--osen-secondary-color, #9ba6b7);
}

.search-no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.search-no-results h5 {
    color: var(--osen-heading-color, #4c4c5c);
    margin-bottom: 0.5rem;
}

.search-no-results p {
    margin: 0;
    font-size: 0.875rem;
}

/* Results List */
.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: #ffffff;
    border: 1px solid var(--osen-border-color, #eef2f7);
    border-radius: 12px;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    border-color: var(--osen-primary, #3c4fd9);
    box-shadow: 0 4px 12px rgba(60, 79, 217, 0.1);
    transform: translateX(4px);
}

.search-result-image {
    width: 64px;
    height: 64px;
    min-width: 64px;
    border-radius: 10px;
    overflow: hidden;
    background-color: var(--osen-gray-100, #f6f7fb);
}

.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--osen-heading-color, #4c4c5c);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-description {
    margin: 0 0 0.5rem;
    font-size: 0.8125rem;
    color: var(--osen-secondary-color, #9ba6b7);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.search-result-price {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--osen-primary, #3c4fd9);
}

.search-result-arrow {
    color: var(--osen-secondary-color, #9ba6b7);
    font-size: 1.25rem;
    transition: transform 0.2s ease;
}

.search-result-item:hover .search-result-arrow {
    transform: translateX(4px);
    color: var(--osen-primary, #3c4fd9);
}

/* Category Badges in Search */
.badge-category {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--osen-primary, #3c4fd9);
    background-color: #ffffff;
    border: 1px solid var(--osen-primary-bg-subtle, rgba(60, 79, 217, 0.1));
    border-radius: 50px;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.badge-category:hover {
    background-color: var(--osen-primary, #3c4fd9);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(60, 79, 217, 0.15);
}

.search-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--osen-secondary-color, #9ba6b7);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.25rem;
    position: relative;
}

.search-section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: var(--osen-border-color, #f1f4f9);
}

.search-section-title i {
    font-size: 1.1rem;
    color: var(--osen-primary, #3c4fd9);
}

.offcanvas {
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    z-index: 2000 !important;
}

.offcanvas-backdrop {
    z-index: 1999 !important;
}

.modal {
    z-index: 1055 !important;
}

.modal-backdrop {
    z-index: 1050 !important;
}

/* Social icons in offcanvas to match footer */
.btn-social-outline {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    background-color: var(--osen-gray-100, #f8f9fa) !important;
    transition: all 0.2s ease;
    color: var(--osen-heading-color, #4C4C5C) !important;
    border: none !important;
    text-decoration: none !important;
    padding: 0 !important;
}

.btn-social-outline:hover {
    color: #ffffff !important;
    background-color: var(--osen-primary) !important;
    transform: translateY(-3px);
}

.btn-social-outline i,
.btn-social-outline svg {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.sort-direction-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9em;
    vertical-align: middle;
}

/* Search History */
.search-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.search-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.btn-history-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    flex: 1;
    padding: 0.75rem;
    font-size: 0.9375rem;
    color: var(--osen-heading-color, #4c4c5c);
    background: transparent;
    border: none;
    border-radius: 8px;
    text-align: left;
    transition: background-color 0.2s ease;
}

.btn-history-item:hover {
    background-color: var(--osen-gray-100, #f6f7fb);
}

.btn-history-item i {
    color: var(--osen-secondary-color, #9ba6b7);
    font-size: 1.125rem;
}

.btn-remove-history {
    padding: 0.5rem;
    color: var(--osen-secondary-color, #9ba6b7);
    background: transparent;
    border: none;
    border-radius: 6px;
    opacity: 0;
    transition: all 0.2s ease;
}

.search-history-item:hover .btn-remove-history {
    opacity: 1;
}

.btn-remove-history:hover {
    color: var(--osen-danger, #ff6d43);
    background-color: rgba(255, 109, 67, 0.1);
}

/* Mobile Fullscreen Modal */
@media (max-width: 767.98px) {
    .search-modal-content {
        border-radius: 0;
        max-height: 100vh;
    }

    .search-modal-body {
        max-height: calc(100vh - 60px);
    }

    .search-input {
        font-size: 1rem;
        padding: 1rem 3rem;
    }

    .search-result-image {
        width: 56px;
        height: 56px;
        min-width: 56px;
    }
}

/* --- PERSONALIZED STUDENT HERO --- */
.student-stat-box {
    border-radius: var(--Box, 16px);
    background: var(--BG-Card-BG, #FFF);
    box-shadow: 0 0 30px 0 var(--Shadow, rgba(104, 134, 177, 0.15));
    padding: 1.25rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-small-title {
    color: #9BA6B7;
    /* var(--Text-Colors-Body-Text) */
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    display: block;
}

.stat-big-value {
    color: #4C4C5C;
    /* var(--Text-Colors-Heading-Text) */
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    margin-bottom: 0;
}

.stat-underline-link {
    color: var(--osen-primary, #3C4FD9);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    text-decoration-line: underline;
}

.last-course-highlight {
    background: #FFF;
    border: 1px solid #f6f7fb;
    overflow: hidden;
}

.last-course-highlight .text-truncate {
    max-width: 100%;
    overflow: hidden;
    min-width: 0;
}

.last-course-highlight .flex-grow-1 {
    min-width: 0;
    overflow: hidden;
}

.course-name-display {
    color: #4C4C5C;
    font-size: 16px;
    display: block;
}

.stat-icon-wrap {
    width: 60px;
    height: 60px;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 28px;
    background-color: var(--osen-primary-bg-subtle);
    ;
    color: var(--osen-primary);
    ;
}

.btn-soft-secondary {
    background-color: #f0f2f5 !important;
    color: #6c757d !important;
    border: none !important;
}

.btn-soft-secondary:hover {
    background-color: #6c757d !important;
    color: #fff !important;
}

.resume-btn {
    font-size: 13px;
    padding: 0.5rem 1.25rem;
}

.personalized-hero .apexcharts-canvas text {
    font-family: 'Inter', sans-serif !important;
}

@media (max-width: 575.98px) {
    .personalized-hero h1.display-6 {
        font-size: 1.5rem;
    }
}

/* --- ERROR 404 PAGE --- */
.error-title {
    color: var(--Text-Colors-Heading-Text, #4C4C5C);
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
}

.error-text {
    color: var(--Text-Colors-Heading-Text, #4C4C5C);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 21px;
    /* 150% */
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.btn-error-home {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-error-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--bs-primary-rgb), 0.3) !important;
}

.error-404-container {
    padding-top: 5rem;
    padding-bottom: 5rem;
    margin-top: 3rem;
    margin-bottom: 3rem;
}