/* Professional Hero Slider Styles */
.hero-section {
    height: calc(100vh - var(--header-height, 80px));
    min-height: 600px;
    max-height: 1200px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: var(--header-height, 80px); /* استخدام متغير لارتفاع الهيدر */
}

/* Static background for when there are no hero images */
.hero-static-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    display: none;
    z-index: 0;
    overflow: hidden;
    object-fit: cover;
    transform-origin: center;
    will-change: transform, opacity;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.6s ease-in-out; /* تسريع الانتقال من ثانية إلى 0.6 ثانية */
}

.hero-slide.active {
    display: block !important;
    z-index: 1;
    animation: kenBurns 12s ease-out forwards; /* تسريع من 20 ثانية إلى 12 ثانية */
    /* Removed filter to make images clearer */
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Using solid black background with opacity controlled separately */
    background-color: #000000;
    z-index: 2;
    opacity: 0.3; /* Default opacity value that can be overridden */
    transition: opacity 0.3s ease; /* Smooth transition when opacity changes */
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    max-width: 900px;
    padding: 0 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateY(-20px); /* نزول النص للأسفل قليلاً */
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 25px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1.2s cubic-bezier(0.25, 0.1, 0.25, 1);
    letter-spacing: 1px;
}

.hero-content p {
    font-size: 1.4rem;
    margin-bottom: 35px;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 1.2s cubic-bezier(0.25, 0.1, 0.25, 1) 0.3s;
    animation-fill-mode: both;
    max-width: 80%;
    line-height: 1.6;
}

.hero-content .btn {
    animation: fadeInUp 1.2s cubic-bezier(0.25, 0.1, 0.25, 1) 0.6s;
    animation-fill-mode: both;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.hero-content .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Slider Navigation */
.slider-nav {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 8px 15px;
    border-radius: 30px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.slider-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    margin: 0 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1); /* تسريع انتقال النقاط */
    border: 2px solid transparent;
}

.slider-dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.slider-dot.active {
    background-color: #f5c45e;
    transform: scale(1.2);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 10px rgba(245, 196, 94, 0.5);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes kenBurns {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.05) rotate(0.5deg);
    }
    100% {
        transform: scale(1.12) rotate(1deg); /* زيادة التكبير وإضافة دوران خفيف */
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Styles */
@media (max-width: 1400px) {
    .hero-content h1 {
        font-size: 3.5rem;
    }

    .hero-content p {
        font-size: 1.3rem;
    }
}

@media (max-width: 992px) {
    :root {
        --header-height: 70px;
    }

    .hero-section {
        height: calc(100vh - var(--header-height));
        margin-top: var(--header-height);
    }

    .hero-content {
        max-width: 700px;
        transform: translateY(-10px);
    }

    .hero-content h1 {
        font-size: 3rem;
        margin-bottom: 20px;
    }

    .hero-content p {
        font-size: 1.2rem;
        margin-bottom: 30px;
        max-width: 90%;
    }

    .hero-content .btn {
        padding: 10px 25px;
        font-size: 1rem;
    }

    .slider-nav {
        padding: 6px 12px;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .hero-section {
        height: calc(100vh - var(--header-height));
        margin-top: var(--header-height);
        min-height: 550px;
    }

    .hero-content {
        max-width: 600px;
        transform: translateY(0);
    }

    .hero-content h1 {
        font-size: 2.5rem;
        letter-spacing: 0.5px;
    }

    .hero-content p {
        font-size: 1.1rem;
        line-height: 1.5;
    }

    .hero-slide {
        background-position: center center !important;
    }

    .slider-dot {
        width: 12px;
        height: 12px;
        margin: 0 5px;
    }
}

@media (max-width: 576px) {
    :root {
        --header-height: 50px;
    }

    .hero-section {
        height: calc(100vh - var(--header-height));
        margin-top: var(--header-height);
        min-height: 500px;
    }

    .hero-content {
        max-width: 100%;
        padding: 0 20px;
        transform: translateY(20px);
    }

    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 15px;
        letter-spacing: 0;
    }

    .hero-content p {
        font-size: 1rem;
        margin-bottom: 25px;
        max-width: 100%;
    }

    .hero-content .btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }

    .slider-dot {
        width: 10px;
        height: 10px;
        margin: 0 4px;
    }

    .slider-nav {
        bottom: 25px;
        padding: 5px 10px;
    }

    /* No need to override hero-overlay background here as it's set dynamically */
}
