/*
Theme Name:   Hello Elementor Child — 24x7 Helpline Support
Theme URI:    https://24x7helplinesupport.in
Description:  Child theme replacing Elementor Pro's Theme Builder, Nav Menu and Forms with native code.
Author:       24x7 Helpline Support
Template:     hello-elementor
Version:      1.0.10
Text Domain:  hs
*/

/* ==========================================================================
   Brand tokens — adjust these two values and everything follows
   ========================================================================== */
:root {
  --hs-navy:        #11265c;
  --hs-navy-deep:   #0c1c46;
  --hs-yellow:      #ffd100;
  --hs-yellow-dark: #e6bc00;
  --hs-ink:         #1b2333;
  --hs-muted:       #5a6476;
  --hs-line:        rgba(255, 255, 255, .22);
  --hs-radius:      10px;
  --hs-radius-pill: 999px;
  --hs-gap:         24px;
  --hs-shadow:      0 10px 30px rgba(17, 38, 92, .12);
}

/* ==========================================================================
   NAVIGATION  —  [hs_nav]
   Replaces Elementor Pro's nav-menu widget.
   ========================================================================== */
.hs-nav { position: relative; }

.hs-nav__list,
.hs-nav__list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hs-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
}

.hs-nav__list li { position: relative; }

.hs-nav__list a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 2px;
  font-size: var(--hs-nav-size, 16px);
  font-weight: 500;
  line-height: 1.2;
  color: var(--hs-nav-color, var(--hs-ink));
  text-decoration: none;
  transition: color .18s ease;
}

.hs-nav__list a:hover,
.hs-nav__list a:focus-visible,
.hs-nav__list .current-menu-item > a,
.hs-nav__list .current-menu-ancestor > a {
  color: var(--hs-nav-hover, var(--hs-navy));
}

/* Dropdown panels are always light, so their links stay dark whatever the
   top-level colour is. */
.hs-nav__list ul.sub-menu a { color: var(--hs-ink); }
.hs-nav__list ul.sub-menu a:hover,
.hs-nav__list ul.sub-menu a:focus-visible { color: var(--hs-navy); }

/* Parent items that are plain toggles have no href. Hello Elementor reset.css
   styles those with `color: inherit` at specificity 0,2,1 — higher than our
   `.hs-nav__list a`. Match that specificity or they fall back to body colour. */
.hs-nav__list a:not([href]):not([tabindex]),
.hs-nav__list a:not([href]):not([tabindex]):hover,
.hs-nav__list a:not([href]):not([tabindex]):focus { color: var(--hs-nav-color, var(--hs-ink)); }
.hs-nav__list li:hover > a:not([href]):not([tabindex]) { color: var(--hs-nav-hover, var(--hs-navy)); }
.hs-nav__list ul.sub-menu a:not([href]):not([tabindex]),
.hs-nav__list ul.sub-menu a:not([href]):not([tabindex]):hover,
.hs-nav__list ul.sub-menu a:not([href]):not([tabindex]):focus { color: var(--hs-ink); }

/* underline on hover, grows from the left */
.hs-nav__list > li > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 0;
  height: 2px;
  background: var(--hs-yellow);
  transition: width .22s ease;
}
.hs-nav__list > li:hover > a::after,
.hs-nav__list > li.current-menu-item > a::after,
.hs-nav__list > li.current-menu-ancestor > a::after { width: 100%; }

/* caret for items with children */
.hs-nav__list .menu-item-has-children > a::before {
  content: "";
  order: 2;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s ease;
}
.hs-nav__list .menu-item-has-children:hover > a::before {
  transform: translateY(1px) rotate(-135deg);
}

/* dropdowns */
.hs-nav__list ul.sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 60;
  min-width: 232px;
  padding: 8px 0;
  background: #fff;
  border-radius: var(--hs-radius);
  box-shadow: var(--hs-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.hs-nav__list li:hover > ul.sub-menu,
.hs-nav__list li:focus-within > ul.sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.hs-nav__list ul.sub-menu a {
  display: block;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 400;
  white-space: nowrap;
}
.hs-nav__list ul.sub-menu a:hover { background: #f4f6fb; }
.hs-nav__list ul.sub-menu ul.sub-menu { top: 0; left: 100%; }

/* burger — hidden on desktop */
.hs-nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.hs-nav__toggle span {
  position: relative;
  display: block;
  width: 24px;
  height: 2px;
  background: var(--hs-nav-color, var(--hs-ink));
  transition: background .2s ease;
}
.hs-nav__toggle span::before,
.hs-nav__toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--hs-nav-color, var(--hs-ink));
  transition: transform .22s ease, top .22s ease;
}
.hs-nav__toggle span::before { top: -7px; }
.hs-nav__toggle span::after  { top:  7px; }

.hs-nav.is-open .hs-nav__toggle span { background: transparent; }
.hs-nav.is-open .hs-nav__toggle span::before { top: 0; transform: rotate(45deg); }
.hs-nav.is-open .hs-nav__toggle span::after  { top: 0; transform: rotate(-45deg); }

@media (max-width: 1024px) {
  .hs-nav__toggle { display: inline-flex; }

  .hs-nav__list {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 70;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: min(320px, calc(100vw - 32px));
    max-height: min(70vh, 520px);
    overflow-y: auto;
    padding: 10px 0;
    background: #fff;
    border-radius: var(--hs-radius);
    box-shadow: var(--hs-shadow);
    display: none;
  }
  .hs-nav.is-open .hs-nav__list { display: flex; }

  .hs-nav__list > li > a::after { display: none; }
  /* Panel is white here, so links go dark regardless of the desktop colour. */
  .hs-nav__list a { padding: 12px 20px; color: var(--hs-ink); }
  .hs-nav__list a:hover,
  .hs-nav__list .current-menu-item > a { color: var(--hs-navy); }
  .hs-nav__list a:not([href]):not([tabindex]),
  .hs-nav__list a:not([href]):not([tabindex]):hover { color: var(--hs-ink); }

  /* dropdowns become inline accordions on touch */
  .hs-nav__list ul.sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    min-width: 0;
    padding: 0 0 6px;
    background: #f7f8fb;
    border-radius: 0;
    box-shadow: none;
    display: none;
  }
  .hs-nav__list li.is-open > ul.sub-menu { display: block; }
  .hs-nav__list ul.sub-menu a { padding-left: 34px; }

  .hs-nav__list .menu-item-has-children > a::before { margin-left: auto; }
}


/* Vertical variant — the footer columns. Same markup, stacked. */
.hs-nav--stack .hs-nav__toggle { display: none; }
.hs-nav--stack .hs-nav__list {
  position: static;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  width: auto;
  max-height: none;
  overflow: visible;
  padding: 0;
  background: none;
  border-radius: 0;
  box-shadow: none;
}
.hs-nav--stack .hs-nav__list a { padding: 0; color: var(--hs-nav-color, var(--hs-ink)); }
.hs-nav--stack .hs-nav__list a:hover { color: var(--hs-nav-hover, var(--hs-navy)); }
.hs-nav--stack .hs-nav__list > li > a::after { display: none; }
.hs-nav--stack .hs-nav__list .menu-item-has-children > a::before { display: none; }
.hs-nav--stack .hs-nav__list ul.sub-menu {
  position: static;
  display: block;
  opacity: 1;
  visibility: visible;
  transform: none;
  min-width: 0;
  margin-top: 10px;
  padding: 0 0 0 14px;
  background: none;
  border-radius: 0;
  box-shadow: none;
}
.hs-nav--stack .hs-nav__list ul.sub-menu li + li { margin-top: 8px; }
.hs-nav--stack .hs-nav__list ul.sub-menu a {
  padding: 0;
  font-size: 14px;
  color: var(--hs-nav-color, var(--hs-ink));
  opacity: .8;
}
.hs-nav--stack .hs-nav__list ul.sub-menu a:hover { opacity: 1; color: var(--hs-nav-hover, var(--hs-navy)); }

/* Stacked menus live in narrow footer columns. The dropdown rule sets
   nowrap on sub-menu links, which is right for a floating panel and wrong
   here: long labels pushed past the screen edge and made phones scroll
   sideways. Let everything in a stacked menu wrap inside its column. */
.hs-nav--stack,
.hs-nav--stack .hs-nav__list,
.hs-nav--stack .hs-nav__list li { max-width: 100%; min-width: 0; }
.hs-nav--stack .hs-nav__list a,
.hs-nav--stack .hs-nav__list ul.sub-menu a {
  display: inline-block;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* ==========================================================================
   BOOKING FORM  —  [hs_booking_form]
   Replaces Elementor Pro's form widget.
   ========================================================================== */
.hs-form { position: relative; }

/* Heading and intro text carried over from Pro form `html` fields. */
.hs-form__intro { margin-bottom: 20px; }
.hs-form__intro > :first-child { margin-top: 0; }
.hs-form__intro > :last-child { margin-bottom: 0; }
.hs-form__intro h1,
.hs-form__intro h2,
.hs-form__intro h3 {
  margin: 0 0 8px;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.2;
  /* --hs-intro-color is the form's own "HTML colour" from Elementor,
     printed inline by the widget. Forms on dark cards set it to white. */
  color: var(--hs-intro-color, var(--hs-navy));
}
.hs-form__intro p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--hs-intro-color, var(--hs-muted));
}
.hs-form--on-dark .hs-form__intro h1,
.hs-form--on-dark .hs-form__intro h2,
.hs-form--on-dark .hs-form__intro h3 { color: var(--hs-white, #fff); }
.hs-form--on-dark .hs-form__intro p { color: rgba(255, 255, 255, .8); }


.hs-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.hs-form__field--full { grid-column: 1 / -1; }

.hs-form input[type="text"],
.hs-form input[type="tel"],
.hs-form input[type="email"],
.hs-form select,
.hs-form textarea {
  width: 100%;
  padding: 14px 16px;
  font: inherit;
  font-size: 15px;
  color: var(--hs-ink);
  background: #fff;
  border: 1px solid #d9dee9;
  border-radius: var(--hs-radius-pill);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
  -webkit-appearance: none;
  appearance: none;
}
.hs-form textarea {
  min-height: 104px;
  border-radius: var(--hs-radius);
  resize: vertical;
}

.hs-form select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a6476' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  padding-right: 42px;
  cursor: pointer;
}

.hs-form input::placeholder,
.hs-form textarea::placeholder { color: #9aa3b4; opacity: 1; }

.hs-form input:focus,
.hs-form select:focus,
.hs-form textarea:focus {
  border-color: var(--hs-navy);
  box-shadow: 0 0 0 3px rgba(17, 38, 92, .12);
}

.hs-form .hs-form__field.has-error input,
.hs-form .hs-form__field.has-error select,
.hs-form .hs-form__field.has-error textarea {
  border-color: #d93a3a;
  box-shadow: 0 0 0 3px rgba(217, 58, 58, .12);
}

.hs-form__error {
  display: none;
  margin-top: 5px;
  padding-left: 16px;
  font-size: 13px;
  color: #d93a3a;
}
.hs-form__field.has-error .hs-form__error { display: block; }

/* honeypot — never shown, never announced */
.hs-form__hp {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.hs-form__submit {
  grid-column: 1 / -1;
  width: 100%;
  padding: 15px 24px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--hs-navy);
  background: var(--hs-yellow);
  border: 0;
  border-radius: var(--hs-radius-pill);
  cursor: pointer;
  transition: background .18s ease, transform .12s ease;
}
.hs-form__submit:hover { background: var(--hs-yellow-dark); }
.hs-form__submit:active { transform: translateY(1px); }
.hs-form__submit[disabled] { opacity: .6; cursor: progress; }

.hs-form__note {
  display: none;
  margin-top: 14px;
  padding: 13px 16px;
  font-size: 15px;
  border-radius: var(--hs-radius);
}
.hs-form__note.is-visible { display: block; }
.hs-form__note.is-ok   { color: #0f5132; background: #d6f3e3; }
.hs-form__note.is-fail { color: #842029; background: #fbdcdc; }

@media (max-width: 600px) {
  .hs-form__grid { grid-template-columns: minmax(0, 1fr); }
}

/* Dark surfaces (the footer form sits on navy) */
.hs-form--on-dark .hs-form__error { color: #ffb3b3; }

/* ==========================================================================
   POPUP  —  replaces Elementor Pro's popup for "Get Quote" / "Schedule a Service"
   ========================================================================== */
.hs-modal[hidden] { display: none; }
.hs-modal {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(12, 28, 70, .62);
  opacity: 0;
  transition: opacity .2s ease;
}
.hs-modal.is-open { opacity: 1; }
.hs-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
  transform: translateY(12px);
  transition: transform .2s ease;
  outline: none;
}
.hs-modal.is-open .hs-modal__dialog { transform: none; }
.hs-modal__close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 28px;
  line-height: 1;
  color: var(--hs-ink);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.hs-modal__close:hover,
.hs-modal__close:focus-visible { color: var(--hs-navy); background: #f1f3f8; }
body.hs-modal-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .hs-modal, .hs-modal__dialog { transition: none; }
}
