/* =========================================================
   WaterGrid - stylesheet
   A clean, corporate-modern theme for a plumbing & water
   infrastructure company. Mobile-first, no framework.
   ========================================================= */

:root {
  --navy: #0a2540;
  --deep-teal: #0b4f6c;
  --teal: #0e7c86;
  --aqua: #2ec4b6;
  --amber: #f2a541;
  --amber-dark: #d98a2b;
  --ink: #16232f;
  --muted: #5c6b7a;
  --line: #e3e9ee;
  --bg: #f6f9fb;
  --card: #ffffff;
  --success: #1c8a5a;
  --danger: #c0392b;
  --radius: 14px;
  --shadow: 0 10px 30px -12px rgba(10, 37, 64, 0.18);
  --shadow-sm: 0 2px 10px rgba(10, 37, 64, 0.08);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Poppins', 'Inter', sans-serif; line-height: 1.2; margin: 0 0 .6em; color: var(--navy); }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; color: var(--muted); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { padding: 0; margin: 0; list-style: none; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section-tight { padding: 40px 0; }
.section-alt { background: #eef4f7; }
.text-center { text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal);
  background: rgba(46, 196, 182, .12);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.section-head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.section-head p { font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--amber); color: var(--navy); }
.btn-primary:hover { background: var(--amber-dark); box-shadow: var(--shadow-sm); }
.btn-outline { background: transparent; border-color: rgba(255,255,255,.55); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: #061a2e; }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--deep-teal); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: .82rem; border-radius: 8px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- Logo ---------- */
.logo { display: flex; align-items: center; gap: 10px; font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.3rem; color: var(--navy); }
.logo svg { flex-shrink: 0; }
.logo .grid-part { color: var(--teal); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  /* Note: intentionally no backdrop-filter/transform here - either would
     create a new containing block and break the fixed-position mobile
     nav-links panel below (it would size itself to the header instead
     of the viewport). */
}
.topbar {
  background: var(--navy);
  color: #cfe3ea;
  font-size: .82rem;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; padding-bottom: 8px; gap: 12px; flex-wrap: wrap; }
.topbar a { color: #fff; }
.topbar .topbar-links { display: flex; gap: 18px; flex-wrap: wrap; }
.navbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-weight: 500; color: var(--ink); padding: 6px 2px; border-bottom: 2px solid transparent; }
.nav-links a:hover, .nav-links a.active { color: var(--teal); border-color: var(--teal); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--navy); border-radius: 2px; }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    inset: 64px 0 0 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 6px;
    transform: translateX(100%);
    transition: transform .25s ease;
    overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { width: 100%; padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .nav-actions .btn span.hide-mobile { display: none; }
  .topbar .topbar-links { font-size: .76rem; }
}

/* ---------- Hero / Carousel ---------- */
.hero {
  position: relative;
  height: 86vh;
  min-height: 520px;
  max-height: 780px;
  overflow: hidden;
  color: #fff;
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute;
  inset: 0;
  background-color: var(--deep-teal); /* fallback if the hotlinked photo can't load */
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.1s ease;
}
.hero-slide.active { opacity: 1; }
.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,37,64,.78) 0%, rgba(10,37,64,.55) 45%, rgba(10,37,64,.85) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 720px;
}
.hero-content .eyebrow { background: rgba(46,196,182,.22); color: #9be8e0; }
.hero-content h1 { color: #fff; margin-bottom: .35em; }
.hero-content p.lead { color: #dbe7ee; font-size: 1.15rem; max-width: 560px; }
.hero-cta { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 34px; margin-top: 46px; flex-wrap: wrap; }
.hero-stats div strong { display: block; font-size: 1.6rem; font-family: 'Poppins', sans-serif; color: var(--aqua); }
.hero-stats div span { font-size: .82rem; color: #cfe3ea; }
.hero-dots { position: absolute; z-index: 3; bottom: 26px; left: 50%; transform: translateX(-50%); display: flex; gap: 9px; }
.hero-dots button {
  width: 9px; height: 9px; border-radius: 50%; border: none; background: rgba(255,255,255,.4); cursor: pointer; padding: 0;
}
.hero-dots button.active { background: var(--amber); width: 26px; border-radius: 5px; }
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35);
  color: #fff; width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.hero-arrow:hover { background: rgba(255,255,255,.28); }
.hero-arrow.prev { left: 18px; }
.hero-arrow.next { right: 18px; }
@media (max-width: 700px) {
  .hero-arrow { display: none; }
  .hero { height: 92vh; }
}

/* ---------- Page header (inner pages) ---------- */
.page-header {
  background: linear-gradient(120deg, var(--navy), var(--deep-teal));
  color: #fff;
  padding: 90px 0 60px;
  text-align: center;
}
.page-header h1 { color: #fff; }
.page-header p { color: #cfe3ea; max-width: 620px; margin: 0 auto; }
.breadcrumb { font-size: .85rem; color: #9fc2cf; margin-bottom: 10px; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 30px 26px;
  border: 1px solid var(--line);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.icon-badge {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(14,124,134,.12); color: var(--teal); margin-bottom: 18px;
}
.icon-badge svg { width: 26px; height: 26px; }

.service-card h3 { margin-bottom: 8px; }
.service-card p { font-size: .93rem; margin-bottom: 14px; }
.service-card a.link { color: var(--teal); font-weight: 600; font-size: .88rem; }
.service-card a.link:hover { text-decoration: underline; }

/* ---------- Why us / feature strip ---------- */
.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature .icon-badge { margin-bottom: 0; flex-shrink: 0; }
.feature h4 { margin-bottom: 4px; font-size: 1.05rem; }
.feature p { font-size: .92rem; margin-bottom: 0; }

/* ---------- Project / gallery cards ---------- */
.project-card { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); aspect-ratio: 4/3; }
.project-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.project-card:hover img { transform: scale(1.06); }
.project-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,37,64,0) 40%, rgba(10,37,64,.92) 100%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 20px; color: #fff;
}
.project-overlay .tag { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--aqua); font-weight: 700; margin-bottom: 4px; }
.project-overlay h3 { color: #fff; margin-bottom: 4px; font-size: 1.05rem; }
.project-overlay p { color: #d8e6ec; font-size: .85rem; margin: 0; }

/* ---------- Testimonials ---------- */
.testimonial { background: var(--card); border-radius: var(--radius); padding: 28px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.testimonial .stars { color: var(--amber); letter-spacing: 2px; margin-bottom: 12px; }
.testimonial p.quote { font-style: italic; color: var(--ink); }
.testimonial .who { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.avatar-circle { width: 42px; height: 42px; border-radius: 50%; background: var(--deep-teal); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: 'Poppins',sans-serif; }
.who strong { display: block; font-size: .92rem; color: var(--navy); }
.who span { font-size: .8rem; color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--teal), var(--deep-teal));
  color: #fff;
  border-radius: var(--radius);
  padding: 50px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.cta-band h2 { color: #fff; margin-bottom: 6px; }
.cta-band p { color: #d8f0ee; margin: 0; }

/* ---------- Forms ---------- */
.form-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px; border: 1px solid var(--line); }
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; color: var(--navy); }
input[type=text], input[type=email], input[type=tel], input[type=password], select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  font-size: .95rem;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(14,124,134,.15);
}
textarea { resize: vertical; min-height: 120px; }
.form-hint { font-size: .78rem; color: var(--muted); margin-top: 5px; }
.form-foot-link { text-align: center; margin-top: 18px; font-size: .9rem; color: var(--muted); }
.form-foot-link a { color: var(--teal); font-weight: 600; }

/* ---------- Alerts / flash ---------- */
.alert { padding: 14px 18px; border-radius: 10px; font-size: .9rem; margin-bottom: 18px; border: 1px solid transparent; }
.alert-success { background: #e7f7f0; color: var(--success); border-color: #b9e6cf; }
.alert-error { background: #fdecea; color: var(--danger); border-color: #f3c1ba; }
.alert-info { background: #e8f3f7; color: var(--deep-teal); border-color: #bfdfe8; }

/* ---------- Badges (proposal status) ---------- */
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.badge-pending  { background: #fdf3e0; color: #a3690c; }
.badge-review   { background: #e6effc; color: #2a5db0; }
.badge-accepted { background: #e2f6ec; color: var(--success); }
.badge-rejected { background: #fbe7e5; color: var(--danger); }

/* ---------- Dashboard ---------- */
.dash-shell { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 64px); }
.dash-sidebar { background: var(--navy); color: #d9e8ee; padding: 28px 20px; }
.dash-sidebar .who { color: #fff; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,.12); }
.dash-sidebar .who strong { color: #fff; }
.dash-sidebar a { display: block; padding: 10px 12px; border-radius: 8px; margin-bottom: 4px; font-size: .92rem; color: #cfe3ea; }
.dash-sidebar a:hover, .dash-sidebar a.active { background: rgba(255,255,255,.08); color: #fff; }
.dash-main { padding: 34px; min-width: 0; } /* min-width:0 lets this grid item shrink below the table's min-width instead of forcing the whole layout to overflow horizontally */
@media (max-width: 860px) {
  .dash-shell { grid-template-columns: 1fr; }
  .dash-sidebar { display: flex; overflow-x: auto; gap: 4px; padding: 14px; align-items: center; }
  .dash-sidebar .who { display: none; }
  .dash-sidebar a { white-space: nowrap; margin-bottom: 0; }
  .dash-main { padding: 20px; }
}

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 30px; }
@media (max-width: 900px) { .stat-row { grid-template-columns: repeat(2,1fr); } }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.stat-card strong { display: block; font-size: 1.8rem; font-family: 'Poppins', sans-serif; color: var(--navy); }
.stat-card span { font-size: .82rem; color: var(--muted); }

.table-wrap { overflow-x: auto; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 14px 16px; text-align: left; font-size: .88rem; border-bottom: 1px solid var(--line); }
th { background: #f3f7f9; color: var(--navy); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: none; }
.actions-cell { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #b9cdd8; padding: 60px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 34px; margin-bottom: 40px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .logo { color: #fff; }
.site-footer .logo .grid-part { color: var(--aqua); }
.site-footer p { color: #9fb4c0; font-size: .9rem; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 16px; }
.site-footer ul li { margin-bottom: 10px; }
.site-footer a { color: #b9cdd8; font-size: .9rem; }
.site-footer a:hover { color: var(--aqua); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .8rem; color: #8ba3b0; }
.social-row { display: flex; gap: 10px; margin-top: 14px; }
.social-row a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; }
.social-row a:hover { background: var(--teal); }

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--line); margin: 40px 0; border: none; }
.center-wrap { display: flex; align-items: center; justify-content: center; min-height: 80vh; padding: 40px 16px; }
.two-col { display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: center; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.tag-pill { display: inline-flex; align-items: center; gap: 8px; background: #eef4f7; color: var(--deep-teal); font-size: .82rem; font-weight: 600; padding: 6px 14px; border-radius: 999px; margin-bottom: 8px; }
.about-image-wrap { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.about-image-wrap img { width: 100%; height: 100%; object-fit: cover; }
.stat-float { position: absolute; bottom: -1px; right: -1px; background: var(--amber); color: var(--navy); padding: 18px 22px; border-top-left-radius: var(--radius); }
.stat-float strong { display: block; font-size: 1.6rem; font-family: 'Poppins', sans-serif; }
.stat-float span { font-size: .78rem; font-weight: 600; }

.wa-float {
  position: fixed; bottom: 22px; right: 22px; z-index: 90;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(0,0,0,.25); font-size: 1.5rem;
}
.wa-float:hover { filter: brightness(1.05); }

.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map-embed iframe { width: 100%; height: 320px; border: 0; display: block; }
