:root {
    --golden-brown: #b5915e;
    --black: #1a1a1a;
    --light-golden: #d4b684;
    --mid-gradient: #606060;
    --light-black: #404040;
    --background: #f8f5f0;
    --text-dark: #4a4a4a;
    --white: #ffffff;
}

body {
    font-family: "Cairo", sans-serif;
    background: linear-gradient(135deg, var(--background) 0%, #f0e9ff 100%);
    color: var(--text-dark);
}

/* Navbar */
.navbar {
    background: linear-gradient(to right, var(--golden-brown), var(--black));
}

.navbar-dark .navbar-nav .nav-link,
.navbar-light .navbar-nav .nav-link {
    color: var(--white) !important;
    transition: all 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link:hover {
    color: var(--light-golden) !important;
}

/* Card Styles */
.card {
    background: linear-gradient(145deg, var(--white), var(--background));
    border: none;
    box-shadow: 0 4px 6px rgba(139, 115, 85, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(181, 145, 94, 0.15);
    background: linear-gradient(145deg, var(--white), var(--light-violet));
}

.card-title {
    color: var(--golden-brown);
    transition: color 0.3s ease;
}

.card:hover .card-title {
    color: var(--violet);
}

.btn-primary {
    background: linear-gradient(
        135deg,
        var(--golden-brown),
        var(--mid-gradient)
    );
    border: none;
    color: var(--white);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--mid-gradient), var(--violet));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 115, 85, 0.2);
}

.btn-outline-primary {
    color: var(--golden-brown);
    border-color: var(--golden-brown);
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, var(--golden-brown), var(--violet));
    border-color: transparent;
    color: var(--white);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--golden-brown);
    font-weight: bold;
}

/* أنيميشن fadeInUp لتعريف الحركة */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.carousel-caption h1 {
    font-size: 3rem;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
    animation: fadeInUp 1.5s ease-in-out forwards; /* مدة 1.5 ثانية */
    animation-delay: 0.8s; /* يبدأ بعد 0.8 ثانية */
    opacity: 0; /* نبدأ مخفي */
    margin-bottom: 0.5rem;
}

.carousel-caption h3 {
    animation: fadeInUp 1.5s ease-in-out forwards;
    animation-delay: 0.8s;
    opacity: 0;
    font-weight: bold;
    color: var(--golden-brown);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.carousel-caption p {
    font-size: 1.25rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1.2s ease-in-out forwards;
    animation-delay: 1.2s; /* يبدأ بعد 1.2 ثانية */
    opacity: 0;
    margin-bottom: 0.8rem;
}

.carousel-caption .btn {
    font-size: 1rem;
    padding: 10px 25px;
    animation: fadeInUp 1.2s ease-in-out forwards;
    animation-delay: 1.6s; /* يبدأ بعد 1.6 ثانية */
    opacity: 0;
}

/* خلي الصورة تملى الشاشة وتكون مظبوطة */
.carousel-item img {
    width: 100%;
    height: 70vh;
    object-fit: cover;
}

/* إخفاء النص الأساسي للـ caption قبل الأنيميشن */
.carousel-caption {
    bottom: 22%;
    opacity: 1; /* خلي الـ caption نفسها مرئية */
    transform: none;
}

.vision-logo {
    animation: fadeInUp 1.2s ease-in-out forwards;
    animation-delay: 1.6s; /* ممكن تخليها نفس تأخير الزر لو عايز يظهروا مع بعض */
    opacity: 0; /* يخفي الصورة في البداية */
}

/* ======= تعديلات الموبايل ======= */
@media (max-width: 768px) {
    .carousel-caption {
        bottom: auto !important; /* إلغاء bottom */
        top: 16%; /* تحديد مكان من الأعلى */
        background: linear-gradient(
            to top,
            rgba(26, 26, 26, 0.9),
            rgba(26, 26, 26, 0.5)
        );
        padding: 20px;
        border-radius: 10px;
    }

    .carousel-caption h1 {
        font-size: 2rem; /* حجم أصغر للعنوان */
        animation-duration: 1s; /* سرعة الأنيميشن أسرع */
        animation-delay: 0.5s; /* تأخير أقل */
        margin-bottom: 0.5rem;
    }

    .carousel-caption h3 {
        font-size: 1.3rem !important;
        margin-bottom: 0.6rem;
    }

    .carousel-caption p {
        font-size: 1rem !important;
        line-height: 1.3;
    }

    .carousel-caption .btn {
        font-size: 0.9rem;
        padding: 8px 20px;
        animation-duration: 1s;
        animation-delay: 1.1s;
    }

    .carousel-item img {
        height: 50vh; /* تقليل ارتفاع الصورة عشان تناسب الموبايل */
    }

    .vision-logo {
        /* height: 45px; أو الحجم اللي يناسبك */
        animation: fadeInUp 1.2s ease-in-out forwards;
        animation-delay: 1.6s;
        opacity: 0;
    }
}

.card:hover {
    transform: scale(1.03);
    transition: transform 0.3s ease-in-out;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.img-fluid {
    max-width: 100%;
    height: 250px;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.img-fixed {
    width: 100%;
    height: 235px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#video-container img {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#video-container:hover img {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.custom-alert {
    background: linear-gradient(145deg, #a67c00, #000000);
    color: #f0e68c; /* لون نص فاتح (خزامى فاتح) عشان يبرز على الخلفية الغامقة */
    border: 1px solid #a67c00;
    font-weight: 600;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

/* صورة اللابتوب: ملء الشاشة مع اقتصاص */
.carousel-img-desktop {
    height: 70vh;
    object-fit: cover;
}

/* صورة الموبايل: احتواء بدون اقتصاص */
.carousel-img-mobile {
    height: 60vh;
    object-fit: contain;
    background-color: #000; /* عشان لو الصورة فيها فراغات يكون الخلفية سودة */
}

@media (max-width: 768px) {
    .carousel-caption {
        background: linear-gradient(
            to top,
            rgba(26, 26, 26, 0.8),
            rgba(26, 26, 26, 0.4)
        );
        padding: 20px;
        border-radius: 10px;
        opacity: 0;
        animation: fadeInUp 1.5s ease-in-out forwards;
        animation-delay: 0.5s;
    }
}

@media (min-width: 769px) {
    .carousel-caption {
        background: linear-gradient(
            to top,
            rgba(26, 26, 26, 0.7),
            rgba(26, 26, 26, 0.3)
        );
        padding: 25px 30px;
        border-radius: 12px;
        display: inline-block;
        max-width: 80%;
        margin: auto;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        opacity: 0;
        animation: fadeInUp 1.5s ease-in-out forwards;
        animation-delay: 0.5s;
    }
}
