:root {
    --main-green: #2ecc71;
    --dark-green: #27ae60;
    --white: #ffffff;
    --glass-bg: rgba(0, 0, 0, 0.4);
}

body,
html {
    margin: 0;
    padding: 0;
    font-family: "Cairo", sans-serif;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background:
        linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("../images/homeBackground.jpg");
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 60px;
    box-sizing: border-box;
    z-index: 1000;
    transition: 0.5s ease;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 10px 60px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.logo {
    display: flex;
    align-items: center;
}

#logoImg {
    height: 70px;
    width: auto;
    transition: all 0.4s ease;
}

#logoImg:hover {
    transform: scale(1.05);
}

header:not(.scrolled) #logoImg {
    filter: brightness(1) invert(0);
}

header.scrolled #logoImg {
    filter: none;
    height: 40px;
}

.login-btn {
    text-decoration: none;
    color: var(--white);
    background: var(--main-green);
    padding: 10px 25px;
    border-radius: 30px;
    transition: 0.3s;
}

.hero {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-text-bg {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    padding: 50px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 800px;
    color: var(--white);
}

#typing-text {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--main-green);
}

.cards-section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 0;
}

.cards-container {
    display: flex;
    gap: 30px;
    width: 90%;
    max-width: 1200px;
    justify-content: center;
}

.card {
    flex: 1;
    background: var(--white);
    color: #333;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-top: 6px solid var(--main-green);
    transition: 0.4s ease;
}

.card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(46, 204, 113, 0.4);
}

.icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.info-section {
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
}

.info-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    color: var(--white);
    width: 70%;
    border-right: 5px solid var(--main-green);
}

#scrollTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: none;
    width: 50px;
    height: 50px;
    background: var(--main-green);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1001;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

footer {
    background: #111;
    color: #777;
    padding: 15px;
    text-align: center;
    font-size: 0.9rem;
}

/* MOBILE */

@media (max-width: 768px) {
    body {
        background-attachment: scroll;
    }

    header {
        padding: 8px 15px;
    }

    header.scrolled {
        padding: 6px 15px;
    }

    #logoImg {
        height: 45px;
    }

    header.scrolled #logoImg {
        height: 30px;
    }

    .login-btn {
        padding: 6px 14px;
        font-size: 0.85rem;
    }

    .hero {
        min-height: 85vh;
        padding: 80px 15px 40px 15px;
    }

    .hero-text-bg {

        background: rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.15);

    }

    #typing-text {
        font-size: 2rem;
    }

    .cards-section {
        padding: 70px 0 40px 0;
    }

    .cards-container {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        width: 90%;
    }

    .card {
        width: 100%;
        max-width: 320px;
        padding: 25px 18px;
    }

    .icon {
        font-size: 2.2rem;
    }

    .info-section {

        padding: 40px 15px;
        /* مسافة من الحواف */

    }

    .info-box {

        width: 100%;
        max-width: 500px;

        margin: auto;

        padding: 25px 20px;

        border-right: none;
        border-bottom: 4px solid var(--main-green);

        text-align: center;

    }

    #scrollTop {
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 400px) {
    #typing-text {
        font-size: 1.7rem;
    }

    .login-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
}