﻿body, html {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background: #f5f7fa;
}

.page-layout {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar-modern-nav {
    width: 270px;
    min-height: 100vh;
    background: rgba(255,255,255,0.85);
    color: #003366;
    box-shadow: 0 8px 32px 0 rgba(31,38,135,0.10);
    border-radius: 0 2rem 2rem 0;
    display: flex;
    flex-direction: column;
    padding-top: 1.5rem;
    font-family: 'Cairo', sans-serif;
    backdrop-filter: blur(8px);
    border-right: 1.5px solid #e3eafc;
    position: relative;
    z-index: 1200;
    left: 0;
    transition: left 0.3s;
}

.sidebar-modern-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 2rem 0;
    margin-bottom: 0.5rem;
}

.sidebar-modern-logo-wide {
    width: 180px;
    height: 50px;
    object-fit: contain;
    border-radius: 0.5rem;
    background: none;
    box-shadow: none;
}

/* SIDEBAR OVERLAY */
.sidebar-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.2);
    z-index: 1100;
}

/* Hide overlay on desktop */
@media (min-width: 992px) {
    .sidebar-overlay {
        display: none !important;
    }
}

/* Responsive sidebar: slide in/out on mobile */
@media (max-width: 991px) {
    .sidebar-modern-nav {
        position: fixed;
        top: 0;
        left: -270px;
        width: 270px;
        height: 100vh;
        z-index: 1200;
        border-radius: 0;
        transition: left 0.3s;
        box-shadow: 2px 0 18px rgba(13,110,253,0.08);
        background: rgba(255,255,255,0.97);
    }

        .sidebar-modern-nav[style*='left:0'] {
            left: 0 !important;
        }
}

/* MAIN AREA & TOPBAR */
.main-area {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
    z-index: 100;
}

.about-link {
    color: #003366;
    font-weight: 600;
    text-decoration: none;
    font-size: 1.07rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

    .about-link:hover {
        color: #0d6efd;
    }

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.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;
    }

.nav-register {
    border-radius: 2rem;
    padding: 0.5rem 1.2rem;
    font-weight: 600;
    font-size: 1rem;
}

.user-dropdown {
    position: relative;
}

.user-profile-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #003366;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.08rem;
    border-radius: 2rem;
    padding: 0.2rem 0.7rem 0.2rem 0.2rem;
    transition: background 0.2s, color 0.2s;
}

    .user-profile-link:hover {
        background: #e3eafc;
        color: #0d6efd;
    }

.user-avatar {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #e3eafc;
    background: #f8fafd;
}

.user-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

.user-dropdown-menu {
    position: absolute;
    top: 110%;
    right: 0;
    min-width: 200px;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 4px 32px rgba(13,110,253,0.08);
    padding: 0.5rem 0;
    margin: 0;
    z-index: 1002;
    display: block;
    border: none;
}

    .user-dropdown-menu .dropdown-item {
        padding: 0.7rem 1.2rem;
        color: #003366;
        font-size: 1.07rem;
        background: none;
        border: none;
        text-align: left;
        width: 100%;
        cursor: pointer;
        transition: background 0.2s, color 0.2s;
        border-radius: 0.5rem;
        display: flex;
        align-items: center;
    }

        .user-dropdown-menu .dropdown-item:hover,
        .user-dropdown-menu .dropdown-item:focus {
            background: #e3eafc;
            color: #0d6efd;
            outline: none;
        }

        .user-dropdown-menu .dropdown-item.text-danger {
            color: #d32f2f;
        }

            .user-dropdown-menu .dropdown-item.text-danger:hover {
                color: #fff;
                background: #d32f2f;
            }

.content-area {
    flex: 1 1 auto;
    border-radius: 1.5rem;
    margin: 0.5rem 0.5rem 0.5rem 0.5rem;
    min-height: 400px;
    transition: margin 0.3s, padding 0.3s;
}

/* Hamburger for mobile */
.sidebar-hamburger {
    background: none;
    border: none;
    color: #003366;
    font-size: 2rem;
    margin-right: 1rem;
    display: none;
    align-items: center;
    cursor: pointer;
}

/* Responsive: adjust content, sidebar, and topbar */
@media (max-width: 991px) {
    .sidebar-modern-nav {
        width: 270px;
        left: -270px;
        position: fixed;
        top: 0;
        height: 100vh;
        border-radius: 0;
        transition: left 0.3s;
    }

        .sidebar-modern-nav[style*='left:0'] {
            left: 0 !important;
        }

    .sidebar-modern-header {
        padding: 1.2rem 0.2rem;
    }

    .sidebar-modern-logo-wide {
        max-width: 120px;
        height: 40px;
    }

    .content-area {
        padding: 1.2rem 0.7rem;
        margin: 1.2rem 0.7rem;
    }

    .topbar {
        padding: 0 1rem;
    }

    .sidebar-hamburger {
        display: flex;
    }
}

@media (max-width: 576px) {
    .sidebar-modern-nav {
        display: none !important;
    }

    .content-area {
        margin: 0.5rem 0.1rem;
        padding: 0.7rem 0.3rem;
        border-radius: 0.7rem;
    }

    .topbar {
        height: 48px;
        font-size: 0.97rem;
        padding: 0 0.5rem;
    }

    .user-name {
        display: none;
    }

    .user-dropdown-menu {
        min-width: 120px;
    }
}
/* Hide desktop-only on mobile */
@media (max-width: 991px) {
    .desktop-only {
        display: none !important;
    }
}
