/* Hide mobile elements on desktop */
#mobile_menu_btn {
  display: none;
}

#mobile_menu {
  display: none;
}

/* =========================
   MOBILE ONLY
   ========================= */
@media screen and (max-width: 768px) {

  body {
    overflow-x: hidden;
  }
  
/* ===== HEADER COMPACT (MOBILE) ===== */

#header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px !important;
  box-sizing: border-box;
}

/* logo left */
#logo_onleft {
  float: none !important;
  width: auto !important;
  height: auto !important;
}

#logo_onleft img {
  max-height: 60px;
  width: auto;
  height: auto;
}

/* right side (languages + login) */
#mainheader {
  float: none !important;
  width: auto !important;
  height: auto !important;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* languages */
#shqip_anglisht {
  float: none !important;
  width: auto !important;
  text-align: right;
  margin-bottom: 4px;
}

#shqip_anglisht .meshigjete {
  display: inline-block;
  float: none !important;
  margin-left: 6px;
  font-size: 13px;
}

/* pitagora */
#kerkim_div {
  float: none !important;
  width: auto !important;
  text-align: right;
}

/* remove table layout */
#kerkim_div table {
  width: auto;
}

#kerkim_div td {
  display: inline-block;
  width: auto;
  padding: 0;
}

/* label smaller */
#kerkim_div b {
  font-size: 12px;
  display: inline-block;
  margin-right: 6px;
}

/* button */
#kerkim_div input[type="submit"] {
  padding: 4px 10px;
  font-size: 13px;
}

  /* SHOW BUTTON */
  #mobile_menu_btn {
    display: block;
    background: #111;
    color: #fff;
    padding: 12px;
    text-align: center;
    font-size: 18px;
    cursor: pointer;
    margin-bottom: 10px;
  }

  /* SHOW MOBILE MENU (hidden by default, toggled by JS) */
   #mobile_menu {
    display: none;
    background: #1f1f1f;
    margin-top: 0;
    border-top: 1px solid #3a3a3a;
  }

  /* base reset */
  #mobile_menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  #mobile_menu li {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  #mobile_menu a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 12px 14px;
    border-bottom: 1px solid #3f3f3f;
    line-height: 1.35;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
  }

  #mobile_menu a:hover {
    background: #2c2c2c;
  }

  /* ---------- FIRST MENU: top navigation ---------- */
  #mobile_menu > ul:first-child {
    background: #0f0f0f;
    border-bottom: 4px solid #4b4b4b;
  }

  #mobile_menu > ul:first-child > li > a {
    font-weight: 700;
    font-size: 16px;
    background: #0f0f0f;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  /* ---------- SECOND MENU: side navigation ---------- */
  #mobile_menu > ul:last-child {
    background: #1f1f1f;
    margin-top: 10px;
    border-top: 1px solid #4b4b4b;
  }

  #mobile_menu > ul:last-child > li > a {
    font-weight: 600;
    font-size: 15px;
    background: #1f1f1f;
  }

  /* ---------- INDENTATION / LEVELS ---------- */
  #mobile_menu ul ul {
    display: none;
    margin: 0;
    padding: 0;
    background: #262626;
  }

  #mobile_menu ul ul li a {
    padding-left: 28px;
    font-size: 14px;
    font-weight: 400;
    background: #262626;
  }

  #mobile_menu ul ul ul {
    background: #2d2d2d;
  }

  #mobile_menu ul ul ul li a {
    padding-left: 42px;
    font-size: 14px;
    background: #2d2d2d;
  }

  #mobile_menu ul ul ul ul {
    background: #343434;
  }

  #mobile_menu ul ul ul ul li a {
    padding-left: 56px;
    font-size: 13px;
    background: #343434;
  }
  
  /* ===== MOBILE MENU SECTIONS ===== */

.mobile_section_title {
  background: #0f0f0f;
  color: #fff;
  padding: 12px 14px;
  font-weight: bold;
  border-bottom: 1px solid #444;
  cursor: pointer;
  position: relative;
}

.mobile_section_title .arrow {
  float: right;
  font-size: 14px;
}

/* hidden by default */
.mobile_section {
  display: none;
}

/* ===== NORMALIZE FONT SIZE (REKTORATI BLOCK) ===== */

/* make ALL menu links same size */
#mobile_menu .mobile_section a {
  font-size: 15px !important;
  font-weight: 500;
}

/* remove bold from top-level inside section */
#mobile_menu .mobile_section > li > a {
  font-weight: 500;
}

/* keep indentation but not smaller text */
#mobile_menu ul ul li a,
#mobile_menu ul ul ul li a,
#mobile_menu ul ul ul ul li a {
  font-size: 15px !important;
}

/* ===== MATCH SECTION TITLES WITH MENU ITEMS ===== */

#mobile_menu .mobile_section_title,
#mobile_menu .mobile_section_title span,
#mobile_menu .mobile_section > li > a,
#mobile_menu .mobile_section ul li a {
  font-size: 15px !important;
  line-height: 1.35 !important;
}

#mobile_menu .mobile_section_title {
  font-weight: 600 !important;
}

#mobile_menu .mobile_section_title .arrow {
  font-size: 11px !important;
}

/* menu items that have submenus */
#mobile_menu li.has-submenu > a {
  position: relative;
  padding-right: 34px;
}

/* arrow symbol on the right */
#mobile_menu li.has-submenu > a::after {
  content: "▸";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: 0.9;
}

/* when opened */
#mobile_menu li.has-submenu.open > a::after {
  content: "▾";
}

  /* HIDE ORIGINAL MENUS */
  #nav_main,
  #nav_left,
  #pjesa_majtas {
    display: none !important;
  }
  
    /* force main layout to fit screen */
  html, body {
    width: 100%;
    overflow-x: hidden;
  }

  #main_container,
  #header,
  #poshte_headerit {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box;
  }

  #main_container {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  /* content width */
  #kontent_ipandryshueshem,
  #kontent_indryshueshem {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    box-sizing: border-box;
  }

  #kontent_indryshueshem {
    padding: 0 10px 16px 10px !important;
    line-height: 1.55 !important;
    text-align: left !important;
    overflow-x: hidden !important;
  }

  #kontent_indryshueshem p,
  #kontent_indryshueshem div,
  #kontent_indryshueshem span,
  #kontent_indryshueshem li,
  #kontent_indryshueshem a {
    max-width: 100% !important;
    box-sizing: border-box;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    word-break: normal !important;
  }

  #kontent_indryshueshem ul,
  #kontent_indryshueshem ol {
    padding-left: 22px !important;
    margin-left: 0 !important;
  }

  h1 {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 10px 12px 10px !important;
    padding: 8px 0 !important;
    background: none !important;
    background-image: none !important;
    box-sizing: border-box;
  }

  /* mobile slideshow: show only first/active image, no overlay */
  #foto_dera {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    margin: 10px 0 14px 0 !important;
  }

  #slideshow {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    overflow: hidden !important;
    position: relative !important;
  }

  #slideshow img {
    position: static !important;
    display: none !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }

  #slideshow img:first-child,
  #slideshow img.active {
    display: block !important;
  }

  /* CLEAN CONTENT */
  #main_container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow-x: hidden !important;
    box-sizing: border-box;
  }

  #kontent_ipandryshueshem {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    clear: both !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
  }

  #kontent_indryshueshem {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 14px 20px 14px !important;
    box-sizing: border-box;
    font-size: 15px;
    line-height: 1.6;
    text-align: left !important;
    overflow-x: hidden !important;
  }

  #kontent_indryshueshem *,
  #kontent_indryshueshem p,
  #kontent_indryshueshem div,
  #kontent_indryshueshem span,
  #kontent_indryshueshem li,
  #kontent_indryshueshem a,
  #kontent_indryshueshem strong,
  #kontent_indryshueshem em {
    max-width: 100% !important;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-wrap: break-word;
  }

  #kontent_indryshueshem ul,
  #kontent_indryshueshem ol {
    margin: 0 0 14px 0 !important;
    padding-left: 22px !important;
  }

  #kontent_indryshueshem table {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto;
  }

  h1 {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 14px 14px 14px !important;
    padding: 8px 0 !important;
    background: none !important;
    background-image: none !important;
    line-height: 1.3 !important;
    box-sizing: border-box;
  }

  /* slideshow mobile: show only active image cleanly */
  #foto_dera {
    margin-top: 15px !important;
    margin-bottom: 15px !important;
  }

  #slideshow {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    overflow: hidden;
    position: relative;
  }

  #slideshow img {
    position: static !important;
    display: none;
    width: 100% !important;
    height: auto !important;
  }

  #slideshow img.active {
    display: block;
  }
  
  /* FIX BIG ICONS */
  #footer img {
    max-width: 80px !important;
    height: auto !important;
  }
}



/* -------- FIX SOCIAL ICONS MOBILE -------- */

#footer img {
  width: 40px !important;
  height: auto !important;
}