/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');

:root {
    --primary-color: #004d40;
    --secondary-color: #00796b;
    --accent-color: #ffca28;
    --bg-color: #f4f6f8;
    --text-color: #333;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--bg-color);
    margin: 0;
    direction: rtl;
    color: var(--text-color);
}

/* --- Navbar --- */
.navbar {
    background: var(--primary-color);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo { font-size: 24px; font-weight: bold; display: flex; align-items: center; gap: 10px; }

.nav-btn {
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: bold;
    transition: 0.3s;
    font-size: 14px;
}

.btn-login { background: var(--accent-color); color: var(--primary-color); }
.btn-login:hover { background: #ffd54f; transform: scale(1.05); }

.btn-logout { background: rgba(255,255,255,0.15); color: white; border: 1px solid rgba(255,255,255,0.3); }
.btn-logout:hover { background: #c62828; border-color: #c62828; }

/* --- Hero Section --- */
.hero {
    position: relative;
    /* الرجوع خطوة للوراء للوصول لمجلد assets */
    background: linear-gradient(rgba(0,77,64,0.85), rgba(0,77,64,0.7)), url('../farm-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 120px 20px;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    margin-bottom: 50px;
}

.hero h1 { font-size: 48px; margin-bottom: 15px; text-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.hero p { font-size: 20px; opacity: 0.95; max-width: 700px; margin: 0 auto 40px; }

.hero-stats { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.stat-badge {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.2);
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* --- Dashboard --- */
.dashboard-container {
    max-width: 1200px;
    margin: -60px auto 50px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.welcome-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-right: 6px solid var(--secondary-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    text-align: center;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.stat-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.stat-card::before { content: ''; position: absolute; top: 0; right: 0; width: 100%; height: 5px; background: var(--primary-color); }
.stat-card.profit::before { background: #2e7d32; }
.stat-card h3 { margin: 0 0 15px; color: #666; font-size: 16px; font-weight: normal; }
.stat-card .value { font-size: 36px; font-weight: bold; color: var(--primary-color); margin-bottom: 5px; }
.stat-card.profit .value { color: #2e7d32; }

.chart-container {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

/* --- Gallery Section --- */
.gallery-container { max-width: 1200px; margin: 50px auto; padding: 0 20px; min-height: 400px; }
.section-header { text-align: center; margin-bottom: 30px; margin-top: 20px; }
.section-header h2 { color: var(--primary-color); font-size: 28px; display: inline-block; position: relative; padding-bottom: 10px; }

.tabs-wrapper { display: flex; justify-content: center; gap: 20px; margin-bottom: 40px; }
.tab-btn {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 30px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'Tajawal', sans-serif;
    display: flex;
    align-items: center;
    gap: 10px;
}
.tab-btn:hover { background: rgba(0,77,64,0.1); }
.tab-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(0,77,64,0.3);
}

.media-content { display: none; animation: fadeIn 0.5s ease-in-out; }
.media-content.active-content { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; }
.media-card { background: white; border-radius: 16px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.08); cursor: pointer; transition: 0.3s; position: relative; }
.media-card:hover { transform: translateY(-5px); box-shadow: 0 12px 25px rgba(0,0,0,0.15); }
.media-card img, .media-card video { width: 100%; height: 220px; object-fit: cover; }
.media-info { padding: 15px; background: white; border-top: 1px solid #eee; }
.media-info h4 { margin: 0; color: var(--primary-color); font-size: 16px; }
.media-info span { font-size: 12px; color: #888; display: block; margin-top: 5px; }
.play-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 220px; background: rgba(0,0,0,0.3); display: flex; justify-content: center; align-items: center; opacity: 0.8; transition: 0.3s; }
.play-icon { font-size: 50px; color: white; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }

/* Pagination Styles */
.pagination-container {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
}
.pagination-btn {
    background: white;
    border: 1px solid #ddd;
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
    font-family: inherit;
    font-weight: bold;
}
.pagination-btn:hover { background: #f0f0f0; }
.pagination-btn.active { background: var(--primary-color); color: white; border-color: var(--primary-color); }
.pagination-btn:disabled { background: #eee; color: #aaa; cursor: not-allowed; }

/* Modal */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 9999; justify-content: center; align-items: center; }
.modal-content { max-width: 90%; max-height: 90%; border-radius: 10px; }
.close { position: absolute; top: 30px; right: 40px; color: white; font-size: 50px; cursor: pointer; }

footer { text-align: center; padding: 40px; color: #666; font-size: 14px; margin-top: 50px; border-top: 1px solid #eee; }