/* base.css - الأنماط الأساسية المشتركة بين جميع الصفحات */
:root {
    --primary-blue: #2E5AAC;
    --green: #73a01a;
    --orange: #f79841;
    --yellow: #FFC107;
    --neutral-100: #F8F9FA;
    --white: #ffffff;
    --text: rgb(0, 0, 0);
    --container-max: 1440px;
    font-size: 16px;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: 'Tajawal', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    color: var(--text);
    background: var(--neutral-100);
    position: relative;
}

a {
    color: inherit;
    text-decoration: none;
}

/* --- Background --- */
body {
    background-image: url('piic/bg.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(0.5px);
    z-index: 0;
}

/* --- Header --- */
header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: linear-gradient(0deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.95));
    backdrop-filter: blur(4px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 16px 48px;
    position: relative;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand img {
    height: 56px;
    width: auto;
}

.brand h1 {
    font-size: 28px;
    margin: 0;
    color: var(--green);
    font-weight: 800;
}

/* --- Navigation --- */
.nav-container {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links {
    display: flex;
    gap: 28px;
    align-items: center;
}

nav a {
    font-weight: 600;
    color: var(--orange);
    opacity: 0.95;
    position: relative;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

nav a:hover {
    color: var(--green);
    text-shadow: 0 0 8px rgba(115, 160, 26, 0.7);
}

/* --- Language Switcher --- */
.lang-switcher {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #73a01a;
    color: #73a01a;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.lang-btn:hover {
    background: #73a01a;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(115, 160, 26, 0.3);
}

.lang-btn.active {
    background: #73a01a;
    color: white;
}

/* --- Mobile Navigation --- */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--green);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.menu-toggle:hover {
    transform: scale(1.1);
}

/* --- Dropdown Menu --- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 280px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 8px;
    z-index: 1000;
    top: 100%;
    left: 0;
    overflow: hidden;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-columns {
    display: flex;
}

.dropdown-column {
    padding: 20px;
}

.dropdown-column h4 {
    color: #9cca3f;
    margin-bottom: 12px;
    font-size: 16px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.dropdown-column a {
    display: block;
    color: #333;
    padding: 6px 0;
    text-decoration: none;
    transition: color 0.2s;
}

.dropdown-column a:hover {
    color: #9cca3f;
}

/* --- Footer --- */
.site-footer {
    background: linear-gradient(135deg, #73a01a 0%, #5a7f15 100%);
    color: white;
    padding: 60px 20px 20px;
    position: relative;
    margin-top: 80px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 16px;
    font-weight: 700;
    font-size: 18px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--white);
}

.footer-col p {
    color: rgba(255,255,255,0.85);
    line-height: 1.6;
    margin: 0 0 12px;
}

.footer-col .brand h2 {
    font-size: 22px;
    color: var(--white);
    margin: 8px 0;
}

.footer-col .brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-col .brand img {
    height: 60px;
    width: auto;
}

.socials {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.socials a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    transition: all 0.3s ease;
}

.socials a:hover {
    background: var(--yellow);
    color: var(--text);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.2);
    margin-top: 40px;
    padding-top: 20px;
    font-size: 14px;
    color: rgba(255,255,255,0.8);
}

/* --- Layout container --- */
.site {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 40px 48px;
    position: relative;
    z-index: 1;
}

/* --- Back to Home Button --- */
.back-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--orange);
    font-weight: 600;
    transition: color 0.3s ease;
}

.back-home:hover {
    color: var(--green);
}

/* --- Utilities --- */
.muted {
    color: rgba(35, 51, 51, 0.6);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Responsive Design - الأساسي --- */
@media (max-width: 900px) {
    .menu-toggle {
        display: block;
    }

    .nav-container {
        position: relative;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 75%;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 100px 30px 30px;
        gap: 25px;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
        z-index: 100;
        transition: right 0.4s ease;
        overflow-y: auto;
    }

    .nav-links.active {
        right: 0;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        background: transparent;
        min-width: 100%;
        margin-top: 10px;
    }

    .dropdown-column {
        padding: 10px 0;
    }

    nav a {
        font-size: 18px;
        width: 100%;
        padding: 10px 0;
    }

    .lang-switcher {
        display: flex;
        margin-top: 20px;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 820px) {
    .site {
        padding: 20px;
    }
    
    .header-inner {
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .nav-links {
        width: 85%;
    }
}