/* Cross-site UI/UX QA refinements for ClinicSoftware.ae.
   Keeps existing copy, metadata and brand colors intact. */

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a:focus,
button:focus,
input:focus,
textarea:focus,
summary:focus,
.navbar-toggle:focus {
  outline: 3px solid rgba(26, 115, 232, .42) !important;
  outline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: 1180px;
}

.topb button#popup1,
#popup1,
.med-btn-white,
.mp-btn,
.mp-btn-primary,
.mp-btn-outline {
  border-radius: 8px !important;
  min-height: 44px;
  line-height: 1.2;
}

.cs-enterprise-header {
  position: sticky;
  top: 0;
  z-index: 9990;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 16px 38px rgba(10, 35, 66, .08);
  backdrop-filter: saturate(150%) blur(14px);
}

.cs-topbar {
  background: #071f34;
  color: rgba(255, 255, 255, .86);
  font-size: 13px;
}

.cs-topbar-inner,
.cs-nav-inner,
.cs-contact-links,
.cs-trust-strip,
.cs-nav-panel,
.cs-nav-list,
.cs-nav-actions {
  display: flex;
  align-items: center;
}

.cs-topbar-inner {
  justify-content: space-between;
  gap: 24px;
  min-height: 38px;
}

.cs-trust-strip,
.cs-contact-links {
  gap: 18px;
  flex-wrap: wrap;
}

.cs-contact-links a {
  color: rgba(255, 255, 255, .9);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
}

.cs-contact-links a:hover,
.cs-contact-links a:focus {
  color: #fff;
}

.cs-navbar {
  background: #fff;
}

.cs-nav-inner {
  min-height: 84px;
  justify-content: space-between;
  gap: 20px;
  position: relative;
}

.cs-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.cs-brand img {
  display: block;
  width: 220px;
  max-width: 220px;
  max-height: 66px;
  object-fit: contain;
}

.cs-nav-panel {
  flex: 1;
  justify-content: flex-end;
  gap: 16px;
}

.cs-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 2px;
}

.cs-nav-list li {
  list-style: none;
}

.cs-nav-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: #12324d;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
  transition: background .18s ease, color .18s ease;
}

.cs-nav-link:hover,
.cs-nav-link:focus,
.cs-nav-link[aria-current="page"],
.cs-has-menu.is-open > .cs-nav-link {
  background: #eef7fb;
  color: #05677b;
  text-decoration: none;
}

.cs-has-menu {
  position: relative;
}

.cs-nav-list > .cs-has-menu:first-of-type {
  position: static;
}

.cs-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: #fff;
  border: 1px solid #e4edf3;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(10, 35, 66, .16);
  padding: 18px;
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.cs-has-menu:nth-last-child(-n+2) > .cs-dropdown {
  left: auto;
  right: 0;
  transform: translateY(8px);
}

.cs-has-menu:hover > .cs-dropdown,
.cs-has-menu:focus-within > .cs-dropdown,
.cs-has-menu.is-open > .cs-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.cs-has-menu:nth-last-child(-n+2):hover > .cs-dropdown,
.cs-has-menu:nth-last-child(-n+2):focus-within > .cs-dropdown,
.cs-has-menu:nth-last-child(-n+2).is-open > .cs-dropdown {
  transform: translateY(0);
}

.cs-dropdown:before {
  content: "";
  position: absolute;
  inset: -16px 0 auto;
  height: 16px;
}

.cs-mega-menu {
  width: min(1040px, calc(100vw - 96px));
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
}

.cs-nav-list > .cs-has-menu:first-of-type > .cs-mega-menu {
  left: 48px;
  right: 48px;
  transform: translateY(8px);
  width: auto;
}

.cs-nav-list > .cs-has-menu:first-of-type:hover > .cs-mega-menu,
.cs-nav-list > .cs-has-menu:first-of-type:focus-within > .cs-mega-menu,
.cs-nav-list > .cs-has-menu:first-of-type.is-open > .cs-mega-menu {
  transform: translateY(0);
}

.cs-menu-intro {
  background: linear-gradient(135deg, #073b55, #087f8f);
  color: #fff;
  border-radius: 8px;
  padding: 26px;
  min-height: 100%;
}

.cs-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #bdf2f4;
  margin-bottom: 10px;
}

.cs-menu-intro strong {
  display: block;
  font-size: 17px;
  line-height: 1.35;
  margin-bottom: 18px;
}

.cs-menu-intro a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.cs-menu-grid,
.cs-solutions-menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.cs-compact-menu {
  width: 340px;
  display: grid;
  gap: 6px;
}

.cs-solutions-menu {
  width: min(760px, calc(100vw - 42px));
}

.cs-dropdown a {
  color: #163653;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  row-gap: 2px;
  min-height: 70px;
  padding: 13px;
  border-radius: 8px;
  text-decoration: none;
  transition: background .18s ease, transform .18s ease;
}

.cs-solutions-menu a,
.cs-compact-menu a {
  display: block;
}

.cs-dropdown a:hover,
.cs-dropdown a:focus,
.cs-dropdown a[aria-current="page"] {
  background: #f2f8fb;
  transform: translateY(-1px);
  text-decoration: none;
}

.cs-dropdown .fa {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #e8f7fa;
  color: #087f8f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.cs-dropdown strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
  color: #102f48;
}

.cs-dropdown small {
  display: block;
  color: #5d7284;
  font-size: 12px;
  line-height: 1.35;
  margin-top: 4px;
}

.cs-nav-actions {
  gap: 8px;
  flex: 0 0 auto;
}

.cs-primary-cta,
.cs-secondary-cta,
.topb button#popup1,
#popup1,
.med-btn-white,
.mp-btn-primary {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px !important;
  border: 1px solid #087f8f !important;
  background: linear-gradient(135deg, #087f8f, #0f6aa0) !important;
  color: #fff !important;
  font-weight: 800 !important;
  padding: 11px 18px !important;
  text-decoration: none !important;
  box-shadow: 0 12px 28px rgba(8, 127, 143, .22);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.cs-secondary-cta,
.mp-btn-outline,
.med-btn-outline {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px !important;
  border: 1px solid #c8d8e2 !important;
  background: #fff !important;
  color: #12324d !important;
  font-weight: 800 !important;
  padding: 11px 16px !important;
  text-decoration: none !important;
  box-shadow: none;
}

.cs-primary-cta:hover,
.cs-primary-cta:focus,
.mp-btn-primary:hover,
.med-btn-white:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(8, 127, 143, .28);
}

.cs-secondary-cta:hover,
.cs-secondary-cta:focus,
.mp-btn-outline:hover,
.med-btn-outline:hover {
  background: #f5fafc !important;
  color: #05677b !important;
}

.cs-menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid #d8e5ec;
  border-radius: 8px;
  background: #fff;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.cs-menu-toggle span {
  width: 20px;
  height: 2px;
  background: #12324d;
  border-radius: 99px;
  transition: transform .18s ease, opacity .18s ease;
}

.cs-menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.cs-menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.cs-menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

body > #header {
  min-height: 0 !important;
  height: auto !important;
  overflow: visible;
}

.container-box.rotated,
.rotated .container-box,
div.container-box.rotated {
  display: none !important;
}

#header > .hidden-xs {
  display: block;
  line-height: 0;
  margin: 0 !important;
  padding: 0 !important;
}

#header #slider {
  height: auto !important;
  min-height: 0 !important;
  margin-top: 0 !important;
  clear: both;
  line-height: normal;
}

#header #slider .carousel .item {
  height: 460px !important;
  min-height: 460px !important;
  overflow: hidden;
}

#header #slider .imgslide,
#header #slider .imgslide img {
  height: 100%;
  width: 100%;
}

#header #slider .imgslide img {
  object-fit: cover;
  object-position: center;
}

#header #slider .carousel-caption {
  top: 50%;
  height: auto;
  min-height: 210px;
  padding: 30px 40px;
  overflow: hidden;
}

#header #slider .item.one h1,
#header #slider .item.one h2,
#header #slider .item.two .service {
  letter-spacing: 0;
  max-width: min(1180px, calc(100vw - 96px));
  margin-left: auto;
  margin-right: auto;
  white-space: normal;
  overflow-wrap: normal;
  text-wrap: balance;
}

#header #slider .item.one h1 {
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1.12;
}

#header #slider .item.one h2 {
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.08;
}

#header #slider .item.two .service {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.16;
}

#header #slider .buttons {
  margin-top: 30px;
}

#header #slider .buttons a {
  border-radius: 8px;
  background: linear-gradient(135deg, #087f8f, #0f6aa0);
  border: 0;
  font-weight: 800;
  pointer-events: auto;
}

#header.sub-page .page-header {
  background: linear-gradient(135deg, #0f4c81 0%, #1a73e8 100%);
  padding: 72px 0 48px;
  margin: 0;
}

#header.sub-page .page-header h1 {
  max-width: 980px;
  margin: 0 auto 12px;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
}

#header.sub-page .breadcrumb,
.mp-breadcrumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  padding: 8px 14px;
  margin: 8px 0 0;
}

.med-section,
.mp-section {
  overflow: hidden;
}

.row.equal-grid,
.med-equal-grid,
.mp-card-grid,
.mp-feature-grid {
  align-items: stretch;
}

.med-card,
.mp-card,
.mp-panel,
.med-use-card,
.med-type-tab {
  border-radius: 10px !important;
  box-shadow: 0 10px 28px rgba(15, 76, 129, .10) !important;
  transition: transform .2s ease, box-shadow .2s ease;
}

.med-card:hover,
.mp-card:hover,
.mp-panel:hover,
.med-use-card:hover,
.med-type-tab:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(15, 76, 129, .14) !important;
}

.med-card p,
.mp-card p,
.mp-panel p,
.med-use-card p,
.med-section-sub,
.mp-sub {
  max-width: 78ch;
}

.owl-carousel img,
.client-section img,
.footer img,
.item img {
  object-fit: contain;
}

#abc {
  z-index: 10000;
}

#popupContact {
  max-width: min(92vw, 560px);
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 12px;
}

#popupContact input,
#popupContact textarea,
.form-control {
  min-height: 44px;
  border-radius: 8px;
}

#popupContact textarea {
  min-height: 110px;
}

#submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
}

#footer {
  background: #1a1e23;
  padding-top: 54px;
  margin-top: 0;
}

#footer .contact-top {
  display: none;
}

#footer .footer-top-main {
  padding-top: 0;
}

#footer .title.common {
  width: auto;
  margin: 0;
  text-align: left;
}

#footer .title.common h2 {
  font-size: 18px;
  line-height: 1.35;
  padding-bottom: 10px;
  text-transform: none;
}

#footer .title.common h2:before,
#footer .title.common h2:after {
  left: 0;
  transform: none;
  width: 44px;
  background: #14B1BB;
}

#footer .title.common h2:after {
  display: none;
}

#footer p,
#footer li,
#footer span,
#footer a {
  line-height: 1.65;
}

#footer .item.hosting ul li,
#footer .item.links ul li {
  margin-bottom: 10px;
}

#footer .social-icons ul {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 0;
}

#footer .social-icons ul li {
  float: none;
  margin: 0;
}

#footer .footer-bottom {
  background: #111418;
  padding: 18px 0;
}

#footer .footer-bottom .links {
  float: none;
}

#footer .copyrights-row .container {
  text-align: center;
}

.back-to-top {
  border-radius: 50% !important;
  width: 42px;
  height: 42px;
}

@media (min-width: 768px) {
  .med-equal-grid,
  .legacy-equal-grid {
    display: flex;
    flex-wrap: wrap;
  }

  .med-equal-grid > [class*="col-"],
  .legacy-equal-grid > [class*="col-"] {
    display: flex;
    float: none;
  }

  .med-equal-grid .med-card,
  .legacy-equal-grid .item,
  .legacy-equal-grid .med-card {
    width: 100%;
  }
}

@media (max-width: 960px) {
  .cs-topbar {
    display: none;
  }

  .cs-nav-inner {
    min-height: 74px;
  }

  .cs-menu-toggle {
    display: inline-flex;
  }

  .cs-nav-panel {
    position: fixed;
    inset: 74px 0 0 auto;
    width: min(430px, 92vw);
    height: calc(100vh - 74px);
    background: #fff;
    border-left: 1px solid #e4edf3;
    box-shadow: -18px 0 48px rgba(10, 35, 66, .18);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px 18px 18px;
    transform: translateX(104%);
    visibility: hidden;
    transition: transform .22s ease, visibility .22s ease;
  }

  body.cs-menu-open .cs-nav-panel {
    transform: translateX(0);
    visibility: visible;
  }

  body.cs-menu-open {
    overflow: hidden;
  }

  .cs-nav-list {
    display: block;
    width: 100%;
  }

  .cs-nav-link {
    width: 100%;
    min-height: 52px;
    justify-content: space-between;
    padding: 0 4px;
    border-radius: 0;
    border-bottom: 1px solid #edf3f7;
    font-size: 15px;
  }

  .cs-nav-link:hover,
  .cs-nav-link:focus,
  .cs-has-menu.is-open > .cs-nav-link {
    background: transparent;
  }

  .cs-has-menu {
    position: static;
  }

  .cs-dropdown,
  .cs-mega-menu,
  .cs-solutions-menu,
  .cs-compact-menu {
    position: static;
    width: 100%;
    max-width: 100%;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: none;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    padding: 8px 0 14px;
    transition: none;
  }

  .cs-nav-list > .cs-has-menu:first-of-type {
    position: static;
  }

  .cs-nav-list > .cs-has-menu:first-of-type > .cs-mega-menu {
    left: auto;
    right: auto;
    width: 100%;
    transform: none;
  }

  .cs-has-menu.is-open > .cs-dropdown {
    display: grid;
  }

  .cs-mega-menu {
    grid-template-columns: 1fr;
  }

  .cs-menu-intro {
    display: none;
  }

  .cs-menu-grid,
  .cs-solutions-menu,
  .cs-compact-menu {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .cs-dropdown:before {
    display: none;
  }

  .cs-dropdown a {
    min-height: 56px;
    padding: 10px 6px;
  }

  .cs-nav-actions {
    position: sticky;
    bottom: -18px;
    background: linear-gradient(180deg, rgba(255,255,255,.78), #fff 28%);
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 18px 0 4px;
  }
}

@media (max-width: 767px) {
  body {
    font-size: 15px;
    letter-spacing: 0;
  }

  .cs-brand img {
    width: 190px;
    max-width: 190px;
    max-height: 58px;
  }

  #header.sub-page .page-header {
    padding: 96px 18px 36px !important;
  }

  #header.sub-page .page-header h1 {
    font-size: 22px !important;
    padding-top: 0 !important;
  }

  .mp-hero,
  .med-hero-section {
    padding: 48px 0 36px !important;
  }

  .mp-hero h1,
  .med-hero-section h1 {
    font-size: 28px !important;
  }

  .mp-hero-cta,
  .med-cta-box {
    text-align: center;
  }

  .mp-btn,
  .med-btn-white,
  .med-btn-outline,
  .mp-btn-primary,
  .mp-btn-outline {
    width: 100%;
    justify-content: center;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .mp-hero-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .mp-hero-actions .mp-btn {
    width: 100%;
    min-width: 0;
  }

  #footer {
    padding-top: 36px;
  }

  #footer .footer-top-main .col-md-3,
  #footer .footer-top-main .col-md-6 {
    margin-bottom: 28px;
  }
}
