/*
 * ADBWC refresh layer. Loaded after the original SharePoint-era stylesheets
 * (bootstrap.css, style.css, style-ar.css) and adjusts them for accessibility
 * (WCAG 2.1 AA), modern layout and the new components.
 */
:root {
  --brand: #aa3339;
  --brand-dark: #8a2a2f;
  --ink: #333;
  --muted: #595959; /* 7:1 on white; replaces #999/#aaa grey text */
  --line: #e8e8e8;
  --surface: #f6f4f4;
  --focus: #1a5fb4;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body { background: #fff; color: var(--ink); }
img, video, iframe { max-width: 100%; }
img { height: auto; }

/* ---------- Arabic typography ---------- */
html[lang="ar"] body,
html[lang="ar"] body *:not(.fa):not([class^="icon"]):not(.caret) {
  font-family: "Noto Kufi Arabic", Tahoma, sans-serif !important; /* style-ar.css forces Droid Arabic Kufi with !important */
}

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute; inset-inline-start: 1rem; top: -100px; z-index: 10000;
  background: var(--brand); color: #fff; padding: .75rem 1.25rem; border-radius: 0 0 6px 6px; font-weight: 700;
}
.skip-link:focus { top: 0; color: #fff; }
:focus-visible { outline: 3px solid var(--focus) !important; outline-offset: 2px; }
main:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.lead, .album-added-date, .p_date_s, .news_list_itm aside > span, .news_list_itm time { color: var(--muted) !important; }
/* Footer sits on a dark grey background: keep secondary text light enough for 4.5:1. */
.footer label, .footer h6, .footer p, .footer span { color: #d9d9d9 !important; }
.footer a { color: #fff; }
@media (max-width: 767px) { .ftr_last_cnr section { padding: 0 16px; } }
a { text-underline-offset: 2px; }
.page-heading { font-family: "Playfair Display", serif; color: var(--brand); margin: 30px 0 20px; font-size: 32px; line-height: 1.3; }
html[lang="ar"] .page-heading { font-size: 28px; }
.h3 { font-size: 20px; }
.h6 { font-size: 14px; margin: 0 0 8px; }

/* Contrast fixes for the original palette (all >= 4.5:1). */
.top_header { background-color: #5c5c5c !important; }
.explore-more-links h6 { color: var(--muted) !important; }
.explore-more-links ul li a { color: #595959 !important; border-color: #949494 !important; }
.location-map-wrapper .nav-tabs li .contact-name,
.location-map-wrapper .nav-tabs li span,
.location-map-wrapper .nav-tabs li span a { color: #595959 !important; }
.location-map-wrapper .nav-tabs li.active .contact-name,
.location-map-wrapper .nav-tabs li.active span,
.location-map-wrapper .nav-tabs li.active span a { color: #fff !important; }
[data-toggle][tabindex], .nav-tabs li[data-toggle] { cursor: pointer; }
.tab-trigger { display: inline-block; margin-top: 8px; background: none; border: 1px solid currentColor; border-radius: 3px; padding: 2px 10px; font-size: 13px; color: var(--brand); }
.nav-tabs li.active .tab-trigger { color: #fff; }

/* ---------- Header ---------- */
.site-header { display: contents; }
.second_header { position: sticky; top: 0; z-index: 1000; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.06); float: none; } /* the original float let content slide under the menu bar */
.top_header .container { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.top_header .chamber-link { margin-inline-end: auto; }
.top_header .log_ar_cnr { position: relative; float: none; margin: 0; }
.top_header .chamber_logo { width: auto !important; height: 41px; }
@media (max-width: 767px) {
  .top_header .chamber_logo { display: block !important; height: 30px; }
  .top_header .container { flex-wrap: nowrap; gap: 12px; }
  .top_header .log_ar_cnr { width: auto !important; padding: 0 !important; }
}
.adwbc_logo { width: 300px !important; height: auto; max-width: 100%; }
.menu-button {
  background: none; border: 0; padding: 15px 12px; font: inherit; color: inherit; cursor: pointer;
  text-transform: inherit; letter-spacing: inherit; display: block;
}
/* Top-level menu: Home is a link, the others are buttons; give both the same look. */
.navbar-nav > li > a, .navbar-nav > li > .menu-button {
  color: #000; font-size: 14px; font-weight: 700; text-transform: uppercase; line-height: 20px; padding: 10px 15px;
}
@media (min-width: 768px) { .navbar-nav > li > a, .navbar-nav > li > .menu-button { padding: 30px 12px; } }
.navbar-nav > li > a:hover, .navbar-nav > li > a:focus, .navbar-nav > li > .menu-button:hover, .navbar-nav > li.open > .menu-button { color: var(--brand); background: transparent; }
.dropdown-submenu > .menu-button { width: 100%; text-align: start; padding: 6px 20px; font-weight: 400; color: #333; }
.dropdown-submenu.open > .dropdown-menu { display: block; position: static; float: none; box-shadow: none; border: 0; padding-inline-start: 12px; }
.search-trigger, .search-trigger:hover, .search-trigger:focus { background: transparent !important; border: 0; padding: 6px; display: inline-flex; min-width: 32px; min-height: 32px; align-items: center; justify-content: center; }
@media (min-width: 768px) {
  .navbar-nav > li.dropdown:focus-within > .dropdown-menu { display: block; }
}
@media (max-width: 767px) {
  .navbar-collapse.collapse.in { display: block !important; max-height: 75vh; overflow-y: auto; }
  .navbar-nav .dropdown-menu { position: static; float: none; box-shadow: none; }
}

/* ---------- Content ---------- */
.service_items { display: flex; flex-wrap: wrap; justify-content: center; float: none; }
.service_items .serv_itm { float: none; }
.inne_cnr { min-height: 40vh; }
.news_list_itm article { margin-bottom: 30px; }
.news_list_itm .thumb { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.news_list_itm h2 a { color: var(--ink); }
.news_list_itm h2 a:hover { color: var(--brand); }
.news-banners { width: 100% !important; height: auto !important; max-width: 100% !important; clear: both; }
.news-banners img { width: 100% !important; max-height: 520px; object-fit: cover; border-radius: 4px; margin-bottom: 20px; }
.news-body p { font-size: 17px !important; line-height: 1.9 !important; text-align: start !important; }
.more_ev_new a { display: block; }

/* ---------- Albums ---------- */
.albums-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; }
.albums-list::before, .albums-list::after { display: none; }
.albums-list li { width: auto; float: none; padding: 0; margin: 0; }
.albums-list .album-count { position: absolute; bottom: 10px; inset-inline-start: 10px; z-index: 1; background: rgba(0,0,0,.72); border-radius: 3px; padding: 2px 10px; }
.albums-list .album-count p { color: #fff !important; margin: 0; font-size: 13px; }
.albums-list .md-thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface); height: auto !important; }
.albums-list .md-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.albums-list .md-albums:hover img { transform: scale(1.04); }
.albums-list .album-title { font-size: 17px; color: var(--ink); margin: 4px 0 0; line-height: 1.4; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; padding: 0; margin: 20px 0; }
.album-grid li { width: auto; float: none; padding: 0; list-style: none; }
.album-thumb { display: block; width: 100%; padding: 0; border: 0; background: var(--surface); cursor: zoom-in; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px; }
.album-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.album-thumb:hover img { transform: scale(1.04); }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(0,0,0,.92); }
.lightbox figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lightbox img { max-width: 92vw; max-height: 86vh; object-fit: contain; }
.video-thumb { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; font-size: 48px; color: #fff; background: #333; }
.lightbox iframe, .lightbox video { width: min(92vw, 1280px); aspect-ratio: 16 / 9; max-height: 86vh; border: 0; background: #000; }
.lightbox figcaption { color: #fff; margin-top: 10px; }
.lightbox button { position: fixed; background: rgba(0,0,0,.5); color: #fff; border: 0; font-size: 34px; width: 52px; height: 52px; border-radius: 50%; cursor: pointer; line-height: 1; }
.lightbox-close { top: 16px; inset-inline-end: 16px; }
.lightbox-prev { top: 50%; inset-inline-start: 16px; }
.lightbox-next { top: 50%; inset-inline-end: 16px; }
html[dir="rtl"] .lightbox-prev, html[dir="rtl"] .lightbox-next { transform: scaleX(-1); }

/* ---------- Feedback ---------- */
.feedback_cnr { position: fixed; bottom: 90px; inset-inline-end: 14px; z-index: 999; }
.feedback-smiley { background: #fff; border: 0; border-radius: 50%; padding: 4px; box-shadow: 0 2px 10px rgba(0,0,0,.2); cursor: pointer; width: 48px; height: 48px; }
.feedback-smiley img { width: 100%; height: 100%; }
.feedback-dialog { border: 0; border-radius: 10px; padding: 24px; width: min(560px, calc(100vw - 32px)); max-height: 90vh; overflow: auto; color: var(--ink); }
.feedback-dialog::backdrop { background: rgba(0,0,0,.5); }
.feedback-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.feedback-head h2 { font-size: 22px; margin: 0; color: var(--brand); }
.feedback-head .close { font-size: 28px; background: none; border: 0; opacity: .8; }
.rating-group { border: 0; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.rating-group legend { font-size: 15px; font-weight: 700; border: 0; margin-bottom: 6px; width: 100%; }
.rating-group label { border: 1px solid var(--line); border-radius: 20px; padding: 4px 12px; font-weight: 400; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.rating-group label:has(input:checked) { border-color: var(--brand); background: #fbeeee; }
.rating-group input { accent-color: var(--brand); margin: 0; }
.feedback-dialog .field { display: block; font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.feedback-dialog .field input, .feedback-dialog .field textarea { display: block; width: 100%; border: 1px solid #949494; border-radius: 4px; padding: 8px; font-weight: 400; margin-top: 4px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.feedback-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.feedback-actions .register-btn { background: var(--brand); color: #fff; border: 0; padding: 10px 26px; border-radius: 4px; font-weight: 700; }
.feedback-status.ok { color: #1e6b34; }
.feedback-status.fail { color: #a4161a; }
.hp { position: absolute; inset-inline-start: -9999px; }

/* ---------- Search ---------- */
.search-page { padding-bottom: 60px; }
.site-search-form { display: flex; gap: 10px; margin: 10px 0 24px; max-width: 720px; }
.site-search-form input { flex: 1; border: 1px solid #949494; border-radius: 4px; padding: 10px 12px; font-size: 16px; }
.site-search-form .register-btn { background: var(--brand); color: #fff; border: 0; padding: 10px 24px; border-radius: 4px; font-weight: 700; }
.search-count { color: var(--muted); }
.search-results { list-style: none; padding: 0; max-width: 860px; }
.search-results li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.search-results h2 { margin: 0 0 4px; }
.search-results h2 a { color: var(--brand); }
.search-results time { color: var(--muted); font-size: 13px; }
.search-results p { margin: 6px 0 0; color: var(--ink); }

/* ---------- 404 ---------- */
.not-found-page { font-family: Lato, "Noto Kufi Arabic", sans-serif; margin: 0; }
.not-found-page main { max-width: 720px; margin: 60px auto; padding: 0 16px; text-align: center; }
.not-found-page h1, .not-found-page .h1 { color: var(--brand); font-size: 30px; }
.not-found-page section { margin: 30px 0; }
.not-found-page a { color: var(--brand); font-weight: 700; }
.nf-logo { max-width: 260px; }

/* ---------- Logo cards: MoUs and Partners (the original cards had fixed heights) ---------- */
.partner_links { display: flex; flex-wrap: wrap; }
.partner_links::before, .partner_links::after { display: none; }
.partner_links > .links_sty { display: flex; float: none; margin-bottom: 24px; }
.partner_links .links_sty > a { display: flex; width: 100%; text-decoration: none; }
.partner_links .links_sty section {
  height: auto !important; min-height: 190px; width: 100%; margin: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 24px 18px; text-align: center; overflow: hidden;
}
.partner_links .links_sty section br { display: none; }
.partner_links .links_sty section img {
  display: block; width: auto !important; max-width: 100%; max-height: 90px; height: auto; object-fit: contain; margin: 0 auto !important;
}
.partner_links .links_sty h5 { margin: 6px 0 0; line-height: 1.45; overflow-wrap: anywhere; }
.partner_links .links_sty span { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }

/* ---------- Event cards (home page and Events and Activities) ---------- */
.home-events { padding: 48px 0 56px; }
.home-events-head { text-align: center; max-width: 720px; margin: 0 auto 32px; }
.home-events-head h2, .home-events > h2 { color: var(--brand); font-size: 32px; margin: 0 0 10px; }
.home-events-head p { color: var(--muted); font-size: 17px; margin: 0; }
.event-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.event-card a {
  display: flex; gap: 18px; height: 100%; padding: 22px; background: #fff; color: var(--ink); text-decoration: none;
  border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: 6px; box-shadow: 0 2px 10px rgba(0,0,0,.05);
  transition: box-shadow .2s, transform .2s;
}
.event-card a:hover, .event-card a:focus-visible { box-shadow: 0 8px 24px rgba(0,0,0,.12); transform: translateY(-2px); color: var(--ink); }
.event-date {
  flex: 0 0 74px; height: 80px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; border-radius: 6px; line-height: 1.1; text-align: center;
}
.event-day { font-size: 30px; font-weight: 700; }
.event-month { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.event-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.event-tag { align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--brand); background: #fbeeee; border-radius: 20px; padding: 2px 10px; }
.event-body h3 { font-size: 17px; line-height: 1.45; margin: 0; color: var(--ink); }
.event-meta { margin: 0; color: var(--muted); font-size: 14px; }
.event-meta .fa { color: var(--brand); margin-inline-end: 4px; }
.event-more { margin-top: auto; padding-top: 6px; font-size: 14px; font-weight: 700; color: var(--brand); }
.event-more::after { content: " →"; }
html[dir="rtl"] .event-more::after { content: " ←"; }
.event-all { text-align: center; margin: 32px 0 0; }

/* ---------- Events and Activities hub ---------- */
.events-hub-intro { font-size: 17px; color: var(--muted); max-width: 760px; }
.events-hub .home-events { padding: 16px 0 8px; }
.events-hub .home-events > h2, .events-hub-programmes { text-align: start; font-size: 24px; color: var(--brand); margin: 24px 0 18px; }
.events-hub .f_s_sec { padding-top: 0; }

/* ---------- Main menu panels (one click to every page) ---------- */
.navbar-nav .menu-panel {
  min-width: 270px; padding: 10px 0; margin-top: 0; border: 0; border-top: 3px solid var(--brand);
  border-radius: 0 0 8px 8px; box-shadow: 0 14px 34px rgba(0,0,0,.16); background: #fff;
}
.navbar-nav .menu-panel ul { list-style: none; margin: 0; padding: 0; }
/* style.css styles every ".nav > li > div" as an always-present, fade-in panel; take control of visibility here. */
.navbar-nav > li > .menu-panel { display: none; opacity: 1; visibility: visible; overflow: visible; }
.navbar-nav > li.open > .menu-panel { display: block; }
.navbar-nav .menu-panel li { float: none; width: auto; border: 0; }
.navbar-nav .menu-panel li a, .navbar-nav .menu-panel li span {
  display: block; padding: 10px 22px; color: #222; font-size: 14px; font-weight: 400; line-height: 1.45;
  text-transform: none; white-space: normal; border: 0; background: none;
}
.navbar-nav .menu-panel li a:hover, .navbar-nav .menu-panel li a:focus { background: #fbeeee; color: var(--brand); }
.menu-group-title { margin: 6px 22px 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
html[lang="ar"] .menu-group-title { letter-spacing: 0; font-size: 13px; }
@media (min-width: 768px) {
  .navbar-nav > li > .menu-panel { inset-inline-start: 0; inset-inline-end: auto; }
  .navbar-nav > li:last-child > .menu-panel, .navbar-nav > li > .menu-panel-groups { inset-inline-start: auto; inset-inline-end: 0; }
  .navbar-nav > li.dropdown:focus-within > .menu-panel { display: block; }
  .navbar-nav > li.open > .menu-panel-groups,
  .navbar-nav > li.dropdown:focus-within > .menu-panel-groups { display: grid; }
  .navbar-nav > li > .menu-panel-groups { grid-template-columns: repeat(2, minmax(250px, 1fr)); gap: 6px 10px; width: 600px; max-width: calc(100vw - 32px); padding: 16px 8px; }
  .menu-panel-groups .menu-group + .menu-group { border-inline-start: 1px solid var(--line); }
}
@media (min-width: 768px) and (hover: hover) {
  .navbar-nav > li.dropdown:hover > .menu-panel { display: block; }
  .navbar-nav > li.dropdown:hover > .menu-panel-groups { display: grid; }
}
@media (max-width: 767px) {
  .navbar-collapse .navbar-nav > li > a, .navbar-collapse .navbar-nav > li > .menu-button { padding: 14px 16px; width: 100%; text-align: start; }
  .navbar-collapse .navbar-nav > li + li { border-top: 1px solid var(--line); }
  .navbar-collapse .menu-panel { position: static; float: none; width: auto; min-width: 0; box-shadow: none; border-top: 0; border-radius: 0; background: #f7f5f5; padding: 4px 0 10px; }
  .navbar-collapse .menu-panel li a { padding: 12px 28px; font-size: 15px; color: #222; }
  .navbar-collapse .menu-group-title { margin: 14px 28px 4px; }
}

/* ---------- Pagination ---------- */
.site-pager { margin: 36px 0 12px; text-align: center; }
.site-pager-status { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.site-pager ul { list-style: none; padding: 0; margin: 0; display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.site-pager .pager-num, .site-pager .pager-step {
  display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 10px;
  border: 1px solid #c9c9c9; border-radius: 6px; color: var(--ink); background: #fff; font-weight: 700; text-decoration: none;
}
.site-pager a:hover, .site-pager a:focus-visible { border-color: var(--brand); color: var(--brand); }
.site-pager .current { background: var(--brand); border-color: var(--brand); color: #fff; }
.site-pager .disabled { opacity: .4; }
.site-pager .pager-gap { display: inline-flex; align-items: center; padding: 0 4px; color: var(--muted); }
html[dir="rtl"] .site-pager .pager-step span { display: inline-block; transform: scaleX(-1); }

/* ---------- Home: space above the first section; footer quick links ---------- */
.home-events { padding-top: 56px; }
@media (max-width: 767px) { .home-events { padding-top: 48px; } }
.event-empty { text-align: center; color: var(--muted); }
.footer-links { columns: 2; column-gap: 24px; padding: 0; margin: 0; list-style: none; }
.footer-links li { break-inside: avoid; margin: 0 0 12px; line-height: 1.4; float: none !important; display: block !important; width: auto !important; }
.ftr_sub_sec1 .footer-links { max-width: 420px; }
@media (max-width: 991px) { .ftr_sub_sec1 { margin-bottom: 24px; } }
.footer-links a { color: #fff; }
.footer-links a:hover, .footer-links a:focus { color: #f3c6c8; }

@media print {
  .site-header, footer, .feedback_cnr { display: none !important; }
}
