/* header-footer.css */
/* أنماط الهيدر والفوتر لموقع Smart PSI */

:root {
    --dark-green: #1a5e3d;
    --primary-green: #2d8659;
    --light-green: #5fb884;
    --background: #f3fbf7;
    --white: #ffffff;
    --gray-light: #f8f8f8;
    --gray: #eaeaea;
    --text-dark: #1a2e22;
    --text-light: #5a7165;
    --shadow: 0 5px 15px rgba(26, 94, 61, 0.08);
    --shadow-hover: 0 10px 25px rgba(26, 94, 61, 0.15);
    --transition: all 0.3s ease;
    --border-radius: 12px;
    --glass-bg: rgba(255, 255, 255, 0.85);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.2rem 5%;
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.header-scrolled {
    padding: 0.8rem 5%;
    background-color: rgba(255, 255, 255, 0.95);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-green);
    text-decoration: none;
    line-height: 1.2;
}

.logo-subtitle {
    font-size: 0.9rem;
    color: var(--primary-green);
    font-weight: 500;
    margin-top: 3px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 1.05rem;
    position: relative;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-green);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-green);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.language-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(95, 184, 132, 0.15) 0%, rgba(45, 134, 89, 0.15) 100%);
    border: 2px solid var(--light-green);
    border-radius: 25px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(45, 134, 89, 0.1);
}

.language-switcher::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.language-switcher:hover::before {
    left: 100%;
}

.language-switcher:hover {
    background: linear-gradient(135deg, rgba(95, 184, 132, 0.25) 0%, rgba(45, 134, 89, 0.25) 100%);
    border-color: var(--primary-green);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(45, 134, 89, 0.2);
}

.lang-flag {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: white;
    box-shadow: 0 2px 8px rgba(45, 134, 89, 0.3);
    transition: transform 0.3s ease;
}

.language-switcher:hover .lang-flag {
    transform: rotate(360deg) scale(1.1);
}

.lang-text {
    font-weight: 500;
    color: var(--dark-green);
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    color: var(--dark-green);
    cursor: pointer;
}

/* Footer */
footer {
    background: var(--white);
    padding: 3rem 5%;
    text-align: center;
    border-top: 1px solid var(--gray);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-green);
    margin-bottom: 0.5rem;
}

.footer-organization {
    font-size: 1rem;
    color: var(--primary-green);
    font-weight: 600;
}

.copyright {
    color: var(--text-light);
    font-size: 1rem;
    margin-top: 1rem;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .nav-links {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background: var(--glass-bg);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        padding-top: 3rem;
        transition: 0.5s;
        gap: 2rem;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-left {
        gap: 1rem;
    }

    .nav-right {
        gap: 1rem;
    }

    .language-switcher .lang-text {
        display: none;
    }
}

@media (max-width: 480px) {
    .logo-main {
        font-size: 1.5rem;
    }
}

/* RTL Support for Arabic */
body.rtl {
    direction: rtl;
    text-align: right;
}

body.rtl .nav-links a::after {
    left: auto;
    right: 0;
}

/* Site-wide logo image style */
.logo-img {
    height: clamp(44px, 4.5vw, 80px);
    width: auto;
    display: block;
    border-radius: 6px;
    transition: transform 0.2s ease;
}

.logo-img:hover {
    transform: scale(1.03);
}

/* Ensure RTL pages place the logo to the right of the text */
/* RTL placement: make Arabic pages show the logo to the right of the text */
html[dir="rtl"] .logo-container {
    flex-direction: row-reverse;
}

/* Note: keep DOM order as `logo-text` then `<img class="logo-img">` in Arabic pages for clarity */