.join-option.trainer .option-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 30px;
    text-align: left;
}
/* --- Global Variables & Styles --- */
:root {
    --primary-color: #7e57c2; /* A shade of purple from the design */
    --dark-bg: #121212;
    --dark-card-bg: #1e1e1e;
    --light-text: #ffffff;
    --secondary-text: #b0b0b0;
    --gradient: linear-gradient(90deg, #7e57c2, #4d3382);
    --font-primary: 'Roboto', sans-serif;
    --font-secondary: 'Teko', sans-serif;
}

.btn, button.btn { /* Applied to button elements as well */
    padding: 10px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid transparent; /* Added for consistent sizing */
    cursor: pointer;
    font-family: var(--font-primary); /* Ensures font consistency */
    font-size: 1rem;
    transition: all 0.3s ease; /* Universal transition */
}

.btn:hover, button.btn:hover {
    transform: translateY(-3px); /* تأثير الرفع لأعلى */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn:active, button.btn:active {
    transform: translateY(-1px); /* تأثير الضغط لأسفل */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--light-text);
    border-color: var(--primary-color);
}
.btn-primary:hover {
    background-color: #9575cd; /* درجة أفتح من اللون الأساسي */
    border-color: #9575cd;
}

.btn-secondary {
    background-color: transparent;
    color: var(--light-text);
    border-color: var(--secondary-text);
}
.btn-secondary:hover {
    background-color: var(--light-text);
    color: var(--dark-bg);
}

.btn-light {
    background: var(--light-text);
    color: var(--dark-bg);
    border-color: var(--light-text);
}
.btn-light:hover {
    background-color: #e0e0e0; /* درجة أغمق قليلاً من الأبيض */
    border-color: #e0e0e0;
}

.btn-dark {
    background: rgba(0,0,0,0.4);
    color: var(--light-text);
    border-color: var(--light-text);
}
.btn-dark:hover {
    background: rgba(0,0,0,0.6);
}

.btn-gradient {
    background: var(--gradient);
    color: var(--light-text);
    border: none;
    padding: 11px 25px; /* Adjust padding to account for no border */
}
.btn-gradient:hover {
    filter: brightness(1.2); /* زيادة سطوع الخلفية المتدرجة */
}


body {
    margin: 0;
    font-family: var(--font-primary);
    background-color: var(--dark-bg);
    color: var(--light-text);
    overflow-x: hidden;
    scroll-behavior: smooth;
    
}

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

h1, h2, h3, .logo {
    font-family: var(--font-secondary);
    text-transform: uppercase;
    font-weight: 700;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 60px;
    color: var(--light-text);
}

/* --- Loader --- */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loader.hidden {
    opacity: 0;
    visibility: hidden;
}
.loader-icon {
    width: 50px;
    height: 50px;
    border: 5px solid var(--dark-card-bg);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Header & Navigation --- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    background: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    transition: top 0.3s ease-in-out;
}

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

.logo {
    font-size: 2rem;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 35px;
}

.nav-links a {
    color: var(--light-text);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.auth-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 10px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--light-text);
    border: 1px solid var(--primary-color);
}
.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-color);
}

.btn-secondary {
    background-color: transparent;
    color: var(--light-text);
    border: 1px solid var(--primary-color);
}
.btn-secondary:hover {
    background-color: var(--light-text);
    color: var(--dark-bg);
}


/* --- Hero Section --- */
.hero-section {
    display: flex; /* يستخدم Flexbox لتوزيع العناصر */
    position: relative;
    height: 500px; /* إعادة الارتفاع إلى حجم محدد ومناسب */
    background-color: #1a1a1a;
    border: 1px solid #222;
    border-radius: 12px;
    overflow: hidden; /* أهم خاصية: تمنع أي عناصر داخلية من الخروج عن الإطار */
    align-items: center;
    margin-top: 100px; /* لإعطاء مساحة للهيدر الثابت */
}

.hero-background-texture {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('/static/images/Smoked_Background.jpg');
    opacity: 0.9;
    z-index: 0;
}

/* هذا العنصر هو الحاوية الرئيسية للمحتوى داخل الهيرو */
.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* النص على اليسار */
.hero-text {
    flex-basis: 45%; /* يأخذ 45% من عرض الحاوية */
    padding-left: 60px; /* مسافة من الحافة اليسرى */
    z-index: 3;
}

.hero-text h1 {
    font-size: 5.5rem;
    line-height: 1.1;
    margin: 0 0 20px 0;
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--secondary-text);
    max-width: 450px;
}

/* حاوية الصورة على اليمين */
.hero-image-wrapper {
    flex-basis: 55%; /* يأخذ 55% من عرض الحاوية */
    height: 100%;
    position: relative; /* مهم جداً لتثبيت العناصر الداخلية بالنسبة له */
    /* تمت إزالة position: absolute من هنا ليعود إلى مكانه الطبيعي */
}

/* الخلفية المائلة */
.hero-purple-skew {
    position: absolute;
    top: 0;
    left: 60%;
    width: 110%;
    height: 100%;
    background: linear-gradient(90deg, #9362e9 0%, #382461 100%);
    z-index: 1;
    opacity: 0.9;
    transform: skewX(-16deg);
}

/* الصورة نفسها */
.hero-image {
    position: absolute;
    bottom: 0;
    right: 5%;
    height: 102%; /* لجعلها تبدو وكأنها ترتكز على الحافة السفلية */
    z-index: 2;
}



/* --- Join Us Section --- */
.join-us-section {
    padding: 80px 0;
    --gradient-pos: 50%;
}

.join-container {
    display: flex;
    height: 450px;
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    background: linear-gradient(110deg, var(--primary-color) 50%, var(--dark-bg) 50%);
    transition: background 0.4s ease-out;
}

.join-option {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    color: var(--light-text);
    text-align: center;
    transition: transform 0.3s ease;
}

.join-option:hover {
    transform: scale(1.05);
}

.join-option.trainer {
    background: transparent;
}

.join-option.member {
    background: transparent;
}

.option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.option-image {
    max-width: 200px;
    border-radius: 50%;
    overflow: hidden;
}

.option-image1 {
    max-width: 230px;
    border-radius: 50%;
    overflow: hidden;
}

.option-text h3 {
    font-size: 2rem;
    font-weight: bold;
}

.btn-light {
    background: var(--light-text);
    color: var(--dark-bg);
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.btn-light:hover {
    background-color: #e0e0e0;
}

.btn-dark {
    background: rgba(0, 0, 0, 0.6);
    color: var(--light-text);
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.btn-dark:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* --- Programs Section --- */
.programs-section {
    padding: 80px 0;
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.program-card {
    background: var(--dark-card-bg);
    border:  1px solid #2a2a2a;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.program-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.program-card.highlight {
    background: var(--gradient);
    color: var(--light-text);
    transform: scale(1.05);
}
.program-card.highlight:hover {
    transform: scale(1.08) translateY(-10px);
}

.program-tag {
    display: inline-block;
    background: linear-gradient(90deg, #9362e9 0%, #382461 50%);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.program-card.highlight .program-tag {
    background: rgba(0,0,0,0.2);
}

.price {
    font-family: var(--font-secondary);
    font-size: 4rem;
    margin-bottom: 20px;
}

.program-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    text-align: center;
    flex-grow: 1;
}

.program-card li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}
.program-card.highlight li {
    border-bottom-color: rgba(255,255,255,0.3);
}

.program-card li:last-child {
    border-bottom: none;
}

.btn-gradient {
    background: var(--gradient);
    color: var(--light-text);
    border: none;
}

/* --- About Us Section --- */
.about-section {
    padding: 80px 0;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 60px;
    background: var(--dark-card-bg);
    border-radius: 15px;
    padding: 60px;
}

.about-image-wrapper {
    flex: 1;
}
.about-image {
    width: 100%;
    border-radius: 10px;
}

.about-text {
    flex: 1;
}
.about-text .section-title {
    text-align: left; /* Changed from right to left */
    margin-bottom: 20px;
}
.about-text p {
    color: var(--secondary-text);
    line-height: 1.8;
}

/* --- Footer --- */
.main-footer {
    background: #0a0a0a;
    padding: 60px 0;
    border-top: 1px solid #2a2a2a;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 40px;
}
.footer-left .logo {
    margin-bottom: 20px;
    display: block;
}
.social-links {
    display: flex;
    gap: 15px;
}
.social-links a {
    color: var(--secondary-text);
    transition: color 0.3s;
}
.social-links a:hover {
    color: var(--primary-color);
}
.footer-links {
    display: flex;
    gap: 60px;
}
.footer-col h4 {
    color: var(--light-text);
    margin-bottom: 20px;
    text-transform: uppercase;
}
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-col li a {
    color: var(--secondary-text);
    text-decoration: none;
    line-height: 2.2;
    transition: color 0.3s;
}
.footer-col li a:hover {
    color: var(--primary-color);
}

/* --- Animations & Reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Scroll Up Button --- */
.scroll-up {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--light-text);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.4s, visibility 0.4s, transform 0.4s;
    z-index: 999;
}
.scroll-up.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.scroll-up svg {
    width: 24px;
    height: 24px;
}

body.modal-open {
    overflow: hidden; /* يمنع تمرير الصفحة في الخلفية عند فتح النافذة */
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--dark-card-bg);
    padding: 40px;
    border-radius: 15px;
    border: 1px solid #2a2a2a;
    width: 90%;
    max-width: 600px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: var(--secondary-text);
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}
.modal-close-btn:hover {
    color: var(--light-text);
}

.modal-content h2 {
    font-family: var(--font-secondary);
    font-size: 2.5rem;
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.modal-content p {
    line-height: 1.7;
    color: var(--secondary-text);
}

.modal-content ul {
    list-style: none;
    padding-left: 0;
    margin: 20px 0 30px 0;
}

.modal-content ul li {
    padding-left: 20px;
    position: relative;
    margin-bottom: 10px;
}

.modal-content ul li::before {
    content: '✓';
    color: var(--primary-color);
    position: absolute;
    left: 0;
}



/* --- Responsive Design --- */
.burger-menu { display: none; }

@media (max-width: 992px) {
    .navbar {
        position: relative;
    }
    .nav-links { display: none; }
    .burger-menu {
        display: flex; flex-direction: column; justify-content: space-around;
        width: 30px; height: 25px;
        background: transparent; border: none; cursor: pointer; z-index: 10;
    }
    .burger-menu span {
        width: 100%; height: 3px; background: var(--light-text);
        border-radius: 2px; transition: all 0.3s ease;
    }
    .burger-menu.open span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .burger-menu.open span:nth-child(2) {
        opacity: 0;
    }
    .burger-menu.open span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-links {
        position: absolute; top: 100%; left: 0;
        background: var(--dark-bg);
        width: 100%;
        flex-direction: column;
        padding: 0;
        gap: 0;
        text-align: center;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out;
    }
    .nav-links.open { max-height: 300px; padding: 20px 0; }
    .nav-links li { padding: 15px 0; width: 100%; }

    .hero-content { flex-direction: column; text-align: center; }
    .hero-text { order: 2; }
    .hero-image-wrapper { order: 1; width: 80%; margin-bottom: 40px; }
    .hero-text h1 { font-size: 4rem; }
    .program-card.highlight { transform: scale(1); }
    .about-content { flex-direction: column; padding: 40px 20px; }
    .about-text .section-title { text-align: center; }
}

@media (max-width: 768px) {
    .auth-buttons { display: none; } /* Hide auth buttons on smaller screens to make space for nav */
    .join-container { flex-direction: column; height: auto; }
    .join-option { width: 100%; padding: 40px 0; }
    .footer-content { flex-direction: column; }
    .footer-links { flex-direction: column; text-align: center; }
    .footer-left { display: flex; flex-direction: column; align-items: center; }
}

.join-option.member .option-content {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 30px;
    text-align: left;
}


.flash-messages {
    margin: 20px auto;
    padding: 10px;
    width: 90%;
    max-width: 600px;
    text-align: center;
    z-index: 1000;
}

.flash {
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 8px;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    font-size: 16px;
}

.flash.success {
    background-color: #e6ffea;
    color: #2e7d32;
}

.flash.info {
    background-color: #e6f4ff;
    color: #0277bd;
}

.flash.error {
    background-color: #ffebee;
    color: #c62828;
}

.flash-messages {
    transition: opacity 0.5s ease;
}


.view-more-container {
    text-align: center;
    margin-top: 50px;
}

#view-more-programs {
    padding: 12px 30px;
    font-size: 1.1rem;
    border-color: var(--primary-color);
}