/* ============================================
   Frontend Modern Design — HiStudy 2025
   ============================================ */

/* ===== HERO SECTIONS ===== */
.hero-section {
    background: linear-gradient(135deg, #fafafe 0%, var(--c-primary-light, #eef2ff) 50%, #fafafe 100%);
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -40%;
    left: -20%;
    width: 60%;
    height: 80%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--c-primary-rgb, 79, 70, 229), .06), transparent 70%);
    pointer-events: none;
}
.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -15%;
    width: 50%;
    height: 70%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124,58,237,.04), transparent 70%);
    pointer-events: none;
}
/* الهيرو: الكلام يمين والصورة شمال — وع الموبايل الكلام فوق والصورة تحته */
.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: center;
}
.hero-section.hero-has-image .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
}
.hero-text { text-align: center; max-width: 720px; margin: 0 auto; }
.hero-section.hero-has-image .hero-text { text-align: right; max-width: none; margin: 0; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 18px;
    background: var(--c-primary-light, #eef2ff);
    border: 1px solid rgba(var(--c-primary-rgb, 79, 70, 229), .15);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: var(--c-primary, #4f46e5);
    margin-bottom: 18px;
}
.hero-title {
    font-size: clamp(1.9rem, 4.2vw, 2.9rem);
    font-weight: 900;
    color: var(--c-dark, #0f172a);
    line-height: 1.3;
    margin-bottom: 16px;
}
.hero-subtitle {
    font-size: 16px;
    color: #64748b;
    line-height: 1.8;
    max-width: 560px;
    margin: 0 auto 28px;
}
.hero-section.hero-has-image .hero-subtitle { margin-right: 0; margin-left: 0; }
.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.hero-section.hero-has-image .hero-actions { justify-content: flex-start; }

/* صورة المدرس */
.hero-media {
    position: relative;
    display: flex;
    justify-content: center;
}
.hero-media::before {
    content: '';
    position: absolute;
    inset: 8% 6%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--c-primary-rgb, 79, 70, 229), .16), transparent 68%);
    filter: blur(26px);
    z-index: 0;
}
.hero-media img {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 430px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 18px 34px rgba(15, 23, 42, .18));
}

/* ===== فيديو الرئيسية ===== */
.home-video-section { padding-top: 40px; padding-bottom: 40px; }
.home-video-frame {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 14px 40px rgba(15, 23, 42, .16);
}
.home-video-frame iframe,
.home-video-frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

@media (max-width: 991px) {
    /* الكلام الأول والصورة تحته */
    .hero-section.hero-has-image .hero-grid { grid-template-columns: 1fr; gap: 24px; }
    .hero-section.hero-has-image .hero-text { text-align: center; }
    .hero-section.hero-has-image .hero-actions { justify-content: center; }
    .hero-section.hero-has-image .hero-subtitle { margin-right: auto; margin-left: auto; }
    .hero-media img { max-width: 330px; }
}

/* ===== BREADCRUMB HERO (inner pages) ===== */
.breadcrumb-hero {
    background: linear-gradient(135deg, var(--c-gradient-from, #4f46e5), var(--c-gradient-to, #7c3aed));
    padding: 48px 0;
    position: relative;
    overflow: hidden;
    text-align: center;
}
.breadcrumb-hero::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
}
.breadcrumb-hero::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255,255,255,.04);
}
.breadcrumb-hero h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}
.breadcrumb-hero .breadcrumb-nav {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    font-size: 13px;
    color: rgba(255,255,255,.7);
    position: relative;
    z-index: 1;
}
.breadcrumb-hero .breadcrumb-nav a {
    color: rgba(255,255,255,.85);
    text-decoration: none;
    transition: color .2s;
}
.breadcrumb-hero .breadcrumb-nav a:hover { color: #fff; }
.breadcrumb-hero .breadcrumb-nav .sep { opacity: .5; }

/* ===== SECTION HEADERS ===== */
.section-block { padding: 70px 0; }
.section-block-alt { background: #f8fafc; }
.section-header {
    text-align: center;
    margin-bottom: 44px;
}
.section-header .badge-label {
    display: inline-block;
    padding: 4px 14px;
    background: var(--c-primary-light, #eef2ff);
    color: var(--c-primary, #4f46e5);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .5px;
    margin-bottom: 10px;
}
.section-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--c-dark, #0f172a);
    margin-bottom: 8px;
}
.section-header p {
    font-size: 14px;
    color: #64748b;
    max-width: 500px;
    margin: 0 auto;
}

/* ===== MODERN BUTTONS ===== */
.modern-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--c-primary, #4f46e5);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all .25s ease;
    box-shadow: 0 4px 14px rgba(var(--c-primary-rgb, 79, 70, 229), .2);
}
.modern-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(var(--c-primary-rgb, 79, 70, 229), .3);
    color: #fff;
}
.modern-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: transparent;
    color: var(--c-primary, #4f46e5);
    border: 1.5px solid var(--c-primary, #4f46e5);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all .25s ease;
}
.modern-btn-outline:hover {
    background: var(--c-primary, #4f46e5);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(var(--c-primary-rgb, 79, 70, 229), .25);
}
.modern-btn-sm {
    padding: 8px 18px;
    font-size: 13px;
    border-radius: 10px;
}
.modern-btn-white {
    background: #fff;
    color: var(--c-primary, #4f46e5);
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
}
.modern-btn-white:hover {
    color: var(--c-primary, #4f46e5);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.modern-btn-success {
    background: #059669;
    box-shadow: 0 4px 14px rgba(5,150,105,.2);
}
.modern-btn-success:hover {
    box-shadow: 0 8px 24px rgba(5,150,105,.3);
    color: #fff;
}

/* ===== COURSE CARD ===== */
.course-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
    transition: all .3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.course-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,.08);
    border-color: #c7d2fe;
}
.course-card .card-thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}
.course-card .card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.course-card:hover .card-thumb img {
    transform: scale(1.05);
}
.course-card .card-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.course-card .badge-tag {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    backdrop-filter: blur(8px);
}
.badge-free { background: rgba(5,150,105,.9); color: #fff; }
.badge-featured { background: rgba(245,158,11,.9); color: #fff; }
.badge-discount { background: rgba(239,68,68,.9); color: #fff; }
.badge-new { background: rgba(var(--c-primary-rgb, 79, 70, 229), .9); color: #fff; }

.course-card .card-body {
    padding: 18px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.course-card .card-category {
    font-size: 11px;
    font-weight: 600;
    color: var(--c-primary, #4f46e5);
    margin-bottom: 6px;
}
.course-card .card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--c-dark, #0f172a);
    margin-bottom: 10px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.course-card .card-title a {
    color: inherit;
    text-decoration: none;
    transition: color .2s;
}
.course-card .card-title a:hover { color: var(--c-primary, #4f46e5); }

.course-card .card-meta {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 14px;
}
.course-card .card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}
.course-card .card-meta i { font-size: 13px; }

.course-card .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid #f3f4f6;
    margin-top: auto;
}
.course-card .card-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--c-primary, #4f46e5);
}
.course-card .card-price .old-price {
    font-size: 12px;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 500;
    margin-right: 6px;
}
.course-card .card-price .free-tag {
    color: #059669;
    font-size: 14px;
}
.course-card .card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #f59e0b;
    font-weight: 700;
}
.course-card .card-rating i { font-size: 12px; }
.course-card .card-rating .count { color: #94a3b8; font-weight: 500; }

/* Progress bar on enrolled cards */
.course-card .card-progress {
    padding: 0 20px 16px;
}
.course-card .card-progress .bar {
    height: 4px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}
.course-card .card-progress .fill {
    height: 100%;
    background: linear-gradient(90deg, #059669, #34d399);
    border-radius: 4px;
    transition: width .4s ease;
}
.course-card .card-progress .pct {
    font-size: 11px;
    color: #059669;
    font-weight: 600;
    text-align: left;
}

/* ===== CATEGORY CARD ===== */
.category-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    transition: all .3s ease;
    text-decoration: none;
    display: block;
}
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,.06);
    border-color: var(--c-primary, #4f46e5);
}
.category-card .cat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--c-primary-light, #eef2ff);
    color: var(--c-primary, #4f46e5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin: 0 auto 14px;
    transition: all .3s;
}
.category-card:hover .cat-icon {
    background: var(--c-primary, #4f46e5);
    color: #fff;
}
.category-card .cat-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--c-dark, #0f172a);
    margin-bottom: 4px;
}
.category-card .cat-count {
    font-size: 12px;
    color: #94a3b8;
}

/* ===== STAT CARD ===== */
.modern-stat {
    text-align: center;
    padding: 28px 20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    transition: all .3s;
}
.modern-stat:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,.06);
}
.modern-stat .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin: 0 auto 14px;
}
.modern-stat .stat-num {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--c-dark, #0f172a);
    line-height: 1;
    margin-bottom: 4px;
}
.modern-stat .stat-label {
    font-size: 13px;
    color: #64748b;
}

/* ===== FEATURE CARD ===== */
.feature-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 28px 24px;
    transition: all .3s ease;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,.06);
    border-color: var(--c-primary, #4f46e5);
}
.feature-card .feat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}
.feature-card h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--c-dark, #0f172a);
    margin-bottom: 8px;
}
.feature-card p {
    font-size: 13px;
    color: #64748b;
    line-height: 1.7;
    margin: 0;
}

/* ===== BLOG CARD ===== */
.blog-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
    transition: all .3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,.08);
}
.blog-card .blog-thumb {
    aspect-ratio: 16/9;
    overflow: hidden;
}
.blog-card .blog-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.blog-card:hover .blog-thumb img { transform: scale(1.05); }
.blog-card .blog-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.blog-card .blog-category {
    font-size: 11px;
    font-weight: 700;
    color: var(--c-primary, #4f46e5);
    background: var(--c-primary-light, #eef2ff);
    padding: 3px 10px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 10px;
    width: fit-content;
}
.blog-card .blog-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--c-dark, #0f172a);
    margin-bottom: 8px;
    line-height: 1.5;
}
.blog-card .blog-title a {
    color: inherit;
    text-decoration: none;
    transition: color .2s;
}
.blog-card .blog-title a:hover { color: var(--c-primary, #4f46e5); }
.blog-card .blog-excerpt {
    font-size: 13px;
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-card .blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #94a3b8;
    padding-top: 14px;
    border-top: 1px solid #f3f4f6;
    margin-top: auto;
}

/* ===== BUNDLE / PATH CARD ===== */
.bundle-card, .path-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
    transition: all .3s ease;
}
.bundle-card:hover, .path-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,.08);
    border-color: #c7d2fe;
}
.bundle-card .card-thumb, .path-card .card-thumb {
    aspect-ratio: 16/9;
    overflow: hidden;
}
.bundle-card .card-thumb img, .path-card .card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.bundle-card:hover .card-thumb img, .path-card:hover .card-thumb img {
    transform: scale(1.05);
}
.bundle-card .card-body, .path-card .card-body {
    padding: 20px;
}
.bundle-card .card-title, .path-card .card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--c-dark, #0f172a);
    margin-bottom: 8px;
}
.bundle-card .card-title a, .path-card .card-title a {
    color: inherit;
    text-decoration: none;
}
.bundle-card .card-desc, .path-card .card-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.bundle-card .card-footer, .path-card .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid #f3f4f6;
}

/* ===== CONTACT CARD ===== */
.contact-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 28px 24px;
    text-align: center;
    transition: all .3s;
}
.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,.06);
    border-color: var(--c-primary, #4f46e5);
}
.contact-card .cc-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin: 0 auto 16px;
    transition: all .3s;
}
.contact-card:hover .cc-icon {
    transform: scale(1.1);
}
.contact-card h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--c-dark, #0f172a);
    margin-bottom: 6px;
}
.contact-card p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}
.contact-card a {
    color: var(--c-primary, #4f46e5);
    text-decoration: none;
    font-weight: 600;
}

/* ===== CTA SECTION ===== */
.cta-section {
    background: linear-gradient(135deg, var(--c-gradient-from, #4f46e5), var(--c-gradient-to, #7c3aed));
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
}
.cta-section h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
    position: relative;
}
.cta-section p {
    color: rgba(255,255,255,.75);
    font-size: 14px;
    margin-bottom: 24px;
    position: relative;
}

/* ===== GRADIENT TEXT CARD (about/features) ===== */
.gradient-card {
    background: linear-gradient(135deg, var(--c-gradient-from, #4f46e5), var(--c-gradient-to, #7c3aed));
    border-radius: 24px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    color: #fff;
    height: 100%;
}
.gradient-card::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
}
.gradient-card::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255,255,255,.05);
}
.gradient-card > * { position: relative; z-index: 1; }
.gradient-card h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 12px;
}
.gradient-card p {
    font-size: 14px;
    opacity: .85;
    line-height: 1.8;
}

/* ===== FORM MODERN ===== */
.modern-form .form-group {
    margin-bottom: 18px;
}
.modern-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--c-dark, #1e293b);
    margin-bottom: 6px;
}
.modern-form input,
.modern-form textarea,
.modern-form select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    color: var(--c-dark, #1e293b);
    outline: none;
    transition: all .2s;
    background: #fafafa;
    font-family: inherit;
}
.modern-form input:focus,
.modern-form textarea:focus,
.modern-form select:focus {
    border-color: var(--c-primary, #4f46e5);
    box-shadow: 0 0 0 3px rgba(var(--c-primary-rgb, 79, 70, 229), .08);
    background: #fff;
}
.modern-form textarea { resize: vertical; }

/* ===== EMPTY STATE ===== */
.empty-state-modern {
    text-align: center;
    padding: 60px 20px;
}
.empty-state-modern i {
    font-size: 48px;
    color: #e5e7eb;
    margin-bottom: 16px;
    display: block;
}
.empty-state-modern h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--c-dark, #0f172a);
    margin-bottom: 8px;
}
.empty-state-modern p {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 20px;
}

/* ===== VIEW ALL LINK ===== */
.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--c-primary, #4f46e5);
    text-decoration: none;
    transition: all .2s;
}
.view-all-link:hover {
    gap: 10px;
    color: var(--c-primary, #4338ca);
}

/* ===== TAG / CHIP ===== */
.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: #f3f4f6;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    transition: all .2s;
}
.tag-chip:hover {
    background: var(--c-primary-light, #eef2ff);
    color: var(--c-primary, #4f46e5);
}

/* ===== SHARE BUTTONS ===== */
.share-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}
.share-section .share-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    display: block;
    margin-bottom: 8px;
}
.share-btns {
    display: flex;
    gap: 6px;
}
.share-btns a,
.share-btns button {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all .2s;
}
.share-btns a:hover,
.share-btns button:hover {
    transform: translateY(-2px);
    opacity: .9;
}
.share-btns a i,
.share-btns button i { font-size: 14px; }
.share-btn-wa { background: #25d366; }
.share-btn-fb { background: #1877f2; }
.share-btn-tw { background: #1da1f2; }
.share-btn-copy { background: #f1f5f9; color: #64748b; }
.share-btn-copy.copied { background: #059669; color: #fff; }

/* ===== CODE MODAL ===== */
.code-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.code-modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    max-width: 400px;
    width: 90%;
}
.code-modal-box h5 {
    font-weight: 700;
    margin-bottom: 16px;
    text-align: center;
}
.code-modal-box h5 i {
    color: var(--c-primary, #4f46e5);
}

/* ===== COURSE DETAIL PAGE ENHANCEMENTS ===== */

/* Sidebar card */
.course-sidebar-top {
    border-radius: 18px !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 4px 24px rgba(0,0,0,.06) !important;
    overflow: hidden;
}
.course-sidebar-top .inner { padding: 0; }
.course-sidebar-top .rbt-radius { border-radius: 0 !important; }
.course-sidebar-top .content-item-content { padding: 24px; }

/* Price */
.course-sidebar-top .rbt-price .current-price {
    font-size: 1.8rem !important;
    font-weight: 900 !important;
    color: var(--c-primary, #4f46e5) !important;
}
.course-sidebar-top .rbt-price .off-price {
    font-size: 14px !important;
    color: #94a3b8 !important;
}

/* Course detail list */
.rbt-course-details-list-wrapper li {
    padding: 12px 0 !important;
    border-bottom: 1px solid #f3f4f6 !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.rbt-course-details-list-wrapper li:last-child { border-bottom: none !important; }
.rbt-course-details-list-wrapper li span:first-child {
    font-size: 13px;
    font-weight: 600;
    color: var(--c-dark, #0f172a);
}
.rbt-course-details-list-wrapper li .rbt-badge-5 {
    background: #f8fafc !important;
    border: 1px solid #e5e7eb;
    border-radius: 8px !important;
    padding: 4px 12px !important;
    font-size: 12px !important;
    font-weight: 600;
    color: #64748b;
}

/* CTA buttons */
.course-sidebar-top .rbt-btn.btn-gradient {
    border-radius: 12px !important;
    padding: 14px 20px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    transition: all .25s !important;
}
.course-sidebar-top .rbt-btn.btn-gradient:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(var(--c-primary-rgb, 79, 70, 229), .25) !important;
}
.course-sidebar-top .rbt-btn.btn-border {
    border-radius: 12px !important;
    padding: 12px 20px !important;
}

/* Accordion sections */
.rbt-accordion-02 .accordion-item.card {
    border: 1px solid #e5e7eb !important;
    border-radius: 14px !important;
    margin-bottom: 10px !important;
    overflow: hidden;
    box-shadow: none !important;
}
.rbt-accordion-02 .accordion-button {
    font-size: 14px !important;
    font-weight: 700 !important;
    padding: 16px 20px !important;
    border-radius: 14px !important;
    background: #fff !important;
    color: var(--c-dark, #0f172a) !important;
}
.rbt-accordion-02 .accordion-button:not(.collapsed) {
    background: var(--c-primary-light, #eef2ff) !important;
    color: var(--c-primary, #4f46e5) !important;
    box-shadow: none !important;
}
.rbt-accordion-02 .accordion-button .rbt-badge-5 {
    background: var(--c-primary-light, #eef2ff);
    color: var(--c-primary, #4f46e5);
    border-radius: 8px;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
}
.rbt-course-main-content.liststyle li {
    border-bottom: 1px solid #f8fafc !important;
}
.rbt-course-main-content.liststyle li a {
    padding: 12px 16px !important;
    border-radius: 8px;
    transition: background .2s;
}
.rbt-course-main-content.liststyle li a:hover {
    background: #f8fafc;
}
.rbt-course-main-content .course-content-left i {
    color: var(--c-primary, #4f46e5);
}

/* What you'll learn section */
.rbt-list-style-1 li {
    padding: 8px 0;
    font-size: 13px;
    line-height: 1.6;
}
.rbt-list-style-1 li i {
    color: #059669 !important;
    margin-left: 8px;
}

/* Shadow boxes */
.rbt-shadow-box {
    border: 1px solid #e5e7eb !important;
    border-radius: 16px !important;
    box-shadow: 0 2px 12px rgba(0,0,0,.03) !important;
}

/* Instructor section */
.intructor-wrapper .thumbnail img {
    border-radius: 14px !important;
    width: 80px !important;
    height: 80px !important;
    object-fit: cover;
}

/* Review box */
.rating-box .rating-number {
    font-size: 2.5rem !important;
    font-weight: 900 !important;
    color: var(--c-primary, #4f46e5) !important;
}

/* Money back guarantee */
.course-sidebar-top .subtitle {
    font-size: 12px;
    color: #94a3b8;
    padding: 12px 0;
    border-top: 1px solid #f3f4f6;
}

/* One page nav */
.rbt-inner-onepage-navigation {
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.04) !important;
    z-index: 50 !important;
}
.rbt-inner-onepage-navigation .mainmenu li a {
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 12px 18px !important;
}
.rbt-inner-onepage-navigation .mainmenu li.current a {
    color: var(--c-primary, #4f46e5) !important;
}

/* Discount badge */
.discount-time .rbt-badge {
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 4px 12px !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
    .hero-section { padding: 50px 0 40px; }
    .hero-title { font-size: 1.8rem; }
    .hero-stats { gap: 24px; }
    .section-block { padding: 50px 0; }
    .breadcrumb-hero { padding: 36px 0; }
    .breadcrumb-hero h1 { font-size: 1.4rem; }
    .cta-section { padding: 40px 24px; border-radius: 16px; }
}
@media (max-width: 576px) {
    .hero-actions { flex-direction: column; align-items: center; }
    .modern-btn, .modern-btn-outline { width: 100%; justify-content: center; }
}

/* ============================================================
   فلتر التصنيفات (شرائح) — صفحة المحاضرات
   ============================================================ */
.cat-filter {
    background: #fff;
    border: 1px solid #e8ecf3;
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .04);
}
.cat-filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.cat-filter-title {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.cat-filter-title i { color: var(--c-primary, #4f46e5); }
.cat-clear {
    font-size: 12px;
    font-weight: 600;
    color: #ef4444;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.cat-clear:hover { color: #b91c1c; }
.cat-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px dashed #eef2f7;
    flex-wrap: wrap;
}
.cat-group:first-of-type { border-top: none; }
.cat-group-label {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    min-width: 110px;
    padding-top: 7px;
}
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1.5px solid #e5e9f2;
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all .18s ease;
    white-space: nowrap;
}
.cat-chip:hover {
    border-color: var(--c-primary, #4f46e5);
    color: var(--c-primary, #4f46e5);
    background: #fff;
    transform: translateY(-1px);
}
.cat-chip.is-active {
    background: var(--c-primary, #4f46e5);
    border-color: var(--c-primary, #4f46e5);
    color: #fff;
    box-shadow: 0 4px 12px rgba(var(--c-primary-rgb, 79, 70, 229), .28);
}
.cat-chip-count {
    font-size: 11px;
    font-weight: 700;
    background: rgba(15, 23, 42, .08);
    border-radius: 999px;
    padding: 1px 7px;
}
.cat-chip.is-active .cat-chip-count { background: rgba(255, 255, 255, .25); }
@media (max-width: 767px) {
    .cat-filter { padding: 14px; }
    .cat-group { flex-direction: column; gap: 8px; }
    .cat-group-label { min-width: 0; padding-top: 0; }
    .cat-chips { width: 100%; }
    .cat-chip { font-size: 12px; padding: 6px 12px; }
}

/* ============================================================
   الباجينيشن العربي (RTL) — بديل قالب Tailwind المكسور
   ============================================================ */
.hs-pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 28px 0 8px;
}
.hs-pagination-info { font-size: 13px; color: #64748b; }
.hs-pagination-info strong { color: #0f172a; font-weight: 700; }
.hs-pagination-list {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
}
.hs-page > a,
.hs-page > span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1.5px solid #e5e9f2;
    background: #fff;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all .18s ease;
}
/* السهم لازم يبقى بحجم الخط مش SVG ضخم */
.hs-page i {
    font-size: 15px;
    line-height: 1;
    display: block;
}
.hs-page > a:hover {
    border-color: var(--c-primary, #4f46e5);
    color: var(--c-primary, #4f46e5);
}
.hs-page.is-active > span {
    background: var(--c-primary, #4f46e5);
    border-color: var(--c-primary, #4f46e5);
    color: #fff;
    box-shadow: 0 4px 12px rgba(var(--c-primary-rgb, 79, 70, 229), .28);
}
.hs-page.is-disabled > span { opacity: .4; cursor: not-allowed; }
.hs-page.is-dots > span { border: none; background: transparent; }
@media (max-width: 480px) {
    .hs-page > a, .hs-page > span { min-width: 32px; height: 32px; font-size: 12px; }
}

/* ============================================================
   كارت المدرس (صفحة المحاضرة) — الصورة كانت مش ظابطة
   ============================================================ */
.rbt-instructor .media {
    display: flex;
    align-items: flex-start;
    gap: 22px;
}
.rbt-instructor .thumbnail {
    flex: 0 0 auto;
    width: 150px;
}
.rbt-instructor .thumbnail a { display: block; }
.rbt-instructor .thumbnail img {
    width: 150px;
    height: 150px;
    object-fit: cover;        /* بدل ما الصورة تتمط أو تتقص غلط */
    object-position: top center;
    border-radius: 16px;
    display: block;
    background: #f1f5f9;
}
.rbt-instructor .media-body { flex: 1; min-width: 0; }
.rbt-instructor .author-info .title { margin-bottom: 4px; }
.rbt-instructor .rbt-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding: 0;
    margin: 10px 0 14px;
    list-style: none;
}
.rbt-instructor .rbt-meta li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #64748b;
}

/* ع الموبايل: الكلام الأول والصورة تحته */
@media (max-width: 767px) {
    .rbt-instructor .media {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 16px;
    }
    .rbt-instructor .thumbnail { width: 100%; }
    .rbt-instructor .thumbnail img {
        width: 100%;
        height: 220px;
        object-position: center 20%;
        border-radius: 14px;
    }
}

/* ============================================================
   لوحة الشرف — أوائل الطلبة
   ============================================================ */
.honor-section { background: linear-gradient(180deg, #fbfbfe 0%, #f4f5fb 100%); }
.honor-section .section-sub {
    color: #64748b; font-size: 14px; margin-top: 6px;
}
.honor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 22px;
}
.honor-card {
    background: #fff;
    border: 1px solid #e8ecf3;
    border-radius: 18px;
    padding: 24px 18px 20px;
    text-align: center;
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
    box-shadow: 0 2px 12px rgba(15, 23, 42, .04);
}
.honor-card:hover {
    transform: translateY(-8px);
    border-color: var(--c-primary, #4f46e5);
    box-shadow: 0 16px 36px rgba(var(--c-primary-rgb, 79, 70, 229), .16);
}
.honor-photo-wrap { position: relative; display: inline-block; margin-bottom: 14px; }
.honor-photo {
    width: 116px; height: 116px;
    object-fit: cover; object-position: top center;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 0 0 3px var(--c-primary, #4f46e5);
    background: #f1f5f9;
    display: block;
}
.honor-score {
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 12px; font-weight: 800;
    padding: 3px 12px;
    border-radius: 999px;
    border: 2px solid #fff;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(217, 119, 6, .35);
}
.honor-name {
    font-size: 16px; font-weight: 800; color: #0f172a;
    margin: 6px 0 8px;
}
.honor-rank {
    display: inline-flex; align-items: center; gap: 5px;
    background: var(--c-primary-light, #eef2ff);
    color: var(--c-primary, #4f46e5);
    font-size: 12px; font-weight: 700;
    padding: 4px 12px; border-radius: 999px;
}
.honor-rank i { font-size: 12px; }
.honor-meta {
    margin-top: 10px;
    font-size: 12px; color: #94a3b8;
    display: flex; justify-content: center; gap: 6px; flex-wrap: wrap;
}
.honor-meta .dot { opacity: .6; }
@media (max-width: 575px) {
    .honor-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
    .honor-card { padding: 18px 12px 16px; }
    .honor-photo { width: 92px; height: 92px; }
    .honor-name { font-size: 14px; }
}

/* ============================================================
   صفحة الطالب بعد الدخول — كروت الصور
   ============================================================ */
.student-home {
    background: linear-gradient(135deg, #fafafe 0%, var(--c-primary-light, #eef2ff) 50%, #fafafe 100%);
    padding: 48px 0 64px;
    min-height: 70vh;
}
.student-home-head { text-align: center; margin-bottom: 34px; }
.student-home-head h1 {
    font-size: clamp(1.5rem, 3.2vw, 2.1rem);
    font-weight: 900; color: #0f172a; margin-bottom: 6px;
}
.student-home-head p { color: #64748b; font-size: 15px; margin: 0; }

.student-tiles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    max-width: 900px;
    margin: 0 auto;
}
.student-tile {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    background: #e2e8f0;
    box-shadow: 0 6px 22px rgba(15, 23, 42, .08);
    transition: transform .3s ease, box-shadow .3s ease;
}
.student-tile:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(var(--c-primary-rgb, 79, 70, 229), .22);
}
.student-tile img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}
.student-tile:hover img { transform: scale(1.06); }
.student-tile-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, .78) 0%, rgba(15, 23, 42, .12) 55%, transparent 100%);
}
.student-tile-label {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    padding: 16px 20px;
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 9px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}
.student-tile-label i { font-size: 18px; }

/* كارت من غير صورة — متدرّج + أيقونة كبيرة (الصورة تحسين مش شرط) */
.student-tile.is-plain {
    background: linear-gradient(135deg, var(--tile-a, #4f46e5), var(--tile-b, #7c3aed));
    display: flex;
    align-items: center;
    justify-content: center;
}
.student-tile-icon {
    display: flex; align-items: center; justify-content: center;
    width: 96px; height: 96px; border-radius: 26px;
    background: rgba(255, 255, 255, .18);
    border: 1.5px solid rgba(255, 255, 255, .28);
    color: #fff; font-size: 42px;
    transition: transform .35s ease;
}
.student-tile.is-plain:hover .student-tile-icon { transform: scale(1.1) rotate(-4deg); }
.student-tile.is-plain .student-tile-label {
    background: linear-gradient(to top, rgba(0, 0, 0, .35), transparent);
}

.student-tiles-empty {
    text-align: center;
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    padding: 44px 24px;
    max-width: 600px;
    margin: 0 auto;
}
.student-tiles-empty i { font-size: 40px; color: #cbd5e1; }
.student-tiles-empty h4 { font-weight: 800; font-size: 17px; margin: 14px 0 6px; color: #0f172a; }
.student-tiles-empty p { color: #94a3b8; font-size: 13px; margin-bottom: 18px; }
.student-tiles-fallback { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.student-home-quick {
    display: flex; justify-content: center; flex-wrap: wrap;
    gap: 10px; margin-top: 36px;
}
.student-home-quick a {
    display: inline-flex; align-items: center; gap: 6px;
    background: #fff; border: 1px solid #e5e9f2;
    border-radius: 999px; padding: 9px 18px;
    font-size: 13px; font-weight: 600; color: #334155;
    text-decoration: none; transition: all .2s ease;
}
.student-home-quick a:hover {
    border-color: var(--c-primary, #4f46e5);
    color: var(--c-primary, #4f46e5);
    transform: translateY(-2px);
}

@media (max-width: 767px) {
    .student-tiles { grid-template-columns: 1fr; gap: 16px; max-width: 460px; }
    .student-tile { aspect-ratio: 16 / 9; }
    .student-tile-label { font-size: 15px; padding: 13px 16px; }
    .student-home { padding: 32px 0 48px; }
}

/* ============================================================
   المحاضرة المتاحة بكود تفعيل بس
   ============================================================ */
.card-price .code-tag {
    display: inline-flex; align-items: center; gap: 5px;
    background: #f5f3ff; color: var(--c-accent, #7c3aed);
    border: 1px solid #ddd6fe;
    font-size: 12px; font-weight: 700;
    padding: 3px 11px; border-radius: 999px;
}
.course-code-only {
    display: flex; align-items: center; gap: 12px;
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 4px;
}
.course-code-only > i { font-size: 24px; color: var(--c-accent, #7c3aed); flex-shrink: 0; }
.course-code-only strong { display: block; font-size: 14px; font-weight: 800; color: #5b21b6; }
.course-code-only span { display: block; font-size: 12px; color: var(--c-accent, #7c3aed); margin-top: 2px; }
