/**
 * Tcaree Products – Front-end styles
 * Prefix: tcaree-
 */

/* ========== Section 1: Hero ========== */
.tcaree-section-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.tcaree-hero-banner {
  width: 100%;
  line-height: 0;
}

.tcaree-hero-banner__img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.tcaree-hero-banner--desktop {
  display: block;
}

.tcaree-hero-banner--mobile {
  display: none;
}

@media (max-width: 767px) {
  .tcaree-hero-banner--desktop {
    display: none;
  }
  .tcaree-hero-banner--mobile {
    display: block;
  }
}

/* ========== Section 2: Title bar ========== */
.tcaree-section-title-bar {
  margin: 0;
}

/* Hidden on desktop, visible on mobile only */
@media (min-width: 768px) {
  .tcaree-section-title-bar {
    display: none;
  }
}

.tcaree-title-bar {
  background-color: #174877;
  color: #fff;
  padding: 14px 20px;
  margin: 0;
}

.tcaree-title-bar__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: bold;
  color: #fff;
}

@media (max-width: 767px) {
  .tcaree-title-bar__title {
    font-size: 1.25rem;
  }
}

/* ========== Section 3: Content + Form ========== */
.tcaree-section-content-form {
  padding: 40px 0;
}

.tcaree-content-form__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  gap: 32px;
}

.tcaree-content-form__content {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.tcaree-content-form__body {
  font-size: var(--tcaree-content-font-size, 1rem);
  line-height: 1.65;
  color: #333;
  min-height: 0;
}

.tcaree-content-form__body > *:first-child {
  margin-top: 0;
}

.tcaree-content-form__body > *:last-child {
  margin-bottom: 0;
}

.tcaree-content-form__body p {
  margin: 0 0 1em;
}

.tcaree-content-form__body h1,
.tcaree-content-form__body h2,
.tcaree-content-form__body h3,
.tcaree-content-form__body h4 {
  margin: 1.25em 0 0.5em;
  font-weight: 700;
  line-height: 1.3;
  color: #1a1a1a;
}

.tcaree-content-form__body h1 { font-size: 1.5em; }
.tcaree-content-form__body h2 { font-size: 1.35em; }
.tcaree-content-form__body h3 { font-size: 1.2em; }
.tcaree-content-form__body h4 { font-size: 1.1em; }

.tcaree-content-form__body h1:first-child,
.tcaree-content-form__body h2:first-child,
.tcaree-content-form__body h3:first-child,
.tcaree-content-form__body h4:first-child {
  margin-top: 0;
}

.tcaree-content-form__body ul,
.tcaree-content-form__body ol {
  margin: 0.75em 0 1em;
  padding-left: 1.5em;
}

.tcaree-content-form__body ul {
  list-style-type: disc;
}

.tcaree-content-form__body ol {
  list-style-type: decimal;
}

.tcaree-content-form__body li {
  margin: 0.35em 0;
}

.tcaree-content-form__body li ul,
.tcaree-content-form__body li ol {
  margin: 0.35em 0;
}

.tcaree-content-form__body a {
  color: #174877;
  text-decoration: underline;
}

.tcaree-content-form__body a:hover {
  color: #0d2d4d;
}

.tcaree-content-form__body strong,
.tcaree-content-form__body b {
  font-weight: 700;
}

.tcaree-content-form__body em,
.tcaree-content-form__body i {
  font-style: italic;
}

.tcaree-content-form__body blockquote {
  margin: 1em 0;
  padding: 0.75em 1em 0.75em 1.25em;
  border-left: 4px solid #174877;
  background: #f5f5f5;
  font-style: italic;
  color: #555;
}

.tcaree-content-form__body hr {
  margin: 1.5em 0;
  border: 0;
  border-top: 1px solid #ddd;
}

.tcaree-content-form__form-inner {
  min-width: 0;
}

@media (min-width: 768px) {
  .tcaree-content-form__inner {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  .tcaree-content-form__body {
    flex: 1;
    overflow: hidden;
  }
}

/* ========== Section 4: Feature boxes ========== */
.tcaree-section-feature-boxes {
  padding: 50px 0;
  background: #f5f5f5;
}

.tcaree-feature-boxes__title {
  text-align: center;
  margin: 0 0 32px;
  font-size: 1.75rem;
  padding: 0 20px;
}

.tcaree-feature-boxes__grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

@media (min-width: 576px) {
  .tcaree-feature-boxes__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .tcaree-feature-boxes__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tcaree-feature-box {
  background: #fff;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  text-align: center;
  border: 2px solid transparent;
  transition: border-radius 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.tcaree-feature-box:hover {
  border-color: #00B4C6;
  box-shadow: 0 8px 24px rgba(0, 180, 198, 0.4);
  transform: translateY(-6px);
}

.tcaree-feature-box__icon {
  margin-bottom: 16px;
}

.tcaree-feature-box__icon svg,
.tcaree-feature-box__img {
  max-width: 64px;
  max-height: 64px;
  width: auto;
  height: auto;
  display: inline-block;
  vertical-align: middle;
}

.tcaree-feature-box__title {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 600;
}

.tcaree-feature-box__desc {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #444;
}

/* ========== Section 5: FAQ ========== */
.tcaree-section-faq {
  padding: 50px 0;
}

.tcaree-faq {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.tcaree-faq__label {
  text-align: center;
  margin: 0 0 8px;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #666;
}

.tcaree-faq__heading {
  text-align: center;
  margin: 0 0 28px;
  font-size: 1.75rem;
}

.tcaree-faq-accordion__item {
  border-radius: 12px;
  margin-bottom: 14px;
  border: 1px solid #e5e7eb;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.tcaree-faq-accordion__item:last-child {
  margin-bottom: 0;
}

.tcaree-faq-accordion__question {
  margin: 0;
}

.tcaree-faq-accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  background: #fff;
  border: none;
  cursor: pointer;
  color: #1a1a1a;
  font-family: inherit;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.tcaree-faq-accordion__trigger:hover {
  background: #f5f5f5;
}

.tcaree-faq-accordion__item.is-open .tcaree-faq-accordion__trigger {
  background: #00B4C6;
  color: #fff;
}

.tcaree-faq-accordion__item.is-open .tcaree-faq-accordion__trigger:hover {
  background: #0099a8;
  color: #fff;
}

.tcaree-faq-accordion__trigger::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid currentColor;
  flex-shrink: 0;
  margin-left: 10px;
  transition: transform 0.3s ease;
}

.tcaree-faq-accordion__trigger[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.tcaree-faq-accordion__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-out;
}

.tcaree-faq-accordion__answer.is-open {
  max-height: 800px;
  transition-duration: 0.85s;
  transition-timing-function: ease-out;
}

.tcaree-faq-accordion__answer-inner {
  padding: 18px 22px 20px;
  font-size: 0.9375rem;
  line-height: 1.6;
  background: #fff;
  border-top: 1px solid #e5e7eb;
}

.tcaree-faq-accordion__answer-inner p:first-child {
  margin-top: 16px;
}

.tcaree-faq-accordion__answer-inner p:last-child {
  margin-bottom: 0;
}

/* ========== Mega menu ========== */
.tcaree-megamenu-wrap {
  position: relative;
  display: inline-block;
  overflow: visible;
}

.tcaree-megamenu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 1rem;
  font-weight: 500;
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  font-family: inherit;
}

/* When inside a nav menu */
.menu-item-tcaree-megamenu .tcaree-megamenu-wrap {
  display: inline-block;
}

/*
 * Header mega menu trigger: 16px / 700 (theme .main-menu a is 14px — must beat cascade).
 * !important used so Elementor / theme link rules don’t shrink the button label.
 */
.menu-item-tcaree-megamenu .tcaree-megamenu-toggle {
  padding: 0;
  margin: 0;
  background: none;
  border: none;
  box-shadow: none;
  font-weight: 700 !important;
  font-size: 16px !important;
  font-family: var(--title-font, inherit);
  color: var(--title-color, #1a1a1a);
  line-height: 1.3;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.menu-item-tcaree-megamenu .tcaree-megamenu-toggle:hover {
  background: transparent;
  color: var(--theme-color, #00b4c6);
}

.menu-item-tcaree-megamenu .tcaree-megamenu-toggle__text {
  font-weight: 700 !important;
  font-size: 16px !important;
  font-family: var(--title-font, inherit);
  color: inherit;
  text-transform: none;
  line-height: inherit;
}

/* Extra specificity + body root (wins over late-loaded theme CSS) */
body .menu-item-tcaree-megamenu button.tcaree-megamenu-toggle,
body .menu-item-tcaree-megamenu .tcaree-megamenu-toggle {
  font-size: 16px !important;
  font-weight: 700 !important;
}

body .menu-item-tcaree-megamenu .tcaree-megamenu-toggle__text {
  font-size: 16px !important;
  font-weight: 700 !important;
}

/* Webteck desktop: vertical rhythm like .main-menu > ul > li > a */
.main-menu > ul > li.menu-item-tcaree-megamenu .tcaree-megamenu-toggle,
.main-menu .menu-item-tcaree-megamenu .tcaree-megamenu-toggle {
  padding: 47px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  vertical-align: middle;
}

.main-menu > ul > li.menu-item-tcaree-megamenu .tcaree-megamenu-toggle:hover,
.main-menu .menu-item-tcaree-megamenu .tcaree-megamenu-toggle:hover {
  color: var(--theme-color, #00b4c6);
}

.tcaree-megamenu-toggle__icon {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 0.2s;
}

.tcaree-megamenu-wrap[data-tcaree-megamenu-open] .tcaree-megamenu-toggle__icon {
  transform: rotate(180deg);
}

.tcaree-megamenu-panel {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  max-width: 90vw;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  z-index: 9999;
  margin-top: 4px;
}

.tcaree-megamenu-panel[hidden] {
  display: none !important;
}

.tcaree-megamenu-panel__inner {
  padding: 20px 24px;
  max-height: 70vh;
  overflow-y: auto;
  display: grid;
  gap: 24px 32px;
}

/* Category column: title + first 10 products + See more +N */
.tcaree-megamenu-category {
  min-width: 0;
}

.tcaree-megamenu-category__title {
  display: block;
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #174877;
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--theme-color, #00B4C6);
}

.tcaree-megamenu-products {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tcaree-megamenu-products__item {
  margin: 0;
}

.tcaree-megamenu-products__link {
  display: block;
  padding: 5px 0;
  font-size: 0.9375rem;
  color: #333;
  text-decoration: none;
  transition: color 0.2s;
}

.tcaree-megamenu-products__link:hover {
  color: #174877;
}

.tcaree-megamenu-category__more-list[hidden] {
  display: none !important;
}

.tcaree-megamenu-category__more-link {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--theme-color, #00B4C6);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s, opacity 0.2s;
}

.tcaree-megamenu-category__more-link:hover {
  color: #174877;
}

.tcaree-megamenu-category__more-list {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid #eee;
}

/* Desktop: wide multi-column mega menu (like reference) */
@media (min-width: 769px) {
  .tcaree-megamenu-panel {
    left: 50%;
    transform: translateX(-50%);
    min-width: 720px;
    max-width: min(1200px, 95vw);
    width: max-content;
  }

  .tcaree-megamenu-panel__inner {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    max-height: 70vh;
  }
}

/* Mobile / drawer (e.g. webteck .th-mobile-menu): full-width stack, no clip, scroll inside panel */
@media (max-width: 768px) {
  .menu-item-tcaree-megamenu,
  .menu-item-tcaree-megamenu .tcaree-megamenu-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    position: relative;
    z-index: 2;
  }

  /* Drawer menu row: align like .th-mobile-menu ul li a */
  .th-mobile-menu .menu-item-tcaree-megamenu .tcaree-megamenu-toggle,
  .th-menu-area .menu-item-tcaree-megamenu .tcaree-megamenu-toggle {
    display: flex;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    text-align: left;
    padding: 12px 0 12px 18px;
    padding-right: 12px;
    margin: 0;
    line-height: 1.4;
    font-size: 16px !important;
    font-weight: 700 !important;
    border-radius: 0;
  }

  .th-mobile-menu .menu-item-tcaree-megamenu .tcaree-megamenu-toggle__text,
  .th-menu-area .menu-item-tcaree-megamenu .tcaree-megamenu-toggle__text {
    flex: 1;
    min-width: 0;
    font-size: 16px !important;
    font-weight: 700 !important;
  }

  .tcaree-megamenu-panel {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    transform: none;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0 0 8px 0;
    max-height: none;
    border-radius: 0;
    border: solid #e8e8e8;
    border-width: 1px 0;
    box-shadow: none;
    z-index: 3;
    float: none;
    clear: both;
  }

  .tcaree-megamenu-panel__inner {
    grid-template-columns: 1fr;
    max-height: min(55vh, 420px);
    gap: 16px;
    padding: 16px 12px 16px 18px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
  }

  .tcaree-megamenu-category__title {
    font-size: 0.8125rem;
  }

  .tcaree-megamenu-products__link {
    padding: 8px 0;
    font-size: 0.9375rem;
  }

  /* Allow expanded panel to extend layout inside scrollable drawer */
  .th-mobile-menu .menu-item-tcaree-megamenu,
  .th-menu-area .menu-item-tcaree-megamenu {
    overflow: visible;
  }

  .th-mobile-menu ul li.menu-item-tcaree-megamenu {
    border-bottom: 1px solid #fdedf1;
  }

  /*
   * Webteck main.js (.thmobilemenu) sets display:none + .th-submenu on every ul inside li.
   * That hides .tcaree-megamenu-products; inline display loses to !important here.
   */
  .th-mobile-menu .tcaree-megamenu-panel .tcaree-megamenu-products:not([hidden]),
  .th-menu-area .tcaree-megamenu-panel .tcaree-megamenu-products:not([hidden]) {
    display: block !important;
  }
}
