@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;900&display=swap');

/* ========================================
   1. RESET & VARIABLES
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-dark: #11120d;
    --color-beige: #d8cfbc;
    --color-light: #fffbf4;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--color-light);
    color: var(--color-dark);
    line-height: 1.6;
    font-size: 14px;
}

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

/* ========================================
   2. NAVIGATION
======================================== */
.navbar {
    background: var(--color-dark);
    padding: 0.8rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.logo {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--color-beige);
    z-index: 1001;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--color-beige);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    padding: 0.5rem;
    transition: var(--transition);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.6rem;
}

.nav-links a {
    color: var(--color-light);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.nav-links a:hover {
    color: var(--color-beige);
}

/* ========================================
   3. HERO SECTION
======================================== */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-dark);
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 1;
    opacity: 0.35;
    filter: brightness(0.7) contrast(1.2);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(17, 18, 13, 0.85), rgba(17, 18, 13, 0.75), rgba(17, 18, 13, 0.85));
    z-index: 2;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(216, 207, 188, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(216, 207, 188, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 3;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: var(--color-light);
    padding: 0 20px;
}

.animate-text {
    font-size: clamp(1.8rem, 4.5vw, 3.5rem);
    font-weight: bold;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
    text-shadow: 3px 3px 15px rgba(0,0,0,0.8), 0 0 30px rgba(216, 207, 188, 0.4);
    letter-spacing: 3px;
}

.subtitle {
    font-size: clamp(0.9rem, 2.2vw, 1.3rem);
    color: var(--color-beige);
    animation: fadeInUp 1s ease 0.3s backwards;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8), 0 0 20px rgba(216, 207, 188, 0.3);
    letter-spacing: 1px;
}

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

/* ========================================
   4. NEXT COURSE
======================================== */
.next-course {
    background: var(--color-beige);
    padding: 1.1rem 0;
}

.course-announcement {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.1rem;
    flex-wrap: wrap;
    text-align: center;
}

.course-announcement i {
    font-size: 1.8rem;
    color: var(--color-dark);
}

.course-announcement h3 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.course-announcement p {
    font-size: 0.9rem;
    color: var(--color-dark);
}

/* ========================================
   5. SECTION TITLE (GLOBAL)
======================================== */
.section-title {
    text-align: center;
    font-size: clamp(1.5rem, 3.2vw, 2rem);
    margin-bottom: 1.8rem;
    color: var(--color-dark);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 65px;
    height: 3px;
    background: var(--color-beige);
    margin: 0.7rem auto;
}

/* ========================================
   6. COURSES SECTION
======================================== */
.courses {
    padding: 2.8rem 0;
    background: var(--color-light);
}

.courses-slider {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.slider-container {
    overflow: hidden;
    border-radius: 10px;
}

.course-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transition: var(--transition);
    display: none;
    max-width: 450px;
    margin: 0 auto;
}

.course-card.active {
    display: block;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.course-image {
    width: 100%;
    height: 250px;
    object-fit: contain;
    background: #f5f5f5;
    padding: 10px;
}

.course-content {
    padding: 1.1rem;
}

.course-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--color-dark);
}

.course-content p {
    margin-bottom: 0.5rem;
    color: #666;
    font-size: 0.85rem;
    line-height: 1.5;
}

.course-details {
    display: flex;
    justify-content: space-between;
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--color-beige);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.course-details span {
    color: var(--color-dark);
    font-weight: bold;
    font-size: 0.8rem;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-beige);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    color: var(--color-dark);
    z-index: 10;
}

.slider-btn:hover {
    background: var(--color-dark);
    color: var(--color-beige);
}

.slider-btn.prev {
    right: 10px;
}

.slider-btn.next {
    left: 10px;
}

/* ========================================
   7. PROJECTS SECTION
======================================== */
.projects {
    padding: 3rem 0;
    background: var(--color-dark);
}

.projects .section-title {
    color: var(--color-light);
}

.projects .section-title::after {
    background: var(--color-beige);
}

.project-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.8rem;
    flex-wrap: wrap;
    padding: 0 20px;
}

.project-breadcrumb a {
    color: var(--color-beige);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.85rem;
}

.project-breadcrumb a:hover {
    color: var(--color-light);
}

.project-breadcrumb .separator {
    color: #999;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.6rem;
    margin-top: 1.8rem;
}

.project-folder {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.project-folder:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(216, 207, 188, 0.4);
}

.project-folder-image {
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
}

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

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

.project-folder-image.no-image {
    background: linear-gradient(135deg, #d8cfbc 0%, #b8ad9a 50%, #9a8f7c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.project-folder-image.no-image i {
    font-size: 3.2rem;
    color: var(--color-dark);
    opacity: 0.4;
    z-index: 1;
    position: relative;
}

.project-folder-content {
    padding: 1.1rem;
    background: white;
}

.project-folder h3 {
    color: var(--color-dark);
    font-size: 1rem;
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.project-folder p {
    color: #666;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.project-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.4rem;
    margin-top: 1.8rem;
    grid-column: 1/-1;
}

.project-image-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 3px 15px rgba(0,0,0,0.2);
}

.project-image-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(216, 207, 188, 0.5);
}

.project-image-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.empty-state {
    grid-column: 1/-1;
    text-align: center;
    padding: 2.5rem;
    color: var(--color-light);
}

/* ========================================
   8. PROFILE SECTION (من أنا)
======================================== */
.profile-section {
    padding: 0;
    background: #f5f5f5;
    position: relative;
}

.profile-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: flex-end;
    min-height: 500px;
    background: #f5f5f5;
    position: relative;
}

.profile-text {
    padding: 3rem 4rem;
    text-align: right;
    z-index: 3;
    align-self: center;
}

.profile-text h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    color: #000;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.profile-description {
    font-size: clamp(0.95rem, 1.8vw, 1.2rem);
    color: #555;
    line-height: 1.8;
    font-weight: 400;
}

.profile-image-container {
    position: relative;
    height: 500px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 2;
}

.profile-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 400"><text x="50%" y="50%" text-anchor="middle" font-family="Arial" font-size="200" fill="%23e0e0e0" opacity="0.3">AT</text></svg>') no-repeat center;
    background-size: 80%;
    opacity: 0.15;
    z-index: 1;
}

.profile-image-container img {
    width: auto;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.15));
}

.profile-stats-bar {
    background: #000;
    padding: 2.5rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6rem;
    position: relative;
    z-index: 4;
}

.profile-stat-item {
    text-align: center;
    color: white;
    position: relative;
}

.profile-stat-item::after {
    content: '';
    position: absolute;
    right: -3rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 60px;
    background: rgba(255,255,255,0.2);
}

.profile-stat-item:last-child::after {
    display: none;
}

.profile-stat-item i {
    font-size: 3rem;
    color: #d8cfbc;
    margin-bottom: 0.8rem;
    display: block;
}

.profile-stat-item h3 {
    font-size: 2.5rem;
    color: #d8cfbc;
    margin-bottom: 0.5rem;
    font-weight: 900;
}

.profile-stat-item p {
    font-size: 1rem;
    color: white;
    font-weight: 400;
}

/* ========================================
   9. CONTACT SECTION
======================================== */
.contact {
    padding: 3rem 0;
    background: var(--color-light);
}

.contact .section-title {
    color: var(--color-dark);
}

.contact .section-title::after {
    background: var(--color-beige);
}

.contact-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.contact-card {
    background: white;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-dark);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 2px solid var(--color-beige);
}

.contact-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: var(--color-dark);
}

.contact-card i {
    font-size: 1.3rem;
}

.contact-card span {
    font-size: 0.85rem;
    font-weight: 500;
}

.contact-card.whatsapp {
    color: #25D366;
    border-color: #25D366;
}

.contact-card.whatsapp:hover {
    background: #25D366;
    color: white;
}

.contact-card.phone {
    color: var(--color-dark);
    border-color: var(--color-beige);
}

.contact-card.phone:hover {
    background: var(--color-dark);
    color: white;
    border-color: var(--color-dark);
}

.contact-card.email {
    color: #EA4335;
    border-color: #EA4335;
}

.contact-card.email:hover {
    background: #EA4335;
    color: white;
}

.contact-card.instagram {
    color: #E1306C;
    border-color: #E1306C;
}

.contact-card.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
    color: white;
    border-color: transparent;
}

.contact-card.facebook {
    color: #1877F2;
    border-color: #1877F2;
}

.contact-card.facebook:hover {
    background: #1877F2;
    color: white;
}

/* ========================================
   10. FOOTER
======================================== */
footer {
    background: var(--color-dark);
    color: var(--color-light);
    text-align: center;
    padding: 1.4rem 0;
    font-size: 0.85rem;
    border-top: 1px solid rgba(216, 207, 188, 0.2);
    margin-top: 0;
}

/* ========================================
   11. MODAL
======================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--color-light);
    padding: 2rem;
    border-radius: 15px;
    max-width: 850px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    left: 20px;
    top: 20px;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--color-dark);
    transition: var(--transition);
    z-index: 10;
}

.close-modal:hover {
    color: #e74c3c;
    transform: rotate(90deg);
}

.modal-gallery {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-gallery img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
}

/* ========================================
   12. RESPONSIVE DESIGN
======================================== */
@media (max-width: 768px) {
    body {
        font-size: 13px;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--color-dark);
        flex-direction: column;
        gap: 0;
        padding-top: 4.5rem;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.3);
        z-index: 999;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        width: 100%;
        border-bottom: 1px solid rgba(216, 207, 188, 0.1);
    }
    
    .nav-links a {
        display: block;
        padding: 1.1rem 1.8rem;
        font-size: 0.95rem;
    }
    
    .hero {
        height: 70vh;
    }
    
    /* Profile Section Mobile - إصلاح مشكلة الصورة */
    .profile-top {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    
    .profile-text {
        padding: 2rem 1.5rem;
        text-align: center;
        order: 1;
    }
    
    .profile-text h2 {
        font-size: 2rem;
    }
    
    .profile-description {
        font-size: 0.9rem;
    }
    
    .profile-image-container {
        height: 300px;
        order: 2;
        margin-bottom: -50px;
    }
    
    .profile-image-container img {
        max-width: 80%;
        height: auto;
        max-height: 300px;
    }
    
    .profile-stats-bar {
        padding: 3rem 1rem 2rem;
        gap: 2rem;
        flex-wrap: wrap;
    }
    
    .profile-stat-item::after {
        display: none;
    }
    
    .profile-stat-item i {
        font-size: 2rem;
    }
    
    .profile-stat-item h3 {
        font-size: 1.8rem;
    }
    
    .profile-stat-item p {
        font-size: 0.85rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
}