/* Mirai Micro-Bubble & DAF Water Systems (miraibubbly.com) — Escape Velocity Custom Architecture */
:root {
  --mirai-navy: #071926;
  --mirai-deep: #0b2538;
  --mirai-cyan: #0284c7;
  --mirai-aqua: #06b6d4;
  --mirai-ice: #f0f9ff;
  --mirai-border: #cbd5e1;
}

html, body {
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  color: #1e293b;
}

img {
  max-width: 100%;
  height: auto !important;
  object-fit: cover !important;
  display: block;
}

/* Fix Escape Velocity #header & absolute #nav traps */
#header.wrapper {
  background: linear-gradient(180deg, rgba(7, 25, 38, 0.88) 0%, rgba(11, 37, 56, 0.92) 100%),
              url("../../images/perth-316l-stainless-daf-clarifier-fabrication-hall.jpg") center center / cover no-repeat !important;
  padding: 0 0 4.5em 0 !important;
  position: relative !important;
}

#header:before {
  display: none !important;
}

.mirai-topstrip {
  background: #041019;
  color: #e2e8f0;
  font-size: 0.83rem;
  padding: 0.55rem 1.25rem;
  border-bottom: 1px solid rgba(56, 189, 248, 0.25);
}

.mirai-topstrip-inner {
  max-width: 1220px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.mirai-topstrip strong {
  color: #38bdf8 !important;
}

.mirai-topstrip a {
  color: #7dd3fc !important;
  text-decoration: none;
  font-weight: 700;
}

/* Neutralize Escape Velocity absolute #nav so it never overlaps #logo */
#nav {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  width: 100% !important;
  background: rgba(4, 16, 25, 0.78);
  padding: 0.85rem 1rem !important;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
  z-index: 1000;
}

#nav > ul {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 auto !important;
  max-width: 1220px;
  height: auto !important;
  line-height: 1.4 !important;
}

#nav > ul > li {
  display: inline-block;
  position: relative;
  padding: 0 !important;
  margin: 0 !important;
}

#nav > ul > li > a,
#nav > ul > li > span {
  display: block;
  color: #f1f5f9 !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase;
  padding: 0.55rem 0.95rem !important;
  border-radius: 5px;
  text-decoration: none;
  border: 1px solid transparent;
}

#nav > ul > li.current > a,
#nav > ul > li:hover > a {
  background: var(--mirai-cyan) !important;
  color: #ffffff !important;
  border-color: #38bdf8;
}

#nav > ul > li > ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 290px;
  background: #071926;
  border: 1px solid #0284c7;
  border-radius: 6px;
  padding: 0.45rem 0;
  z-index: 1001;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  text-align: left;
}

#nav > ul > li:hover > ul {
  display: block;
}

#nav > ul > li > ul > li {
  display: block;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#nav > ul > li > ul > li:first-child {
  border-top: none;
}

#nav > ul > li > ul > li > a {
  display: block;
  padding: 0.6rem 1.05rem;
  color: #e0f2fe !important;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
}

#nav > ul > li > ul > li > a:hover {
  background: var(--mirai-cyan);
  color: #ffffff !important;
}

/* Neutralize Escape Velocity absolute #logo */
#logo {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  max-width: 980px;
  margin: 2.6rem auto 0 auto !important;
  padding: 0 1.25rem;
  text-align: center;
}

#logo h1 {
  font-size: 2.2rem !important;
  line-height: 1.25 !important;
  color: #ffffff !important;
  letter-spacing: 0.02em !important;
  margin-bottom: 0.6rem !important;
}

#logo p {
  font-size: 1.05rem !important;
  line-height: 1.6 !important;
  color: #bae6fd !important;
  max-width: 840px;
  margin: 0 auto !important;
}

.mirai-hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1.15rem;
}

.mirai-badge {
  background: rgba(6, 182, 212, 0.2);
  border: 1px solid #22d3ee;
  color: #cffafe;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
}

.mirai-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 1.6rem;
}

/* Buttons — prevent any ellipsis truncation */
.button,
a.button,
button,
input[type="submit"],
input[type="button"] {
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  height: auto !important;
  line-height: 1.4 !important;
  padding: 0.85em 1.65em !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
}

.button.style1,
input[type="submit"].style1 {
  background: var(--mirai-cyan) !important;
  color: #ffffff !important;
}

.button.style2 {
  background: #0f172a !important;
  color: #f8fafc !important;
  border: 1px solid #38bdf8 !important;
}

/* Section Wrapper Titles */
.wrapper .title {
  background: var(--mirai-deep) !important;
  color: #38bdf8 !important;
  font-weight: 800 !important;
  border-radius: 6px 6px 0 0;
}

#intro.wrapper.style1 {
  background: #0b2538 !important;
  color: #e2e8f0 !important;
  padding: 3.5em 0 4em 0 !important;
}

#intro.wrapper.style1 .title {
  background: #0284c7 !important;
  color: #ffffff !important;
}

#main.wrapper.style2 {
  background: #f8fafc !important;
  padding: 3.5em 0 4.5em 0 !important;
}

#highlights.wrapper.style3 {
  background: #f1f5f9 !important;
  padding: 3.5em 0 4.5em 0 !important;
}

.box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
  margin-bottom: 1.8rem;
}

.box.post header.style1 {
  text-align: left !important;
  padding-bottom: 1rem !important;
  margin-bottom: 1.5rem !important;
  border-bottom: 2px solid #e2e8f0;
}

.box.post header.style1 h2 {
  font-size: 1.85rem !important;
  line-height: 1.28 !important;
  color: #0f172a !important;
  margin-bottom: 0.45rem !important;
}

.box.post header.style1 p {
  font-size: 1.05rem !important;
  line-height: 1.45 !important;
  color: #0284c7 !important;
}

/* Interactive DAF Micro-Bubble Hydraulic Loading Calculator */
.mirai-calc-card {
  background: #071926;
  color: #f8fafc;
  border-radius: 12px;
  padding: 2.2rem;
  border: 2px solid #0284c7;
  margin: 2rem 0 2.5rem 0;
  box-shadow: 0 18px 42px rgba(7, 25, 38, 0.25);
}

.mirai-calc-card h2,
.mirai-calc-card h3 {
  color: #ffffff !important;
}

.mirai-calc-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 1.8rem;
  align-items: start;
  margin-top: 1.4rem;
}

.mirai-calc-controls label {
  display: block;
  font-size: 0.81rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7dd3fc;
  margin: 0.85rem 0 0.35rem 0;
}

.mirai-calc-controls select {
  width: 100%;
  background: #0f293d !important;
  color: #ffffff !important;
  border: 1px solid #0369a1 !important;
  border-radius: 6px;
  padding: 0.7rem 0.9rem;
  font-size: 0.94rem;
  font-weight: 600;
}

.mirai-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.mirai-kpi-box {
  background: #0f293d;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 8px;
  padding: 0.8rem 0.9rem;
  overflow: hidden;
}

.mirai-kpi-box span {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #bae6fd;
  margin-bottom: 0.25rem;
}

.mirai-kpi-box strong {
  display: block;
  font-size: 0.92rem !important;
  font-weight: 800;
  color: #38bdf8 !important;
  white-space: nowrap !important;
}

.mirai-svg-panel {
  background: #041019;
  border: 1px solid #0369a1;
  border-radius: 10px;
  padding: 1.15rem;
}

#mirai-daf-svg {
  width: 100%;
  height: auto;
  display: block;
}

.mirai-calc-summary {
  margin-top: 0.9rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #e2e8f0;
}

/* Engineering Tables */
.mirai-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0;
}

table.mirai-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  font-size: 0.92rem;
}

table.mirai-table th {
  background: var(--mirai-navy);
  color: #ffffff;
  font-weight: 700;
  text-align: left;
  padding: 0.85rem 1rem;
  border: 1px solid #0f293d;
}

table.mirai-table td {
  padding: 0.8rem 1rem;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  vertical-align: top;
}

table.mirai-table tr:nth-child(even) td {
  background: #f0f9ff;
}

.mirai-callout {
  background: #f0f9ff;
  border-left: 5px solid var(--mirai-cyan);
  padding: 1.25rem 1.5rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
}

.mirai-step-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin: 1.5rem 0;
}

.mirai-step-card {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 1.25rem;
}

.mirai-step-card h4 {
  color: var(--mirai-cyan);
  font-size: 1.02rem;
  margin-bottom: 0.45rem;
}

/* Booking Form */
.mirai-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
}

.mirai-form-grid .full-span {
  grid-column: 1 / -1;
}

.mirai-form-grid label {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
  color: #0f172a;
}

.mirai-form-grid input,
.mirai-form-grid select,
.mirai-form-grid textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.7rem 0.9rem;
  background: #ffffff;
  color: #1e293b;
  font-size: 0.95rem;
}

/* Footer */
#footer.wrapper {
  background: #071926 !important;
  color: #cbd5e1 !important;
  padding: 3.5em 0 3em 0 !important;
}

#footer .title {
  background: #071926 !important;
  color: #38bdf8 !important;
}

#titleBar, #navPanel {
  display: none !important;
}

@media screen and (max-width: 980px) {
  #nav {
    display: block !important;
  }
  #nav > ul > li > a {
    font-size: 0.78rem !important;
    padding: 0.45rem 0.65rem !important;
  }
  .mirai-calc-grid,
  .mirai-step-grid,
  .mirai-form-grid {
    grid-template-columns: 1fr !important;
  }
  #logo h1 {
    font-size: 1.65rem !important;
  }
}

@media screen and (max-width: 680px) {
  .mirai-kpi-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Override Escape Velocity #header display:flex & fixed 24em height */
#header,
#header.wrapper,
body.homepage #header,
body.no-sidebar #header {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 0 5.5rem 0 !important;
}
#nav > ul > li {
  line-height: 1.35 !important;
  height: auto !important;
}
#nav > ul > li > a,
#nav > ul > li > span {
  line-height: 1.35 !important;
  height: auto !important;
}
