/* 
 * MOBILE MENU CSS - Footer-style expandable menu
 * Only applies to mobile devices (max-width: 800px)
 */

@media (max-width: 800px) {
  /* Mobile menu overlay and container */
  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .mobile-menu-overlay.active {
    display: block;
    opacity: 1;
  }
  
  .mobile-menu-container {
    position: fixed;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 350px;
    height: 100%;
    background: var(--secondary-color);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
  }
  
  .mobile-menu-container.active {
    transform: translateX(0);
  }
  
  /* Mobile menu header */
  .mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--tertiary-color);
    background: var(--secondary-color);
  }
  
  .mobile-menu-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
    display: flex;
    align-items: center;
  }
  
  .mobile-menu-logo {
    max-height: 40px;
    max-width: 120px;
    height: auto;
    width: auto;
    object-fit: contain;
  }
  
  .mobile-menu-title-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
  }
  
  .mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
  }
  
  .mobile-menu-close:hover {
    background: var(--tertiary-color);
    color: var(--secondary-color);
  }
  
  /* Mobile menu content */
  .mobile-menu-content {
    padding: 1rem 0;
  }
  
  /* Mobile menu sections - styled like footer */
  .mobile-menu-section {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }
  
  .mobile-menu-section:last-child {
    border-bottom: none;
  }
  
  .mobile-section-title {
    position: relative;
    cursor: pointer;
    user-select: none;
    padding: 0.5rem 1rem;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--primary-color);
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
  }
  
  .mobile-section-title:hover {
    background: rgba(0, 123, 255, 0.05);
  }
  
  .mobile-section-title.active {
    color: var(--tertiary-color);
    font-weight: normal;
  }
  
  .mobile-section-toggle {
    font-size: 1rem;
    font-weight: bold;
    transition: transform 0.2s ease;
    color: var(--primary-color);
  }
  
  .mobile-section-title.active .mobile-section-toggle {
    transform: rotate(360deg);
    color: var(--tertiary-color);
  }
  
  /* Mobile submenu */
  .mobile-submenu {
    display: none;
    background: var(--set-transparent);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
  }
  
  .mobile-submenu.active {
    display: block;
    animation: slideDown 0.3s ease-out;
  }
  
  .mobile-submenu ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .mobile-submenu li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }
  
  .mobile-submenu li:last-child {
    border-bottom: none;
  }
  

  .mobile-submenu ul li::before {
    content: none;
  }

  .mobile-submenu a {
    border: 0px solid var(--set-transparent);
    display: block;
    font-weight: 600;
    padding: 0.2rem 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    position: relative;
  }
  
  .mobile-submenu a:hover {
    background: rgba(0, 123, 255, 0.08);
    color: var(--link-color);
    padding-left: 2rem;
  }
  
  .mobile-submenu a::before { /* moderner weg um hier einen Abstand einzufügen  */
    /* content: "»";*/
    /* position: absolute;*/
    /*left: 1rem;*/
    opacity: 0;
    transition: opacity 0.2s ease;
    /*color: var(--tertiary-color);*/
  }
  
  .mobile-submenu a:hover::before {
    opacity: 1;
  }

  
  /* Third level submenu (nested) */
  .mobile-submenu .mobile-submenu {
    background: rgba(0, 0, 0, 0.05);
    border-left: 2px solid var(--tertiary-color);
    margin-left: 1rem;
  }
  
  .mobile-submenu .mobile-submenu a {
    padding-left: 2rem;
    font-size: 0.85rem;
    color: #666;
  }
  
  .mobile-submenu .mobile-submenu a:hover {
    padding-left: 2.5rem;
    color: var(--link-color);
  }
  
  .mobile-submenu ul li a.nested-li-a {
    color: var(--primary-color); !important;
    font-size: 0.85rem;
    font-weight:normal;
    opacity: 0.8;
    padding-left: 2.5rem;
  }

  /* Animation for expanding menus */
  @keyframes slideDown {
    from {
      opacity: 0;
      max-height: 0;
      padding-top: 0;
      padding-bottom: 0;
    }
    to {
      opacity: 1;
      max-height: 500px;
      padding-top: 0;
      padding-bottom: 0;
    }
  }
  
  /* Main menu items without children */
  .mobile-menu-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s ease;
  }
  
  .mobile-menu-link:hover {
    background: rgba(0, 123, 255, 0.05);
    color: var(--link-color);
  }
  
  /* Hide desktop submenu elements in mobile menu */
  .mobile-menu-container .submenu {
    display: none !important;
  }
  
  .mobile-menu-container .submenu-indicator {
    display: none !important;
  }
  
  /* Prevent body scroll when menu is open */
  body.mobile-menu-open {
    overflow: hidden;
  }
  
  /* Mobile Menu Footer */
  .mobile-menu-footer {
    margin-top: auto;
    border-top: 1px solid var(--tertiary-color);
    background: var(--secondary-color);
    padding: 1rem;
  }
  
  .mobile-footer-content {
    font-size: 0.85rem;
  }
  
  .mobile-footer-section {
    margin-bottom: 1rem;
  }
  
  .mobile-footer-section:last-child {
    margin-bottom: 0;
  }
  
  .mobile-footer-section h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
    padding: 0;
  }
  
  .mobile-footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .mobile-footer-section li {
    margin-bottom: 0.25rem;
  }
  
  .mobile-footer-section li::before {
    content: none !important;
  }
  
  .mobile-footer-section a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0;
    transition: color 0.2s ease;
  }
  
  .mobile-footer-section a:hover {
    color: var(--link-color);
  }
  
  /* Horizontal footer links */
  .mobile-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 1rem;
  }
  
  .mobile-footer-links li {
    margin: 0;
    padding: 0;
  }
  
  .mobile-footer-links li::before {
    content: none !important;
  }
  
  .mobile-footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem;
    transition: color 0.2s ease;
    text-align: center;
  }
  
  .mobile-footer-links a:hover {
    color: var(--link-color);
  }
  
  .mobile-footer-links svg {
    width: 18px;
    height: 18px;
    margin-bottom: 0.2rem;
  }
  
  /* Icons-only mode */
  .mobile-footer-links.icons-only a {
    flex-direction: row;
    gap: 0;
    padding: 0.75rem;
  }
  
  .mobile-footer-links.icons-only svg {
    margin-bottom: 0;
    width: 20px;
    height: 20px;
  }
  
  .footer-link-label {
    font-size: 0.8rem;
    font-weight: 500;
  }
  
  .mobile-footer-update,
  .mobile-footer-attribution {
    color: var(--tertiary-color);
    margin: 0;
    text-align: center;
  }
  
  .mobile-footer-attribution a {
    color: var(--tertiary-color);
    text-decoration: underline;
  }
  
  .mobile-footer-attribution a:hover {
    color: var(--link-color);
  }
  
  .mobile-footer-fallback {
    text-align: center;
    color: var(--tertiary-color);
    font-style: italic;
  }
  
  /* Alternative footer styles */
  .mobile-menu-footer-compact {
    padding: 0.5rem 1rem;
  }
  
  .mobile-menu-footer-compact .mobile-footer-section {
    margin-bottom: 0.5rem;
  }
  
  .mobile-menu-footer-minimal {
    padding: 0.75rem 1rem;
    text-align: center;
  }
  
  .mobile-menu-footer-minimal .mobile-footer-section {
    margin-bottom: 0.5rem;
  }
  
  /* Ensure footer stays at bottom */
  .mobile-menu-container {
    display: flex;
    flex-direction: column;
  }
  
  .mobile-menu-content {
    flex: 1;
  }
}

/* Ensure mobile menu is hidden on desktop */
@media (min-width: 801px) {
  .mobile-menu-overlay,
  .mobile-menu-container {
    display: none !important;
  }
}
