/* إعدادات عامة */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', Arial, sans-serif;
}

body {
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: #007bff;
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3;
}

/* الرأس */
header {
    background-color: #007bff;
    color: white;
    padding: 20px 0;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2em;
}

/* شريط التنقل */
nav {
    background-color: #0056b3;
    padding: 10px 0;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav ul li {
    margin: 5px 10px;
}

nav ul li a {
    color: white;
    font-size: 1.1em;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

nav ul li a:hover {
    background-color: #007bff;
}

/* شريط البحث */
.search-bar {
    margin: 20px 0;
    text-align: center;
}

.search-bar input {
    width: 70%;
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
}

.search-bar button {
    padding: 10px 20px;
    font-size: 1em;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

/* المحتوى الأساسي */
main {
    padding: 20px 0;
}

h2 {
    color: #007bff;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.tips-grid, .category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tip, .category-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tip:hover, .category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.tip h3, .category-card h3 {
    color: #0056b3;
    margin-bottom: 10px;
}

.tip p, .category-card p {
    color: #666;
    margin-bottom: 15px;
}

.tip img, .category-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 15px;
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    color: #007bff;
    font-weight: bold;
}

/* نموذج الاتصال */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 5px;
    font-weight: bold;
}

input, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
}

button {
    align-self: flex-start;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #0056b3;
}

/* التذييل */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
}

footer p {
    font-size: 0.9em;
}

/* تصميم متجاوب */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }

    .search-bar input {
        width: 100%;
        border-radius: 5px;
        margin-bottom: 10px;
    }

    .search-bar button {
        width: 100%;
        border-radius: 5px;
    }

    .tips-grid, .category-grid {
        grid-template-columns: 1fr;
    }
}