/* ==================== GLOBAL STYLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-y: scroll;
    scroll-behavior: smooth;
}

:root {
    --bg-primary: #000000;
    --bg-secondary: #302305;
    --bg-card: rgba(28, 28, 28, 0.6);
    --gold: #d4af37;
    --gold-light: #F1DE65;
    --gold-dark: #9F7312;
    --text-primary: #ffffff;
    --text-secondary: #000000;
    --border-radius: 20px;
    --border-radius-lg: 30px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: rgba(245, 240, 225, 0.055);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    transition: var(--transition);
    padding-top: 80px;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(212, 175, 55, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    display: block;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== NAVBAR ==================== */
.navbar {
    position: fixed;
    top: 20px;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

[dir="rtl"] .nav-content {
    flex-direction: row-reverse;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 800;
    color: #000;
    letter-spacing: 0.5px;
}

[dir="rtl"] .logo {
    flex-direction: row-reverse;
}

.logo-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px var(--gold-glow);
    border: 1px solid var(--gold);
    overflow: hidden;
}

.logo-circle img {
    width: 80%;
    height: auto;
}

.nav-menu {
    display: flex;
    border: 2px solid rgba(212, 175, 55, 1);
    align-items: center;
    gap: 40px;
    background: rgba(0, 0, 0, 0.979);
    padding: 10px 20px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.nav-menu a {
    color: rgb(255, 255, 255);
    text-decoration: none;
    padding: 0px 20px;
    border-radius: 25px;
    transition: var(--transition);
    font-size: 15px;
}

.nav-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    z-index: -1;
    transition: var(--transition);
    border-radius: 25px;
}

.nav-menu a:hover,
.nav-menu a.active {
 color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
}

.nav-menu a:hover::before,
.nav-menu a.active::before {
    opacity: 1;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-direction: row-reverse;
}

/* أزرار الإجراءات */
button {
    font-family: inherit;
    outline: none;
}

.btn-login {
    padding: 10px 15px;
    background: rgb(0, 0, 0);
    border: 2px solid rgba(212, 175, 55, 1);
    border-radius: 25px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 12px;
    backdrop-filter: blur(10px);
}

.btn-lang {
    padding: 10px 15px;
    background: rgb(0, 0, 0);
    border: 2px solid rgba(212, 175, 55, 1);
    border-radius: 25px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 12px;
    backdrop-filter: blur(10px);
}

.btn-login:hover,
.btn-lang:hover {

    box-shadow: 0 0 20px var(--gold-glow);
    transform: translateY(-2px);
}

.lang-active {
    font-weight: 800;
}

/* ==================== INSTAGRAM STYLE PROFILE HEADER ==================== */
.profile-header {
    padding: 140px 0 60px;
    position: relative;
    z-index: 1;
}


.profile-content {
    display: flex;
    gap: 50px;
    align-items: flex-start;
    background: linear-gradient(221deg, #d4af378c, #ffffff75);
    border: 2px solid rgba(212, 175, 55, 0.15);
    padding: 40px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    max-width: 900px;
    margin: 0 auto;
}

[dir="rtl"] .profile-content {
    flex-direction: row-reverse;
}

/* Profile Avatar */
.profile-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.profile-gradient-ring {
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--gold), var(--gold-light), var(--gold-dark));
    padding: 4px;
    animation: rotateGradient 3s linear infinite;
}

.profile-avatar {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid #000;
    object-fit: cover;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
    display: block;
    z-index: 2;
}

/* Profile Info */
.profile-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

[dir="rtl"] .profile-info {
    text-align: right;
}

.profile-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    flex-direction: column;
    align-content: flex-start;
}

.profile-username {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-username h1 {
    font-size: 28px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.verified-badge {
    flex-shrink: 0;
}

.btn-exclusive {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: #000;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    white-space: nowrap;
}

.btn-exclusive:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 30px rgba(212,175,55,0.3);
}

.profile-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-top: -8px;
}

/* Profile Stats */
.profile-stats {
    display: flex;
    gap: 35px;
    align-items: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

[dir="rtl"] .stat-item {
    align-items: center;
}

.stat-number {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Profile Bio */
.profile-bio {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 15px;
    max-width: 600px;
}

/* Profile Action Buttons */
.profile-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.btn-action-primary,
.btn-action-secondary {
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(212, 175, 55, 0.4);
    white-space: nowrap;
}

.btn-action-primary {
    background: rgba(212, 175, 55, 0.2);
    color: #ffffff;
}

.btn-action-primary:hover {
    background: rgba(212, 175, 55, 0.3);
    border-color: var(--gold);
    transform: translateY(-2px);
}

.btn-action-secondary {
    background: rgba(0, 0, 0, 0.4);
    color: var(--text-secondary);
}

.btn-action-secondary:hover {
    background: rgba(212, 175, 55, 0.15);
    color: #ffffff;
    border-color: var(--gold);
    transform: translateY(-2px);
}

/* ==================== COURSES SECTION ==================== */
.courses-section {
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

.section-title-wrapper {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--gold-light);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    border-radius: 3px;
}

/* Courses Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 320px));
    gap: 30px;
    margin-bottom: 50px;
    justify-content: center;
}

/* Course Card */
.course-card {
    position: relative;
    background: linear-gradient(180deg, rgba(0,0,0,0.7), rgba(0,0,0,0.6));
    border: 2px solid rgba(212,175,55,0.15);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    cursor: pointer;
}

.course-card:hover {
    transform: translateY(-8px);
    border-color: var(--gold);
    box-shadow: 0 15px 45px rgba(212,175,55,0.25);
}

/* Course Badge */
.course-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(212, 175, 55, 0.9);
    color: #000;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    z-index: 10;
    backdrop-filter: blur(5px);
}

[dir="rtl"] .course-badge {
    left: auto;
    right: 15px;
}

/* Course Image */
.course-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(212,175,55,0.1), rgba(0,0,0,0.8));
    display: flex;
    align-items: center;
    justify-content: center;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    transition: transform 0.5s ease;
}

.course-card:hover .course-image img {
    transform: scale(1.05);
}

/* Play Button */
.play-button {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(212, 175, 55, 0.95);
    border: none;
    border-radius: 50%;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    padding: 0;
}

[dir="rtl"] .play-button {
    right: auto;
    left: 20px;
}

.play-button:hover {
    transform: scale(1.1);
    background: var(--gold-light);
    box-shadow: 0 5px 20px rgba(212,175,55,0.5);
}

/* Course Content */
.course-content {
    background: linear-gradient(180deg, #d4af37, #e7d24940);
    padding: 20px;
}

.course-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 15px;
    line-height: 1.4;
    min-height: 50px;
}

[dir="rtl"] .course-title {
    text-align: right;
}

.course-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.course-price {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #000;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.course-price:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.35);
}

.course-price:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.btn-subscribe-now,
.btn-start-journey {
    min-width: 128px;
    letter-spacing: 0.2px;
}

.btn-subscribe-now:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

/* Subscribe Button */
.subscribe-wrapper {
    text-align: center;
    margin-top: 40px;
}

.btn-subscribe {
    padding: 18px 60px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: #000;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(212,175,55,0.3);
}

.btn-subscribe:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 15px 50px rgba(212,175,55,0.5);
}

/* ==================== BENEFITS SECTION ==================== */
.benefits {
    padding: 60px 0;
}

.benefits-pill {
    text-align: center;
    margin-bottom: 50px;
}

.benefits-pill h2 {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border: 2px solid rgba(212,175,55,0.3);
    border-radius: 50px;
}

.benefits-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.benefit-item {
    background: linear-gradient(180deg, #d4af37, #f1de6526);
    border: 2px solid rgba(212,175,55,0.15);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.benefit-item:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
    box-shadow: 0 10px 35px rgba(212,175,55,0.2);
}

.check-icon {
    font-size: 18px;
    font-weight: 600;
    color: #615719;
    display: block;
    margin-bottom: 10px;
}

.benefit-item p {
    color: var(--text-secondary);
    font-size: 14px;
}

.section-separator {
    height: 8px;
    margin-top: 60px;
    background: linear-gradient(90deg, transparent, rgba(212,175,55,0.22) 20%, rgba(212,175,55,0.22) 80%, transparent);
    border-radius: 6px;
}

/* ==================== CTA SECTION ==================== */
.cta {
    padding: 80px 0;
    text-align: center;
}

.btn-cta {
    padding: 20px 60px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: #000;
    border: none;
    border-radius: 50px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 10px 40px rgba(212,175,55,0.3);
}

.btn-cta:hover {
    transform: translateY(-6px) scale(1.04);
    box-shadow: 0 20px 60px rgba(212,175,55,0.5);
}

/* ==================== FOOTER ==================== */
.main-footer {
    background: #000000;
    padding: 80px 0 0;
    margin-top: 100px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.footer-container {
    max-width: 1200px;
    margin: auto;
    text-align: center;
    padding: 0 20px 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.footer-contact {
    border-left: 2px solid var(--gold);
    padding-left: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
        align-items: center;
    gap: 25px;
    text-align: left;
}

[dir="rtl"] .footer-contact {
    border-left: none;
    padding-left: 0;
    padding-right: 40px;
    text-align: center;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.contact-label {
    font-size: 12px;
    color: var(--gold);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.contact-value {
    font-size: 18px;
    color: #fff;
    font-weight: 500;
}

.footer-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 25px;
}

.footer-text {
    color: #aaa;
    font-size: 15px;
    line-height: 1.8;
    max-width: 450px;
}

.footer-cta-title {
    font-size: 32px;
    background: linear-gradient(135deg, var(--gold) 0%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.btn-book {
    padding: 15px 40px;
    border-radius: 50px;
    border: none;
    background: linear-gradient(135deg, #d4af37, #f5d76e);
    color: #000;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
    transition: var(--transition);
}

.btn-book:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 50px rgba(212, 175, 55, 0.5);
}

.social-icons {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: var(--transition);
    font-size: 16px;
    text-decoration: none;
}

.social-icons a:hover {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
    transform: translateY(-3px);
}

.footer-bottom {
    background: #000;
    padding: 25px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    border-top: 1px solid #222;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--gold);
}

.copyright {
    font-size: 12px;
    color: #444;
}
/* ==================== DECORATIVE ELEMENTS ==================== */
.decorative-circle {
    position: fixed;
    bottom: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

[dir="rtl"] .decorative-circle {
    right: auto;
    left: -200px;
}

.decorative-circle-2 {
    position: fixed;
    top: 100px;
    left: -150px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

[dir="rtl"] .decorative-circle-2 {
    left: auto;
    right: -150px;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotateGradient {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes popIn {
    0% {
        transform: scale(0.7) translateY(10px);
        opacity: 0;
    }
    60% {
        transform: scale(1.05) translateY(-6px);
        opacity: 1;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
    opacity: 0;
}

.show {
    opacity: 1 !important;
}

/* ==================== RESPONSIVE DESIGN ==================== */
/* Tablets */
@media (max-width: 1024px) {
   .nav-menu {
        position: fixed;
        top: 80px;
        left: 50%;
        transform: translateX(-50%) translateY(-20px);
        flex-direction: column;
        width: 90%;
        background: rgba(0, 0, 0, 0.95);
        padding: 30px;
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
        border: 1px solid var(--gold);
    }

    .nav-menu.open {
        opacity: 1;
        pointer-events: all;
        transform: translateX(-50%) translateY(0);
    }

    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 6px;
        background: none;
        border: none;
        cursor: pointer;
    }

    .mobile-menu-toggle span {
        width: 25px;
        height: 3px;
        background-color: #000000;
        border-radius: 2px;
        transition: var(--transition);
    }


    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    .nav-actions {
        margin-left: auto;
    }

    .profile-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-info {
        align-items: center;
    }

    .profile-header-top {
        justify-content: center;
    }

    .stat-item {
        align-items: center;
    }

    .profile-actions {
        justify-content: center;
    }

    .courses-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 300px));
        justify-content: center;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-contact {
        border-left: none;
        border-right: none;
        border-top: 2px solid rgba(212,175,55,0.2);
        padding: 25px 0 0 0;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .profile-header {
        padding: 100px 0 20px; /* تقليل المسافة العلوية */
    }

    /* تحويل الحاوية الرئيسية إلى شبكة (Grid) لسهولة الترتيب */

    .profile-content {
        display: flex;
        grid-template-columns: auto 1fr;
        gap: 15px 20px;
        padding: 20px;
        max-width: 100%;
        border: none;
        border-radius: 0 0 25px 25px;
        align-items: end;
        margin-top: -20px;
        justify-content: flex-end;
        align-content: center;
        justify-items: stretch;
        flex-direction: row-reverse;
        flex-wrap: wrap;
    }


    /* خدعة سحرية: إلغاء صندوق "profile-info"
       لجعل عناصره (الاسم، الاحصائيات، البايو) جزءاً من الشبكة الرئيسية
    */
    .profile-info {
        display: contents;
    }

    /* 1. صورة البروفايل (أعلى اليسار/اليمين) */
    .profile-avatar-wrapper {
        grid-column: 1;
        grid-row: 1;
        width: 85px; /* حجم أصغر مناسب للجوال */
        height: 85px;
        margin: 0;
    }

    .profile-avatar {
        width: 85px;
        height: 85px;
        border-width: 2px; /* تخفيف سماكة الإطار */
    }

    .profile-gradient-ring {
        top: -4px; left: -4px; right: -4px; bottom: -4px;
        padding: 2px;
    }

    /* 2. الإحصائيات (بجانب الصورة) */
      .profile-stats {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        justify-content: space-around;
        align-items: center;
        height: 85px;
        text-align: center;
        width: 100%;
        padding: 0;
        margin: 0;
    }


    .stat-item {
        align-items: center !important; /* توسيط الرقم والكلمة */
        flex-direction: column;
        justify-content: center;
    }

    .stat-number {
        font-size: 18px;
        font-weight: 700;
        color: #fff;
    }

    .stat-label {
        font-size: 13px;
        color: var(--text-secondary); /* أو اجعلها #aaa للوضوح */
    }

    /* في حالة اللغة العربية/الانجليزية تأكد من المحاذاة */
    [dir="rtl"] .stat-item { align-items: center; }

    /* 3. الاسم والتوثيق (سطر جديد تحت الصورة) */
    .profile-header-top {
        grid-column: 1 / -1; /* يأخذ العرض كامل */
        grid-row: 2;
        display: flex;
        flex-direction: column; /* الاسم فوق الزر الحصري */
        align-items: flex-start;
        gap: 5px;
        margin-top: 5px;
        width: 100%;
    }

    [dir="rtl"] .profile-header-top {
        align-items: flex-start; /* محاذاة لليمين في العربية */
    }

    .profile-username {
        margin-bottom: 2px;
    }

    .profile-username h1 {
        font-size: 16px;
        font-weight: 700;
        margin: 0;
    }

    /* زر Exclusive يتم تصغيره ووضعه بجانب الاسم أو تحته */
    .btn-exclusive {
        padding: 4px 12px;
        font-size: 11px;
        margin-top: 2px;
    }

    /* 4. البايو/الوصف (تحت الاسم) */
    .profile-bio {
        grid-column: 1 / -1;
        grid-row: 3;
        font-size: 14px;
        line-height: 1.4;
        color: #000000;
        max-width: 100%;
        text-align: left; /* محاذاة لليسار */
        margin-bottom: 15px;
    }

    [dir="rtl"] .profile-bio {
        text-align: right; /* محاذاة لليمين */
    }

    /* 5. الأزرار (أزرار الإجراءات في الأسفل) */
    .profile-actions {
        grid-column: 1 / -1;
        grid-row: 4;
        display: flex;
        width: 100%;
        gap: 8px;
        margin-top: 5px;
    }

    .btn-action-primary,
    .btn-action-secondary {
        flex: 1; /* الأزرار تأخذ عرض متساوي وتملأ الشاشة */
        text-align: center;
        justify-content: center;
        padding: 8px 0;
        font-size: 14px;
        border-radius: 8px; /* زوايا أقل انحناءً مثل التطبيق */
    }

    /* تعديلات إضافية لباقي العناصر في الموبايل */
    .navbar { width: 95%; }
    .mobile-menu-toggle { display: flex; }

    /* شبكة الكورسات */
    .courses-grid {
        grid-template-columns: repeat(2, 1fr); /* عمودين للكورسات */
        gap: 10px;
        padding: 0 10px;
    }

    .course-image { height: 160px; }
    .section-title { font-size: 24px; }

    .footer-container {
        padding: 0 20px;
    }

    .footer-info {
        align-items: center;
        text-align: center;
    }

    .btn-book {
        align-self: center;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .nav-content {
        gap: 30px;
    }

    .logo span {
        font-size: 18px;
    }


    .profile-username h1 {
        font-size: 20px;
    }

    .btn-action-primary,
    .btn-action-secondary {
        padding: 8px 18px;
        font-size: 13px;
    }

    .section-title {
        font-size: 22px;
    }

    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .course-image {
        height: 180px;
    }

    .course-title {
        font-size: 13px;
        min-height: auto;
    }

    .course-badge {
        font-size: 10px;
        padding: 4px 10px;
        top: 10px;
    }

    [dir="rtl"] .course-badge {
        right: 10px;
    }

    .course-price {
        font-size: 12px;
        padding: 5px 12px;
    }

    .play-button {
        width: 35px;
        height: 35px;
        bottom: 10px;
        right: 10px;
    }

    .play-button svg {
        width: 20px;
        height: 20px;
    }

    [dir="rtl"] .play-button {
        right: auto;
        left: 10px;
    }
}
@media (max-width: 380px) {
    .profile-avatar-wrapper, .profile-avatar { width: 75px; height: 75px; }
    .profile-stats { height: 75px; }
    .stat-number { font-size: 16px; }
    .stat-label { font-size: 11px; }
}
button {
    -webkit-tap-highlight-color: transparent;
}
/* ==================== VIDEO STYLES ==================== */
/* Course Video */
.course-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 5;
    border-radius: 0;
}

.course-thumbnail {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.course-thumbnail:hover {
    transform: scale(1.02);
}

/* Expand Video Button */
.expand-video-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(212, 175, 55, 0.95);
    border: none;
    border-radius: 50%;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 15;
}

[dir="rtl"] .expand-video-btn {
    right: auto;
    left: 15px;
}

.expand-video-btn:hover {
    transform: scale(1.1);
    background: var(--gold-light);
    box-shadow: 0 5px 20px rgba(212,175,55,0.5);
}

/* Video Popup Modal */
.video-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.video-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
}

.video-popup-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(212, 175, 55, 0.3);
    border: 2px solid var(--gold);
    z-index: 10000;
    animation: slideUp 0.4s ease;
}

#popupVideo {
    width: 100%;
    height: auto;
    display: block;
}

.close-popup-btn {
    position: absolute;
    top: -50px;
    right: 0;
    width: 45px;
    height: 45px;
    background: var(--gold);
    border: none;
    border-radius: 50%;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

[dir="rtl"] .close-popup-btn {
    right: auto;
    left: 0;
}

.close-popup-btn:hover {
    transform: scale(1.1) rotate(90deg);
    background: var(--gold-light);
    box-shadow: 0 5px 20px rgba(212,175,55,0.6);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Video Styles */
@media (max-width: 768px) {
    .video-popup-content {
        width: 95%;
        border-radius: 15px;
    }

    .close-popup-btn {
        top: -45px;
        width: 40px;
        height: 40px;
    }

    .expand-video-btn {
        width: 35px;
        height: 35px;
    }

    .expand-video-btn svg {
        width: 18px;
        height: 18px;
    }
}
/* رسالة حالة الكورسات (تحميل / لا يوجد) */
.courses-status {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 20px;
    margin: 20px 0;

    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.3px;

    color: #d4af37; /* ذهبي واضح */
    background: linear-gradient(
        135deg,
        rgba(212, 175, 55, 0.08),
        rgba(212, 175, 55, 0.02)
    );

    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 16px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.25),
        inset 0 0 20px rgba(212, 175, 55, 0.08);

    backdrop-filter: blur(6px);
}

/* حالة التحميل */
.courses-status.loading {
    animation: pulseGlow 1.6s infinite ease-in-out;
}

/* حالة لا يوجد محتوى */
.courses-status.empty {
    color: #f0c75e;
    background: linear-gradient(
        135deg,
        rgba(240, 199, 94, 0.1),
        rgba(240, 199, 94, 0.03)
    );
}

@keyframes pulseGlow {
    0%   { box-shadow: 0 0 10px rgba(212,175,55,0.25); }
    50%  { box-shadow: 0 0 28px rgba(212,175,55,0.55); }
    100% { box-shadow: 0 0 10px rgba(212,175,55,0.25); }
}
