/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}


body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: url("7402282.jpg") no-repeat center center fixed;
    background-size: cover;
    color: #333;
}


/* الهيكل العام */
/*body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(135deg, #19c9ff 0%, #ebedee 100%);
    color: #333;
}*/

/* رأس الصفحة */
header {
    background-color: #0077b6;
    color: #fff;
    text-align: center;
    padding: 25px 0;
    position: relative;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.2em;
    font-weight: bold;
    letter-spacing: 1px;
}

/* زر تغيير اللغة */
#lang-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #fff;
    color: #0077b6;
    border: none;
    padding: 10px 18px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

#lang-btn:hover {
    background: #0077b6;
    color: #fff;
    transform: scale(1.05);
}

/* قائمة التنقل */
nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 15px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    padding: 5px 10px;
    transition: 0.3s;
    border-radius: 5px;
}

nav ul li a:hover {
    background-color: rgba(255,255,255,0.2);
}

/* المحتوى الرئيسي */
main {
    flex: 1;
    max-width: 1100px;
    margin: 40px auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    padding: 0 20px;
}

/* كروت المواد */
.card {
    background-color: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transition: transform 0.4s, box-shadow 0.4s;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

/* صور الكروت */
.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.5s;
}

.card:hover img {
    transform: scale(1.1);
}

/* محتوى الكروت */
.card .content {
    padding: 20px;
    text-align: center;
}

.card h2 {
    color: #0077b6;
    margin-bottom: 10px;
    font-size: 1.5em;
}

.card p {
    color: #555;
    font-size: 1em;
    line-height: 1.5;
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* الفوتر */
footer {
    text-align: center;
    padding: 20px;
    background-color: #023e8a;
    color: #fff;
    margin-top: auto;
    font-size: 0.95em;
    letter-spacing: 0.5px;
}

/* تحسين تجربة التمرير على الهواتف */
@media (max-width: 600px) {
    nav ul {
        flex-direction: column;
        gap: 15px;
    }

    main {
        margin: 20px 10px;
        grid-template-columns: 1fr;
    }

    #lang-btn {
        top: 15px;
        right: 15px;
        padding: 8px 15px;
    }
}


.slider {
    position: relative;
    width: 90%;
    max-width: 1100px;
    margin: 30px auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    height: 400px;
}

.slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;  /* فوق بعضياتها */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(80%);
}

/* نص فوق الصورة */
.caption {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(2, 62, 138, 0.7);
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

/* أزرار التنقل */
.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.25);
    color: #fff;
    border: none;
    padding: 12px;
    cursor: pointer;
    border-radius: 50%;
    font-size: 1.5em;
    transition: 0.3s;
    backdrop-filter: blur(4px);
}

.prev:hover, .next:hover {
    background: rgba(2, 62, 138, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.prev { left: 15px; }
.next { right: 15px; }

/* Responsive */
@media (max-width: 768px) {
    .slide img {
        max-height: 300px;
    }
    .caption {
        font-size: 1em;
        padding: 8px 12px;
    }
}
