/* --- Global Styles --- */
:root {
    --primary-color: #0056b3; /* A professional blue */
    --secondary-color: #007bff;
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
    --text-color: #212529;
    --border-radius: 8px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Cairo', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: var(--light-gray);
    color: var(--text-color);
    line-height: 1.8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header & Navigation --- */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav.container {
    display: flex;
    justify-content: flex-start; /* Aligns items to the right for RTL */
    align-items: center;
    gap: 40px; /* Adds space between logo and menu */
}

.logo {
    max-height: 50px;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}

nav ul li a {
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 700;
    font-size: 16px;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: color 0.3s, border-color 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* --- Main Content --- */
main {
    padding: 40px 0;
}

.hero {
    text-align: center;
    margin-bottom: 50px;
}

.hero h1 {
    font-size: 2.8rem;
    color: var(--dark-gray);
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.2rem;
    color: #6c757d;
}

/* --- Magazine Grid & Cards --- */
.magazine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.magazine-card {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.magazine-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.magazine-card img {
    width: 100%;
    /* The fixed height was removed to allow the full image to show */
    object-fit: cover; 
    object-position: top;
}

.card-content {
    padding: 20px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.4rem;
    color: var(--dark-gray);
}

.card-content p {
    margin-bottom: 20px;
    flex-grow: 1;
    color: #6c757d;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: scale(1.05);
}

/* --- About Us Page --- */
.about-section h1 {
    font-size: 2.5rem;
    color: var(--dark-gray);
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.about-section p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* --- Footer --- */
footer {
    background-color: var(--dark-gray);
    color: #fff;
    text-align: center;
    padding: 25px 0;
    margin-top: 50px;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    nav.container {
        flex-direction: column;
        gap: 15px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
}