﻿* {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
}

.main-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f7f9fb;
    transition: direction 0.2s;
}

    .main-layout.rtl {
        direction: rtl;
    }

.navbar {
    display: flex;
    align-items: center;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.5rem 1rem;
    gap: 1.5rem;
}

.brand-logo {
    height: 44px;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-left: 1.5rem;
 
}

/* Ensure navbar uses logical properties for spacing */
.navbar-actions {
    margin-left: auto; /* LTR: pushes actions to right */
    display: flex;
    align-items: center;
    gap: 1rem;
}

.main-layout.rtl .navbar-actions {
    margin-left: 0;
    margin-right: auto; /* RTL: pushes actions to left */
}

.btn-lang-toggle {
    margin-left: 1rem; /* LTR: space between language and login */
}

.main-layout.rtl .btn-lang-toggle {
    margin-left: 0;
    margin-right: 1rem; /* RTL: space between language and login */
}


.nav-link {
    color: #003366;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: background 0.2s;
}

    .nav-link:hover {
        background: #e3eafc;
    }

.nav-register {
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-weight: 600;
    margin-left: 0.5rem;
}

.btn-lang-toggle {
    border: none;
    background: #f0f2f7;
    color: #003366;
    font-weight: bold;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
    box-shadow: 0 2px 6px rgba(0,51,102,0.05);
    transition: background 0.2s, color 0.2s;
}

    .btn-lang-toggle:hover {
        background: #003366;
        color: #fff;
    }

.desktop-only {
    display: flex;
}

.mobile-only {
    display: none;
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: 1rem;
}

.navbar-toggle-icon, .navbar-toggle-icon::before, .navbar-toggle-icon::after {
    display: block;
    width: 28px;
    height: 3px;
    background: #003366;
    border-radius: 2px;
    position: relative;
    transition: all 0.3s;
}

    .navbar-toggle-icon::before, .navbar-toggle-icon::after {
        content: '';
        position: absolute;
        left: 0;
    }

    .navbar-toggle-icon::before {
        top: -8px;
    }

    .navbar-toggle-icon::after {
        top: 8px;
    }

/* Drawer Menu (Mobile) */
.drawer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.35);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s;
}

    .drawer-overlay.open {
        display: block;
        opacity: 1;
    }

.drawer-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 270px;
    height: 100vh;
    background: #fff;
    box-shadow: 2px 0 16px rgba(0,0,0,0.13);
    z-index: 2100;
    transform: translateX(-100%);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.2rem 1.2rem 1.2rem;
}

    .drawer-menu.rtl {
        left: auto;
        right: 0;
        transform: translateX(100%);
    }

    .drawer-menu.open {
        transform: translateX(0);
    }

    .drawer-menu.rtl.open {
        transform: translateX(0);
    }

.drawer-close {
    background: none;
    border: none;
    font-size: 2rem;
    align-self: flex-end;
    margin-bottom: 1.5rem;
    color: #003366;
    cursor: pointer;
    transition: color 0.2s;
}

    .drawer-close:hover {
        color: #e53935;
    }

.drawer-menu .nav-link, .drawer-menu .nav-register {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: #003366;
    text-decoration: none;
    font-weight: 500;
    border-radius: 6px;
    padding: 0.5rem 0.7rem;
    transition: background 0.2s, color 0.2s;
}

    .drawer-menu .nav-link:hover, .drawer-menu .nav-register:hover {
        background: #f0f2f7;
        color: #0a58ca;
    }

.drawer-menu .nav-register {
    background: #003366;
    color: #fff;
    font-weight: 600;
    border-radius: 20px;
    margin-top: 1rem;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

    .drawer-menu .nav-register:hover {
        background: #0a58ca;
        color: #fff;
    }

.drawer-menu .lang-switch {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.icon {
    width: 22px;
    text-align: center;
    color: #003366;
    font-size: 1.1em;
}

.main-content {
    flex: 1 1 auto;
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.footer {
    background: #fff;
    text-align: center;
    padding: 1rem 0;
    border-top: 1px solid #eee;
    font-size: 0.95rem;
    color: #666;
}

/* Responsive */
@media (max-width: 992px) {
    .main-content {
        padding: 1.2rem 0.5rem;
    }
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }

    .brand-logo {
        height: 36px;
    }

    .navbar {
        gap: 0.5rem;
    }
}

@media (max-width: 576px) {
    .brand-logo {
        height: 28px;
    }

    .main-content {
        padding: 0.8rem 0.2rem;
    }

    .drawer-menu {
        width: 90vw;
        min-width: 180px;
    }
}
.loader-overlay {
    position: fixed;
    z-index: 9999;
    background: linear-gradient(to bottom, #f8f9fa, #e0e0e0);
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-container {
    position: relative;
    width: 150px;
    height: 150px;
}

.loader-logo {
    width: 150px;
    height: 150px;
    animation: pulse 2s infinite ease-in-out;
    position: relative;
    z-index: 2;
}

.wave {
    position: absolute;
    border: 2px solid #007bff;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    animation: ripple 2s infinite;
    opacity: 0.6;
}

.wave1 {
    animation-delay: 0s;
}

.wave2 {
    animation-delay: 0.5s;
}

.wave3 {
    animation-delay: 1s;
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}
/* Background animated SVG */
.bg-waves {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 200px;
    z-index: 0;
    opacity: 0.7;
    animation: waveMove 8s linear infinite;
}

@keyframes waveMove {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100px);
    }
}
.typewriter-text {
    margin-top: 20px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #007bff;
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid #007bff;
    width: 0;
    animation: typing 3s steps(30, end) 1s forwards, blink 0.8s infinite;
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 12ch;
    }
    /* adjust based on max letters */
}

@keyframes blink {
    0%, 100% {
        border-color: transparent;
    }

    50% {
        border-color: #007bff;
    }
}
