@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Hebrew:wght@100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Alef:wght@400;700&family=Noto+Sans+Hebrew:wght@100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@200..800&display=swap');

/* ============================================================================
   MC-257 — main-site design tokens.
   The instructor panel got this vocabulary in MC-237; the customer-facing site
   never did, so colours were hardcoded per rule. Names mirror MC-237 so the two
   halves of the product speak the same language.

   NOTE: this file already REFERENCED var(--secondary) / var(--gray) / var(--primary)
   (course-card text and footer) without any :root ever defining them, so those three
   declarations were invalid and silently fell back to the inherited body colour.
   Defining the tokens here is what makes those rules finally apply.
   ============================================================================ */
:root {
    /* Brand */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #e8f0fe;

    /* Text — --secondary matches the existing body colour so headings do not shift. */
    --secondary: #2a2b3f;
    --gray: #6b7280;
    --muted: #9aa1ad;

    /* Surfaces & lines */
    --bg: #F9FAFD;
    --surface: #ffffff;
    --surface-alt: #f2f5fb;
    --border: #e4e8f0;

    /* Semantic */
    --success: #198754;
    --danger: #dc3545;
    --warning: #f59e0b;
    --info: #0dcaf0;

    /* Shape & elevation */
    --radius-sm: 8px;
    --radius: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 2px 4px rgba(6, 17, 118, 0.06);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 32px rgba(6, 17, 118, 0.12);

    /* Spacing scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 1rem;
    --space-4: 1.5rem;
    --space-5: 2.5rem;
}

*{
    font-family: 'Noto Sans Hebrew', sans-serif;
    /* font-family: "Alef"; */
}
body{
    background-size: cover;
    background-color: #F9FAFD !important;
    color:#2a2b3f;
    
}



.main_content
{
    /* background-image: linear-gradient(to left,rgb(238, 234, 234),rgb(241, 241, 233)); */
    padding:35px;
}

.best-seller-icon{
    /* color: var(--ribbon-color) !important; */
    width:50px;
}

.search-results{
    position:absolute;
    background-color: white;
    width:100%;
    z-index: 9999999;
    max-height: 500px;
    direction: rtl;
    overflow-y: auto;
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
    margin-top:10px;
    border-radius:5px;
}

.show{
    transform: scaleY(1);
    opacity: 1;
}

.search-results ul{
    direction: rtl;
}
.search-result{
    transition: 0.3s;
    width:100%;
    text-decoration: none;
    list-style: none;
    font-size: large;
    font-weight: bolder;
    display: flex;
    flex-direction: row;
}

.search-result-instructor-link{
    color: grey;
    font-size: 14px;
    text-decoration: none;
}

.search-result-course-data{
    display:flex;
    flex-direction: column;
}

.search-result-course-image img{
    width: 50px;
    height: 50px;
    margin-left:10px;
}

/* .search-result:hover{
        color:#18191a;
    background-color:  rgba(174, 172, 172, 0.25);
    border-radius: 15px;
} */

.search-result-link{
    text-decoration: none;
    color:#18191a;
    transition: 0.3s;
}

.search-result-link:hover{
    text-decoration: underline;
    color:#18191a;
}

.navbar-search-input{
    border-radius: 25px;
    background-color: #F9FAFD;
    direction: rtl;
    height:6vh;
}

.course-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 500px;

}

.course-card:hover {
    transform: translateY(-10px);
}

.course-card img {
    width: 100%;
    /* MC-257: course artwork is 1:1 (every file in images/EditedImages is square). Pinning the
       ratio keeps every card the same height and reserves the right box before the image loads,
       so nothing shifts. object-fit: cover then handles any future non-square upload by cropping
       rather than distorting. Views/Profile.php overrides this with an explicit height in
       PersonalPage.css, which loads later. */
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.course-card a {
    text-decoration: none;
}

.course-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.course-card-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    color: var(--secondary);
}

.course-card-content p {
    font-size: 0.95rem;
    color: var(--gray);
}

.course-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    font-weight: 600;
    color: var(--primary);
}

/* Home page "My Courses" row — circular course progress (MC-226) */
.home-my-courses-progress.progress-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: conic-gradient(#198754 0% var(--progress), #e9ecef var(--progress) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.home-my-courses-progress .progress-circle-inner {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: #198754;
}
    
/* .course-card-extra-data{
    display:flex;
    word-spacing: 10px;
} */

.course-card-extra{
    margin: 10px;
}

.course-tag{
    margin-left:5px;
}

.course-card-list-item{

    list-style: none;
}
.accordion-button{
    transition: 0.1s !important;
}
.accordion-button::after{
    margin-left:0 !important;
    margin-right:auto !important;
}
.accordion-button:hover{
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .25);
}
.mainpage-coursel-img{
  width: 100%;
  height: auto;
  image-rendering: -webkit-optimize-contrast;
}

/* Home carousel feature slides (Sum Drive, discounts, subscription, bundles).
   Per-slide gradient is set inline in Views/Massvid.php ($featureSlides). */
.home-feature-slide{
  display:flex; align-items:center; justify-content:center; text-align:center; text-decoration:none;
  width:100%; aspect-ratio: 1000 / 300; min-height:200px;
  color:#fff; border-radius:12px; padding:1rem; direction:rtl;
}
.home-feature-inner{ max-width:760px; }
.home-feature-emoji{ font-size:2.6rem; line-height:1; margin-bottom:.4rem; }
.home-feature-inner h2{ font-weight:800; font-size:clamp(1.2rem, 3.2vw, 2.1rem); margin:0 0 .4rem; }
.home-feature-inner p{ font-size:clamp(.85rem, 1.8vw, 1.1rem); opacity:.92; margin:0 0 .9rem; }
.home-feature-cta{
  display:inline-flex; align-items:center; gap:.4rem;
  background:#fff; color:#1e293b; font-weight:700; border-radius:50px;
  padding:.5rem 1.3rem; font-size:clamp(.85rem, 1.8vw, 1.05rem); transition:transform .15s;
}
.home-feature-slide:hover .home-feature-cta{ transform:translateX(-4px); }

/*      Coures Page              */
.mvContainer
{
    margin-bottom: 10%;
    margin-top: 10%;
    padding: 5%;
    animation: MassvidItemAnimation 1s;
    box-shadow: 0 2px 4px rgba(6,17,118,0.08), 0 4px 12px rgba(6,17,118,0.08);
}
.homePageCourseCardRating{
    display: flex;
}

.courseSumLink{
    text-decoration: none;
    color:#2a2b3f;
    transition: 0.2s;
}
.courseSumLink:hover{
    font-size: x-large!important;
}
#courseDescription{
    font-size: x-large;
}

.bundle{
    align-items: center;
    text-decoration: none;
    font-size:x-large;
    transition: 0.5s;
    box-shadow: 0 2px 4px rgba(6,17,118,0.08), 0 4px 12px rgba(6,17,118,0.08);
    max-width: 17rem;
    min-width: 17rem;
    max-height: 35rem;
    min-height: 35rem;
    margin:50px;
    overflow:hidden;
    position: relative;
    border-radius: 15px;

}

.bundle:hover{
    background-color: #f1f2f2;
}
.bundle-images img{
    border-radius: 15px;
}

#HeadlineContainer
{
    border-bottom: 1px solid rgb(205, 205, 205);
    word-spacing: 10px;
}


.subject-videos-video{
    list-style:decimal;
}
.subject-videos-video-link{
    text-decoration: none;
    color:#18191a;
    transition: 0.2s;

}

.subject-videos-video-watched{
    list-style:url('https://upload.wikimedia.org/wikipedia/commons/3/3b/Eo_circle_green_checkmark.svg');
}

.subject-videos-video-watched::marker{
    font-size: 1.5em;
}
.subject-videos-video-link:hover{
    color:#18191a;
    background-color:  rgba(13, 110, 253, .25);
    border-radius: 15px;

}
@keyframes MassvidItemAnimation
{
    0%{opacity: 0;}
    
    100% {visibility: visible;opacity: 1;}
}

@media only screen and (min-width:1000px)
{
    #myOptions li       
        {
            margin-left:15px;
        }

        .course-card{
            max-width: 300px;
            max-height:500px;
        }
                .card-title {
                    white-space: nowrap !important;
                    overflow: hidden !important;
                    text-overflow: ellipsis !important;
                }
            

}

.my_headline{
    
    width: 100%;
    height:150px;
    margin-bottom:25px;
    text-align: center;
    align-items: center;
}
.my_headline_h1
{
    font-weight: bolder;
    position:absolute;
    right:0%;
    left:0%;
    

}
/********************************************* Video Page ******************************************/

.playing{
    color:#18191a;
    background-color:  rgba(13, 110, 253, .25);
    border-radius: 15px;
}
.comments
{
    background-color: #282828;
    padding: 2%;
    border-radius: 15px;
    box-shadow: 5px 5px #18191a;
    animation: MassvidItemAnimation 1s;
}

#Comment{
    transition: 0.2s;
}

#show_commetns
{
    text-decoration: none;
}
#show_commetns:hover{
    text-decoration: underline;
}
#Speed
{
    width:5%;
}
#MyVid{
    width:80%;
}

#Video{
    height:50vh;
}

/*********************************** Profile Page ******************************************************/
.profile_instructorCourses_headline{
}
.profile_instructor_courseCard
{
    max-height:300px;
    margin-top: 50px;
    position:relative;
}


/*********************************** Search Modal ******************************************************/


#SearchModalInput{
    border-top:unset;
    border-right:unset;
    border-left:unset;
}

.extra{
    list-style: none;
}
.controllers svg{
    cursor: pointer;
}
/* General tooltip look */
.tooltip-inner {
  background: #fff !important;
  color: #212529 !important;
  border: 1px solid #dee2e6;
  border-radius: 0.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-width: 320px;
  padding: 0;
  text-align: left;
  opacity: 1 !important;
}

/* Optional arrow color */
.tooltip.bs-tooltip-top .tooltip-arrow::before,
.tooltip.bs-tooltip-auto[data-popper-placement^='top'] .tooltip-arrow::before {
  border-top-color: #fff !important;
}

/* Header styling */
.tooltip-inner h3 {
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(90deg, #007bff 0%, #6610f2 100%);
  color: #fff;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-top-left-radius: 0.75rem;
  border-top-right-radius: 0.75rem;
  text-align: center;
}

/* Description text */
.tooltip-inner p {
  font-size: 0.875rem;
  color: #333;
  margin: 0;
  padding: 0.75rem;
  line-height: 1.4;
  background-color: #fff;
  text-align: center;
}

.tooltip.bs-tooltip-top .tooltip-arrow::before,
.tooltip.bs-tooltip-bottom .tooltip-arrow::before,
.tooltip.bs-tooltip-start .tooltip-arrow::before,
.tooltip.bs-tooltip-end .tooltip-arrow::before {
  border-top-color: #fff; /* match background */
  border-bottom-color: #fff;
  border-left-color: #fff;
  border-right-color: #fff;
}
.tooltip.show {
  opacity: 1 !important;
}

#FirstLoginModal{
font-family: "Assistant", sans-serif;
  font-optical-sizing: auto;
  font-weight: normal;
  font-style: normal;
}

.welcome-modal-carusel-item{
    height:50vh;
}

/* MC-240: video access-gate modal (#UnAuthorizedModal) */
#UnAuthorizedModal .modal-content{
    border:0;
    border-radius:1.25rem;
    overflow:hidden;
    box-shadow:0 24px 60px rgba(0,0,0,.25);
}
#UnAuthorizedModal .ua-icon{
    width:76px;
    height:76px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    margin:0 auto 1rem;
    background:#e7f5ec;
    color:#198754;
}
#UnAuthorizedModal .ua-icon svg{
    width:38px;
    height:38px;
}
#UnAuthorizedModal .modal-title-lock{
    font-weight:800;
}
#UnAuthorizedModal .btn-go{
    box-shadow:0 8px 20px rgba(25,135,84,.3);
    border-radius:.75rem;
}
/* MC-257: moved out of the inline <style> block in Views/Course.php.
   Course-page course-progress ring. Views/Profile.php overrides the sizes in
   PersonalPage.css, which loads after this file. */
.progress-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: conic-gradient(#198754 0% var(--progress), #e9ecef var(--progress) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-circle-inner {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: #198754;
}

/* MC-257: heading hierarchy. Several elements changed tag so each page has exactly one
   <h1>; these rules keep every one of them rendering at its previous size. */
.categoryHeadline,
.section-headline {
    font-size: 2.5rem;
    font-weight: 500;
    line-height: 1.2;
}

.welcome-modal-title {
    font-size: 2.5rem;
    font-weight: 500;
    line-height: 1.2;
}

/* Promoted from <h2> to <h1>; keep the smaller heading scale they were designed with. */
#VideoName,
.page-headline {
    font-size: 2rem;
    font-weight: 500;
    line-height: 1.2;
}

/* ============================================================================
   MC-257 — course page: two-column hero + sticky purchase card + subject cards.
   Replaces a hero that was eight stacked centred <p> tags of equal weight.
   ============================================================================ */

.course-hero {
    margin-bottom: var(--space-5);
}

/* Course artwork is 1:1 (every file in images/EditedImages is square), so it is framed as a
   fixed poster next to the title. Stretching it to full column width and capping the height
   distorted it. */
.course-hero-top {
    display: flex;
    gap: var(--space-4);
    align-items: flex-start;
    flex-wrap: wrap;
}

.course-hero-media {
    flex: 0 0 240px;
    width: 240px;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: var(--surface-alt);
}

.course-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.course-hero-headline {
    flex: 1 1 320px;
    min-width: 0;
}

/* ---- Positive-only credibility badge (replaces the star rating) ----
   Courses.rating is a popularity tier derived from views/purchases with a floor of 4.0, not a
   user rating, so stars were uninformative and penalised new courses. A course that has not
   earned a popularity badge shows "חדש" instead of a weak score; none of these say anything
   negative. */
.course-badge {
    display: inline-block;
    padding: 0.25rem 0.8rem;
    margin-bottom: var(--space-2);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.course-badge-bestseller {
    background: #fef3c7;
    color: #92400e;
}

.course-badge-popular {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.course-badge-new {
    background: #d1fae5;
    color: #065f46;
}

.course-hero h1 {
    color: var(--secondary);
    font-weight: 700;
}

/* ---- Hero meta row: instructor, rating, duration/lesson/subject chips ---- */
.course-instructor-chip {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
}

.course-instructor-chip:hover {
    text-decoration: underline;
}

.course-instructor-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.course-rating {
    font-size: 1rem;
    letter-spacing: 1px;
}

.course-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    background: var(--surface-alt);
    color: var(--gray);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

.course-description {
    color: var(--gray);
    font-size: 1rem;
    line-height: 1.8;
    max-width: 70ch;
}

/* ---- Sticky purchase card ---- */
.course-buy-card {
    position: sticky;
    top: var(--space-4);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: var(--space-4);
}

.course-buy-price {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.course-buy-price .price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary);
}

.course-buy-price .oldPrice {
    font-size: 1.1rem;
    color: var(--muted);
}

/* The buttons inside come from the controller's $purchase markup — style the
   container, never the button ids, so the existing handlers keep working. */
.course-buy-action {
    display: block;
    margin-bottom: var(--space-3);
}

.course-buy-action .btn {
    width: 100%;
    padding: 0.65rem 1rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.course-preview-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    width: 100%;
    padding: 0.6rem 1rem;
    margin-bottom: var(--space-3);
    border: 2px dashed var(--success);
    border-radius: var(--radius-sm);
    color: var(--success);
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s;
}

.course-preview-cta:hover {
    background: var(--success);
    color: #fff;
}

.course-includes {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-3) 0;
    border-top: 1px solid var(--border);
    padding-top: var(--space-3);
}

.course-includes li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--gray);
    font-size: 0.925rem;
    padding: 0.3rem 0;
}

.course-includes li::before {
    content: "✓";
    color: var(--success);
    font-weight: 700;
}

.course-contact-instructor {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    color: var(--gray);
    font-size: 0.9rem;
    text-decoration: none;
    padding-top: var(--space-2);
    border-top: 1px solid var(--border);
}

.course-contact-instructor:hover {
    color: var(--primary);
}

/* ---- Subject cards (were bare accordion buttons) ---- */
.subject-card {
    background: var(--surface) !important;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: var(--space-3);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.subject-card:hover {
    box-shadow: var(--shadow-md);
}

.subject-card-heading {
    margin: 0;
    font-size: 1rem;
}

.subject-card-heading .accordion-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    flex-wrap: wrap;
    box-shadow: none;
}

.subject-card-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--secondary);
}

.subject-card-meta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.subject-chip {
    background: var(--surface-alt);
    color: var(--gray);
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
    font-size: 0.8rem;
    white-space: nowrap;
}

.subject-progress-ring {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: conic-gradient(var(--success) 0% var(--progress), #e9ecef var(--progress) 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.subject-progress-ring-inner {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--success);
}

@media (max-width: 991px) {
    .course-buy-card {
        position: static;
        margin-top: var(--space-4);
    }
}

@media (max-width: 575px) {
    .course-hero-media {
        flex: 0 0 140px;
        width: 140px;
    }
}
