/**
 * True Travel — site footer (v2: new filename so browsers pick up the redesign; ?ver is stripped site-wide).
 * Floating contact card + classic dark-green column grid.
 * All layout rules are scoped to .true-footer to avoid affecting page content.
 */

.true-footer {
  position: relative;
  isolation: isolate;
  margin-top: 0;
  padding: 5.5rem 0 0;
  color: rgba(255, 255, 255, 0.9);
  background: linear-gradient(160deg, #143a2b 0%, #0f2a1f 60%, #12332a 100%);
  border-top: 1px solid rgba(191, 148, 104, 0.35);
}

/*
 * The floating card straddles the seam, so the page's last block needs room
 * for it. No gap is left above the footer any more: the space used to show the
 * body background as a white band between dark or cream pages and the footer.
 */
.true-main > section:last-child:not(#main-content),
.true-main > aside:last-child,
.true-main > #main-content > section:last-child:not(#contact) {
  padding-bottom: 6rem;
}

/* Footer-only wide canvas. The global .true-container remains unchanged. */
.true-footer > .true-container {
  position: static;
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 3vw, 2.5rem);
}

/* ── Floating contact card ── */

.true-footer__cta {
  position: absolute;
  top: -3rem;
  inset-inline: 0;
  z-index: 2;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 1rem;
}

.true-footer__cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.6rem 2rem;
  background: linear-gradient(135deg, #1e4d3a, #2d6b52);
  border: 1px solid rgba(191, 148, 104, 0.55);
  border-radius: 22px;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.true-footer__cta-text {
  min-width: 0;
}

.true-footer .true-footer__cta-title {
  margin: 0;
  font-family: "Alexandria", "Tajawal", sans-serif;
  font-size: clamp(1.2rem, 1.6vw, 1.45rem);
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}

.true-footer .true-footer__cta-desc {
  margin: 0.3rem 0 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
}

.true-footer__cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.true-footer__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.65rem 1.3rem;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  border-radius: 999px;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.true-footer__btn .true-icon {
  flex: 0 0 auto;
}

.true-footer .true-footer__btn--gold {
  color: #0a322c;
  background: #bf9468;
  border: 1px solid #bf9468;
}

/* Keep the dark label readable on the gold button in every interaction state. */
.true-footer .true-footer__btn--gold:hover,
.true-footer .true-footer__btn--gold:focus-visible {
  color: #0a322c;
  background: #d1a97f;
  border-color: #d1a97f;
  text-decoration: none;
  transform: translateY(-1px);
  outline: none;
}

.true-footer__btn--ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.true-footer__btn--ghost:hover,
.true-footer__btn--ghost:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transform: translateY(-1px);
  outline: none;
}

.true-footer__btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(240, 207, 170, 0.5);
}

/* ── Main grid ── */

.true-footer__main {
  display: grid;
  grid-template-areas: "brand nav reach";
  grid-template-columns: minmax(220px, 1fr) minmax(0, 3.6fr) minmax(250px, 1fr);
  align-items: start;
  gap: clamp(1.5rem, 2.5vw, 2.75rem);
  padding: 1.5rem 0 2rem;
}

.true-footer__brand {
  grid-area: brand;
  min-width: 0;
}

.true-footer .true-logo--footer .true-logo__img {
  height: 96px;
  max-width: 240px;
}

.true-footer .true-footer__desc {
  max-width: 32ch;
  margin: 0.75rem 0 1rem;
  font-size: 0.9rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.7);
}

.true-footer__social {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.true-footer__social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.true-footer .true-footer__social-btn:hover,
.true-footer .true-footer__social-btn:focus-visible {
  color: #0f2a1f;
  background: #bf9468;
  border-color: #bf9468;
  text-decoration: none;
  transform: translateY(-2px);
  outline: none;
}

/* ── Navigation columns ── */

.true-footer__nav {
  grid-area: nav;
  min-width: 0;
}

/* Add as many WordPress footer columns as needed; they share the row equally. */
.true-footer__menu-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 112px), 1fr));
  align-items: start;
  gap: 1.5rem clamp(0.75rem, 1.25vw, 1.5rem);
}

.true-footer__menu-column {
  min-width: 0;
}

.true-footer__menu-heading-row {
  position: relative;
}

.true-footer__menu-toggle {
  display: none;
}

.true-footer .true-footer__title {
  position: relative;
  margin: 0 0 0.85rem;
  padding: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.4;
  color: #d4ab85;
}

.true-footer__title::after {
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 28px;
  height: 2px;
  content: "";
  background: #bf9468;
  border-radius: 2px;
}

.true-footer__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.true-footer__title a:hover,
.true-footer__title a:focus-visible {
  color: #f0cfaa;
  outline: none;
}

.true-footer__menu {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.true-footer__menu li {
  min-width: 0;
}

.true-footer__menu a,
.true-footer__menu-disabled {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.true-footer__menu a {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
  text-decoration: none;
  transition:
    color 0.2s ease,
    padding 0.2s ease;
}

.true-footer__menu a:hover,
.true-footer__menu a:focus-visible,
.true-footer__menu a[aria-current="page"] {
  color: #f0cfaa;
  padding-inline-start: 0.3rem;
  outline: none;
}

.true-footer__menu-disabled {
  color: rgba(255, 255, 255, 0.5);
  cursor: default;
}

/* ── Contact column ── */

.true-footer__reach {
  grid-area: reach;
  min-width: 0;
}

.true-footer__meta-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.true-footer__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  max-width: 100%;
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.2s ease;
}

.true-footer__meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

a.true-footer__meta:hover,
a.true-footer__meta:focus-visible {
  color: #f0cfaa;
  text-decoration: none;
  outline: none;
}

.true-footer__meta .true-icon {
  flex: 0 0 auto;
  color: #bf9468;
}

.true-footer__meta--static {
  cursor: default;
}

/* ── Bottom bar ── */

.true-footer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  /* Inline-end padding keeps the credit clear of the fixed WhatsApp button. */
  padding: 1.1rem 4.75rem 1.25rem 0;
  padding-inline: 0 4.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.true-footer .true-footer__copy {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.55);
}

.true-footer .true-footer__policy-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 2px;
}

.true-footer .true-footer__policy-link:visited,
.true-footer .true-footer__policy-link:hover {
  color: #fff;
}

.true-footer .true-footer__policy-link:focus-visible {
  color: #fff;
  outline: 2px solid #d5aa78;
  outline-offset: 2px;
}

.true-footer .true-footer__credit {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
}

.true-footer .true-footer__credit a {
  color: #d4ab85;
  font-weight: 800;
  text-decoration: none;
  transition: color 0.2s ease;
}

.true-footer .true-footer__credit a:hover,
.true-footer .true-footer__credit a:focus-visible {
  color: #f0cfaa;
  text-decoration: underline;
  text-underline-offset: 3px;
  outline: none;
}

/* ── Tablet ── */
@media (min-width: 768px) and (max-width: 1199px) {
  .true-footer {
    padding-top: 6.5rem;
  }

  .true-footer__main {
    grid-template-areas:
      "brand reach"
      "nav nav";
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem;
  }

  .true-footer__nav {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .true-footer__menu-cols {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

/* ── Mobile ──
   One column where every block spans the full width: brand (centred), the menu
   as a clean accordion, contact as tappable tiles, then the legal bar. */
@media (max-width: 767px) {
  .true-footer {
    margin-top: 0;
    padding-top: 1.5rem;
  }

  .true-footer > .true-container {
    padding-inline: 1rem;
  }

  /* The card sits in flow on small screens and lifts over the page edge. */
  .true-footer__cta {
    position: relative;
    top: auto;
    margin-top: -3rem;
    padding-inline: 0;
  }

  .true-footer__cta-card {
    justify-content: center;
    gap: 1.1rem;
    padding: 1.4rem 1.2rem;
    text-align: center;
    border-radius: 18px;
  }

  .true-footer__cta-actions {
    justify-content: center;
    width: 100%;
  }

  .true-footer__btn {
    justify-content: center;
    flex: 1 1 100%;
  }

  /* Blocks stretch to the full width (they used to shrink to their content). */
  .true-footer .true-footer__main {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 2rem 0 0;
  }

  /* Brand */
  .true-footer .true-footer__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 1.75rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  }

  .true-footer .true-logo--footer .true-logo__img {
    height: 96px;
    max-width: 200px;
    margin-inline: auto;
    object-position: center;
  }

  /* The logo file has transparent padding under the mark; pull the text up to it. */
  .true-footer .true-footer__brand .true-logo {
    margin-bottom: -0.65rem;
  }

  .true-footer .true-footer__desc {
    max-width: 34ch;
    margin: 0 auto 1.1rem;
    font-size: 0.875rem;
    line-height: 1.75;
  }

  .true-footer__social {
    justify-content: center;
  }

  /* Menu accordion */
  .true-footer .true-footer__nav {
    width: 100%;
    padding: 0;
    border: 0;
  }

  .true-footer__menu-cols {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .true-footer .true-footer__menu-column {
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  }

  .true-footer__menu-heading-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
  }

  .true-footer .true-footer__title {
    flex: 1;
    margin: 0;
    padding: 1rem 0;
    font-size: 0.98rem;
    border: 0;
  }

  .true-footer__title::after {
    display: none;
  }

  .true-footer .true-footer__menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    margin-inline-end: -8px;
    padding: 0;
    color: #d5aa78;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
  }

  .true-footer__menu-toggle svg {
    transition: transform 0.2s ease;
  }

  .true-footer__menu-toggle:focus-visible {
    outline: 2px solid #d5aa78;
    outline-offset: 2px;
  }

  .true-footer__menu-column.is-open .true-footer__menu-toggle svg {
    transform: rotate(180deg);
  }

  .true-footer__menu-column:not(.is-open) .true-footer__menu {
    display: none;
  }

  /* Open column: links in two columns */
  .true-footer .true-footer__menu-column.is-open .true-footer__menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem 1rem;
    padding: 0 0 1.1rem;
  }

  .true-footer .true-footer__menu a,
  .true-footer .true-footer__menu-disabled {
    min-height: 36px;
    font-size: 0.875rem;
  }

  /* Contact tiles */
  .true-footer .true-footer__reach {
    width: 100%;
    padding: 1.75rem 0 1.5rem;
    text-align: start;
  }

  .true-footer .true-footer__reach .true-footer__title {
    margin: 0 0 1rem;
    padding: 0 0 0.6rem;
  }

  .true-footer .true-footer__reach .true-footer__title::after {
    display: block;
  }

  .true-footer .true-footer__meta-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    align-items: stretch;
  }

  .true-footer .true-footer__meta-list li:nth-child(n + 3) {
    grid-column: 1 / -1;
  }

  .true-footer .true-footer__meta {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    min-height: 50px;
    padding: 0.7rem 0.85rem;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
  }

  .true-footer a.true-footer__meta:active {
    background: rgba(191, 148, 104, 0.14);
  }

  .true-footer .true-footer__meta span[dir="ltr"] {
    white-space: nowrap;
  }

  /* Legal bar */
  .true-footer__bar {
    flex-direction: column;
    justify-content: center;
    gap: 0.6rem;
    text-align: center;
    padding-inline: 0;
    padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
  }

  .true-footer .true-footer__copy {
    justify-content: center;
    max-width: 34ch;
    font-size: 0.75rem;
  }

  .true-footer .true-footer__credit {
    white-space: normal;
    justify-content: center;
  }
}

/* ── WhatsApp float — independent from the footer grid ── */
.true-whatsapp-float {
  position: fixed;
  bottom: 1.25rem;
  inset-inline-end: 1.25rem;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  color: #fff;
  text-decoration: none;
  background: var(--color-primary);
  border: 2px solid rgba(191, 148, 104, 0.55);
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.true-whatsapp-float:hover,
.true-whatsapp-float:focus-visible {
  color: #fff;
  text-decoration: none;
  border-color: var(--color-gold);
  box-shadow: 0 6px 24px rgba(30, 77, 58, 0.45);
  transform: translateY(-2px);
  outline: none;
}

.true-whatsapp-float .true-icon {
  display: block;
}

@media (max-width: 767px) {
  .true-whatsapp-float {
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    inset-inline-end: 1rem;
    width: 48px;
    height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .true-footer__menu a,
  .true-footer__social-btn,
  .true-footer__btn,
  .true-whatsapp-float {
    transition: none;
  }

  .true-footer__menu a:hover,
  .true-footer__social-btn:hover,
  .true-footer__btn:hover,
  .true-whatsapp-float:hover {
    transform: none;
  }
}
