/* ==========================================================================
   Site footer
   Partial: Views/Shared/_siteFooter.cshtml
   Used by: _Layout.cshtml and _LayoutForLandingPage.cshtml

   Every rule is scoped under .sf-footer so nothing here leaks into main.css
   styling elsewhere. The footer uses its own .sf-wrap instead of Bootstrap's
   .container, because main.css changes .container per breakpoint
   (min-width:1280px from 1366px up, width:100% below 992px). Each element
   also resets the properties page styles tend to change, so the footer
   renders the same on every page. Colours follow the Agoda-style search box
   (agodaStyleHotelSearch.css).
   ========================================================================== */

.sf-footer {
  --sf-blue: #2067da;
  --sf-blue-dark: #1a56c4;
  --sf-blue-soft: #e8f0fc;
  --sf-text: #2a2a2e;
  --sf-muted: #5e6b82;
  --sf-line: #e1e6ee;
  --sf-surface: #f4f6fa;
  --sf-white: #fff;
  --sf-gutter: 24px;

  display: block;
  position: relative;
  z-index: 2;
  clear: both;
  float: none;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 56px 0 0;
  background: var(--sf-surface);
  border: 0;
  border-top: 1px solid var(--sf-line);
  color: var(--sf-text);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
  text-align: left;
  text-transform: none;
}
.sf-footer *,
.sf-footer *::before,
.sf-footer *::after {
  box-sizing: border-box;
}

/* Width wrapper (replaces Bootstrap .container) */
.sf-footer .sf-wrap {
  width: 100%;
  max-width: 1280px;
  min-width: 0;
  margin: 0 auto;
  padding: 0 var(--sf-gutter);
}

/* Element resets */
.sf-footer h2,
.sf-footer p,
.sf-footer ul,
.sf-footer li,
.sf-footer nav,
.sf-footer section {
  float: none;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  letter-spacing: normal;
  text-transform: none;
  text-align: left;
}
.sf-footer nav,
.sf-footer section {
  display: block;
  position: static;
}
.sf-footer img {
  max-width: 100%;
  border: 0;
}
.sf-footer .sf-icon {
  display: block;
  flex-shrink: 0;
  fill: currentColor;
  overflow: visible;
}

.sf-footer a {
  text-decoration: none;
  background-color: transparent;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.sf-footer a:focus {
  outline: none;
}
.sf-footer a:focus-visible {
  outline: 2px solid var(--sf-blue);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Grid: help card + three link columns
   -------------------------------------------------------------------------- */
.sf-footer .sf-main {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) repeat(3, minmax(0, 1fr));
  gap: 40px 48px;
  align-items: start;
  padding-bottom: 48px;
}

/* --------------------------------------------------------------------------
   Need help? card
   -------------------------------------------------------------------------- */
.sf-footer .sf-help {
  padding: 28px 28px 30px;
  border-radius: 16px;
  background: var(--sf-blue);
  color: var(--sf-white);
}
.sf-footer .sf-help-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--sf-white);
}
.sf-footer .sf-help-text {
  margin: 0 0 20px;
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
}
.sf-footer .sf-help-mail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--sf-white);
  color: var(--sf-blue-dark);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}
.sf-footer .sf-help-mail .sf-icon {
  width: 17px;
  height: 17px;
}
.sf-footer .sf-help-mail-text {
  min-width: 0;
  overflow-wrap: anywhere;
}
.sf-footer .sf-help-mail:hover {
  background: var(--sf-blue-soft);
  color: var(--sf-blue-dark);
  text-decoration: none;
}
.sf-footer .sf-help-mail:focus-visible {
  outline-color: var(--sf-white);
  border-radius: 999px;
}

/* --------------------------------------------------------------------------
   Link columns
   -------------------------------------------------------------------------- */
.sf-footer .sf-heading {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--sf-text);
}
.sf-footer .sf-links {
  list-style: none;
}
.sf-footer .sf-links li {
  display: block;
  list-style: none;
}
.sf-footer .sf-links li + li {
  margin-top: 2px;
}
.sf-footer .sf-links a {
  display: inline-block;
  padding: 5px 0;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--sf-muted);
}
.sf-footer .sf-links a:hover {
  color: var(--sf-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Social icons
   -------------------------------------------------------------------------- */
.sf-footer .sf-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 3px;
}
.sf-footer .sf-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--sf-line);
  border-radius: 50%;
  background: var(--sf-white);
  color: var(--sf-text);
}
.sf-footer .sf-social .sf-icon {
  width: 18px;
  height: 18px;
}
.sf-footer .sf-social a:hover {
  border-color: var(--sf-blue);
  background: var(--sf-blue);
  color: var(--sf-white);
}
.sf-footer .sf-social a:focus-visible {
  border-radius: 50%;
}

/* --------------------------------------------------------------------------
   Bottom bar: logo + copyright
   -------------------------------------------------------------------------- */
.sf-footer .sf-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 20px 0 24px;
  border-top: 1px solid var(--sf-line);
}
.sf-footer .sf-logo {
  display: inline-block;
  line-height: 0;
}
.sf-footer .sf-logo img {
  display: block;
  width: auto;
  height: 40px;
}
.sf-footer .sf-copy {
  font-size: 13px;
  line-height: 1.5;
  color: var(--sf-muted);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .sf-footer .sf-main {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px 32px;
  }
  .sf-footer .sf-help {
    grid-column: 1 / -1;
  }
}

/* main.css pads <body> by 12px between 641px and 768px wide (and resets it
   to 0 at 640px and below); pull the footer out so it still runs edge to edge */
@media (min-width: 640.02px) and (max-width: 768px) {
  .sf-footer {
    width: calc(100% + 24px);
    margin: 0 -12px -12px;
  }
}

@media (max-width: 575.98px) {
  .sf-footer {
    --sf-gutter: 16px;
    padding-top: 32px;
  }
  .sf-footer .sf-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 20px;
    padding-bottom: 32px;
  }
  .sf-footer .sf-help {
    padding: 22px 20px 24px;
    border-radius: 14px;
  }
  .sf-footer .sf-help-title {
    font-size: 20px;
  }
  .sf-footer .sf-help-mail {
    padding: 10px 18px;
    font-size: 14.5px;
  }
  .sf-footer .sf-col-social {
    grid-column: 1 / -1;
  }
  .sf-footer .sf-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sf-footer a {
    transition: none;
  }
}
