/* إعادة تعيين الأنماط الافتراضية */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f0f4f8;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

h1, h2, h3 {
    color: #2c3e50;
}

/* تنسيق الرأس */
header {
    background-color: #2980b9;
    color: white;
    padding: 20px 0;
    text-align: center;
    position: relative;
}

header .logo h1 {
    font-size: 2.5em;
    font-weight: bold;
}

/* التنقل العلوي */
header nav ul {
    list-style-type: none;
    padding: 0;
    margin-top: 15px;
}

header nav ul li {
    display: inline;
    margin: 0 15px;
}

header nav ul li a {
    color: white;
    font-size: 1.2em;
    padding: 5px 10px;
    transition: background 0.3s;
}

header nav ul li a:hover {
    background-color: #3498db;
    border-radius: 5px;
}

/* المنطقة الرئيسية */
main {
    padding: 30px 15px;
}

.posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.post {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.post:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.post h3 {
    font-size: 1.8em;
    margin-bottom: 10px;
    color: #2980b9;
}

.post h3 a {
    color: inherit;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.post h3 a:hover {
    color: #3498db;
}

.post p {
    color: #7f8c8d;
    font-size: 1.1em;
    margin-bottom: 10px;
}

/* تنسيق نموذج تسجيل الدخول */
.login-form, .signup-form {
    background-color: white;
    max-width: 400px;
    margin: 0 auto;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.login-form h2, .signup-form h2 {
    text-align: center;
    font-size: 1.8em;
    margin-bottom: 20px;
}

.login-form input, .signup-form input {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 1em;
}

.login-form button, .signup-form button {
    width: 100%;
    padding: 15px;
    background-color: #2980b9;
    color: white;
    font-size: 1.2em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-form button:hover, .signup-form button:hover {
    background-color: #3498db;
}

/* صفحة البوست */
.post-details {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.post-details h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #2980b9;
}

.post-details p {
    font-size: 1.2em;
    line-height: 1.8;
    margin-bottom: 30px;
    color: #2c3e50;
}

.post-details .download-btn {
    padding: 15px 25px;
    background-color: #27ae60;
    color: white;
    font-size: 1.2em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.post-details .download-btn:hover {
    background-color: #2ecc71;
}

/* تذييل الصفحة */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px;
    position: fixed;
    width: 100%;
    bottom: 0;
}

footer p {
    font-size: 1em;
    margin: 0;
}

/* تنسيق خاص للأجهزة الصغيرة */
@media (max-width: 768px) {
    .posts {
        grid-template-columns: 1fr;
    }

    header nav ul li {
        display: block;
        margin-bottom: 10px;
    }
}
