/* =========================================================================
   Embassy of India, Belgrade – DBIM / GIGW 3.0 stylesheet
   Replaces: 5.css, 15.css, 18.css, 19.css, style.css, semantic.css (for the
   redesigned pages). Mobile-first, no jQuery dependency.
   ========================================================================= */

/* ---------- 1. Design tokens ---------- */
:root {
  --c-primary: #162d69;          /* footer, drawer, headings            */
  --c-nav: #0d3580;              /* desktop menu bar                    */
  --c-accent: #2349a8;           /* buttons, active tab, links          */
  --c-accent-hover: #1a3a8a;
  --c-accent-soft: #dbe5ff;      /* hovered menu row                    */
  --c-surface: #ffffff;
  --c-surface-alt: #eef1f9;      /* top strip, cards                    */
  --c-border: #c9d1e6;
  --c-text: #1b1f2a;             /* 15.8:1 on white                     */
  --c-text-muted: #4a5368;       /* 7.6:1 on white                      */
  --c-on-dark: #ffffff;
  --c-focus: #ffb300;
  --c-danger: #b3261e;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(22, 45, 105, .10);
  --font: "Noto Sans", "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --container: 1320px;
  --wide: 1600px;
  --gutter: 16px;
  --base-size: 100%;
}

html[data-theme="dark"] {
  --c-primary: #0e1a3d;
  --c-nav: #0a1630;
  --c-accent: #8ab4ff;
  --c-accent-hover: #b3ceff;
  --c-accent-soft: #1d2a55;
  --c-surface: #10172b;
  --c-surface-alt: #172040;
  --c-border: #33406b;
  --c-text: #eef1fa;
  --c-text-muted: #b9c2de;
  --shadow: 0 2px 10px rgba(0, 0, 0, .5);
}

/* ---------- 2. Base / reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: var(--base-size); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.6;
  color: var(--c-text); background: var(--c-surface);
}
img, video, iframe { max-width: 100%; height: auto; border: 0; }
iframe { width: 100%; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .6em; color: var(--c-primary); }
html[data-theme="dark"] h1, html[data-theme="dark"] h2,
html[data-theme="dark"] h3, html[data-theme="dark"] h4 { color: var(--c-text); }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--c-accent); text-underline-offset: 3px; }
a:hover { color: var(--c-accent-hover); }
button { font: inherit; cursor: pointer; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Visible focus for every interactive element (GIGW 2.4.7) */
:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; border-radius: 3px; }
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 10000; background: #fff; color: var(--c-primary);
  padding: 10px 16px; font-weight: 700; border-radius: 6px; text-decoration: none;
}
.skip-link:focus { top: 8px; }

/* ---------- 3. Header ---------- */
.top-strip { background: var(--c-surface-alt); border-bottom: 1px solid var(--c-border); font-size: .92rem; }
.top-strip .container { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 8px; max-width: var(--wide); }
.clock { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; color: var(--c-text); }
.clock img { width: 32px; height: 21px; object-fit: cover; border: 1px solid var(--c-border); flex: none; }
.clock .clock-time { font-weight: 700; }

.site-header { background: var(--c-surface); }
.header-main { display: grid; grid-template-columns: auto minmax(280px, 640px) auto; justify-content: space-between; align-items: center; gap: 24px; padding-block: 12px; max-width: var(--wide); }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--c-primary); }
.brand img { height: 84px; width: auto; max-width: none; object-fit: contain; flex: none; }
.brand-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.brand-text .brand-name { font-weight: 700; font-size: 1.1rem; color: var(--c-primary); }
.brand-text .brand-place { font-size: 1.05rem; color: var(--c-text); }
html[data-theme="dark"] .brand-text .brand-name { color: var(--c-accent); }
html[data-theme="dark"] .brand img { background: #fff; border-radius: 6px; padding: 3px; }

.search-form { display: flex; width: 100%; }
.search-form input[type="search"] {
  flex: 1; min-width: 0; height: 54px; padding: 0 18px; font: inherit; color: var(--c-text);
  background: var(--c-surface); border: 1px solid #7a839d; border-right: 0; border-radius: 10px 0 0 10px;
}
.search-form button {
  width: 62px; height: 54px; background: var(--c-accent-soft); color: var(--c-primary);
  border: 1px solid #7a839d; border-radius: 0 10px 10px 0; display: grid; place-items: center;
}
html[data-theme="dark"] .search-form button { color: var(--c-text); }
.search-form button:hover { background: var(--c-border); }

.tools { display: flex; align-items: center; justify-content: flex-end; }
.tools > * { position: relative; }
.tools > * + *::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 1px; background: var(--c-border); pointer-events: none; }
.tool-btn {
  position: relative; width: 64px; height: 54px; display: grid; place-items: center; text-decoration: none;
  background: transparent; border: 0; color: var(--c-primary); border-radius: 8px;
}
html[data-theme="dark"] .tool-btn { color: var(--c-text); }
.tool-wrap .tool-btn { width: 64px; }
.tool-btn:hover, .tool-btn[aria-expanded="true"], .tool-btn[aria-pressed="true"] { background: var(--c-accent-soft); }
.tool-btn svg, .icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.search-toggle, .menu-toggle { display: none; }
.menu-toggle { background: var(--c-primary); color: #fff; border-radius: 10px; }
.menu-toggle:hover { background: var(--c-accent); }

/* Dropdown panels: language + accessibility */
.tool-wrap { position: relative; }
.lang-list, .a11y-panel {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 1200; background: var(--c-surface);
  border: 1px solid var(--c-border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.lang-list { min-width: 220px; padding: 8px; }
.lang-list button {
  display: block; width: 100%; text-align: left; padding: 12px 14px; background: transparent; color: var(--c-text);
  border: 2px solid transparent; border-radius: 8px; font-size: 1rem;
}
.lang-list button:hover { background: var(--c-accent-soft); }
.lang-list button[aria-checked="true"] { border-color: var(--c-primary); background: var(--c-accent-soft); font-weight: 700; }

.a11y-panel { width: 420px; max-width: calc(100vw - 24px); padding: 18px; }
.a11y-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.a11y-head h2 { margin: 0; font-size: 1.1rem; display: flex; gap: 8px; align-items: center; }
.a11y-close { background: transparent; border: 0; color: var(--c-primary); width: 44px; height: 44px; display: grid; place-items: center; }
html[data-theme="dark"] .a11y-close { color: var(--c-text); }
.a11y-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.a11y-opt {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 92px;
  padding: 12px 8px; text-align: center; background: var(--c-surface); color: var(--c-primary);
  border: 1px solid var(--c-border); border-radius: var(--radius); font-size: .78rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
}
html[data-theme="dark"] .a11y-opt { color: var(--c-text); }
.a11y-opt:hover { border-color: var(--c-accent); }
.a11y-opt[aria-pressed="true"] { background: var(--c-accent-soft); border-color: var(--c-accent); box-shadow: inset 0 0 0 1px var(--c-accent); }
.a11y-links { display: flex; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--c-border); font-size: .95rem; }
.a11y-links a, .a11y-reset { display: inline-flex; gap: 8px; align-items: center; color: var(--c-primary); }
html[data-theme="dark"] .a11y-links a, html[data-theme="dark"] .a11y-reset { color: var(--c-accent); }
.a11y-reset { background: transparent; border: 0; padding: 12px 0 0; text-decoration: underline; font-size: .95rem; }

/* ---------- 4. Navigation (single row, white bar, multi-column mega panel) ---------- */
.main-nav { background: var(--c-surface); border-top: 1px solid var(--c-border); border-bottom: 1px solid var(--c-border); position: relative; z-index: 1100; box-shadow: 0 2px 6px rgba(22, 45, 105, .06); }
.nav-list { display: flex; flex-wrap: nowrap; justify-content: space-between; align-items: stretch; max-width: var(--wide); margin-inline: auto; padding-inline: var(--gutter); }
.nav-item { position: static; flex: 0 0 auto; }
.nav-item.nav-hidden { display: none; }
.nav-link, .nav-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 58px; padding: 0 clamp(6px, .8vw, 14px); color: var(--c-text); background: transparent;
  border: 0; border-bottom: 4px solid transparent; font-size: clamp(.9rem, 1vw, 1rem); font-weight: 600; text-decoration: none; white-space: nowrap;
}
html[data-theme="dark"] .nav-link, html[data-theme="dark"] .nav-btn { color: var(--c-text); }
.nav-link:hover, .nav-btn:hover, .nav-btn[aria-expanded="true"], .nav-link[aria-current="page"] {
  color: var(--c-accent); border-bottom-color: var(--c-accent); background: transparent;
}
html:not([data-theme="dark"]) .nav-link:hover, html:not([data-theme="dark"]) .nav-btn:hover,
html:not([data-theme="dark"]) .nav-btn[aria-expanded="true"], html:not([data-theme="dark"]) .nav-link[aria-current="page"] { color: #1a3a8a; }
.nav-btn .chev { width: 16px; height: 16px; transition: transform .2s; flex: none; }
.nav-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }

.mega {
  position: absolute; left: 0; right: 0; top: 100%; background: var(--c-surface); border-top: 1px solid var(--c-border);
  box-shadow: 0 16px 28px rgba(0, 0, 0, .18); border-radius: 0 0 14px 14px; display: none; max-height: calc(100vh - 230px); overflow-y: auto;
}
.mega.open { display: block; }
.mega-wrap { max-width: var(--wide); margin-inline: auto; padding: 26px var(--gutter) 30px; }
.mega-grid { columns: 4 230px; column-gap: 44px; }
.mega-col { break-inside: avoid; margin: 0 0 22px; }
.mega-h { display: block; padding: 6px 0; font-weight: 500; font-size: 1.02rem; line-height: 1.35; color: var(--c-accent); text-decoration: none; }
html:not([data-theme="dark"]) .mega-h { color: #1a3a8a; }
a.mega-h:hover { text-decoration: underline; }
span.mega-h { color: var(--c-text); font-weight: 700; }
.mega-sub li a { display: block; padding: 5px 0; font-size: .95rem; line-height: 1.4; color: var(--c-text); text-decoration: none; }
.mega-sub li a:hover { color: var(--c-accent); text-decoration: underline; }
.mega-sub2 { padding-left: 14px; }
.mega-top { font-weight: 700; border-bottom: 2px solid var(--c-accent-soft); margin-bottom: 6px; }
.nav-more .mega-wrap { padding-top: 22px; }

/* Mobile drawer */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 1900; display: none; }
.drawer-overlay.open { display: block; }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; width: min(86vw, 420px); background: var(--c-primary); color: #fff; z-index: 2000;
  transform: translateX(-102%); transition: transform .25s ease; overflow-y: auto; visibility: hidden;
}
.drawer.open { transform: none; visibility: visible; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 18px; border-bottom: 1px solid rgba(255, 255, 255, .25); }
.drawer-head .t { font-size: 1.3rem; font-weight: 700; margin: 0; color: #fff; }
.drawer-close { width: 48px; height: 48px; flex: none; background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, .6); border-radius: 10px; display: grid; place-items: center; }
.drawer-list > li { border-bottom: 1px solid rgba(255, 255, 255, .22); }
.drawer-row { display: flex; }
.drawer-row > a, .drawer-row > .d-name { flex: 1; padding: 20px 18px; color: #fff; font-weight: 600; font-size: 1.05rem; text-decoration: none; }
.drawer-row > a[aria-current="page"] { box-shadow: inset 5px 0 0 #fff; font-weight: 700; }
.drawer-row > button.d-toggle { width: 78px; background: transparent; color: #fff; border: 0; border-left: 1px solid rgba(255, 255, 255, .25); display: grid; place-items: center; }
.d-toggle .chev { transition: transform .2s; }
.d-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.drawer-sub { display: none; background: rgba(0, 0, 0, .22); }
.drawer-sub.open { display: block; }
.drawer-sub a { display: block; padding: 14px 18px 14px 32px; color: #fff; text-decoration: none; border-top: 1px solid rgba(255, 255, 255, .12); }
.drawer-sub .drawer-sub a { padding-left: 50px; font-size: .95rem; opacity: .95; }
.drawer a:hover, .drawer a:focus-visible { background: rgba(255, 255, 255, .12); }
body.no-scroll { overflow: hidden; }

/* ---------- 5. Hero slider + announcements ---------- */
.hero { position: relative; margin-top: 20px; border-radius: var(--radius); overflow: hidden; background: #000; }
.hero-track { display: flex; transition: transform .5s ease; }
.hero-slide { position: relative; flex: 0 0 100%; aspect-ratio: 21 / 9; min-height: 240px; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* caption reserves room on the right for the controls so text never runs underneath them */
.hero-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 56px 220px 20px 24px; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .88) 55%); font-weight: 600; font-size: clamp(.95rem, 1.5vw, 1.2rem); line-height: 1.45;
}
.hero-ctrl { position: absolute; right: 16px; bottom: 16px; display: flex; gap: 8px; z-index: 3; }
.hero-ctrl button {
  width: 46px; height: 46px; border-radius: 50%; border: 2px solid #fff; background: rgba(13, 28, 70, .85); color: #fff;
  display: grid; place-items: center;
}
.hero-ctrl button:hover { background: #fff; color: var(--c-primary); }
.hero-ctrl .icon { width: 22px; height: 22px; }
.hero-slide[aria-hidden="true"] a, .hero-slide[aria-hidden="true"] button { visibility: hidden; }

.announce { display: flex; align-items: stretch; margin-top: 16px; background: var(--c-accent-soft); border-radius: 8px; overflow: hidden; }
.announce-label { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--c-primary); color: #fff; font-weight: 700; white-space: nowrap; }
.announce-label button { width: 34px; height: 34px; border-radius: 6px; background: transparent; color: #fff; border: 1px solid #fff; display: grid; place-items: center; }
.announce-view { flex: 1; overflow: hidden; display: flex; align-items: center; }
.announce-run { display: inline-flex; gap: 40px; padding-left: 20px; white-space: nowrap; animation: ticker 45s linear infinite; }
.announce.paused .announce-run, .announce-view:hover .announce-run, .announce-view:focus-within .announce-run { animation-play-state: paused; }
.announce-run a { color: var(--c-text); text-decoration: none; font-weight: 500; }
.announce-run a:hover { text-decoration: underline; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .announce-run { animation: none; overflow-x: auto; }
  .hero-track { transition: none; }
}

.banner-link { display: block; margin-top: 16px; border-radius: 8px; overflow: hidden; }
.banner-link img { width: 100%; display: block; }

/* ---------- 6. Content layout ---------- */
main { display: block; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-block: 24px 40px; }
.card { background: var(--c-surface-alt); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 22px; }
.card > h2.card-title, .card-title {
  font-size: 1.15rem; color: var(--c-primary); margin: 0 0 14px; padding-bottom: 10px; border-bottom: 2px solid var(--c-accent-soft);
}
html[data-theme="dark"] .card-title { color: var(--c-text); }
.stack > * + * { margin-top: 24px; }

/* Tabs */
.tablist { display: flex; flex-wrap: wrap; gap: 4px 20px; border-bottom: 1px solid var(--c-border); margin-bottom: 8px; }
.tablist [role="tab"] {
  background: transparent; border: 0; border-bottom: 3px solid transparent; padding: 12px 4px; color: var(--c-text-muted); font-size: .98rem;
}
.tablist [role="tab"]:hover { color: var(--c-accent); }
.tablist [role="tab"][aria-selected="true"] { color: var(--c-text); border-bottom-color: var(--c-accent); font-weight: 700; }
.tabpanel[hidden] { display: none; }

.link-list li { border-bottom: 1px solid var(--c-border); }
.link-list li:last-child { border-bottom: 0; }
.link-list a {
  display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: flex-start; padding: 14px 4px 14px 22px; position: relative;
  color: var(--c-text); text-decoration: none;
}
.link-list a::before { content: ""; position: absolute; left: 4px; top: 21px; width: 7px; height: 7px; border-top: 2px solid var(--c-accent); border-right: 2px solid var(--c-accent); transform: rotate(45deg); }
.link-list a:hover { color: var(--c-accent); text-decoration: underline; }
.link-list img { width: auto; height: 16px; vertical-align: middle; }
.file-size { font-size: .85rem; color: var(--c-text-muted); }
.more-row { display: flex; justify-content: space-between; gap: 16px; margin-top: 14px; font-weight: 700; }
.more-row a { color: var(--c-text); }
.more-row a:hover { color: var(--c-accent); }
.social-embeds { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); padding-top: 12px; }
.social-embeds iframe { min-height: 415px; border: 0; }

/* Photo gallery */
.album-list li { display: grid; grid-template-columns: 140px 1fr; gap: 18px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--c-border); }
.album-list li:last-child { border-bottom: 0; }
.album-list img { width: 140px; height: 84px; object-fit: cover; border-radius: 4px; }
.album-list .kind { display: block; font-size: .9rem; color: var(--c-text-muted); }
.album-list a { color: var(--c-text); text-decoration: none; }
.album-list a:hover { text-decoration: underline; color: var(--c-accent); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.card-head .card-title { flex: 1; }

/* Related websites */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 16px; }
.tile { display: grid; place-items: center; min-height: 100px; padding: 12px; background: #fff; border: 1px solid var(--c-border); border-radius: 8px; }
.tile:hover { box-shadow: var(--shadow); border-color: var(--c-accent); }
.tile img { max-height: 76px; object-fit: contain; }

/* Sidebar cards */
.amb { text-align: center; }
.amb img { width: 160px; max-width: 60%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; margin-inline: auto; display: block; }
.amb h2 { font-size: 1.2rem; margin: 16px 0 4px; color: var(--c-primary); }
.amb p { color: var(--c-text-muted); margin-bottom: 14px; }
.btn-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 18px; font-weight: 600; text-decoration: none;
  color: var(--c-accent); background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 8px;
}
.btn:hover { background: var(--c-accent-soft); }
.btn-primary { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }
html[data-theme="dark"] .btn-primary { color: #0a1630; }
.btn-primary:hover { background: var(--c-accent-hover); color: #fff; }
html[data-theme="dark"] .btn-primary:hover { color: #0a1630; }


.imp-list a { display: flex; gap: 12px; align-items: center; padding: 11px 4px; color: var(--c-text); text-decoration: none; border-bottom: 1px solid var(--c-border); }
.imp-list li:last-child a { border-bottom: 0; }
.imp-list a:hover { color: var(--c-accent); text-decoration: underline; }
.imp-list img { width: 32px; height: 32px; object-fit: contain; flex: none; }

/* ---------- 7. Footer ---------- */
.site-footer { background: var(--c-primary); color: var(--c-on-dark); margin-top: 48px; }
.footer-grid { display: grid; gap: 32px; padding-block: 44px 32px; grid-template-columns: 1fr; }
.footer-col h2 { color: #fff; font-size: 1.35rem; margin-bottom: 20px; padding-bottom: 12px; position: relative; }
.footer-col h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 60px; height: 4px; border-radius: 2px; background: #6b8cff; }
.footer-col a { color: #fff; text-decoration: none; }
.footer-col a:hover { text-decoration: underline; }
.f-list li { margin-bottom: 14px; display: flex; gap: 14px; align-items: flex-start; }
.f-list .icon { flex: none; margin-top: 3px; opacity: .9; }
.f-list small { display: block; color: #d6defa; }
.f-links li { margin-bottom: 14px; }
.f-links a { display: inline-flex; gap: 10px; align-items: center; }
.f-links a::before { content: ""; width: 7px; height: 7px; border-top: 2px solid #fff; border-right: 2px solid #fff; transform: rotate(45deg); margin-right: 4px; }
.f-social { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.f-social a { width: 52px; height: 52px; border: 2px solid rgba(255, 255, 255, .7); border-radius: 50%; display: grid; place-items: center; }
.f-social a:hover { background: rgba(255, 255, 255, .15); }
.f-map { border-radius: 10px; overflow: hidden; background: #dfe5f5; }
.f-map iframe { width: 100%; height: 250px; border: 0; display: block; }
.f-dir { display: inline-flex; margin-top: 14px; gap: 8px; font-weight: 700; }
.footer-base { border-top: 1px solid rgba(255, 255, 255, .25); padding-block: 22px 30px; font-size: .98rem; }
.footer-base p { margin-bottom: 12px; }
.footer-base a { color: #fff; }
.footer-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; }
.footer-meta .sep { width: 1px; height: 22px; background: rgba(255, 255, 255, .4); }
.footer-copy { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.link-btn { background: transparent; border: 0; color: #fff; text-decoration: underline; padding: 8px 0; }
.footer-copy img { height: 42px; width: auto; background: #fff; border-radius: 4px; padding: 2px; }

/* ---------- 8. Cookie banner + dialogs ---------- */
.cookie-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 3000; background: var(--c-surface); color: var(--c-text);
  border-top: 3px solid var(--c-accent); box-shadow: 0 -6px 20px rgba(0, 0, 0, .18); padding: 18px 0;
}
.cookie-bar[hidden] { display: none; }
.cookie-in { display: grid; gap: 14px; align-items: center; }
.cookie-in h2 { font-size: 1.05rem; margin: 0 0 4px; color: var(--c-primary); }
html[data-theme="dark"] .cookie-in h2 { color: var(--c-text); }
.cookie-in p { margin: 0; }
.cookie-act { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cookie-act .btn { min-height: 48px; font-weight: 700; }
.cookie-act .btn-accept { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }
html[data-theme="dark"] .cookie-act .btn-accept { color: #0a1630; }
.cookie-act .btn-link { background: transparent; border: 0; text-decoration: underline; }

.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .65); z-index: 4000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-back[hidden] { display: none; }
.modal { position: relative; background: var(--c-surface); color: var(--c-text); border-radius: var(--radius); max-width: 640px; width: 100%; max-height: 92vh; overflow: auto; padding: 26px; box-shadow: var(--shadow); }
.modal.wide { max-width: 860px; }
.modal h2 { margin-top: 0; padding-right: 56px; }
.modal-x {
  position: absolute; top: 10px; right: 10px; width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--c-primary);
  background: var(--c-surface); color: var(--c-primary); display: grid; place-items: center; font-size: 1.3rem; line-height: 1;
}
html[data-theme="dark"] .modal-x { color: var(--c-text); border-color: var(--c-text); }
.modal-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; margin-top: 20px; }
.pref { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--c-border); align-items: flex-start; }
.pref input { width: 22px; height: 22px; margin-top: 4px; accent-color: var(--c-accent); flex: none; }
.pref label { font-weight: 700; display: block; }
.pref small { display: block; color: var(--c-text-muted); font-weight: 400; }
.popup-img { width: 100%; height: auto; display: block; border-radius: 6px; }

/* ---------- 9. Accessibility modifiers (set on <html>) ---------- */
html.a11y-contrast body, html.a11y-contrast .card, html.a11y-contrast .site-header, html.a11y-contrast .top-strip,
html.a11y-contrast .mega, html.a11y-contrast .modal, html.a11y-contrast .cookie-bar, html.a11y-contrast .tile,
html.a11y-contrast .a11y-panel, html.a11y-contrast .lang-list, html.a11y-contrast .search-form input { background: #000 !important; color: #fff !important; border-color: #fff !important; }
html.a11y-contrast a, html.a11y-contrast .card-title, html.a11y-contrast h1, html.a11y-contrast h2, html.a11y-contrast h3,
html.a11y-contrast .brand-name { color: #ffeb3b !important; }
html.a11y-contrast .main-nav, html.a11y-contrast .site-footer, html.a11y-contrast .drawer { background: #000 !important; border-top: 2px solid #ffeb3b; }
html.a11y-contrast .site-footer a, html.a11y-contrast .nav-link, html.a11y-contrast .nav-btn, html.a11y-contrast .drawer a { color: #ffeb3b !important; }
html.a11y-contrast .a11y-opt, html.a11y-contrast .tool-btn, html.a11y-contrast .btn { background: #000 !important; color: #ffeb3b !important; border: 1px solid #ffeb3b !important; }
html.a11y-invert .page-wrap { filter: invert(1) hue-rotate(180deg); }
html.a11y-invert .page-wrap img, html.a11y-invert .page-wrap video, html.a11y-invert .page-wrap iframe { filter: invert(1) hue-rotate(180deg); }
html.a11y-sat-1 .page-wrap { filter: saturate(.35); }
html.a11y-sat-2 .page-wrap { filter: saturate(2.2); }
html.a11y-sat-3 .page-wrap { filter: grayscale(1); }
html.a11y-links a { text-decoration: underline !important; background: #ffeb3b !important; color: #000 !important; outline: 2px solid #000; }
html.a11y-noimg main img, html.a11y-noimg .f-map, html.a11y-noimg .hero-slide img { visibility: hidden; }
html.a11y-cursor, html.a11y-cursor * { cursor: default !important; }

/* ---------- 10. Responsive ---------- */
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .cookie-in { grid-template-columns: 1fr auto; gap: 28px; }
}
@media (min-width: 1100px) {
  .home-grid { grid-template-columns: minmax(0, 1fr) 380px; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
}
@media (max-width: 1023px) {
  .main-nav { display: none; }
  .search-toggle, .menu-toggle { display: grid; }
  .header-main { padding-block: 8px; }
  .brand { padding-bottom: 8px; border-bottom: 1px solid var(--c-border); }
  .search-form { display: none; max-width: none; }
  .search-form.open { display: flex; }
  .a11y-panel { position: fixed; left: 12px; right: 12px; top: 120px; width: auto; max-height: calc(100vh - 140px); overflow: auto; }
  .lang-list { right: auto; left: 0; }
  .hero-slide { aspect-ratio: 16 / 10; }
  .hero-ctrl { right: 10px; bottom: 10px; }
  .hero-ctrl button { width: 40px; height: 40px; }
  .hero-cap { padding: 44px 180px 14px 16px; }
  .header-main { grid-template-columns: 1fr; gap: 6px; }
  .brand img { height: 64px; }
  .tool-btn, .tool-wrap .tool-btn { width: 56px; height: 48px; }
  .tools > .skip-tool { display: none; }
  .tools { justify-content: space-between; }
  .top-strip { font-size: .8rem; }
  .top-strip .container { padding-inline: 10px; }
  .clock img { width: 28px; height: 18px; }
}
@media (max-width: 599px) {
  .clock .tz-full { display: none; }
  .album-list li { grid-template-columns: 96px 1fr; gap: 12px; }
  .album-list img { width: 96px; height: 64px; }
  .card { padding: 16px; }
  .brand img { height: 56px; }
  .hero-slide { aspect-ratio: 4 / 3; }
  .hero-cap { padding: 36px 14px 14px; font-size: .95rem; }
  .hero-ctrl { top: 10px; bottom: auto; }
  .clock .clock-date { display: none; }
  .brand-text .brand-name { font-size: 1.05rem; }
  .brand-text .brand-place { font-size: .95rem; }
  .announce { flex-direction: column; }
  .modal { padding: 20px 16px; }
  .more-row { flex-direction: column; }
}
@media print {
  .top-strip, .main-nav, .tools, .search-form, .cookie-bar, .hero-ctrl, .modal-back { display: none !important; }
}


/* Stay connected with MEA */
.connect-logo { display: block; background: #fff; border: 1px solid var(--c-border); border-radius: 8px; padding: 14px 18px; margin-bottom: 18px; }
.connect-logo img { display: block; width: 100%; max-width: 280px; height: auto; margin-inline: auto; }
.connect-logo:hover { box-shadow: var(--shadow); border-color: var(--c-accent); }
.connect-lead { margin: 0 0 14px; color: var(--c-text-muted); font-size: .95rem; }
.connect-icons { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.connect-icons a { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--c-primary); color: #fff; border: 2px solid var(--c-primary); text-decoration: none; }
.connect-icons a:hover { background: #fff; color: var(--c-primary); }
html[data-theme="dark"] .connect-icons a { background: var(--c-accent); color: #0a1630; border-color: var(--c-accent); }

/* Full-width promotional banners */
.promo { display: block; border-radius: 8px; overflow: hidden; }
.promo img { display: block; width: 100%; height: auto; }
.promo:hover { box-shadow: var(--shadow); }

/* Related websites (video + logo tiles) */
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.related-grid .tile { min-height: 150px; padding: 14px; }
.related-grid .tile img { max-height: 110px; width: auto; max-width: 100%; }
.tile-video { position: relative; padding: 0 !important; overflow: hidden; background: #000 !important; }
.tile-video video { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-toggle { position: absolute; right: 8px; bottom: 8px; width: 40px; height: 40px; border-radius: 50%; border: 2px solid #fff; background: rgba(13, 28, 70, .85); color: #fff; display: grid; place-items: center; }
.video-toggle:hover { background: #fff; color: var(--c-primary); }

/* Hide the Google Translate top banner / tooltips so the layout is not pushed down */
iframe.goog-te-banner-frame, iframe.skiptranslate, #goog-gt-tt, .goog-te-balloon-frame, .goog-tooltip { display: none !important; }
body { top: 0 !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }

/* SVG elements do not get the UA [hidden] rule */
[hidden] { display: none !important; }

/* =========================================================================
   Inner pages (page-banner / page-layout / page-main / page-side)
   ========================================================================= */
.page-banner { background: var(--c-primary); color: var(--c-on-dark); }
.page-banner-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 96px; padding-block: 18px; }
.page-banner h1 { margin: 0; color: var(--c-on-dark) !important; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); font-weight: 500; }
.page-banner-icon { width: 56px; height: 56px; object-fit: contain; flex: none; }

.page-layout { display: grid; gap: 28px; padding-block: 24px 48px; align-items: start; }
.page-layout.has-side { grid-template-columns: minmax(0, 1fr) 320px; }
.page-main { min-width: 0; }

.page-crumb { font-size: .9rem; margin-bottom: 18px; color: var(--c-text-muted); }
.page-crumb a { color: var(--c-accent); }
.page-crumb a:hover { text-decoration: underline; }

.page-side { background: var(--c-surface-alt); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.page-side h2, .page-side h3 { font-size: 1.25rem; margin-bottom: .6em; }
.page-side li { border-bottom: 1px solid var(--c-border); }
.page-side li:last-child { border-bottom: 0; }
.page-side li a { display: block; padding: 9px 4px 9px 18px; position: relative; color: var(--c-text); text-decoration: none; }
.page-side li a::before { content: ""; position: absolute; left: 2px; top: 1.15em; width: 6px; height: 6px; border-right: 2px solid var(--c-accent); border-top: 2px solid var(--c-accent); transform: rotate(45deg); }
.page-side li a:hover, .page-side li a.selected, .page-side li.active > a { color: var(--c-accent); text-decoration: underline; }

/* Legacy CMS content (inline-styled HTML from the database) */
.mcontent { overflow-wrap: anywhere; }
.mcontent h2, .mcontent h3, .mcontent h4 { margin-top: 1.2em; }
.mcontent img { max-width: 100%; height: auto; }
.mcontent ul { list-style: disc; padding-left: 1.4em; margin-bottom: 1em; }
.mcontent ol { list-style: decimal; padding-left: 1.4em; margin-bottom: 1em; }
.mcontent table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.mcontent th, .mcontent td { border: 1px solid var(--c-border); padding: 8px 10px; text-align: left; vertical-align: top; }
.mcontent th { background: var(--c-surface-alt); }
.mcontent iframe { aspect-ratio: 16/9; height: auto; }
html[data-theme="dark"] .mcontent [style*="color"] { color: inherit !important; }
html[data-theme="dark"] .mcontent [style*="background"] { background: transparent !important; }

@media (max-width: 1023px) {
  .page-layout.has-side { grid-template-columns: 1fr; }
  .page-side { order: 2; }
}
@media print { .page-side, .page-banner-icon { display: none; } .page-banner { background: none; color: #000; } .page-banner h1 { color: #000 !important; } }

/* Menu extras + HTML produced by the legacy helpers (getRightContent / get_breadcrumbs) */
.f-meta { font-size: .78em; color: var(--c-text-muted); white-space: nowrap; }
.page-crumb ul.breadcrumb, .page-crumb ul.breadcrumb li { display: inline; margin: 0; padding: 0; }
.page-crumb .bdrNoLink { display: inline; }
.page-crumb span { margin-right: .25em; }
.page-crumb span:last-child { color: var(--c-text); font-weight: 600; }
.page-side .leftMenu { display: block; }
.page-side .menuTitle { display: block; font-size: 1.35rem; font-weight: 600; color: var(--c-primary); margin-bottom: .5em; }
html[data-theme="dark"] .page-side .menuTitle { color: var(--c-text); }
.page-side ul#menuLeft { margin: 0; padding: 0; }

/* ---- inner page refinements (accessible breadcrumb, tools, sidebar nav) ---- */
.page-bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-bar .page-crumb { margin: 0; flex: 1 1 auto; min-width: 0; }
.page-crumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; margin: 0; padding: 0; list-style: none; }
.page-crumb ol li { display: inline-flex; align-items: center; }
.page-crumb ol li + li::before { content: "/"; margin: 0 .55em; color: var(--c-text-muted); }
.page-crumb [aria-current="page"] { color: var(--c-text); font-weight: 600; }
.page-print { display: inline-flex; align-items: center; gap: 6px; background: transparent; color: var(--c-accent); border: 1px solid var(--c-border); border-radius: 8px; padding: 6px 12px; font: inherit; font-size: .88rem; cursor: pointer; min-height: 40px; }
.page-print:hover { background: var(--c-accent-soft); }
.page-print .icon { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.page-updated { margin-top: 2em; padding-top: 12px; border-top: 1px solid var(--c-border); font-size: .88rem; color: var(--c-text-muted); }
.page-main:focus { outline: none; }
.side-title { font-size: 1.3rem; font-weight: 600; margin: 0 0 .5em; }
.page-side a[aria-current="page"] { color: var(--c-accent); font-weight: 600; }
.page-side { position: sticky; top: 16px; }
@media (max-width: 1023px) { .page-side { position: static; } }
@media print { .page-print { display: none; } }

/* =========================================================================
   Lists, gallery, pagination, forms, lightbox (inner pages)
   ========================================================================= */
.page-heading { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem); margin-bottom: .8em; }
.empty-note { color: var(--c-text-muted); padding: 16px 0; }

/* document / link lists */
.doc-list { display: grid; gap: 0; border-top: 1px solid var(--c-border); }
.doc-item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 12px 4px; border-bottom: 1px solid var(--c-border); }
.doc-item a { color: var(--c-accent); font-weight: 500; text-decoration: none; display: inline-flex; align-items: baseline; gap: 6px; }
.doc-item a:hover .doc-name { text-decoration: underline; }
.doc-ico { flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; align-self: center; }
.badge-new { background: var(--c-danger); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; }

/* photo gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.gal-text { grid-column: 1 / -1; }
.gal-item figure { margin: 0; background: var(--c-surface-alt); border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; height: 100%; display: flex; flex-direction: column; }
.gal-item a { display: block; line-height: 0; }
.gal-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .25s; }
.gal-item a:hover img, .gal-item a:focus-visible img { transform: scale(1.03); }
.gal-item a { overflow: hidden; }
.gal-item figcaption { padding: 10px 12px; font-size: .92rem; line-height: 1.4; }

/* lightbox (native <dialog>) */
.lb { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100%; height: 100%; }
.lb::backdrop { background: rgba(5, 10, 25, .88); }
.lb-box { position: relative; width: 100%; height: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 56px 12px 16px; }
.lb-fig { margin: 0; text-align: center; color: #fff; min-width: 0; }
.lb-fig img { max-width: 100%; max-height: calc(100vh - 150px); width: auto; margin-inline: auto; border-radius: 6px; background: #000; }
.lb-fig figcaption { margin-top: 10px; font-size: .95rem; }
.lb-close, .lb-prev, .lb-next { background: rgba(255, 255, 255, .15); color: #fff; border: 1px solid rgba(255, 255, 255, .4); width: 48px; height: 48px; border-radius: 50%; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255, 255, 255, .3); }
.lb-close { position: absolute; top: 8px; right: 12px; }
@media (max-width: 599px) { .lb-box { grid-template-columns: 1fr 1fr; padding-top: 60px; } .lb-fig { grid-column: 1 / -1; order: -1; } .lb-prev, .lb-next { justify-self: center; } }

/* pagination (bootstrap-style markup from Laravel) */
.pager { margin-top: 24px; }
.pager nav, .pager .pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pager .pagination { margin: 0; padding: 0; list-style: none; }
.pager .page-link, .pager .page-item span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; padding: 0 12px; border: 1px solid var(--c-border); border-radius: 8px; background: var(--c-surface); color: var(--c-accent); text-decoration: none; }
.pager .page-link:hover { background: var(--c-accent-soft); }
.pager .active .page-link, .pager .active span { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }
.pager .disabled .page-link, .pager .disabled span { color: var(--c-text-muted); opacity: .6; }
.pager p.small, .pager .d-none { display: none; }
.pager svg { width: 1rem; height: 1rem; }

/* forms */
.dbim-form { display: grid; gap: 18px; max-width: 640px; margin-top: 18px; }
.dbim-form .field { display: grid; gap: 6px; }
.dbim-form label, .dbim-form .label-like { font-weight: 600; }
.req { color: var(--c-danger); }
.dbim-form input[type="text"], .dbim-form input[type="email"], .dbim-form textarea {
  width: 100%; font: inherit; color: var(--c-text); background: var(--c-surface);
  border: 1.5px solid #6b7690; border-radius: 8px; padding: 10px 12px; min-height: 44px;
}
.dbim-form textarea { resize: vertical; }
.dbim-form [aria-invalid="true"] { border-color: var(--c-danger); box-shadow: 0 0 0 1px var(--c-danger); }
.dbim-form .err { color: var(--c-danger); font-size: .9rem; margin: 0; min-height: 0; }
.dbim-form .err:empty { display: none; }
.dbim-form .hint, .form-note { color: var(--c-text-muted); font-size: .9rem; margin: 0; }
.captcha-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.captcha-row img { border: 1px solid var(--c-border); border-radius: 6px; background: #fff; max-width: 100%; height: auto; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.btn-primary, .btn-ghost { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 600; min-height: 44px; padding: 0 22px; border-radius: 8px; cursor: pointer; }
.btn-primary { background: var(--c-accent); color: #fff; border: 1px solid var(--c-accent); }
html[data-theme="dark"] .btn-primary { color: #0b1226; }
.btn-primary:hover { background: var(--c-accent-hover); }
.btn-primary:disabled { opacity: .6; cursor: progress; }
.btn-ghost { background: transparent; color: var(--c-accent); border: 1px solid var(--c-border); padding: 0 16px; }
.btn-ghost:hover { background: var(--c-accent-soft); }
.btn-ghost .icon { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.alert { border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px; border: 1px solid; }
.alert:focus { outline-offset: 2px; }
.alert-ok { background: #e6f4ea; color: #14532d; border-color: #86c79a; }
.alert-err { background: #fdecea; color: #7a1410; border-color: #e5a29d; }
html[data-theme="dark"] .alert-ok { background: #0f2a1a; color: #bfe8cc; border-color: #2e6b45; }
html[data-theme="dark"] .alert-err { background: #33100e; color: #f5c6c2; border-color: #7a2b26; }
