@import url('https://fonts.googleapis.com/css2?family=Audiowide&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

/* ── SHARED HEADER / BACKGROUND / FOOTER SHELL ── */

/* Marble page background (matches aboutus.html) */
html,
body {
  background-image: url("../img/background.jpg") !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-size: cover !important;
  background-attachment: fixed !important;
  background-color: transparent !important;
}

/* Hide the old template headers / sidebars so they don't duplicate/flash before JS removes them */
.top-header-banner,
body > .w3-bar,
.w3-sidebar,
.w3-overlay,
header.w3-top.w3-hide-large,
.w3-button.w3-hide-large {
  display: none !important;
}

/* Reset sidebar-induced left margins on template layouts */
#main,
.w3-main {
  margin-left: 0 !important;
}

/* ── Site header nav bar ── */
.ta-site-header {
  width: 100%;
  background-color: #000102a5; /* asphalt */
  color: #f8f7f7;
  font-size: 18px;
  font-family: 'Audiowide', cursive;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 30px;
  box-sizing: border-box;
  padding: 24px 20px;
}

.ta-site-header a {
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  padding: 5px;
  display: inline-block;
  transition: background-color 0.2s ease;
  border: 5px solid transparent;
  border-image: repeating-linear-gradient(
    -45deg,
    #f3c623,
    #f3c623 8px,
    #111111 8px,
    #111111 16px
  ) 1;
  border-radius: 10px;
  margin-right: 15px;
}

.ta-site-header a:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.ta-site-header .ta-nav-right {
  margin-left: auto;
}

/* ── HOME BUTTON (shared header) ── */
.ta-site-header .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  outline: none;
  box-sizing: border-box;
  transition: all 0.2s;
  padding: 7px 12px;
  font-size: 16px;
  font-family: Inter, sans-serif;
  font-weight: 600;
  color: rgba(255, 255, 255, 1);
  background-color: rgba(0, 0, 0, 1);
  background-image: linear-gradient(45deg, rgba(164, 164, 164, 1) 25%, transparent 25%, transparent 75%, rgba(164, 164, 164, 1) 75%), linear-gradient(-45deg, rgba(164, 164, 164, 1) 25%, transparent 25%, transparent 75%, rgba(164, 164, 164, 1) 75%);
  background-size: 8px 8px;
  border-radius: 18px;
  border: 2px dashed rgba(255, 255, 255, 1);
  min-width: 108px;
  min-height: 34px;
  box-shadow: 6px -7px 14px rgba(0, 0, 0, 1);
  animation: pulse 1s ease 0s 1;
  --hover-duration: 0.3s;
  --hover-bg: rgba(190, 190, 190, 1);
}

.ta-site-header .btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ta-site-header .btn-icon svg {
  width: 17px;
  height: 17px;
  fill: rgba(153, 153, 153, 1);
}

.ta-site-header .btn:hover {
  background: rgba(190, 190, 190, 1);
  color: rgba(62, 62, 62, 1);
  border-color: rgba(52, 52, 52, 1);
  box-shadow: 0 0 20px var(--glow-color, rgba(59, 130, 246, 0.6));
  transition: box-shadow var(--hover-duration, 0.3s) ease;
}

/* ── CALCULATOR BUTTON (shared header) ── */
.ta-site-header .btn._pop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1 1 0;
  cursor: pointer;
  outline: none;
  box-sizing: border-box;
  transition: all 0.2s;
  padding: 6px 12px;
  font-size: 19px;
  font-family: "Bebas Neue", sans-serif;
  font-weight: 600;
  color: rgb(4 118 192);
  background: radial-gradient(circle, rgba(0, 0, 0, 1), rgba(108, 108, 108, 1));
  border-radius: 24px;
  border: 3px dotted rgba(4, 118, 192, 1);
  min-width: 92px;
  min-height: 30px;
  box-shadow: 5px 4px 12px rgba(255, 255, 255, 0.98);
  text-shadow: 0px 3px 9px #000000;
  position: relative;
  overflow: hidden;
  --hover-duration: 1.4s;
  --hover-bg: rgba(165, 165, 165, 1);
}

.ta-site-header .btn._pop .btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ta-site-header .btn._pop .btn-icon svg {
  width: 18px;
  height: 18px;
  fill: rgba(21, 21, 21, 1);
}

.ta-site-header .btn._pop .btn-text {
  position: relative;
  z-index: 2;
}

.ta-site-header .btn._pop:hover {
  background: radial-gradient(circle, rgb(100, 100, 100), rgba(165, 165, 165, 1));
  color: rgb(33, 113, 241);
  border-color: rgb(181, 148, 0);
  transform: scale(1.1);
}

.ta-site-header .btn._pop::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--hover-bg, rgba(0, 0, 0, 0.917));
  transform: scaleX(0);
  transform-origin: center;
  z-index: 1;
  pointer-events: none;
  transition: transform var(--hover-duration, 0.5s) ease;
}

.ta-site-header .btn._pop:hover::before {
  transform: scaleX(1);
}

@media (max-width: 600px) {
  .ta-site-header {
    justify-content: center;
  }

  .ta-site-header .ta-nav-right {
    margin-left: 0;
  }
}

/* ── Sticky footer layout ── */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
}

main {
  flex: 1;
}

/* ── Site footer banner ── */
.ta-site-footer {
  margin-top: auto;
  width: 100%;
}

.ta-site-footer img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── RESPONSIVE / MOBILE ── */

/* Never let images stretch the page horizontally */
img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 860px) {
  body {
    overflow-x: hidden;
  }
}

@media (max-width: 640px) {
  .ta-site-header {
    font-size: 14px;
    padding: 12px 6px;
    row-gap: 5px;
    justify-content: center;
  }

  .ta-site-header a {
    padding: 6px 8px;
    border-width: 3px;
    margin-right: 6px;
    border-radius: 8px;
  }

  .ta-site-header .ta-nav-right {
    margin-left: 0;
  }
}

/* ── Mobile nav: two rows of three, evenly spaced ── */
@media (max-width: 640px) {
  .ta-site-header {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: auto;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    justify-content: stretch;
    align-items: stretch;
    text-align: center;
  }

  .ta-site-header .btn,
  .ta-site-header .btn._pop {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    margin: 0;
    padding: 5px 2px;
    justify-content: center;
    font-size: clamp(11px, 3.1vw, 15px);
    white-space: nowrap;
  }

  .ta-site-header .btn .btn-text,
  .ta-site-header .btn._pop .btn-text {
    font-size: clamp(11px, 3.1vw, 15px);
    letter-spacing: 0.02em;
  }

  .ta-site-header .btn-icon {
    display: none;
  }
}
