/* =========================================================
   TERMS & CONDITIONS PAGE
   Responsive desktop / laptop / tablet / mobile
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  width: 100%;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: #fff;
  color: #000;
  font-family: "Fira Sans", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.terms-page {
  width: 100%;
  min-height: 100vh;
  background: #fff;
}

/* =========================================================
   SHARED WIDTH
   ========================================================= */

.content-width {
  width: min(100% - 40px, 1310px);
  margin-inline: auto;
}

/* =========================================================
   HEADER
   ========================================================= */

.site-header {
  width: 100%;
  background: #fff;
  position: relative;
  z-index: 10000;
}

.header-inner {
  position: relative;
  width: min(100% - 40px, 1320px);
  min-height: 72px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 300px;
  align-items: center;
  gap: 20px;
}

.site-logo {
  width: 180px;
  display: flex;
  align-items: center;
}

.site-logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(32px, 5vw, 70px);
}

.nav-link-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-link {
  color: #0554a2;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.nav-link:hover {
  opacity: 0.7;
}

.agx-service-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.agx-service-button {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.agx-service-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: 230px;
  padding: 10px;
  background: #fff;
  border: 1px solid rgba(5, 84, 162, 0.12);
  border-radius: 14px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 9999;
}

.agx-service-menu.agx-open,
.agx-service-dropdown.agx-open .agx-service-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.agx-service-item {
  display: block;
  padding: 11px 14px;
  border-radius: 9px;
  color: #0554a2;
  text-decoration: none;
  font-family: "Fira Sans", sans-serif;
  font-size: 15px;
  line-height: 20px;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.agx-service-item:hover {
  background-color: rgba(5, 84, 162, 0.07);
  opacity: 0.78;
}

.agx-dropdown-icon {
  width: 20px;
  height: auto;
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.quote-button {
  min-height: 42px;
  padding: 0 24px;
  border-radius: 24px;
  background: #008ae4;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.quote-button img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.menu-button {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.menu-button img {
  width: 25px;
  height: 25px;
  object-fit: contain;
}

/* =========================================================
   BLACK PAGE TITLE
   ========================================================= */

.page-hero {
  width: min(100% - 72px, 1720px);
  min-height: 145px;
  margin: 0 auto 48px;
  border-radius: 10px;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
}

.page-hero .content-width {
  width: min(100% - 80px, 1310px);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: 0;
}

/* =========================================================
   TERMS CONTENT
   ========================================================= */

.terms-content {
  padding-bottom: 58px;
}

.terms-section {
  width: 100%;
  margin: 0 0 30px;
}

.terms-section:last-child {
  margin-bottom: 0;
}

.terms-section h2 {
  margin: 0 0 8px;
  font-size: 29px;
  line-height: 1.2;
  font-weight: 500;
  color: #111;
}

.terms-section p,
.terms-section li {
  font-size: 15px;
  line-height: 1.58;
  color: #111;
}

.terms-section p {
  margin: 0;
}

.terms-section ul,
.terms-section ol {
  margin: 4px 0 0;
  padding-left: 20px;
}

.terms-section li {
  margin: 0 0 3px;
  padding-left: 2px;
}

.terms-section ol {
  padding-left: 23px;
}

.terms-section li::marker {
  font-size: 0.9em;
}

.intro-section {
  margin-bottom: 28px;
}

.contact-section {
  margin-top: 4px;
  padding-bottom: 8px;
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  width: calc(100% - 10px);
  margin: 0 auto;
  border-radius: 18px;
  background: #055eab;
  color: #fff;
  overflow: hidden;
}

.footer-inner {
  width: min(100% - 80px, 1320px);
  margin-inline: auto;
  padding: 52px 0 30px;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(250px, 1.35fr) minmax(140px, 0.7fr) minmax(190px, 1fr) minmax(270px, 1.1fr);
  gap: 42px;
  align-items: start;
}

.footer-brand {
  min-width: 0;
}

.footer-logo {
  width: 180px;
  height: auto;
  margin-bottom: 28px;
  object-fit: contain;
}

.footer-brand p {
  max-width: 340px;
  margin: 0 0 25px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.65;
}

.newsletter {
  width: 100%;
  max-width: 340px;
  height: 38px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #fff;
  font-size: 13px;
}

.newsletter button {
  border: 0;
  border-radius: 18px;
  padding: 7px 17px;
  background: #008ae4;
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
}

.footer-column,
.footer-contact {
  min-width: 0;
}

.footer-column h3,
.footer-contact h3 {
  margin: 0 0 22px;
  color: #fff;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 500;
}

.footer-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
}

.footer-column a {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  line-height: 1.5;
}

.footer-column a:hover {
  color: #fff;
}

.services-column {
  gap: 8px;
}

.footer-contact {
  display: flex;
  flex-direction: column;
}

.contact-item {
  width: 100%;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  margin-bottom: 13px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  line-height: 1.45;
}

.contact-item > span:last-child,
.contact-item > div {
  min-width: 0;
}

.contact-item > span:last-child {
  overflow-wrap: anywhere;
}

.contact-icon {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  border-radius: 50%;
  background: #008ae4;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.contact-icon img {
  width: 11px;
  height: 11px;
  object-fit: contain;
}

.phone-circle img {
  width: 12px;
  height: 12px;
  object-fit: contain;
}

.whatsapp-circle img {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  object-fit: cover;
}

.address-item {
  align-items: start;
}

.address-item .contact-icon {
  margin-top: 3px;
}

.address-item strong {
  display: block;
  margin-bottom: 1px;
  color: #fff;
  font-weight: 500;
}

.address-item div span {
  display: block;
}

.footer-bottom {
  position: relative;
  margin-top: 30px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}

.footer-bottom p {
  margin: 0;
  color: #fff;
  font-size: 11px;
  line-height: 1.5;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 10px;
  line-height: 1.4;
}

/* =========================================================
   LAPTOP
   ========================================================= */

@media (max-width: 1350px) {
  .header-inner {
    grid-template-columns: 190px minmax(0, 1fr) 300px;
  }

  .main-nav {
    gap: 38px;
  }

  .footer-inner {
    width: min(100% - 60px, 1180px);
  }

  .footer-top {
    gap: 28px;
  }
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1050px) {
  .header-inner {
    min-height: 68px;
    grid-template-columns: 170px minmax(0, 1fr) 120px;
  }

  .main-nav {
    gap: 25px;
  }

  .header-actions {
    gap: 0;
  }

  .quote-button {
    display: none;
  }

  .page-hero {
    width: calc(100% - 40px);
    min-height: 125px;
    margin-bottom: 38px;
  }

  .page-hero .content-width {
    width: calc(100% - 60px);
  }

  .terms-content {
    width: calc(100% - 70px);
  }

  .terms-section h2 {
    font-size: 26px;
  }

  .terms-section p,
  .terms-section li {
    font-size: 15px;
  }

  .footer-inner {
    width: calc(100% - 70px);
    padding-top: 42px;
  }

  .footer-top {
    grid-template-columns: 1.25fr 0.75fr 1fr;
  }

  .footer-contact {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {
  .content-width {
    width: calc(100% - 32px);
  }

  .header-inner {
    width: calc(100% - 28px);
    min-height: 64px;
    grid-template-columns: 145px 1fr 34px;
    gap: 10px;
  }

  .site-logo {
    width: 145px;
  }

  /* Mobile menu: compact stacked navigation. Nothing is vertically stretched. */
  .main-nav {
    display: grid !important;
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    left: auto;
    width: min(250px, calc(100vw - 28px));
    height: auto !important;
    max-height: 0;
    min-height: 0 !important;
    z-index: 9998;
    grid-auto-rows: max-content;
    align-content: start !important;
    justify-content: stretch !important;
    align-items: stretch !important;
    gap: 2px !important;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px) scale(0.985);
    transform-origin: top right;
    background: #fff;
    border: 1px solid transparent;
    border-radius: 14px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
    padding: 0 !important;
    transition:
      max-height 0.34s ease,
      padding 0.22s ease,
      opacity 0.22s ease,
      transform 0.26s ease,
      visibility 0.26s ease,
      border-color 0.22s ease;
  }

  .main-nav.agx-mobile-open {
    max-height: 520px;
    padding: 10px !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    border-color: rgba(5, 84, 162, 0.10);
  }

  .main-nav > .nav-link-wrap,
  .main-nav > .agx-service-dropdown {
    width: 100% !important;
    height: max-content !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: none !important;
    flex-shrink: 0 !important;
    align-self: start !important;
    display: block !important;
  }

  .nav-link-wrap,
  .agx-service-dropdown {
    overflow: visible !important;
  }

  .nav-link,
  .agx-service-button {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    flex: none !important;
  }

  .nav-link {
    display: block !important;
    padding: 11px 14px !important;
    font-size: 15px;
    line-height: 1.25;
  }

  .agx-service-button {
    appearance: none;
    justify-content: space-between;
    align-items: center;
    padding: 0 !important;
    font-size: 15px;
  }

  .agx-service-button .nav-link {
    display: block !important;
  }

  .agx-dropdown-icon {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    object-fit: contain;
    transition: transform 0.25s ease;
  }

  .agx-service-dropdown.agx-open .agx-dropdown-icon {
    transform: rotate(180deg);
  }

  .agx-service-menu {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    max-height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 4px !important;
    overflow: hidden !important;
    transform: none !important;
    border: 0 !important;
    border-radius: 10px;
    box-shadow: none !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: block !important;
    transition:
      max-height 0.28s ease,
      padding 0.22s ease,
      opacity 0.2s ease,
      visibility 0.22s ease;
  }

  .agx-service-menu.agx-open,
  .agx-service-dropdown.agx-open .agx-service-menu {
    max-height: 420px !important;
    padding: 3px 4px 5px !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .agx-service-item {
    display: block !important;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    padding: 9px 14px;
    font-size: 14px;
    line-height: 1.35;
  }

  .header-actions {
    grid-column: 3;
  }

  .menu-button {
    width: 30px;
    height: 30px;
    transition: transform 0.25s ease;
  }

  .menu-button[aria-expanded="true"] {
    transform: rotate(4deg);
  }

  .page-hero {
    width: calc(100% - 24px);
    min-height: 105px;
    margin: 0 auto 30px;
    border-radius: 9px;
  }

  .page-hero .content-width {
    width: calc(100% - 40px);
  }

  .page-hero h1 {
    font-size: 27px;
    line-height: 1.15;
  }

  .terms-content {
    width: calc(100% - 32px);
    padding-bottom: 38px;
  }

  .terms-section {
    margin-bottom: 25px;
  }

  .terms-section h2 {
    margin-bottom: 8px;
    font-size: 23px;
    line-height: 1.2;
  }

  .terms-section p,
  .terms-section li {
    font-size: 14px;
    line-height: 1.62;
  }

  .terms-section ul,
  .terms-section ol {
    padding-left: 18px;
  }

  .site-footer {
    width: calc(100% - 8px);
    border-radius: 16px;
  }

  .footer-inner {
    width: calc(100% - 34px);
    padding: 38px 0 24px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-brand p,
  .newsletter {
    max-width: 100%;
  }

  .footer-logo {
    width: 165px;
    margin-bottom: 22px;
  }

  .footer-column,
  .footer-contact {
    width: 100%;
  }

  .footer-column h3,
  .footer-contact h3 {
    margin-bottom: 15px;
    font-size: 18px;
  }

  .footer-bottom {
    margin-top: 24px;
    padding-top: 22px;
    gap: 17px;
  }

  .footer-links {
    width: 100%;
    gap: 9px 16px;
  }
}

/* =========================================================
   SCROLL REVEAL — smooth, one-time, no flicker
   ========================================================= */

@media (prefers-reduced-motion: no-preference) {
  .terms-section.reveal-ready {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
    transition: opacity 0.65s ease, transform 0.65s ease;
    will-change: opacity, transform;
  }

  .terms-section.reveal-ready.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {
  body {
    font-size: 14px;
  }

  .header-inner {
    grid-template-columns: 130px 1fr 30px;
  }

  .site-logo {
    width: 130px;
  }

  .page-hero {
    min-height: 92px;
  }

  .page-hero .content-width {
    width: calc(100% - 32px);
  }

  .page-hero h1 {
    font-size: 24px;
  }

  .terms-content {
    width: calc(100% - 28px);
  }

  .terms-section h2 {
    font-size: 21px;
  }

  .terms-section p,
  .terms-section li {
    font-size: 13.5px;
    line-height: 1.6;
  }

  .footer-inner {
    width: calc(100% - 28px);
  }

  .footer-bottom p {
    font-size: 10px;
  }
}

/* =========================================================
   FINAL MOBILE NAV OVERRIDE — KEEP AT VERY END
   ========================================================= */
@media screen and (max-width: 700px) {
  .header-inner { position: relative !important; }

  .main-nav {
    display: none !important;
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    left: auto !important;
    width: 225px !important;
    max-width: calc(100vw - 24px) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 8px !important;
    box-sizing: border-box !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    background: #fff !important;
    border: 1px solid rgba(5,84,162,.12) !important;
    border-radius: 15px !important;
    box-shadow: 0 12px 35px rgba(0,0,0,.12) !important;
    z-index: 99999 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(-8px) !important;
    transform-origin: top right !important;
    transition: opacity .22s ease, transform .22s ease, visibility .22s ease !important;
  }

  .main-nav.agx-mobile-open {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }

  .main-nav > .nav-link-wrap,
  .main-nav > .agx-service-dropdown {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 0 0 auto !important;
  }

  .main-nav .nav-link-wrap {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .main-nav .nav-link,
  .main-nav .agx-service-button {
    width: 100% !important;
    min-height: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 11px 14px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex: none !important;
    font-size: 15px !important;
    line-height: 20px !important;
    color: #0554a2 !important;
    text-decoration: none !important;
    border-radius: 9px !important;
    transform: none !important;
  }

  .main-nav .nav-link:hover,
  .main-nav .agx-service-button:hover {
    background: rgba(5,84,162,.07) !important;
  }

  .main-nav .agx-service-dropdown {
    position: relative !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .main-nav .agx-service-button {
    appearance: none !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    cursor: pointer !important;
    justify-content: space-between !important;
    text-align: left !important;
  }

  .main-nav .agx-service-button .nav-link {
    width: auto !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 11px 0 !important;
    background: transparent !important;
  }

  .main-nav .agx-dropdown-icon {
    width: 15px !important;
    height: 15px !important;
    margin-right: 5px !important;
    object-fit: contain !important;
    flex: 0 0 15px !important;
    transition: transform .22s ease !important;
  }

  .main-nav .agx-service-dropdown.agx-open .agx-dropdown-icon {
    transform: rotate(180deg) !important;
  }

  .main-nav .agx-service-menu {
    position: static !important;
    display: block !important;
    width: 100% !important;
    height: 0 !important;
    max-height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transition: height .25s ease, max-height .25s ease, opacity .2s ease, visibility .2s ease, padding .25s ease !important;
  }

  .main-nav .agx-service-dropdown.agx-open .agx-service-menu,
  .main-nav .agx-service-menu.agx-open {
    height: auto !important;
    max-height: 330px !important;
    margin: 0 !important;
    padding: 3px 4px 5px !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  .main-nav .agx-service-item {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 36px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 8px 14px 8px 28px !important;
    box-sizing: border-box !important;
    font-size: 14px !important;
    line-height: 19px !important;
    color: #0554a2 !important;
    text-decoration: none !important;
    border-radius: 8px !important;
  }

  .main-nav .agx-service-item:hover {
    background: rgba(5,84,162,.07) !important;
  }

  .menu-button {
    position: relative !important;
    z-index: 100000 !important;
  }
}

@media screen and (max-width: 380px) {
  .main-nav {
    width: 215px !important;
    max-width: calc(100vw - 20px) !important;
  }
}
