@import url('https://fonts.googleapis.css2?family=Tajawal:wght@400;500;700&display=swap');

:root {
    --primary: #1A365D; /* Navy Blue */
    --secondary: #D4AF37; /* Gold */
    --light-bg: #F8FAFC;
    --card-bg: #FFFFFF;
    --text-main: #2D3748;
    --text-muted: #718096;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-main);
    line-height: 1.6;
    direction: rtl; /* RTL for Arabic */
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary), #2A4365);
    color: white;
    padding: 1.5rem 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid var(--secondary);
}

header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header h1 span {
    color: var(--secondary);
    text-shadow: none;
}

/* Hero & Map */
.hero {
    width: 100%;
    margin: 2rem auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background-color: transparent;
    text-align: center;
}

.hero img {
    width: 100%;
    height: auto;
    display: block;
}

.main-map {
    max-width: 800px; /* Reduced from 1200px */
    width: 100%;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: block;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Section Title */
.section-title {
    text-align: center;
    font-size: 2rem;
    margin: 3rem 0 2rem;
    color: var(--primary);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

/* Project Card */
.project-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid var(--secondary);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid #E2E8F0;
    padding-bottom: 0.5rem;
}

.project-code {
    background-color: var(--primary);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: bold;
}

.developer-name {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.project-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.project-space {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--primary);
    color: white;
    text-align: center;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #2A4365;
}

.btn-gold {
    background-color: var(--secondary);
    color: #000;
}

.btn-gold:hover {
    background-color: #B8962B;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Project Details Page */
.details-container {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem auto;
    box-shadow: var(--shadow);
    max-width: 1000px;
}

.details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.details-info h2 {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.details-info p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.project-logo {
    max-height: 100px;
    max-width: 200px;
    object-fit: contain;
}

.masterplan {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid #E2E8F0;
}

.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Admin Styles */
.admin-container {
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin: 2rem auto;
    max-width: 1000px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}

.admin-table th, .admin-table td {
    padding: 1rem;
    border-bottom: 1px solid #E2E8F0;
    text-align: right;
}

.admin-table th {
    background-color: #F7FAFC;
    color: var(--text-muted);
    font-weight: 600;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #CBD5E0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

.badge {
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    background-color: #EDF2F7;
    color: var(--text-main);
}

.btn-danger {
    background-color: #E53E3E;
}
.btn-danger:hover {
    background-color: #C53030;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

/* Responsive Design Media Queries */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.6rem;
        margin: 2rem 0 1.5rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-name {
        font-size: 1.2rem;
    }
    
    .details-info h2 {
        font-size: 1.6rem;
    }
    
    .details-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .project-logo {
        max-height: 120px;
        margin-top: 1rem;
    }
    
    .hero {
        margin: 1rem auto;
    }
    
    .main-map {
        max-width: 100%;
    }
}
