/* Root Variables - Color Palette from AIAS Logo */
:root {
    --primary-color: #661F22;
    --secondary-color: #F0DAA1;
    --accent-color: #945C50;
    --accent-light: #C09775;
    --accent-lighter: #CBAE9A;
    --dark-bg: #0f1419;
    --light-bg: #EEEEED;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-light: #718096;
    --white: #ffffff;
    --gradient-1: linear-gradient(135deg, #661F22 0%, #945C50 100%);
    --gradient-2: linear-gradient(135deg, #945C50 0%, #C09775 100%);
    --gradient-3: linear-gradient(135deg, #F0DAA1 0%, #CBAE9A 100%);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--white);
    overflow-x: hidden;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.98);
    padding: 0.25rem 0;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    height: 45px;
    width: auto;
    object-fit: contain;
    transition: all 0.3s ease;
}

.navbar.scrolled .logo img {
    height: 40px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links li {
    display: flex;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0.75rem;
    position: relative;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    border-radius: 3px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 80px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-1);
    z-index: -1;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.hero-shape.shape-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-color);
    top: -200px;
    right: -200px;
    animation: float 20s ease-in-out infinite;
}

.hero-shape.shape-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-light);
    bottom: -100px;
    left: -100px;
    animation: float 15s ease-in-out infinite reverse;
}

.hero-shape.shape-3 {
    width: 300px;
    height: 300px;
    background: var(--accent-lighter);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float 25s ease-in-out infinite;
}

.hero-content {
    text-align: center;
    color: var(--white);
    max-width: 800px;
    padding: 2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 2rem;
    opacity: 0.95;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--white);
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

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

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    display: block;
    width: 30px;
    height: 50px;
    border: 2px solid var(--white);
    border-radius: 20px;
    position: relative;
}

.scroll-indicator span::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--white);
    border-radius: 50%;
    animation: scroll 2s infinite;
}

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Mission Section */
.mission {
    background: var(--light-bg);
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.mission-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    text-align: center;
}

.mission-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.mission-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    padding: 20px;
    background: var(--gradient-2);
    border-radius: 50%;
    color: var(--white);
}

.mission-icon svg {
    width: 100%;
    height: 100%;
}

.mission-card h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.mission-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Quick Links */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.link-card {
    position: relative;
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    overflow: hidden;
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

.link-card:hover::before {
    transform: scaleX(1);
}

.link-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.link-card h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.link-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.link-arrow {
    display: inline-block;
    color: var(--accent-color);
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.link-card:hover .link-arrow {
    transform: translateX(5px);
}

/* Footer */
.footer {
    background: var(--dark-bg);
    color: var(--white);
    padding: 3rem 0 1rem;
}

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

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-section h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.social-links {
    display: flex;
    gap: 1rem;
    font-size: 1.5rem;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1.5rem 0;
        box-shadow: var(--shadow-md);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        gap: 0;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links li {
        padding: 0.75rem 1.5rem;
        width: 100%;
        border-bottom: 1px solid var(--light-bg);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        display: block;
        width: 100%;
        padding: 0.5rem 0;
    }

    .nav-btn {
        display: block;
        text-align: center;
        width: 100%;
        margin: 0.5rem 0;
    }

    .language-toggle {
        width: 100%;
        justify-content: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .mission-grid,
    .links-grid {
        grid-template-columns: 1fr;
    }

    .nav-content {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }
}

/* Language Toggle Styles */
.language-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--light-bg);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.language-toggle:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.language-toggle svg {
    width: 20px;
    height: 20px;
}

.language-toggle span {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Navigation Auth Buttons */
.nav-btn {
    padding: 0.5rem 1.25rem !important;
    border-radius: 8px;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    transition: all 0.3s ease !important;
    border: 2px solid transparent;
}

.nav-btn::after {
    display: none !important;
}

.nav-btn-login {
    color: var(--primary-color) !important;
    background: transparent;
    border-color: var(--primary-color);
}

.nav-btn-login:hover {
    background: var(--primary-color);
    color: var(--white) !important;
}

.nav-btn-signup {
    background: var(--gradient-1);
    color: var(--white) !important;
}

.nav-btn-signup:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* RTL Support for Arabic */
body[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

body[dir="rtl"] .nav-content {
    flex-direction: row-reverse;
}

body[dir="rtl"] .logo {
    flex-direction: row-reverse;
}

body[dir="rtl"] .nav-links {
    flex-direction: row-reverse;
}

body[dir="rtl"] .hero-buttons {
    flex-direction: row-reverse;
}

body[dir="rtl"] .link-arrow {
    transform: rotate(180deg);
}

body[dir="rtl"] .link-card:hover .link-arrow {
    transform: rotate(180deg) translateX(-5px);
}

body[dir="rtl"] .social-links {
    flex-direction: row-reverse;
}

@media (max-width: 768px) {
    .language-toggle {
        padding: 0.4rem 0.8rem;
    }
    
    body[dir="rtl"] .nav-links {
        flex-direction: column;
    }
}

/* Loading, Error, and Empty State Styles */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    min-height: 300px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--light-bg);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    min-height: 300px;
    text-align: center;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.error-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.error-message {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 500px;
}

.retry-btn {
    padding: 0.75rem 2rem;
    background: var(--gradient-1);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    min-height: 300px;
    text-align: center;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-title {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.empty-message {
    color: var(--text-secondary);
    max-width: 500px;
}
