/* ============================================
   Levant Cloud – Shared Styles
   ============================================ */

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

:root {
    --primary: #FF6A00;
    --primary-dark: #E55E00;
    --secondary: #1E2530;
    --accent: #00C9B8;
    --bg-light: #F5F7FA;
    --text-dark: #1E2530;
    --text-light: #646A73;
    --white: #FFFFFF;
    --gradient: linear-gradient(135deg, #FF6A00 0%, #FF8F00 100%);
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ---- Navigation ---- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
    text-decoration: none;
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
}

.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: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

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

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

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

.nav-buttons {
    display: flex;
    gap: 1rem;
}

/* ---- Mobile menu button ---- */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1100;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--secondary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

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

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ---- Buttons ---- */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 106, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 106, 0, 0.4);
}

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

.btn-white:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.btn-outline-white {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ---- Section helpers ---- */
.section-container {
    max-width: 1400px;
    margin: 0 auto;
}

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

.section-tag {
    display: inline-block;
    background: rgba(255, 106, 0, 0.1);
    color: var(--primary);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ---- Page Header (sub-pages) ---- */
.page-header {
    background: linear-gradient(135deg, #1E2530 0%, #2D3548 100%);
    padding: 10rem 2rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23FF6A00' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-header h1 {
    font-size: 3rem;
    color: white;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.page-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ---- Footer ---- */
footer {
    background: var(--secondary);
    color: white;
    padding: 4rem 2rem 2rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand .logo {
    color: white;
    margin-bottom: 1.5rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    max-width: 300px;
}

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

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-links h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

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

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-bottom-links {
    display: flex;
    gap: 2rem;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
    color: white;
}

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

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        z-index: 1050;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-buttons {
        display: none;
    }

    .nav-container {
        padding: 0.85rem 1.25rem;
    }

    .page-header {
        padding: 7rem 1.25rem 3rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .section-header h2 {
        font-size: 1.85rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-bottom-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0.75rem 1rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .page-header {
        padding: 6rem 1rem 2.5rem;
    }

    .page-header h1 {
        font-size: 1.7rem;
    }

    .page-header p {
        font-size: 0.95rem;
    }

    .section-header h2 {
        font-size: 1.55rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    footer {
        padding: 2.5rem 1rem 1.5rem;
    }
}

/* ---- Language Toggle ---- */
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-light, #F5F7FA);
    border-radius: 8px;
    padding: 3px;
    margin-left: 0.75rem;
    flex-shrink: 0;
}

.lang-option {
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-light, #646A73);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.25s ease;
    user-select: none;
    white-space: nowrap;
}

.lang-option:hover {
    color: var(--text-dark, #1E2530);
}

.lang-option.active {
    background: var(--primary, #FF6A00);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 106, 0, 0.25);
}

@media (max-width: 768px) {
    .lang-toggle {
        position: fixed;
        top: 14px;
        right: 58px;
        z-index: 1100;
        margin-left: 0;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    [dir="rtl"] .lang-toggle {
        right: auto;
        left: 58px;
    }
}

/* ============================================
   RTL (Arabic) Layout Support
   ============================================ */

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

/* ---- Navigation RTL ---- */
[dir="rtl"] .nav-container {
    flex-direction: row-reverse;
}

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

[dir="rtl"] .nav-links a::after {
    left: auto;
    right: 0;
}

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

[dir="rtl"] .lang-toggle {
    margin-left: 0;
    margin-right: 0.75rem;
}

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

[dir="rtl"] .btn i.fa-arrow-right {
    transform: scaleX(-1);
}

/* ---- Mobile menu RTL ---- */
@media (max-width: 768px) {
    [dir="rtl"] .mobile-menu-btn {
        order: -1;
    }
}

/* ---- Footer RTL ---- */
[dir="rtl"] .footer-grid {
    direction: rtl;
}

[dir="rtl"] .footer-brand p {
    text-align: right;
}

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

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

@media (max-width: 768px) {
    [dir="rtl"] .footer-bottom {
        flex-direction: column;
    }
}

/* ---- Section helpers RTL ---- */
[dir="rtl"] .section-header {
    text-align: center;
}

/* ---- Page-specific About styles RTL ---- */
[dir="rtl"] .story-container {
    direction: rtl;
}

[dir="rtl"] .story-content {
    text-align: right;
}

[dir="rtl"] .founder-info {
    text-align: right;
}

[dir="rtl"] .founder-bio p {
    text-align: right;
}

[dir="rtl"] .value-card {
    text-align: right;
}

[dir="rtl"] .about-nav {
    direction: rtl;
}

/* ---- Contact page RTL ---- */
[dir="rtl"] .contact-info-card {
    text-align: right;
}

[dir="rtl"] .form-group label {
    text-align: right;
}

[dir="rtl"] input,
[dir="rtl"] textarea,
[dir="rtl"] select {
    text-align: right;
    direction: rtl;
}

/* ---- Sovereignty section RTL ---- */
[dir="rtl"] .sovereignty-content {
    text-align: right;
}

[dir="rtl"] .highlight-box {
    text-align: right;
}

/* ---- Generic flex row-reverse for RTL ---- */
[dir="rtl"] .social-links {
    flex-direction: row-reverse;
}
