/* User Guide specific styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Header */
header {
    background: rgb(255, 255, 255);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    gap: 2rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
}

.logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    margin-right: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.nav-links a:hover, .nav-links a.active {
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: 300px;
    background: #fff;
    border-right: 1px solid #e0e0e0;
    padding: 20px;
    position: fixed;
    height: calc(100vh - 80px);
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    top: 80px;
}

.sidebar h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.nav-menu {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 8px;
}

.nav-menu a {
    text-decoration: none;
    color: #555;
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.nav-menu a:hover {
    background-color: #e8f4f8;
    color: #2980b9;
    transform: translateX(5px);
}

.nav-menu .active {
    background-color: #3498db;
    color: white;
}

.nav-submenu {
    margin-left: 20px;
    list-style: none;
    margin-top: 5px;
}

.nav-submenu a {
    font-size: 0.85rem;
    color: #777;
    padding: 5px 10px;
}

.nav-submenu a:hover {
    background-color: #f0f8ff;
    color: #2980b9;
}

/* Custom scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Main Content */
.content {
    margin-left: 320px;
    padding: 40px;
    background: white;
    flex: 1;
    border-radius: 8px;
    margin-top: 20px;
    margin-right: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.content h1 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2.5rem;
    border-bottom: 3px solid #3498db;
    padding-bottom: 15px;
}

.content h2 {
    color: #34495e;
    margin: 40px 0 20px 0;
    font-size: 2rem;
    border-left: 4px solid #3498db;
    padding-left: 15px;
}

.content h3 {
    color: #2c3e50;
    margin: 30px 0 15px 0;
    font-size: 1.5rem;
}

.content h4 {
    color: #34495e;
    margin: 25px 0 12px 0;
    font-size: 1.2rem;
}

.content p {
    margin-bottom: 15px;
    text-align: justify;
}

.content ul, .content ol {
    margin: 15px 0 15px 30px;
}

.content li {
    margin-bottom: 8px;
}

.content strong {
    color: #2c3e50;
}

.content em {
    color: #e74c3c;
    font-style: normal;
    font-weight: 600;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #3498db;
    color: white;
    padding: 12px 16px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);
}

/* Section styling for better separation */
.content section {
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 1px solid #ecf0f1;
}

.content section:last-child {
    border-bottom: none;
}

/* Code and highlighted text */
code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #e74c3c;
}

/* Prevent interaction before JS loads */
.no-js .mobile-menu-toggle,
.no-js .menu-toggle,
.no-js .back-to-top {
    pointer-events: none;
    opacity: 0.5;
}

/* Menu toggle button */
.menu-toggle {
    display: none;
    position: fixed;
    top: 80px;
    left: 20px;
    z-index: 1001;
    background: #3498db;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        padding: 1rem;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
        top: 70px;
        height: calc(100vh - 70px);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .content {
        margin-left: 0;
        margin-right: 0;
        margin-top: 0;
        padding: 20px;
        border-radius: 0;
    }

    .menu-toggle {
        display: block;
        position: fixed;
        top: 80px;
        left: 20px;
        z-index: 1001;
        background: #3498db;
        color: white;
        border: none;
        padding: 10px;
        border-radius: 5px;
        cursor: pointer;
    }
}

/* Print styles */
@media print {
    header, .sidebar, .back-to-top, .menu-toggle {
        display: none;
    }
    
    .content {
        margin: 0;
        padding: 0;
        box-shadow: none;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Language Selector */
.language-selector {
    position: relative;
}

.language-selector-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.language-selector-toggle:hover {
    background: rgba(52, 152, 219, 0.2);
    border-color: rgba(52, 152, 219, 0.5);
}

/* JavaScript-controlled flag display */
.language-flag {
    display: inline-block;
    width: auto;
    height: auto;
    min-width: 1.2rem;
    font-size: 1.2rem;
    text-align: center;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Emoji support - use system fonts */
.language-flag.emoji-support {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "EmojiOne", "Twemoji Mozilla", sans-serif;
}

/* No emoji support - use colored circles */
.language-flag.no-emoji.flag-us { color: #B22234 !important; }
.language-flag.no-emoji.flag-cz { color: #d7141a !important; }
.language-flag.no-emoji.flag-de { color: #666666 !important; }
.language-flag.no-emoji.flag-gb { color: #012169 !important; }
.language-flag.no-emoji.flag-es { color: #c60b1e !important; }
.language-flag.no-emoji.flag-mx { color: #006847 !important; }
.language-flag.no-emoji.flag-fr { color: #0055a4 !important; }
.language-flag.no-emoji.flag-ca { color: #ff0000 !important; }
.language-flag.no-emoji.flag-it { color: #009246 !important; }
.language-flag.no-emoji.flag-jp { color: #bc002d !important; }
.language-flag.no-emoji.flag-kr { color: #c60c30 !important; }
.language-flag.no-emoji.flag-pl { color: #dc143c !important; }
.language-flag.no-emoji.flag-br { color: #009739 !important; }
.language-flag.no-emoji.flag-ru { color: #d52b1e !important; }
.language-flag.no-emoji.flag-sk { color: #0b4ea2 !important; }
.language-flag.no-emoji.flag-ua { color: #005bbb !important; }
.language-flag.no-emoji.flag-cn { color: #de2910 !important; }

.language-name {
    display: none;
}

.dropdown-arrow {
    font-size: 0.8rem;
    opacity: 0.7;
}

.language-selector-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    list-style: none;
    padding: 0.5rem 0;
    min-width: 200px;
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.language-selector-dropdown li {
    margin: 0;
}

.language-selector-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background 0.2s ease;
}

.language-selector-dropdown a:hover {
    background: rgba(52, 152, 219, 0.1);
}

.language-selector-dropdown a.active {
    background: rgba(52, 152, 219, 0.15);
    color: #2980b9;
    font-weight: 600;
}

.language-selector-dropdown .language-flag {
    font-size: 1.2rem;
    width: auto;
    height: auto;
    min-width: 1.2rem;
}

.language-selector-dropdown .language-name {
    display: block;
}

/* Responsive Design for Language Selector */
@media (min-width: 769px) {
    .language-selector-toggle .language-name {
        display: inline;
    }
}

@media (max-width: 768px) {
    .nav-right {
        gap: 0.5rem;
    }
    
    .language-selector-toggle {
        padding: 0.5rem 0.75rem;
    }
    
    .language-selector-dropdown {
        right: -10px;
    }
}