/* Mobile Nav & Language Switcher fixes */

/* Ensure header is visible and fixed on all breakpoints */
header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 20000 !important;
  background: rgba(20,20,20,0.98) !important;
  backdrop-filter: blur(10px);
  overflow: visible !important;
}

/* Offset page content */
body { padding-top: 90px !important; }

/* Avoid default theme hiding header on mobile */
@media (max-width: 992px) {
  header { display: block !important; position: fixed !important; }
}

/* Keep slider and bg below header */
.rev-slidebg,
[data-bgimage],
section[data-bgimage],
#slider-revolution { z-index: 1 !important; }

/* Language switcher */
.language-switcher { 
  position: relative; 
  margin-right: 12px; 
  z-index: 20002; 
  background: transparent; /* remove container box */
  border-radius: 0;
}
.lang-toggle { 
  background: transparent; border: 1px solid rgba(255,255,255,.3); color: #fff; 
  padding: 6px 12px; border-radius: 4px; cursor: pointer; font-size: 14px; position: relative; z-index: 20002;
}
.lang-toggle:hover { background: rgba(255,255,255,.1); }
.lang-menu {
  display: none; position: absolute; top: calc(100% + 8px); right: 0; min-width: 140px;
  background: #fff; color:#333; border-radius: 6px; box-shadow: 0 8px 20px rgba(0,0,0,.2);
  z-index: 20002;
}
.lang-menu.show { display: block; }
.lang-menu a { display:block; padding:10px 14px; color:#333; text-decoration:none; }
.lang-menu a:hover { background:#f5f5f5; }
.lang-menu a.active { background:#eee; font-weight: 600; }

/* Mobile main menu container (theme uses #menu-btn + #mainmenu) */
@media (max-width: 992px) {
  /* language switcher participates in flex row; remove absolute offset */
  header .language-switcher {
    position: static !important;
    margin: 0 !important;
    background: rgba(20,20,20,0.98) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }
  /* align items on same baseline and avoid duplicate logo */
  header .de-flex, header .de-flex-col { align-items: center !important; }
  #logo .logo-2 { display: none !important; }
  /* hidden by default on mobile */
  #mainmenu { 
    position: absolute !important; 
    top: 100% !important; 
    left: 0; right: 0; 
    z-index: 20001 !important; 
    display: none; 
    background: rgba(20,20,20,0.98);
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
  }
  /* unify header and menu background color */
  header, #mainmenu { background: rgba(20,20,20,0.98) !important; }
  /* show when header has menu-open */
  header.menu-open #mainmenu { display: block; }
  /* make menu items larger touch targets */
  #mainmenu > li > a { padding: 14px 20px; display: block; }
  #menu-btn { cursor: pointer; }
}

/* Desktop alignment: keep language switcher on the same baseline as other header items */
@media (min-width: 993px) {
  header .de-flex .de-flex-col:last-child { display: flex; align-items: center; gap: 10px; }
  header .language-switcher { top: 0; }
}

/* Responsive fixes for the Legal Notice block */
  /* Global spacing to the next section */
  .legal-notice-container { margin-bottom: 10px !important; }

@media (max-width: 768px) {
  /* Allow the notice block to expand and avoid clipping */
  .legal-notice-container { overflow: visible !important; margin-top: 0 !important; }
  .notice-bg { min-height: auto !important; }
  .notice-content { position: relative !important; height: auto !important; padding: 16px !important; }
  /* Remove negative offset and reduce padding inside the white card */
  #notice-body.notice-body { top: 0 !important; padding: 16px !important; }
  /* Typography scaling */
  #notice-body h3 { font-size: 20px !important; margin-bottom: 12px !important; }
  #notice-body p { font-size: 14px !important; line-height: 1.65 !important; }
  /* Ensure long words/URLs break properly */
  #notice-body { word-break: break-word; overflow-wrap: anywhere; }
  /* Header badges stack on small screens */
  .notice-header { flex-direction: column !important; align-items: flex-start !important; gap: 8px !important; }
  .notice-header .date-badge,
  .notice-header .notice-tag { font-size: 12px !important; padding: 6px 10px !important; }
}
