* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #7D3C98;
    --light-primary-color: #F5EEF8;
    --secondary-color: #4ECDC4;
}

body {
    font-family: "Tajawal", sans-serif;
    background-color: var(--light-primary-color);
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Navbar ===== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
    gap: 2rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.site-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: "Paytone One", sans-serif;
}

.nav-list {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(90deg, #7A2BC0 0%, #1EC7B7 100%);
    border-radius: 20px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.nav-link {
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    padding: 0.5rem 0.8rem;
    border-radius: 10px;
    transition: background 0.3s;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

.login-btn {
    text-decoration: none;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(90deg, #7A2BC0 0%, #1EC7B7 100%);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s;
    white-space: nowrap;
}

.login-btn:hover {
    transform: translateY(-2px);
    cursor: pointer;
}

/* ===== Hero Sections ===== */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    padding: 2rem 0;
    min-height: 75vh;
}

.hero-content {
    text-align: right;
}

.hero-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.4;
    color: var(--primary-color);
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    color: #3b3b3b;
    font-size: clamp(1rem, 2vw, 1.3rem);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.start-btn {
    margin-top: 2rem;
    text-align: center;
    margin-right: 5px;
}

.evaluate {
    display: inline-block;
    text-decoration: none;
    border-radius: 12px;
    padding: 0.9rem 1.8rem;
    font-weight: 700;
    font-size: 1.1rem;
    background: linear-gradient(90deg, #7A2BC0 0%, #1EC7B7 100%);
    color: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.evaluate:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.hero-media img {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 14px;
    display: block;
    object-fit: contain;
}

.hero-second {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 5rem;
    padding: 2rem 0;
    min-height: 80vh;
    margin-top: 3rem;
}

.second-media {
    width: 100%;
    overflow: visible;
}

.second-media img {
    width: 120%;
    max-width: none;
    height: auto;
    border-radius: 14px;
    display: block;
    object-fit: contain;
    transform: scale(1.1) translateX(30px);
}

.second-content {
    text-align: center;
    padding-right: 2rem;
}

.second-content h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.4;
    color: var(--primary-color);
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.second-content p {
    color: #3b3b3b;
    font-size: clamp(1rem, 2vw, 1.5rem);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.hero-third {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    padding: 2rem 0;
    min-height: 80vh;
    margin-top: 3rem;
}

.third-content {
    text-align: right;
    padding-right: 2rem;
}

.third-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.4;
    color: var(--primary-color);
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.third-text {
    color: #3b3b3b;
    font-size: clamp(1rem, 2vw, 1.5rem);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.third-media img {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 14px;
    display: block;
    object-fit: contain;
}

/* ===== تموجات ===== */
.hero-media {
    position: relative;
    z-index: 1;
}

.hero-media::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 110%;
    height: 110%;
    background: rgba(125, 60, 152, 0.12);
    border-radius: 60% 40% 50% 50% / 50% 60% 40% 50%;
    z-index: -1;
}

.second-media {
    position: relative;
    z-index: 1;
}

.third-media {
    position: relative;
    z-index: 1;
}

.third-media::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 110%;
    height: 110%;
    background: rgba(122, 43, 192, 0.13);
    border-radius: 55% 45% 50% 50% / 50% 50% 45% 55%;
    z-index: -1;
}

.hero-media img,
.second-media img,
.third-media img {
    transition: transform 0.3s ease;
}

.hero-media img:hover,
.third-media img:hover {
    transform: scale(1.02);
}

.second-media img:hover {
    transform: scale(1.02) translateX(30px);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--light-primary-color);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7A2BC0 0%, #1EC7B7 100%);
    border-radius: 10px;
    border: 2px solid var(--light-primary-color);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #8e33de 0%, #26decb 100%);
}

/* ========================================
   Responsive Design
======================================== */

@media (max-width: 968px) {
    .navbar {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }

    .brand {
        order: 1;
        flex-basis: 100%;
        justify-content: center;
    }

    .nav-list {
        order: 2;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0.5rem 1rem;
        gap: 0.8rem;
    }
    
    .login-btn {
        order: 3;
    }

    .hero,
    .hero-second,
    .hero-third {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 2rem 0;
        min-height: auto;
    }

    .hero-content,
    .second-content,
    .third-content {
        text-align: center;
        padding-right: 0;
    }

    .second-content {
        order: 2;
    }

    .second-media {
        order: 1;
    }
    
    .second-media img {
        width: 100%;
        transform: scale(1) translateX(0);
        max-width: 500px;
        margin: 0 auto;
    }

    .third-content {
        order: 2;
    }
    
    .third-media {
        order: 1;
    }

    .third-media img {
        margin: 0 auto;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 15px;
    }

    .navbar {
        padding: 1rem 0;
    }

    .brand {
        gap: 0.4rem;
    }

    .site-logo {
        font-size: 1.5rem;
    }

    .logo {
        width: 42px;
        height: 42px;
    }

    .nav-list {
        gap: 0.6rem;
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .nav-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }

    .login-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .hero-title,
    .second-content h2,
    .third-title {
        font-size: 1.5rem;
    }

    .hero-subtitle,
    .second-content p,
    .third-text {
        font-size: 1rem;
    }

    .evaluate {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .hero,
    .hero-second,
    .hero-third {
        gap: 1.8rem;
        padding: 1.5rem 0;
    }
}

@media (max-width: 400px) {
    .site-logo {
        font-size: 1.3rem;
    }

    .logo {
        width: 38px;
        height: 38px;
    }

    .nav-list {
        font-size: 0.8rem;
        gap: 0.5rem;
        padding: 0.3rem 0.6rem;
    }

    .nav-link {
        padding: 0.3rem 0.5rem;
    }

    .login-btn {
        font-size: 0.85rem;
        padding: 0.45rem 0.9rem;
    }
}

@media (max-width: 320px) {
    .container {
        padding: 0 10px;
    }

    .navbar {
        gap: 0.8rem;
    }

    .site-logo {
        font-size: 1.2rem;
    }

    .nav-list {
        gap: 0.4rem;
        padding: 0.25rem 0.5rem;
    }
}