html {
    scroll-behavior: smooth;
}

body {
    font-family: Cairo,'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    background-color: #f8f8f8;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

li {
    border-radius: 10px;
    overflow: hidden;
    width: 300px;
    height: 400px;
    background-color: #fff;
    box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin: 10px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

li:hover {
    transform: translateY(-5px);
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.2);
}

.info {
    padding: 20px;
    flex: 1;
}

h2,
p {
    margin: 0;
    padding: 0;
    color: #fff;
}

h2 {
    font-size: 1.2em;
    margin-bottom: 10px;
}

p {
    font-size: 1em;
}

.image-container {
    flex-shrink: 0;
    width: 100%;
    height: 60%;
    /* تعيين نسبة معينة لارتفاع الصور */
    display: flex;
    align-items: center;
    justify-content: center;
}

img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

li:hover .overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.overlay-content a {
    display: inline-block;
    background-color: #2196f3;
    border: none;
    color: white;
    text-align: center;
    font-size: 16px;
    padding: 10px 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 10px;
}

.overlay-content a:hover {
    background-color: #0b7dda;
}

.disabled {
    background-color: #ccc;
    pointer-events: none;
    filter: grayscale(100%);
}

.overlay-content h2,
.overlay-content p {
    color: #fff;
}

.overlay-content.disabled-content {
    color: #fff;
}

.always-show {
    opacity: 1 !important;
}

.disabled-overlay {
    background-color: rgba(0, 0, 0, 0.7);
}

/* شريط الأزرار */
.navbar {
    background-color: #2196f3;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.navbar a {
    float: left;
    display: block;
    color: #f2f2f2;
    text-align: center;
    padding: 14px 20px;
    text-decoration: none;
}

.navbar a:hover {
    background-color: #ddd;
    color: black;
}

.navbar a.active {
    background-color: #0b7dda;
    color: #fff;
}

/* شريط الأخبار المتحرك */
.news-ticker {
    background-color: #333;
    color: #fff;
    padding: 10px;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
    direction: ltr;
}

.news-ticker p {
    display: inline-block;
    padding-right: 100%;
    animation: ticker 15s linear infinite;
}

@keyframes ticker {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* زر الصعود إلى الأعلى */
#scrollTopBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    font-size: 18px;
    border: none;
    outline: none;
    background-color: #2196f3;
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    text-align: center;
    line-height: 20px;
}

#scrollTopBtn:hover {
    background-color: #555;
}
