/* Global Styles */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #1e293b;
    --accent-color: #f59e0b;
    --light-color: #f8fafc;
    --dark-color: #0f172a;
    --text-color: #334155;
    --text-light: #64748b;
    --gray-light: #e2e8f0;
    --white: #ffffff;
    --black: #000000;
    --transition: all 0.3s ease;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius: 8px;
    --border-radius-lg: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    direction: rtl;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--dark-color);
    line-height: 1.3;
    font-weight: 700;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.text-center {
    text-align: center;
}

.highlight {
    color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background-color: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
}

.navbar ul {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.navbar ul li a {
    color: var(--dark-color);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.navbar ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.navbar ul li a:hover::after {
    width: 100%;
}

.navbar ul li a.active {
    color: var(--primary-color);
}

.navbar ul li a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    margin-left: 1rem;
    color: var(--dark-color);
    cursor: pointer;
}

/* يخفي زر تسجيل الدخول داخل القائمة على الشاشات الكبيرة */
.mobile-login {
    display: none;
}

/* يظهر الزر داخل القائمة على الشاشات الصغيرة ويخفي الزر الخارجي */
@media (max-width: 768px) {
    .mobile-login {
        display: block;
    }

    .desktop-only {
        display: none !important;
    }
}

/* Hero Section */
.hero {
    padding: 8rem 0 5rem;
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.hero-content {
    flex: 1;
}

.hero-image {
    flex: 1;
    position: relative;
}

/* Animation for pulse */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Apply pulse to profile image */
.pulse {
    animation: pulse 2s infinite;
    transition: transform 0.3s ease-in-out;
}

/* Smooth transitions on hero content */
.hero-content {
    transition: all 0.6s ease-in-out;
}

/* Add some entrance effect */
[data-aos="fade-right"] {
    opacity: 0;
    transform: translateX(-50px);
    animation: fadeRight 1s forwards;
}

@keyframes fadeRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Optional: fade-in for image */
[data-aos="fade-left"] {
    opacity: 0;
    transform: translateX(50px);
    animation: fadeLeft 1s forwards;
}

@keyframes fadeLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}


.profile-image {
    border-radius: var(--border-radius-lg);
    position: relative;
    z-index: 1;
}

.image-border {
    position: absolute;
    top: -4px;
    right: -14px;
    width: 76%;
    height: 102%;
    border: 3px solid var(--primary-color);
    border-radius: var(--border-radius-lg);
    z-index: 0;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero h2 {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-light);
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--white);
    color: var(--dark-color);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
}

/* Skills Section */
.skills-section {
    background-color: var(--white);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.skill-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.skill-icon {
    width: 60px;
    height: 60px;
    background-color: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.skill-card h3 {
    margin-bottom: 0.5rem;
}

/* Projects Section */
.projects-preview {
    background-color: var(--light-color);
}

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

.project-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(37, 99, 235, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
    padding: 1rem;
    text-align: center;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-overlay h3 {
    color: var(--white);
    margin-bottom: 1rem;
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    margin-bottom: 0.5rem;
}

.project-tech {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.project-tech span {
    background-color: var(--light-color);
    color: var(--text-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Testimonials */
.testimonials {
    background-color: var(--white);
}

.testimonial-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.testimonial {
    display: none;
    background-color: var(--light-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.testimonial.active {
    display: block;
}

.testimonial-content {
    text-align: center;
}

.testimonial-content p {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 2rem;
    position: relative;
}

.testimonial-content p::before,
.testimonial-content p::after {
    content: '"';
    font-size: 2rem;
    color: var(--primary-color);
    opacity: 0.5;
}

.client-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.client-info img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.client-info h4 {
    margin-bottom: 0.25rem;
}

.client-info span {
    color: var(--text-light);
    font-size: 0.875rem;
}

.slider-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.slider-controls button {
    background-color: var(--primary-color);
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.slider-controls button:hover {
    background-color: var(--primary-dark);
}

/* Blog Preview */
.blog-preview {
    background-color: var(--light-color);
}

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

.blog-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.blog-image {
    position: relative;
    height: 200px;
}

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

.blog-date {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.blog-content {
    padding: 1.5rem;
}

.blog-content h3 {
    margin-bottom: 0.75rem;
}

.blog-content h3 a {
    color: var(--dark-color);
    transition: var(--transition);
}

.blog-content h3 a:hover {
    color: var(--primary-color);
}

.read-more {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 500;
    margin-top: 1rem;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--primary-dark);
}

/* CTA Section */
.cta-section {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 4rem 0;
}

.cta-content h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.cta-content p {
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 4rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.testimonial {
    display: none;
}

.testimonial.active {
    display: block;
}

.footer-logo {
    font-size: 2%;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
    display: inline-block;
}

.footer-about p {
    color: var(--gray-light);
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transition: var(--transition);
}

.footer-social a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-links h3,
.footer-contact h3 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

.footer-links ul li a {
    color: var(--gray-light);
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--primary-color);
    padding-right: 5px;
}

.footer-contact ul li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--gray-light);
}

.footer-contact ul li i {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    text-align: center;
}

.footer-bottom p {
    color: var(--gray-light);
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow);
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

/* Loader */
.loader {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.loader-content {
    text-align: center;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--gray-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.loader p {
    font-weight: 500;
    color: var(--dark-color);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loader.hidden {
    visibility: hidden;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        margin-bottom: 3rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }

    .hero-image {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .navbar {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background-color: var(--white);
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
        padding: 2rem;
        overflow-y: auto;
    }

    .navbar.active {
        right: 0;
    }

    .navbar ul {
        flex-direction: column;
        gap: 1rem;
    }

    .menu-toggle {
        display: block;
    }

    section {
        padding: 3rem 0;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero h2 {
        font-size: 1.25rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-title::after {
        bottom: -0.75rem;
    }
}


.login-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #13079c;
    border-color: #0011ff;
    /* yellow-500 */
    text-decoration: none;
    transition: all 0.3s ease-in-out;
    background-color: transparent;
}

.login-button:hover {
    border-color: #facc15;
    color: #d00bda;
    box-shadow: 0 4px 10px rgba(250, 204, 21, 0.3);
}

.login-button .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.login-button:hover .icon {
    transform: rotate(180deg);
}

.login-button .text {
    display: flex;
    align-items: center;
    gap: 4px;
}

.login-button .highlight {
    color: #facc15;
}

body.dark .login-button {
    color: #fde047;
    /* yellow-300 */
}

body.dark .login-button .highlight {
    color: #fde047;
}

body.dark .login-button:hover {
    border-color: #0608a2;
    box-shadow: 0 4px 10px rgba(253, 224, 71, 0.3);
}

.about-section {
    padding: 60px 0;
    background-color: #f9f9f9;
    direction: rtl;
    text-align: center;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.about-card {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

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

.about-icon {
    font-size: 40px;
    color: #4caf50;
    margin-bottom: 15px;
}

.section-title {
    font-size: 28px;
    color: #333;
    margin-bottom: 20px;
}

.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.lesson-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.lesson-card:hover {
    transform: translateY(-8px);
}

.lesson-image {
    position: relative;
}

.lesson-image img {
    width: 100%;
    height: auto;
    display: block;
}

.lesson-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 15px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lesson-card:hover .lesson-overlay {
    opacity: 1;
}

.lesson-info {
    padding: 15px;
    text-align: center;
}

.lesson-meta span {
    display: block;
    font-size: 14px;
    color: #555;
    margin-top: 5px;
}

.stars {
    color: #facc15;
    /* لون النجمة - أصفر */
    font-size: 18px;
    margin-top: 5px;
}
