/* Base styles */
:root {
    --primary-color: #0092f1;
    --secondary-color: #2D3E50;
    --accent-color: #3498DB;
    --text-color: #34495E;
    --background-light: #f5f7fa;
    --card-shadow: 0 8px 30px rgba(0,0,0,0.08);
    --gradient-bg: linear-gradient(135deg, #2980B9, #0092f1);
    --border-radius: 12px;
    --transition-speed: 0.3s;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-light);
    color: var(--text-color);
    line-height: 1.6;
    overflow-y: auto; /* Allow vertical scrolling */
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

.body-container {
    display: flex;
    min-height: 100vh;
    height: 100vh; /* Set fixed height to viewport */
    overflow: hidden; /* Prevent container scrolling */
}

/* Menu styles */
.public-docs-menu {
    background: var(--gradient-bg);
    color: #fff;
    padding: 2rem 1.5rem;
    width: 300px;
    box-shadow: 0 0 20px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10;
    height: 100vh; /* Full viewport height */
    overflow-y: auto; /* Allow scrolling within menu if needed */
    position: sticky;
    top: 0;
}

/* Logo styles */
.logo-container {
    margin-bottom: 30px;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
}

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

.logo-container a {
    display: flex;
    align-items: center;
}

.logo-container a, .logo-container a:hover, .logo-container a:active {
    font-size: 2rem;
    color: #ffffff;
    text-decoration: none;
}

.logo-symbol-container {
    height: 45px;
    width: 45px;
    padding: 0;
    display: flex;
    align-items: center;
}

.logo-type-container {
    padding: 0;
    margin-left: 5px;
    display: flex;
    align-items: center;
}

.logo-symbol-container img, .logo-type-container img {
    display: block;
    height: 45px;
}

.logo-doc {
    font-size: 1.2rem;
    color: #ffffff;
    padding-left: 10px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Menu navigation */
.docs-list {
    display: flex;
    padding: 0;
    flex-direction: column;
    margin-top: 15px;
    list-style: none;
}

.doc-link {
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.doc-link a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 12px 18px;
    border-radius: 8px;
    font-weight: 500;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.doc-link a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.doc-link.active a {
    background-color: rgba(255, 255, 255, 0.25);
    border-left: 3px solid #fff;
}

/* Menu content & footer */
.menu-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
}

.sidebar-social {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.sidebar-social a {
    color: #fff;
    transition: all 0.2s ease;
}

.sidebar-social a:hover {
    transform: scale(1.2);
    color: #D6EAF8;
}

.sidebar-copyright {
    text-align: center;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    margin-bottom: 47px;
}

.sidebar-copyright a {
    color: #D6EAF8;
    text-decoration: none;
}

.sidebar-copyright a:hover {
    text-decoration: underline;
}

/* Content area styles */
.public-doc {
    width: 100%;
    padding: 0;
    box-sizing: border-box;
    color: var(--text-color);
    font-size: 16px;
    overflow-y: auto; /* Enable scrolling for content */
    background-color: #fff;
    height: 100vh; /* Full viewport height */
}

/* Document container with modern styling */
.doc-content {
    max-width: 900px;
    margin: 3rem auto 5rem;
    padding: 3rem;
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.doc-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--gradient-bg);
}

/* Typography enhancements */
.public-doc h1 {
    color: var(--secondary-color);
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 1rem;
    text-align: center;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.public-doc h2 {
    color: var(--secondary-color);
    font-size: 1.8rem;
    margin: 0.5rem 0 2.5rem;
    text-align: center;
    font-weight: 500;
}

.public-doc h3 {
    color: var(--accent-color);
    font-size: 1.5rem;
    margin: 2.5rem 0 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eaeaea;
    font-weight: 500;
}

.public-doc p {
    margin: 1.2rem 0;
    line-height: 1.8;
    color: var(--text-color);
    font-size: 1.05rem;
    letter-spacing: 0.01rem;
}

/* List styling */
.public-doc ul {
    margin: 1.5rem 1rem 2rem 1.5rem;
    padding-left: 1rem;
    list-style-type: none;
}

.public-doc ul li {
    position: relative;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    line-height: 1.6;
}

.public-doc ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-color);
}

/* Links and emphasis */
.public-doc a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all var(--transition-speed);
    font-weight: 500;
}

.public-doc a:hover {
    border-bottom: 1px solid var(--accent-color);
}

.public-doc strong {
    color: var(--secondary-color);
    font-weight: 600;
}

.public-doc b {
    color: var(--accent-color);
    font-weight: 500;
}

/* Animation effects */
.doc-content {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Special version indicator */
.version-badge {
    display: inline-block;
    background: linear-gradient(135deg, #3498db20, #9b59b620);
    color: var(--secondary-color);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 2rem;
}

/* Date styling */
.doc-date {
    text-align: center;
    color: #777;
    font-style: italic;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* Section dividers */
.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #e1e8ed, transparent);
    margin: 2rem 0;
}

/* Contact section styling */
.contact-section {
    background-color: #f8fafc;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-top: 2rem;
}

.contact-section h3 {
    margin-top: 0;
}

/* Mobile Menu Styles */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 0 15px;
    background: var(--gradient-bg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 1000; /* Increased z-index */
    height: 60px;
    align-items: center;
    justify-content: space-between;
}

.mobile-header .mobile-logo {
    display: flex;
    align-items: center;
    height: 100%;
}

.mobile-header .logo-symbol-container {
    margin-right: -5px; /* Reduced margin for better spacing */
}

.mobile-header img {
    height: 35px;
}

.mobile-header .logo-type-container img {
    height: 30px;
    filter: brightness(0) invert(1); /* Makes logo white */
}

/* Add docs text to mobile header */
.mobile-header .logo-doc {
    font-size: 1rem;
    color: #ffffff;
    padding-left: 5px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.mobile-menu-toggle {
    display: none;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
    z-index: 1001; /* Higher than menu to ensure it's clickable */
}

.mobile-menu-toggle i {
    font-size: 20px;
}

.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 990;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Responsive styles */
@media(max-width: 992px) {
    .doc-content {
        margin: 2rem 1rem 4rem;
        padding: 2rem;
    }
    
    .public-doc h1 {
        font-size: 2rem;
    }
    
    .public-doc h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
  body {
    padding-top: 60px;
    overflow: visible;
    height: auto;
  }

  .mobile-header {
    display: flex;
  }

  .mobile-menu-toggle {
    display: flex;
    position: relative;
    z-index: 1001;
  }

  .body-container {
    flex-direction: column;
    overflow: visible;
    height: auto;
  }

  .public-docs-menu {
    position: fixed;
    left: -100%;
    top: 0;
    width: 280px;
    height: calc(100vh - 60px); /* subtract the height of the mobile header */
    transition: left 0.3s ease;
    z-index: 995;
    padding-top: 70px;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }

  .public-docs-menu.active {
    left: 0;
  }

  .menu-overlay.active {
    display: block;
    opacity: 1;
  }

  /* Hide logo in sidebar when in mobile view */
  .public-docs-menu .logo-container {
    display: none;
  }

  .public-doc {
    padding: 20px 15px;
    margin-left: 0;
    width: 100%;
    height: auto;
    min-height: calc(100vh - 60px);
    overflow-y: auto;
  }

  .docs-list {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
  }

  .doc-link {
    margin-bottom: 0;
  }

  .doc-link a {
    padding: 12px 15px;
    font-size: 1rem;
  }

  /* Ensure footer is visible in mobile view */
  .sidebar-footer {
    position: relative;
    width: 100%;
    padding: 15px;
    box-sizing: border-box;
    margin-top: auto;
    bottom: 0;
  }

  .sidebar-copyright {
    margin-bottom: 10px;
    padding-bottom: 0;
    text-align: center;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
  }

  .sidebar-social {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 5px;
  }

  /* Adjust menu content to use flex properly */
  .public-docs-menu .menu-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
  }
}

@media(max-width: 480px) {
    .docs-list {
        flex-direction: column;
        gap: 5px;
    }
    
    .doc-link {
        margin-bottom: 8px;
        width: 100%;
    }
    
    .doc-link a {
        text-align: center;
    }
    
    .ctn-icon-social {
        gap: 10px;
    }
}
