/* ==========================================================================
   mobile.css - mobile-first layer for the ngEmbassy / ngConsulate default theme.
   Loaded AFTER bootstrap/AdminLTE/custom.css so it only overrides; desktop look
   (>= 992px) is intentionally left as it was. Edit freely.
   ========================================================================== */

/* ---- 1. Base: readable text, nothing wider than the screen ---------------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { font-size: 16px; line-height: 1.55; overflow-wrap: break-word; word-wrap: break-word; }
img, video, canvas, svg { max-width: 100%; }
img { height: auto; }
iframe, embed, object { max-width: 100%; }
table { max-width: 100%; }
.wrapper { overflow-x: hidden; }
pre, code { white-space: pre-wrap; word-break: break-word; }
.content-wrapper, .main-footer { margin-left: 0; }
:focus-visible { outline: 3px solid #f90; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

h1 { font-size: 1.65rem; line-height: 1.25; }
h2 { font-size: 1.4rem; line-height: 1.3; }
h3 { font-size: 1.2rem; line-height: 1.3; }
@media (min-width: 768px) { h1 { font-size: 2rem; } h2 { font-size: 1.6rem; } h3 { font-size: 1.3rem; } }

/* Tables inside articles / pages scroll sideways instead of breaking the layout */
.reading-details table, .reading-preview table, ._PAGE table, ._NOTICE table, ._ARTICLE table, ._MISSION table {
  display: block; overflow-x: auto; -webkit-overflow-scrolling: touch;
}

/* Form controls: 16px stops iOS from zooming, 44px is a comfortable tap target */
.form-control, select, textarea, input[type=text], input[type=email], input[type=search], input[type=tel] { font-size: 16px; }
.btn, .form-control { min-height: 44px; }
textarea.form-control { min-height: 100px; }

/* ---- 2. Header / logo / menu (mobile first) ------------------------------ */
.skin-black-light .main-header { padding: 6px 0; background: #fff; }
.main-header .navbar-header { display: flex; align-items: center; justify-content: space-between; }
.navbar-brand.logo-img { height: auto; padding: 4px 15px; flex: 1 1 auto; min-width: 0; float: none; }
.navbar-brand.logo-img img, .ngm-logo { width: auto; max-width: 100%; max-height: 52px; height: auto; display: block; }
.navbar-brand:not(.logo-img) { height: auto; padding: 12px 15px; font-weight: 700; }
.main-header .navbar-toggle { float: none; flex: 0 0 auto; margin: 0 8px 0 0; padding: 8px 12px; min-width: 48px; min-height: 48px; border: 0; background: transparent; color: #333; }
.main-header .navbar-toggle .fa { font-size: 26px; }

.navbar-collapse { max-height: calc(100vh - 70px); max-height: calc(100dvh - 70px); overflow-y: auto; -webkit-overflow-scrolling: touch; border-top: 1px solid #eee; box-shadow: none; }
.navbar-collapse.pull-left, .navbar-custom-menu { float: none !important; }
.navbar-nav { margin: 0 -15px; float: none !important; }
.navbar-nav > li { float: none; }
.navbar-nav > li > a { padding: 13px 20px; font-size: 16px; line-height: 1.3; min-height: 44px; margin: 0; }
.navbar-nav > li > a:after { display: none; }
.navbar-nav .open .dropdown-menu { position: static; float: none; width: auto; margin: 0; padding: 0; background: #f7f7f7; border: 0; box-shadow: none; }
.navbar-nav .open .dropdown-menu > li > a { padding: 12px 20px 12px 40px; font-size: 15px; line-height: 1.3; white-space: normal; min-height: 44px; }
.navbar-nav .dropdown-toggle .caret { margin-left: 6px; }

/* Tablets (768-991px): keep the hamburger menu - 10+ items do not fit in one row */
@media (min-width: 768px) and (max-width: 991px) {
  .navbar-header { float: none; }
  .navbar-toggle { display: block; }
  .navbar-collapse { border-top: 1px solid #eee; }
  .navbar-collapse.collapse { display: none !important; }
  .navbar-collapse.collapse.in { display: block !important; }
  .navbar-nav { float: none !important; margin: 0 -15px; }
  .navbar-nav > li { float: none; }
  .navbar-nav .open .dropdown-menu { position: static; float: none; width: auto; margin-top: 0; background: #f7f7f7; border: 0; box-shadow: none; }
}
/* Desktop (>= 992px): restore the original look */
@media (min-width: 992px) {
  .skin-black-light .main-header { padding: 20px 0; }
  .navbar-brand.logo-img img, .ngm-logo { max-height: 60px; }
  .main-header .navbar-header { display: block; }
  .navbar-nav > li > a:after { display: block; }
  .navbar-collapse { max-height: none; overflow: visible; border-top: 0; }
  .navbar-nav { margin: 0; }
}

/* ---- 3. Homepage tabs ---------------------------------------------------- */
.ngm-tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; border-bottom: 2px solid #448842; margin-top: 10px; }
.ngm-tabs > li { float: none; margin: 0 2px -2px 0; flex: 0 0 auto; }
.ngm-tabs > li > a { padding: 12px 16px; min-height: 44px; margin-right: 0; border-radius: 4px 4px 0 0; color: #333; }
.ngm-tabs > li.active > a, .ngm-tabs > li.active > a:hover, .ngm-tabs > li.active > a:focus { background: #448842; border-color: #448842; color: #fff; }
.ngm-tab-content { padding: 12px 0 4px; }
.ngm-tab-links { list-style: none; margin: 0; padding: 0; }
.ngm-tab-links li a { display: block; padding: 12px 8px; border-bottom: 1px solid #eee; font-weight: 600; }
.ngm-tab-more { text-align: right; margin: 10px 0 0; font-weight: 600; }
@media (min-width: 768px) { .ngm-tabs { flex-wrap: wrap; overflow: visible; } }

/* ---- 4. Country list (homepage + /mission/country) ------------------------ */
.ngm-country-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.ngm-country-list li { margin: 0; min-width: 0; }
.ngm-country-list a { display: flex; align-items: center; gap: 8px; padding: 9px 2px; min-height: 44px; font-weight: 600; line-height: 1.2; border-bottom: 1px solid rgba(0,0,0,.06); }
.ngm-flag { width: 20px; height: 15px; flex: 0 0 20px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.18); background: #eee; object-fit: cover; }
.ngm-flag-none { display: inline-block; }
.ngm-count { margin-left: auto; min-width: 22px; padding: 1px 6px; font-size: 12px; font-weight: 600; text-align: center; color: #555; background: #eee; border-radius: 10px; }
.ngm-letter { margin: 22px 0 6px; padding-bottom: 4px; border-bottom: 2px solid #448842; color: #448842; font-size: 1.4rem; }
.ngm-lead { font-size: 1.05rem; color: #555; margin-bottom: 8px; }
@media (min-width: 576px) { .ngm-country-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 768px) { .ngm-country-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } .ngm-country-list a { min-height: 38px; padding: 6px 2px; } }
@media (min-width: 992px) { .ngm-country-list-home { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* ---- 5. Ad slots: reserve space so ads cannot shove the page around ------- */
ins.adsbygoogle { display: block; max-width: 100%; overflow: hidden; margin-left: auto; margin-right: auto; }
center > ins.adsbygoogle, .ad-slot ins.adsbygoogle { min-height: 100px; }
center, .ad-slot { max-width: 100%; overflow: hidden; }
.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }

/* ---- 6. Maps (Leaflet) ---------------------------------------------------- */
#map-details, #_MISSION_MAIN_MAP, #map_generator { width: 100%; height: 320px; background: #e8eef0; }
.leaflet-container { z-index: 0; font: inherit; }
.leaflet-popup-content { margin: 10px 12px; line-height: 1.35; }
.ngm-pop img { float: left; margin: 0 8px 4px 0; border-radius: 3px; }
@media (min-width: 768px) { #map-details, #_MISSION_MAIN_MAP, #map_generator { height: 450px; } }

/* ---- 7. Lists, cards, footer --------------------------------------------- */
.container { padding-left: 15px; padding-right: 15px; }
.notice-categories-headline { font-size: 1.4rem; margin: 10px 0 6px; }
.main-footer .container .row > div { margin-bottom: 14px; }
.main-footer ul { padding-left: 18px; }
.main-footer a { display: inline-block; padding: 4px 0; }
.copyright-footer.pull-left, .copyright-footer.pull-right { float: none !important; text-align: center; padding: 4px 0; }
@media (min-width: 768px) { .copyright-footer.pull-left { float: left !important; text-align: left; } .copyright-footer.pull-right { float: right !important; text-align: right; } }
.timeline > li > .timeline-item { margin-right: 0; }
.error-page { width: auto; max-width: 600px; padding: 0 15px; }
.error-page > .error-content { margin-left: 0; }
.pagination > li > a, .pagination > li > span { padding: 10px 14px; min-width: 44px; text-align: center; }
