/* Al-Khayrat — full-width responsive overlay */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

html,
body {
  min-height: 100%;
}

body {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  position: relative !important;
  top: auto !important;
  margin: 0 !important;
}

img,
video,
object,
embed,
iframe {
  max-width: 100% !important;
  height: auto !important;
}

#container,
#container[id] {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 100vh;
  margin: 0 auto !important;
}

#container > table {
  width: 100% !important;
  max-width: 100% !important;
}

.blackbar,
.redbar,
.header,
.top_redbar,
.bottom_redbar {
  width: 100% !important;
  background-size: cover;
}

.header-bar {
  display: block;
  width: 100%;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 20px 4px;
}

.header-bar #logo,
.header-bar #meta,
.header-bar #nav_cell,
#logo,
#meta,
#nav_cell {
  display: block !important;
}

#logo {
  padding: 4px 0 !important;
  width: auto !important;
}

#logo img {
  max-height: 72px;
  width: auto !important;
}

#meta {
  text-align: right !important;
  padding: 0 !important;
  white-space: normal;
  flex: 1 1 auto;
  font-size: 12px !important;
  line-height: 1.4 !important;
}

#nav_cell,
#nav_cell[id] {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 44px;
  background-color: #1a1a1a !important;
  background-image: none !important;
  position: relative;
}

#nav_cell ul,
#nav {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: space-between;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 12px !important;
  list-style: none;
}

#nav_cell li {
  float: none !important;
  border: none !important;
  background-image: none !important;
  flex: 1 1 auto;
}

#nav_cell a,
#nav a {
  width: auto !important;
  min-height: 44px;
  padding: 12px 16px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background-image: none !important;
}

#nav_cell a:hover,
#nav_cell .current a,
#nav_cell .active a,
#nav_cell li:hover,
#nav_cell li.over,
#nav_cell .current,
#nav_cell .active {
  background-image: none !important;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin: 4px 8px 4px auto;
  padding: 0;
  border: 1px solid #dbc687;
  background: #2e0706;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #dbc687;
}

.nav-toggle:focus-visible {
  outline: 2px solid #dbc687;
  outline-offset: 2px;
}

#footer {
  width: 100% !important;
  max-width: 100% !important;
  padding: 16px 20px !important;
}

#header {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
}

.flash,
td.flash {
  display: block;
  width: 100% !important;
  line-height: 0;
}

.flash img,
td.flash img,
#header a img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 70vh;
  display: block;
  object-fit: cover;
}

#page {
  display: flex;
  align-items: flex-start;
  width: 100% !important;
  overflow: hidden;
}

#subnav {
  width: 220px !important;
  flex: 0 0 220px;
  float: none !important;
}

#subnav table {
  display: none;
}

#page_content {
  width: auto !important;
  flex: 1 1 auto;
  min-width: 0;
  float: none !important;
}

#document_content,
#document_content_full,
#past_news_document_content {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
}

#sidebar,
#past_news_sidebar {
  display: none !important;
}

#page_image {
  display: none !important;
}

.service-detail {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 28px 36px;
  align-items: start;
  width: 100%;
  padding: 8px 0 12px;
}

.service-media {
  margin: 0;
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  background: #111;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
  aspect-ratio: 4 / 3;
}

.service-media img {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: cover;
}

.service-info {
  min-width: 0;
}

.service-lead,
.service-info .document_summary,
.service-info p {
  margin: 0 0 18px;
  font-size: 15px !important;
  line-height: 1.7 !important;
  color: #333;
  text-align: left;
}

.service-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: grid;
  gap: 8px;
}

.service-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: #f6f4f1;
  border-left: 3px solid #9c0a0f;
  color: #333;
  font-size: 14px;
  line-height: 1.45;
}

.service-list li::before {
  content: "";
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: #9c0a0f;
}

.service-next {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 20px;
  padding: 0 16px;
  color: #9c0a0f !important;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid #d7c7c7;
  background: #fff;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease;
}

.service-next:hover,
.service-next:focus-visible {
  background: #9c0a0f;
  color: #fff !important;
}

.service-cards {
  display: grid;
  gap: 16px;
  width: 100%;
  padding: 4px 0 16px;
}

.service-card {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 12px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  transition: box-shadow 200ms ease, border-color 200ms ease;
}

a.service-card {
  cursor: pointer;
}

.service-card:hover,
.service-card:focus-visible {
  border-color: #c9b3b3;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}

.service-card-media {
  overflow: hidden;
  border-radius: 6px;
  background: #111;
  aspect-ratio: 4 / 3;
}

.service-card-media img {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: cover;
}

.service-card h2,
.service-card h1,
.service-card .document_link {
  margin: 0 0 6px !important;
  font-size: 18px !important;
  line-height: 1.3;
}

.service-card p {
  margin: 0;
  font-size: 14px !important;
  line-height: 1.55 !important;
  color: #555;
}

#container > table > tbody > tr > td[height] {
  display: block;
  height: auto !important;
}

.home-columns {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
  padding: 16px 20px 28px;
}

#news,
.middle,
.right {
  float: none !important;
  width: auto !important;
}

#news {
  flex: 0 0 240px;
  padding: 8px 0 !important;
}

.middle {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 0 !important;
}

.right {
  flex: 0 0 240px;
  padding: 8px 0 !important;
}

.special_alert,
.special_alert_content,
.project_spotlight,
.features,
.careers,
.title {
  width: 100% !important;
  max-width: 100% !important;
}

#document_content,
#document_content_full {
  text-align: left;
  padding: 16px 20px 28px !important;
}

#document_content > table,
#document_content table.content-list,
#project_list table {
  width: auto !important;
  max-width: 100% !important;
  margin: 0 !important;
  border-collapse: collapse;
  text-align: left;
}

#document_content table.content-list td,
#document_content > table td {
  text-align: left;
  vertical-align: middle;
}

#document_content table.content-list td:first-child,
#document_content > table td:first-child {
  width: 157px !important;
}

#document_content table.content-list img,
#document_content > table td:first-child img,
#project_list img {
  width: 150px !important;
  max-width: 150px !important;
  height: auto !important;
  margin: 0;
  display: block;
}

#document_content .document_link,
#document_content h1.document_link {
  margin: 0 0 6px;
  text-align: left;
}

.goog-te-gadget,
#google_translate_element,
.skiptranslate {
  max-width: 100%;
}

#google_translate_element,
.skiptranslate.goog-te-gadget {
  padding: 6px 12px;
}

@media (max-width: 1023px) {
  #page {
    flex-direction: column;
  }

  #subnav {
    flex: 0 0 auto;
    width: 100% !important;
    padding: 8px 12px 0 !important;
  }

  #subnav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin: 0 8px 12px !important;
  }

  #subnav li {
    border: none;
    padding: 6px 8px !important;
  }

  #page_content {
    width: 100% !important;
  }

  #document_content table.content-list,
  #document_content > table {
    width: 100% !important;
  }

  .service-detail {
    grid-template-columns: 1fr;
  }

  .service-card {
    grid-template-columns: 132px minmax(0, 1fr);
  }

  .service-media {
    max-width: 100%;
    max-height: 280px;
    aspect-ratio: 16 / 9;
  }

  .home-columns {
    flex-wrap: wrap;
  }

  #news,
  .middle,
  .right {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

@media (max-width: 767px) {
  .header-top {
    flex-direction: column;
    text-align: center;
    padding: 10px 12px 6px;
  }

  #logo {
    text-align: center;
  }

  #meta {
    text-align: center !important;
    font-size: 10px !important;
    letter-spacing: 0 !important;
  }

  .nav-toggle {
    display: flex;
  }

  #nav_cell ul,
  #nav {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 0 !important;
  }

  body.nav-open #nav_cell ul,
  body.nav-open #nav {
    display: flex;
  }

  #nav_cell li {
    width: 100%;
    border-bottom: 1px solid #333 !important;
  }

  #nav_cell a,
  #nav a {
    width: 100% !important;
    justify-content: flex-start;
  }

  #document_content table:not(.content-list),
  #document_content table:not(.content-list) tbody,
  #document_content table:not(.content-list) tr,
  #document_content table:not(.content-list) td,
  .features table,
  .features tbody,
  .features tr,
  .features td {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }

  #document_content table.content-list,
  #document_content table.content-list tbody {
    display: table !important;
    width: 100% !important;
  }

  #document_content table.content-list tr {
    display: table-row !important;
  }

  #document_content table.content-list td {
    display: table-cell !important;
    width: auto !important;
    height: auto !important;
  }

  h1 {
    font-size: 18px !important;
  }

  #title,
  #summary,
  #bread,
  #document_content {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  #footer {
    text-align: center !important;
    font-size: 11px !important;
  }

  #document_content table.content-list td:first-child,
  #document_content > table td:first-child {
    width: auto !important;
  }

  #document_content table.content-list img,
  #document_content > table td:first-child img {
    width: 150px !important;
    max-width: 150px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
