/* الكود السعودي للزراعة الحضرية - الهوية البصرية الموحدة لجمعية المهندسين الزراعيين (SAE) */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* SAE Brand Colors */
    --primary-color: #153729; /* Deep Forest Green */
    --primary-light: #20533e;
    --primary-dark: #0b1d16;
    --accent-color: #C5A059; /* Warm Gold */
    --accent-light: #dfc38d;
    --accent-hover: #b08c46;
    --bg-color: #FAF9F6; /* Cream Off-white */
    --card-bg: #ffffff;
    --text-dark: #1f2d27;
    --text-muted: #5c6b64;
    --border-color: rgba(21, 55, 41, 0.1);
    
    /* Shadows & Effects */
    --shadow-soft: 0 10px 30px rgba(21, 55, 41, 0.06);
    --shadow-hover: 0 20px 40px rgba(21, 55, 41, 0.12);
    --shadow-gold: 0 8px 25px rgba(197, 160, 89, 0.25);
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
}

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

body {
    font-family: 'Cairo', 'Noto Sans Arabic', Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-color);
    direction: rtl;
    text-align: right;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Section */
.header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: white;
    padding: 1.1rem 0;
    border-bottom: 3px solid var(--accent-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    background: #ffffff;
    padding: 6px 14px;
    border-radius: 10px;
    border: 2px solid var(--accent-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    height: 52px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.03);
}

.logo-text h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
}

.logo-text p {
    font-size: 0.85rem;
    color: var(--accent-light);
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 15px;
    align-items: center;
}

.nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
}

.nav a:hover {
    background-color: rgba(197, 160, 89, 0.2);
    color: var(--accent-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 60%, var(--primary-light) 100%);
    color: white;
    padding: 70px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
}

.hero-content h2 {
    font-size: 2.8rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 18px;
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 40px;
    color: var(--accent-light);
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 45px;
}

.feature {
    background: rgba(255,255,255,0.06);
    padding: 30px;
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(197, 160, 89, 0.2);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.1);
    border-color: var(--accent-color);
}

.feature i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.feature h3 {
    font-size: 1.3rem;
    color: #ffffff;
    margin-bottom: 10px;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #ffffff;
    border-color: var(--accent-color);
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border-color: rgba(255,255,255,0.6);
}

.btn-secondary:hover {
    background-color: #ffffff;
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
}

/* About Section */
.about {
    padding: 80px 0;
    background-color: #ffffff;
}

.about h2 {
    text-align: center;
    font-size: 2.3rem;
    margin-bottom: 45px;
    color: var(--primary-color);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: center;
}

.about-text h3 {
    color: var(--primary-color);
    margin: 25px 0 15px 0;
    font-size: 1.4rem;
}

.about-text ul {
    list-style: none;
    padding-right: 20px;
}

.about-text li {
    padding: 8px 0;
    position: relative;
    color: var(--text-dark);
}

.about-text li::before {
    content: "✓";
    color: var(--accent-color);
    font-weight: bold;
    position: absolute;
    right: -20px;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stat {
    text-align: center;
    padding: 25px;
    background: linear-gradient(135deg, #f4f8f4 0%, #e8f3e8 100%);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
}

.stat h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-family: 'Outfit', sans-serif;
}

.stat p {
    color: var(--text-muted);
    font-weight: 600;
}

/* Parts/Books Section */
.parts {
    padding: 80px 0;
    background-color: var(--bg-color);
}

.parts h2 {
    text-align: center;
    font-size: 2.3rem;
    margin-bottom: 45px;
    color: var(--primary-color);
}

.parts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 25px;
}

.part-card {
    background: #ffffff;
    border-radius: var(--border-radius-md);
    padding: 30px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    border-right: 5px solid var(--accent-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.part-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-right-color: var(--primary-color);
}

.part-number {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--accent-color);
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 15px;
    align-self: flex-start;
}

.part-card h3 {
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 1.25rem;
    line-height: 1.4;
}

.part-card p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* Tools Section */
.tools {
    padding: 80px 0;
    background-color: #ffffff;
}

.tools h2 {
    text-align: center;
    font-size: 2.3rem;
    margin-bottom: 45px;
    color: var(--primary-color);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.tool-card {
    background: #FAF9F6;
    border: 1px solid rgba(21, 55, 41, 0.08);
    border-radius: var(--border-radius-md);
    padding: 35px 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    background: #ffffff;
    border-color: var(--accent-color);
}

.tool-card i {
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 18px;
}

.tool-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.25rem;
}

.tool-card p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* Footer Section */
.footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: white;
    padding: 60px 0 25px 0;
    border-top: 3px solid var(--accent-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    margin-bottom: 20px;
    color: var(--accent-color);
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 25px;
    text-align: center;
    color: var(--accent-light);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.05rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
}

/* Book & Document Content Styles (SAE Brand Identity) */
.code-content {
    max-width: 950px;
    margin: 40px auto;
    background: #ffffff;
    padding: 45px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
}

.chapter {
    margin-bottom: 40px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 30px;
}

.chapter:last-child {
    border-bottom: none;
}

.chapter-title {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--accent-color);
}

.section {
    margin-bottom: 25px;
}

.section-number {
    color: var(--accent-color);
    font-weight: 800;
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.subsection {
    margin-bottom: 18px;
    padding-right: 20px;
    border-right: 4px solid var(--primary-color);
}

.content-text {
    line-height: 1.85;
    color: var(--text-dark);
    font-size: 1.05rem;
}

.toc {
    background: #FAF9F6;
    padding: 25px 30px;
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(21, 55, 41, 0.1);
    margin-bottom: 40px;
}

.toc h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.toc ul {
    list-style-type: none;
    padding-right: 0;
}

.toc li {
    margin-bottom: 8px;
}

.toc li a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.toc li a:hover {
    color: var(--accent-color);
}
