/* ============================================
   AquaPure — Main Stylesheet
   Warm, professional water treatment aesthetic
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Nunito:wght@300;400;500;600;700&display=swap');

:root {
  /* Warm green palette — forest green with earthy warmth */
  --teal-deep:    #2d6a2d;   /* deep warm forest green */
  --teal-mid:     #3d8b3d;   /* main warm green */
  --teal-light:   #68b368;   /* lighter warm green */
  --teal-pale:    #d4edcc;   /* very pale warm green tint */
  --warm-sand:    #f5f0e8;   /* keep warm sand */
  --warm-cream:   #fdf9f3;   /* keep warm cream */
  --warm-tan:     #e8dcc8;   /* keep warm tan */
  --warm-amber:   #c8934a;   /* keep amber accent */
  --warm-brown:   #7a5c3a;   /* keep warm brown */
  --text-dark:    #1e3320;   /* very dark warm green-black */
  --text-mid:     #4a6650;   /* mid warm green-grey */
  --text-light:   #7a9480;   /* light warm green-grey */
  --white:        #ffffff;
  --shadow-sm:    0 2px 12px rgba(45,106,45,.10);
  --shadow-md:    0 6px 28px rgba(45,106,45,.16);
  --shadow-lg:    0 16px 56px rgba(45,106,45,.20);
  --radius:       12px;
  --radius-lg:    20px;
  --transition:   0.35s cubic-bezier(.4,0,.2,1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--warm-cream);
  color: var(--text-dark);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── Typography ── */
h1,h2,h3,h4 {
  font-family: 'Playfair Display', serif;
  line-height: 1.25;
}

/* ── Navbar ── */
#mainNav {
  background: rgba(253,249,243,.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--warm-tan);
  padding: 0;
  transition: box-shadow var(--transition);
  position: sticky;
  top: 0;
  z-index: 1000;
}
#mainNav.scrolled { box-shadow: var(--shadow-md); }

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--teal-mid), var(--teal-deep));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1.2rem;
  overflow: hidden;
  flex-shrink: 0;
}

/* ── Logo image ──────────────────────────────────────────────
   Works on any background: white navbar, warm footer, dark
   admin sidebar. Just drop logo.png/svg/webp into assets/images/
   and call <?= logo_img() ?> in PHP templates.
───────────────────────────────────────────────────────────── */

/* Wrapper — keeps the logo slot consistent regardless of image shape */
.brand-logo-wrap {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Logo image — clean transparent PNG, no blend tricks needed */
.brand-logo-img {
  max-width: 60px !important;
  max-height: 60px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
  display: block;
}

/* SVG fallback color — teal on light, white on dark */
.brand-logo-fallback { color: var(--teal-mid); }
footer .brand-logo-fallback,
#sidebar .brand-logo-fallback,
.sidebar-brand .brand-logo-fallback { color: white; }

/* Admin sidebar logo size */
#sidebar .brand-logo-img { max-width: 38px; max-height: 38px; }

/* Client logo carousel — transparent logos sit cleanly on any bg */
.client-logo-item img { object-fit: contain; }
.brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--teal-deep);
  line-height: 1;
}
.brand-tagline {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.navbar-nav {
  align-items: stretch; /* let each li stretch to full navbar height */
}
.nav-link {
  font-weight: 600;
  font-size: .92rem;
  color: var(--text-mid) !important;
  padding: 1.4rem 1rem !important;
  letter-spacing: .03em;
  position: relative;
  transition: color var(--transition);
}
/* Get a Quote button li — same height as nav links, button centred inside */
.navbar-nav .nav-item:last-child {
  display: flex;
  align-items: center;        /* vertically centre the button */
  padding: 0 0 0 .5rem;      /* left spacing only — top/bottom come from stretch */
}
.navbar-nav .btn-primary-aq {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  /* remove any top/bottom margin that could push it off-centre */
  margin: 0;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%; right: 50%;
  height: 2px;
  background: var(--teal-mid);
  transition: left var(--transition), right var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--teal-deep) !important;
}
.nav-link:hover::after, .nav-link.active::after {
  left: 1rem; right: 1rem;
}

/* ── Hero ── */
.hero {
  min-height: 88vh;
  background: linear-gradient(160deg, var(--teal-deep) 0%, var(--teal-mid) 55%, var(--teal-light) 100%);
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(255,255,255,.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.06) 0%, transparent 50%);
}
.hero-waves {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 100px; overflow: hidden; line-height: 0;
}
.hero-waves svg { display: block; }

.hero-content { position: relative; z-index: 2; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50px;
  padding: 6px 18px;
  font-size: .8rem;
  font-weight: 600;
  color: rgba(255,255,255,.9);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  color: white;
  margin-bottom: 1.2rem;
  text-shadow: 0 2px 24px rgba(0,0,0,.15);
}
.hero h1 span { color: var(--teal-pale); }
.hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,.85);
  max-width: 520px;
  margin-bottom: 2.2rem;
}
.btn-hero-primary {
  background: white;
  color: var(--teal-deep);
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 700;
  font-size: .95rem;
  border: none;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  transition: transform var(--transition), box-shadow var(--transition);
}
.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,.25);
  color: var(--teal-deep);
}
.btn-hero-outline {
  border: 2px solid rgba(255,255,255,.6);
  color: white;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background var(--transition), border-color var(--transition);
}
.btn-hero-outline:hover {
  background: rgba(255,255,255,.15);
  border-color: white;
  color: white;
}
.hero-stats {
  display: flex; gap: 2.5rem;
  margin-top: 3rem;
}
.hero-stat { color: white; }
.hero-stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}
.hero-stat-label {
  font-size: .78rem;
  color: rgba(255,255,255,.7);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.hero-visual {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center;
}
.hero-card {
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius-lg);
  padding: 2rem;
  color: white;
  max-width: 340px;
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.hero-card-icon {
  width: 56px; height: 56px;
  background: rgba(255,255,255,.2);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.quality-bar { margin-top: 1rem; }
.quality-bar-label {
  display: flex; justify-content: space-between;
  font-size: .82rem; color: rgba(255,255,255,.8);
  margin-bottom: .4rem;
}
.quality-bar-track {
  height: 6px; background: rgba(255,255,255,.2);
  border-radius: 3px; overflow: hidden;
}
.quality-bar-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--teal-pale), white);
  animation: fillBar 2s ease forwards;
  width: 0;
}
@keyframes fillBar { to { width: var(--target-width); } }

/* ── Section Shared ── */
.section-pad { padding: 90px 0; }
.section-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal-mid);
  margin-bottom: .75rem;
}
.section-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--text-dark);
  margin-bottom: 1rem;
}
.section-divider {
  width: 48px; height: 3px;
  background: linear-gradient(90deg, var(--teal-mid), var(--teal-light));
  border-radius: 2px;
  margin-bottom: 1.5rem;
}
.section-lead {
  font-size: 1.05rem;
  color: var(--text-mid);
  max-width: 580px;
}

/* ── Services strip ── */
.services-strip { background: var(--warm-sand); }
.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem 1.6rem;
  text-align: center;
  border: 1px solid var(--warm-tan);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  height: 100%;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal-pale);
}
.service-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--teal-pale), #e0f4fa);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 1.2rem;
}
.service-card h5 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: var(--text-dark);
  margin-bottom: .5rem;
}
.service-card p { font-size: .88rem; color: var(--text-mid); margin: 0; }

/* ── About strip ── */
.about-strip { background: var(--warm-cream); }
.about-image-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.about-image-wrap img {
  width: 100%; height: 420px; object-fit: cover;
  display: block;
}
.about-badge {
  position: absolute; bottom: 24px; left: 24px;
  background: white;
  border-radius: var(--radius);
  padding: 1rem 1.4rem;
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 12px;
}
.about-badge-icon { font-size: 1.6rem; }
.about-badge-text strong {
  display: block; font-size: 1.2rem;
  color: var(--teal-deep);
  font-family: 'Playfair Display', serif;
}
.about-badge-text span { font-size: .8rem; color: var(--text-mid); }

.value-item {
  display: flex; gap: 14px;
  align-items: flex-start;
  margin-bottom: 1.4rem;
}
.value-dot {
  width: 36px; height: 36px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--teal-pale), #d8f0f8);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  margin-top: 2px;
}
.value-item h6 {
  font-family: 'Playfair Display', serif;
  font-size: .98rem;
  color: var(--text-dark);
  margin-bottom: .2rem;
}
.value-item p { font-size: .86rem; color: var(--text-mid); margin: 0; }

/* ── Clients Carousel ── */
.clients-strip {
  background: var(--white);
  border-top: 1px solid var(--warm-tan);
  border-bottom: 1px solid var(--warm-tan);
  padding: 60px 0;
}
.clients-track-outer {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
}
.clients-track {
  display: flex; gap: 40px;
  animation: scrollClients 28s linear infinite;
  width: max-content;
}
.clients-track:hover { animation-play-state: paused; }
@keyframes scrollClients {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.client-logo-item {
  display: flex; align-items: center; justify-content: center;
  background: var(--warm-sand);
  border: 1px solid var(--warm-tan);
  border-radius: var(--radius);
  padding: 18px 28px;
  min-width: 160px; height: 72px;
  flex-shrink: 0;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.client-logo-item:hover {
  border-color: var(--teal-light);
  box-shadow: var(--shadow-sm);
}
.client-logo-item img {
  max-width: 120px; max-height: 44px;
  object-fit: contain; filter: grayscale(40%);
  transition: filter var(--transition);
}
.client-logo-item:hover img { filter: grayscale(0%); }
.client-logo-item .client-name-text {
  font-weight: 700; font-size: .82rem;
  color: var(--text-mid);
  text-align: center;
  white-space: nowrap;
}

/* ── Projects page ── */
.page-hero {
  background: linear-gradient(135deg, var(--teal-deep) 0%, var(--teal-mid) 100%);
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 60px;
  background: var(--warm-cream);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.page-hero h1 { color: white; }
.page-hero p { color: rgba(255,255,255,.8); }

.filter-bar {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 2.5rem;
}
.filter-btn {
  border: 1.5px solid var(--warm-tan);
  background: white;
  color: var(--text-mid);
  border-radius: 50px;
  padding: 7px 18px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Nunito', sans-serif;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--teal-mid);
  border-color: var(--teal-mid);
  color: white;
}

.project-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--warm-tan);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  height: 100%;
  display: flex; flex-direction: column;
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.project-img-wrap { position: relative; overflow: hidden; }
.project-img-wrap img {
  width: 100%; height: 240px; object-fit: cover;
  display: block;
  transition: transform .6s ease;
}
.project-card:hover .project-img-wrap img { transform: scale(1.05); }
.project-category-badge {
  position: absolute; top: 14px; left: 14px;
  background: white;
  color: var(--teal-deep);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 50px;
  box-shadow: var(--shadow-sm);
}
.project-featured-star {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px;
  background: var(--warm-amber);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
}
.project-body {
  padding: 1.6rem;
  flex: 1; display: flex; flex-direction: column;
}
.project-body h5 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--text-dark);
  margin-bottom: .7rem;
}
.project-body p {
  font-size: .88rem; color: var(--text-mid);
  flex: 1; margin-bottom: 1.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-meta {
  display: flex; gap: 1rem;
  font-size: .78rem; color: var(--text-light);
  border-top: 1px solid var(--warm-tan);
  padding-top: 1rem;
}
.project-meta span { display: flex; align-items: center; gap: 5px; }

/* ── Contact page ── */
.contact-info-card {
  background: linear-gradient(160deg, var(--teal-deep), var(--teal-mid));
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  color: white; height: 100%;
}
.contact-info-card h3 {
  color: white; font-size: 1.6rem;
  margin-bottom: .8rem;
}
.contact-info-card p {
  color: rgba(255,255,255,.8);
  margin-bottom: 2rem;
}
.contact-detail {
  display: flex; gap: 14px; align-items: flex-start;
  margin-bottom: 1.5rem;
}
.contact-detail-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  background: rgba(255,255,255,.15);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.contact-detail-text strong {
  display: block; font-size: .85rem;
  color: rgba(255,255,255,.65);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
  margin-bottom: 2px;
}
.contact-detail-text span { font-size: .95rem; }

.contact-form-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  border: 1px solid var(--warm-tan);
  box-shadow: var(--shadow-sm);
  height: 100%;
}
.contact-form-card h3 {
  font-size: 1.5rem; margin-bottom: .5rem;
}
.form-label {
  font-size: .85rem; font-weight: 700;
  color: var(--text-mid);
  letter-spacing: .04em;
  margin-bottom: .4rem;
}
.form-control, .form-select {
  border: 1.5px solid var(--warm-tan);
  border-radius: 10px;
  padding: 11px 14px;
  font-family: 'Nunito', sans-serif;
  font-size: .92rem;
  background: var(--warm-cream);
  transition: border-color var(--transition), box-shadow var(--transition);
  color: var(--text-dark);
}
.form-control:focus, .form-select:focus {
  border-color: var(--teal-mid);
  box-shadow: 0 0 0 3px rgba(61,139,61,.12);
  background: white;
  outline: none;
}

/* ── Buttons ── */
.btn-primary-aq {
  background: linear-gradient(135deg, var(--teal-mid), var(--teal-deep));
  color: white; border: none;
  padding: 13px 32px;
  border-radius: 50px;
  font-weight: 700;
  font-size: .92rem;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform var(--transition), box-shadow var(--transition);
  font-family: 'Nunito', sans-serif;
}
.btn-primary-aq:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(61,139,61,.4);
}
.btn-primary-aq:disabled { opacity: .65; cursor: not-allowed; transform: none; }

/* ── Footer ── */
footer {
  background: var(--text-dark);
  color: rgba(255,255,255,.75);
  padding: 60px 0 30px;
}
.footer-brand { margin-bottom: 1rem; }
.footer-brand .brand-name { color: var(--teal-light) !important; }
.footer-brand .brand-tagline { color: rgba(255,255,255,.4); }
.footer-about {
  font-size: .88rem; line-height: 1.75;
  color: rgba(255,255,255,.6);
  max-width: 300px;
}
footer h6 {
  color: white; font-weight: 700;
  font-size: .85rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: .6rem; }
.footer-links a {
  color: rgba(255,255,255,.6);
  text-decoration: none;
  font-size: .88rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--teal-light); }
.footer-divider {
  border-color: rgba(255,255,255,.1);
  margin: 2rem 0 1.5rem;
}
.footer-bottom {
  font-size: .82rem; color: rgba(255,255,255,.4);
}
.social-links { display: flex; gap: 10px; margin-top: 1rem; }
.social-link {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.08);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  font-size: .9rem;
}
.social-link:hover { background: var(--teal-mid); color: white; }

/* ── Alerts ── */
.alert-aq-success {
  background: #e8f8f2;
  border: 1px solid #a8e6cc;
  color: #1a6b50;
  border-radius: 10px;
  padding: 1rem 1.4rem;
  display: flex; align-items: center; gap: 10px;
  font-weight: 600;
}
.alert-aq-error {
  background: #fff0f0;
  border: 1px solid #f4c2c2;
  color: #8b2222;
  border-radius: 10px;
  padding: 1rem 1.4rem;
  display: flex; align-items: center; gap: 10px;
  font-weight: 600;
}

/* ── Page loader ── */
.loader-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--warm-cream);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .5s ease;
}
.loader-overlay.hidden { opacity: 0; pointer-events: none; }
.loader-drop {
  width: 48px; height: 48px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: linear-gradient(180deg, var(--teal-light), var(--teal-deep));
  animation: dropBounce 1.2s cubic-bezier(.4,0,.2,1) infinite;
}
@keyframes dropBounce {
  0%,100% { transform: translateY(-24px) scaleY(1); }
  50% { transform: translateY(12px) scaleY(.85); }
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .65s ease, transform .65s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero { min-height: 75vh; }
  .hero-stats { gap: 1.5rem; }
  .section-pad { padding: 60px 0; }
  .hero-visual { display: none; }
}
