/* =============================================================================
   Medirect - Problems Section Styles
   Made by Addie.sk
   All rules scoped to #mdProblems to avoid conflicts with host page.
   ============================================================================= */

/* ===== RESET ===== */
#mdProblems *, #mdProblems *::before, #mdProblems *::after { margin: 0; padding: 0; box-sizing: border-box; }
#mdProblems img { display: block; }
#mdProblems a { text-decoration: none; color: inherit; }

/* ===== FONT ===== */
@font-face {
  font-family: 'Poppins2';
  src: local('Poppins');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins2';
  src: local('Poppins');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
#mdProblems { font-family: 'Poppins2', sans-serif; }

/* ===== VARIABLES ===== */
#mdProblems {
  --color-light: #f0e3da;
  --color-dark: #d0b29a;
  --text-primary: #1a1a1a;
  --text-alternate: #fff;
  --bg-primary: #fff;
  --bg-secondary: #f5efe9;
  --accent: #a0785c;
  --accent-hover: #876248;
  --brand-07: #e0d3c8;
  --link-primary: #1a1a1a;
  --highlight: #206c8e;
  --highlight-hover: #1a576f;
  --highlight-soft: rgba(32, 108, 142, .18);
  --highlight-ring: rgba(32, 108, 142, .35);
  --highlight-ring-hover: rgba(32, 108, 142, .55);
}

/* ===== NO TEXT SELECTION / NO CARET INSIDE WIDGET =========================== */
#mdProblems,
#mdProblems * {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  caret-color: transparent;
}
#mdProblems :focus { outline: none; }

/* ===== LAYOUT ===== */
#mdProblems .padding-global { padding-left: 2.5rem; padding-right: 2.5rem; }
#mdProblems .padding-global.is-problems { height: 100%; }
#mdProblems .container-large { max-width: 80rem; margin: 0 auto; width: 100%; }
#mdProblems .container-large.is-full-height { height: 100%; }
#mdProblems .home-anchor { position: absolute; top: 0; }

/* ===== SECTION ===== */
#mdProblems .problems_section {
  color: var(--text-alternate);
  background: linear-gradient(135deg, var(--color-light) 0%, var(--color-dark) 100%);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#mdProblems .problems_step {
  height: 80vh;
  position: relative;
  overflow: hidden;
  transition: opacity .3s ease;
}

/* ===== STEP CONTENT ===== */
#mdProblems .problems_step-content {
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  height: 100%;
  padding-top: 3rem;
  padding-bottom: 3rem;
  display: flex;
  position: relative;
}

#mdProblems .problems_main-content {
  z-index: 4;
  width: 100%;
  max-width: 36.375rem;
  position: relative;
}
#mdProblems .problems_main-content.is-small { max-width: 27rem; }

/* ===== FLEX HELPERS ===== */
#mdProblems .flex-v-32-24 { display: flex; flex-direction: column; gap: 2rem; }
#mdProblems .flex-v-32-24.is-center-align { align-items: center; text-align: center; }
#mdProblems .flex-v-16 { display: flex; flex-direction: column; gap: 1rem; }
#mdProblems .flex-v-16.is-center { align-items: center; text-align: center; }

/* ===== TYPOGRAPHY ===== */
#mdProblems .heading-size-48-26 {
  font-size: 3rem;
  font-weight: 500;
  font-style: normal;
  line-height: 1.15;
  font-family: 'Poppins2', sans-serif;
  color: inherit;
}
#mdProblems .text-size-16 { font-size: 1rem; line-height: 1.5; color: inherit; }
#mdProblems .text-lineheight-small { line-height: 1.4; }
#mdProblems .text-size-medium { font-size: .875rem; }

/* Force white text on the main step content (host theme may override h3/p). */
#mdProblems .problems_main-content,
#mdProblems .problems_main-content h1,
#mdProblems .problems_main-content h2,
#mdProblems .problems_main-content h3,
#mdProblems .problems_main-content h4,
#mdProblems .problems_main-content h5,
#mdProblems .problems_main-content h6,
#mdProblems .problems_main-content p {
  color: var(--text-alternate);
}

/* Popup must stay dark on its white panel (override the white-text rule above). */
#mdProblems .problems_popup_content,
#mdProblems .problems_popup_content h1,
#mdProblems .problems_popup_content h2,
#mdProblems .problems_popup_content h3,
#mdProblems .problems_popup_content h4,
#mdProblems .problems_popup_content h5,
#mdProblems .problems_popup_content h6,
#mdProblems .problems_popup_content p {
  color: var(--text-primary);
}

/* ===== BUTTONS ===== */
#mdProblems .button {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.5rem;
  border: 2px solid rgba(255,255,255,1);
  border-radius: 0;
  background: transparent;
  color: var(--text-alternate);
  font-size: .875rem;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: border-color .3s, background-color .3s, color .3s;
}
#mdProblems .button:hover,
#mdProblems .button.is-hovered {
  border-color: var(--highlight);
  background: var(--highlight);
  color: #fff;
}
#mdProblems .button.is-small-paddings { padding: .625rem 1.25rem; }

#mdProblems .button-text-wrapper {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 1.25em;
  line-height: 1.25em;
}
#mdProblems .button-text-wrapper .button-text { transition: transform .3s; }
#mdProblems .button:hover .button-text-wrapper .button-text,
#mdProblems .button.is-hovered .button-text-wrapper .button-text { transform: translateY(-100%); }

#mdProblems .problems_button-wrapper {
  gap: .5rem;
  flex-flow: row wrap;
  justify-content: center;
  align-items: center;
  display: flex;
}

/* ===== IMAGES ===== */
#mdProblems .problems_image {
  z-index: 1;
  height: 100%;
  width: auto;
  display: block;
  position: relative;
}
#mdProblems .problems_image.is-1 { aspect-ratio: 1 / 1; }
#mdProblems .problems_image.is-2 { aspect-ratio: 1 / 1; }
#mdProblems .problems_image.is-3 { aspect-ratio: 1 / 1; }

#mdProblems .problems_image-wrapper {
  z-index: 1;
  position: absolute;
  inset: 0 auto 0 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
#mdProblems .problems_image-wrapper.is-wrapper-1 { left: 5%; }
#mdProblems .problems_image-wrapper.is-wrapper-2 { left: 0; }
#mdProblems .problems_image-wrapper.is-wrapper-3 { left: 5%; }

#mdProblems .problems_image-overlay {
  z-index: 2;
  pointer-events: none;
  background-image: linear-gradient(0deg, var(--color-dark) 30%, transparent 50%);
  display: none;
  position: absolute;
  inset: 0;
}

/* ===== DOT MARKERS ===== */
#mdProblems .problems_link-wrapper {
  z-index: 10;
  pointer-events: auto;
  justify-content: center;
  align-items: center;
  width: 2.8125rem;
  height: 2.8125rem;
  display: flex;
  position: absolute;
  transform: translate(-50%, -50%);
}

#mdProblems .problems_link {
  justify-content: center;
  align-items: center;
  width: 4.875rem;
  max-width: none;
  height: 4.875rem;
  text-decoration: none;
  display: flex;
  position: absolute;
}

#mdProblems .problems_dot-wrapper {
  background-color: transparent;
  border-radius: 100%;
  justify-content: center;
  align-items: center;
  width: 2.8125rem;
  height: 2.8125rem;
  transition: background-color .3s;
  display: flex;
  position: relative;
}
/* Pulse ring lives on a pseudo-element so its timeline never resets;
   all dots stay in sync — on hover we just hide it. */
#mdProblems .problems_dot-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 100%;
  pointer-events: none;
  animation: mdProblemsRingPulse 1.8s ease-out infinite;
  transition: opacity .25s ease;
}
#mdProblems .problems_link:hover .problems_dot-wrapper,
#mdProblems .problems_link.is-hovered .problems_dot-wrapper {
  background-color: var(--highlight-ring-hover);
}
#mdProblems .problems_link:hover .problems_dot-wrapper::before,
#mdProblems .problems_link.is-hovered .problems_dot-wrapper::before {
  opacity: 0;
}

#mdProblems .problems_dot {
  background-color: var(--bg-primary);
  color: var(--link-primary);
  border-radius: 100%;
  flex: none;
  justify-content: center;
  align-items: center;
  width: 2.25rem;
  height: 2.25rem;
  transition: color .3s, background-color .3s;
  display: flex;
}
#mdProblems .problems_link:hover .problems_dot,
#mdProblems .problems_link.is-hovered .problems_dot {
  background-color: var(--highlight);
  color: #fff;
}

#mdProblems .icon-embed-12 { width: 1.25rem; height: 1.25rem; }

#mdProblems .problems_dot-icon {
  display: block;
  width: .975rem;
  height: .975rem;
  color: currentColor;
  opacity: .8;
  transition: opacity .3s ease;
}
#mdProblems .problems_link:hover .problems_dot-icon,
#mdProblems .problems_link.is-hovered .problems_dot-icon { opacity: 1; }
#mdProblems .problems_dot-icon path,
#mdProblems .problems_dot-icon circle { fill: currentColor; }

@keyframes mdProblemsRingPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(32, 108, 142, .55);
  }
  100% {
    box-shadow: 0 0 0 .9rem rgba(32, 108, 142, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  #mdProblems .problems_dot-wrapper { animation: none; }
}

#mdProblems .problems_dot-text {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  margin-left: .75rem;
  padding: .75rem 1.5rem;
  font-size: 1.55rem;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
  position: absolute;
  inset: 50% auto auto 100%;
  transform: translate(0, -50%);
  white-space: nowrap;
}
#mdProblems .problems_link:hover .problems_dot-text,
#mdProblems .problems_link.is-hovered .problems_dot-text { opacity: 1; }

#mdProblems .problems_dot-figure {
  width: .9375rem;
  height: 1.125rem;
  position: absolute;
  inset: 50% auto auto -.75rem;
  transform: translate(0, -50%);
}

/* ===== DOT LIST ===== */
#mdProblems .problems-dot_list-wrapper {
  z-index: 2;
  pointer-events: none;
  position: absolute;
  inset: 0;
}
#mdProblems .problems-dot_list {
  width: 100%;
  height: 100%;
  position: relative;
}

/* ===== POPUP ===== */
#mdProblems .problems_popup-wrapper {
  z-index: 20;
  justify-content: flex-end;
  width: 100%;
  height: 100%;
  display: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
}
#mdProblems .problems_popup-wrapper.is-open { display: flex; }

#mdProblems .problems_popup-overlay {
  z-index: 1;
  background-color: rgba(0,0,0,.3);
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  cursor: pointer;
  opacity: 0;
  transition: opacity .35s ease;
}
#mdProblems .problems_popup-wrapper.is-open .problems_popup-overlay { opacity: 1; }

#mdProblems .problems_popup_content {
  z-index: 2;
  gap: 1.5rem;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  flex-flow: column;
  width: 100%;
  max-width: 27rem;
  padding: 3.125rem;
  display: flex;
  position: relative;
  overflow: auto;
  transform: translateX(100%);
  opacity: 0;
  transition: transform .35s ease, opacity .35s ease;
}
#mdProblems .problems_popup-wrapper.is-open .problems_popup_content {
  transform: translateX(0);
  opacity: 1;
}

#mdProblems .problems_popup-header {
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
  display: flex;
}

#mdProblems .problem_popup-close {
  background-color: var(--highlight);
  flex: none;
  justify-content: center;
  align-items: center;
  width: 2.5rem;
  height: 2.5rem;
  transition: background-color .2s;
  display: flex;
  cursor: pointer;
  position: relative;
}
#mdProblems .problem_popup-close:hover {
  background-color: var(--highlight-hover);
  animation: mdProblemsClosePulse .65s ease-out 1;
}
#mdProblems .problem_popup-close .icon-embed-xxsmall rect { fill: #fff; transition: fill .2s; }

@keyframes mdProblemsClosePulse {
  0%   { box-shadow: 0 0 0 0 rgba(32, 108, 142, .6); }
  100% { box-shadow: 0 0 0 1rem rgba(32, 108, 142, 0); }
}

#mdProblems .icon-embed-xxsmall { width: 1rem; height: 1rem; }

#mdProblems .problems_popup-intro {
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.5;
  font-style: italic;
  opacity: .85;
  margin: 0;
}

#mdProblems .problems_popup-services-label {
  font-size: .8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--highlight);
  margin-top: 1rem;
}

#mdProblems .problems_popup-reservation {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  margin-top: auto;
  padding: .9rem 1.5rem;
  background-color: var(--highlight);
  color: #fff !important;
  font-size: .9375rem;
  font-weight: 500;
  letter-spacing: .01em;
  text-align: center;
  border: 2px solid var(--highlight);
  cursor: pointer;
  transition: background-color .25s ease, border-color .25s ease, transform .25s ease;
}
#mdProblems .problems_popup-reservation:hover {
  background-color: var(--highlight-hover);
  border-color: var(--highlight-hover);
}

#mdProblems .problems_popup-list {
  flex-flow: column;
  justify-content: flex-start;
  align-items: flex-start;
  display: flex;
}

#mdProblems .procedure_link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(0,0,0,.08);
  font-size: 1rem;
  color: var(--text-primary);
  transition: opacity .2s;
}
#mdProblems .procedure_link:hover { opacity: .6; }
#mdProblems .procedure_link .icon-embed-custom1 { flex: none; }

/* ===== BACK BUTTON ===== */
#mdProblems .problems_back-wrapper { margin-top: .15rem; }
#mdProblems .problems_back-wrapper .button {
  transform: scale(.75);
  transform-origin: center;
}
#mdProblems .problems_back-wrapper .button:hover {
  border-color: rgba(255,255,255,.7);
}

#mdProblems .icon-embed-custom1 { width: 1.25rem; height: 1.25rem; flex: none; }

/* ===== RESPONSIVE (mobile <= 991px) ===== */
@media (max-width: 991px) {
  #mdProblems .problems_step {
    height: auto;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  #mdProblems .padding-global.is-problems {
    padding-left: 0;
    padding-right: 0;
    flex: 1 1 0%;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  #mdProblems .container-large.is-full-height {
    max-width: none;
    flex: 1 1 0%;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  #mdProblems .problems_step-content {
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 0;
    flex: 1 1 0%;
    min-height: 0;
  }
  #mdProblems .problems_image-wrapper {
    position: relative;
    inset: auto;
    left: auto;
    width: 100%;
    max-width: none;
    margin: 0;
    overflow: hidden;
    order: -1;
    flex: 1 1 0%;
    min-height: 0;
  }
  #mdProblems .problems_image-wrapper.is-wrapper-1,
  #mdProblems .problems_image-wrapper.is-wrapper-2,
  #mdProblems .problems_image-wrapper.is-wrapper-3 {
    left: auto;
  }
  #mdProblems .problems_image {
    width: 100%;
    height: auto;
    max-width: none;
    display: block;
  }
  #mdProblems .problems-dot_list-wrapper {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
  }
  #mdProblems .problems_image-overlay { display: none; }
  #mdProblems .problems_main-content,
  #mdProblems .problems_main-content.is-small {
    max-width: 100%;
    z-index: 5;
    position: relative;
    padding: 1.5rem 1.25rem 2rem;
    background-color: var(--color-dark);
    flex: none;
  }
  #mdProblems .problems_main-content::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 8rem;
    background: linear-gradient(0deg, var(--color-dark) 0%, transparent 100%);
    pointer-events: none;
  }
  #mdProblems .heading-size-48-26 { font-size: 1.625rem; }
  #mdProblems .flex-v-32-24 { gap: 1rem; }
  #mdProblems .flex-v-16 { gap: .5rem; }
  #mdProblems .problems_back-wrapper { margin-top: .05rem; }
  #mdProblems .problems_back-wrapper .button { font-size: .75rem; padding: .4rem 1rem; }

  /* Popup slides from bottom on mobile */
  #mdProblems .problems_popup-wrapper {
    align-items: flex-end;
    justify-content: center;
  }
  #mdProblems .problems_popup_content {
    max-width: 100%;
    max-height: 80vh;
    width: 100%;
    padding: 2rem;
    transform: translateY(100%);
    opacity: 0;
    transition: transform .35s ease, opacity .35s ease;
  }
  #mdProblems .problems_popup-wrapper.is-open .problems_popup_content {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 767px) {
  #mdProblems .hide-mobile-landscape { display: none !important; }
}
