/* hero Section */
.hero {
    color: var(--white);

    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: end;
    gap: var(--space-md);
    z-index: 0;
    height: 75vh;
}

.slider {
    height: 75vh;
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    width: 100%;
}

.slide {
    display: none;
    animation: fade 1s ease-in-out;
}

.slide.active {
    display: block;
}

/* الخلفية */
.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 75vh;
    background-size: cover;
    background-position: center;
    z-index: -1;
}

/* كل مرة السلايد تبقى active يشتغل الأنيميشن من الأول */
.slide.active .slide-bg {
    animation: slowZoom 20s ease-in-out forwards;
}

.hero .slider .slide1 .slide-bg {
    background-image: url("../../img/hero-bg1.jpg");
}

.hero .slider .slide2 .slide-bg {
    background-image: url("../../img/hero-bg2.jpg");
}

.hero .slider .slide3 .slide-bg {
    background-image: url("../../img/hero-bg3.jpg");
}

.hero .slider .slide4 .slide-bg {
    background-image: url("../../img/hero-bg4.jfif");
}

.hero .slider .slide5 .slide-bg {
    background-image: url("../../img/hero-bg5.jfif");
}

@keyframes slowZoom {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.5);
    }
}

.hero .bg-hero-overlay {
    background-color: var(--transparentColor);
    display: flex;
    flex-direction: column;
    padding-top: var(--space-lg);
    align-items: center;
    justify-content: start;
    padding-bottom: var(--space-md);
    height: 75vh;
}

.hero .hero-overlay {
    width: 70%;
    margin: 0 auto;
    /* height: fit-content; */
    max-height: 85%;
    min-height: 85%;
    padding-bottom: var(--space-md);

    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
}

.hero h1 {
    position: relative;
    padding-bottom: 8px;
    color: var(--white);
}

.hero h1::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 20%;
    height: 3px;
    background: var(--helperColor);
    border-radius: 2px;
}

.hero .hero-overlay p {

    font-size: 1.8rem;
    line-height: 2.8rem;
}


@keyframes fade {
    from {
        opacity: 0.4;
    }

    to {
        opacity: 1;
    }
}

/* Controls */
.slider-controls {
    position: absolute;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 var(--space-lg);
    color: var(--white);
    font-size: var(--text-lg);
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
}

.slider-controls span:hover {
    color: var(--primaryColor);
    transform: scale(1.1);
}

/* Indicators (dots) */
.slider-indicators {
    text-align: center;
    display: flex;
    flex-direction: row;
    gap: var(--space-md);
    align-items: center;
    justify-content: center;
    width: 100%;
}

.slider-indicators span {
    height: 12px;
    width: 12px;
    margin: 0 4px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
}

.slider-indicators span.active {
    background-color: var(--primaryColor);
}

/* العناصر اللي جوه السلايد */
.slide .hero-overlay>* {
    opacity: 0;
    transform: translateY(40px);
    animation: fadeUp 0.8s ease forwards;
}

/* ترتيب التأخيرات */
.slide.active .top-quote {
    animation-delay: 0.3s;
}

.slide.active h1 {
    animation-delay: 0.6s;
}

.slide.active p {
    animation-delay: 0.9s;
}

.slide.active a {
    animation-delay: 1.2s;
}

.hero .top-quote {
    display: inline-block;
    background-color: var(--primaryColor);
    padding: var(--space-md) var(--space-lg);
    font-size: 20px;
    font-weight: 600;
    border-radius: 35px;
}


/* ====== Animations إضافية ====== */

/* حركة ظهور للفوق عند التحميل */
@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* حركة تكبير بسيطة عند المرور */
@keyframes pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* تأثير دخول العناصر الرئيسية */
.hero,
.about,
.contact,
.address-container {
    animation: fadeUp 1s ease forwards;
}

/* ترتيب الظهور */
.hero {
    animation-delay: 0.2s;
}

.about {
    animation-delay: 0.4s;
}

.contact {
    animation-delay: 0.6s;
}

.address-container {
    animation-delay: 0.8s;
}

/* حركة على الكروت عند المرور */
.service-card,
.stats div {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}


/* حركة أيقونات التواصل */
.contact-btn {
    transition: transform 0.3s ease;
}

.contact-btn:hover {
    animation: pop 0.4s ease;
}


/* Responsive Design */


/* للشاشات المتوسطة مثل التابلت */
@media (max-width: 1500px) {
    .hero h1 {
        font-size: xx-large;
        font-weight: 900;
    }

    .hero .hero-overlay p {

        font-size: larger;
        line-height: normal;
    }

    .hero .hero-overlay {
        width: 80%;
        padding: 0 20px;
        text-align: center;
    }

    .hero h1::after {
        left: 50%;
        transform: translateX(-50%);
        right: auto;
    }
}


@media (max-width: 993px) {


    .hero .top-quote {
        background-color: var(--primaryColor);
        padding: 10px 20px;
        font-size: 15px;
        font-weight: 400;
        border-radius: 35px;
        width: 100%;
        display: block;
    }


    .hero .hero-overlay {
        gap: var(--space-md);
    }


}


/* للشاشات الصغيرة مثل الموبايل */
@media (max-width: 768px) {
    .slider-controls {
        display: none;
    }

    .hero .bg-hero-overlay {
        width: 100%;
        padding-top: 0;
        align-items: center;
        justify-content: start;
    }

    .hero .hero-overlay {
        gap: var(--space-md);
        width: 100%;
    }

    .hero h1 {
        font-size: xx-large;
        font-weight: 900;
    }

    .hero .hero-overlay p {
        font-size: larger;
        line-height: normal;
    }

}

@media (max-width:550px) {
    .hero h1 {
        font-size: x-large;
        font-weight: 800;
    }
}

@media (max-width:320px) {


    .hero .bg-hero-overlay {
        padding-top: 0;
        align-items: center;
        justify-content: start;
    }

}