/* ============================================================
   DEFINIT Water Solutions — Custom Styles
   Brand: #0c3340 (primary dark) | #99eefe (accent cyan)
   ============================================================ */

:root {
  --primary: #0c3340;
  --primary-light: #164d61;
  --secondary: #1a5f7a;
  --accent: #99eefe;
  --accent-dark: #4dc8ef;
  --light-blue: #e0f7fe;
  --text-dark: #1a202c;
  --text-medium: #4a5568;
  --text-light: #718096;
  --white: #ffffff;
  --off-white: #f7fafc;
}

/* Base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

/* ---- HEADER ---- */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 9000;
  background: var(--primary);
  box-shadow: 0 2px 20px rgba(0,0,0,0.25);
  transition: background 0.3s ease;
}
.site-header.scrolled {
  background: rgba(12, 51, 64, 0.97);
  backdrop-filter: blur(8px);
}
.nav-link {
  color: #b2d8e4;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
  padding-bottom: 4px;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.nav-link:hover { color: var(--accent); }
.nav-link:hover::after { width: 100%; }
.nav-link.active { color: var(--accent); }
.nav-link.active::after { width: 100%; }
.btn-nav-cta {
  background: var(--accent);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-nav-cta:hover {
  background: #fff;
  color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(153,238,254,0.35);
}

/* ---- HERO ---- */
.hero-section {
  min-height: 100vh;
  background: linear-gradient(135deg, #061e28 0%, #0c3340 45%, #164d61 80%, #1a5f7a 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2399eefe' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-glow {
  position: absolute;
  top: 20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(153,238,254,0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-glow-2 {
  position: absolute;
  bottom: -10%;
  left: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(26,95,122,0.3) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* ---- BUTTONS ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: var(--primary);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.875rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.25s ease;
  border: 2px solid transparent;
}
.btn-primary:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(153,238,254,0.4);
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.875rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  border: 2px solid var(--accent);
  transition: all 0.25s ease;
}
.btn-outline:hover {
  background: var(--accent);
  color: var(--primary);
  transform: translateY(-2px);
}
.btn-outline-dark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.625rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  border: 2px solid var(--primary);
  transition: all 0.25s ease;
}
.btn-outline-dark:hover {
  background: var(--primary);
  color: #fff;
}

/* ---- STATS BAR ---- */
.stats-bar {
  background: var(--primary);
  padding: 2.5rem 0;
}
.stat-item {
  text-align: center;
  padding: 0 1rem;
}
.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.stat-label {
  font-size: 0.875rem;
  color: #90c4d4;
  font-weight: 500;
  line-height: 1.4;
}
@media (max-width: 768px) {
  .stat-number { font-size: 1.875rem; }
}

/* ---- CARDS ---- */
.solution-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
  display: block;
  height: 100%;
}
.solution-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(12,51,64,0.14);
  border-color: var(--accent);
}
.solution-card:hover .card-icon-wrap {
  background: var(--accent);
}
.solution-card:hover .card-icon-wrap i {
  color: var(--primary);
}

.card-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: var(--light-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  transition: background 0.3s ease;
}
.card-icon-wrap i {
  font-size: 1.5rem;
  color: var(--secondary);
  transition: color 0.3s ease;
}

/* ---- IMAGE PLACEHOLDERS ---- */
.img-placeholder {
  background: linear-gradient(135deg, #0c3340 0%, #1a5f7a 60%, #2a7a9a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(153,238,254,0.7);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}
.img-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%2399eefe' fill-opacity='0.05'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.img-placeholder i {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  opacity: 0.6;
  position: relative;
  z-index: 1;
}
.img-placeholder span {
  position: relative;
  z-index: 1;
}

/* ---- TRUST BADGES ---- */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 0.625rem 1.125rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

/* ---- SECTION TITLES ---- */
.section-label {
  display: inline-block;
  background: var(--light-blue);
  color: var(--secondary);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}
.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 1rem;
}
.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-medium);
  line-height: 1.7;
  max-width: 640px;
}
@media (max-width: 768px) {
  .section-title { font-size: 1.75rem; }
}

/* ---- SPECS TABLE ---- */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.specs-table th {
  background: var(--primary);
  color: var(--accent);
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.specs-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  color: var(--text-medium);
}
.specs-table tr:last-child td { border-bottom: none; }
.specs-table tr:hover td { background: #f7fafc; }
.specs-table td:first-child {
  font-weight: 600;
  color: var(--text-dark);
}

/* ---- PROCESS STEPS ---- */
.process-step {
  position: relative;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 3rem;
}
.step-num {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  border: 3px solid var(--accent);
}
.step-connector {
  position: absolute;
  top: 56px;
  left: 27px;
  width: 2px;
  height: calc(100% + 1rem);
  background: linear-gradient(to bottom, var(--accent), rgba(153,238,254,0.2));
}
.process-step:last-child .step-connector { display: none; }

/* ---- CASE STUDY CARDS ---- */
.case-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}
.case-card:hover {
  box-shadow: 0 16px 40px rgba(12,51,64,0.12);
  transform: translateY(-4px);
}
.case-card .case-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 1.5rem;
  color: white;
}
.metric-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(153,238,254,0.15);
  border: 1px solid rgba(153,238,254,0.3);
  color: var(--accent);
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ---- CONTACT FORM ---- */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.375rem;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-dark);
  box-shadow: 0 0 0 3px rgba(153,238,254,0.2);
}
.form-textarea { resize: vertical; min-height: 120px; }

/* ---- FLOATING CTA ---- */
.floating-cta {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 8000;
  background: var(--accent);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.875rem 1.5rem;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(12,51,64,0.3);
  animation: floatPulse 3s infinite;
  transition: transform 0.2s ease;
}
.floating-cta:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 32px rgba(12,51,64,0.4);
}
@keyframes floatPulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(12,51,64,0.3), 0 0 0 0 rgba(153,238,254,0.4); }
  50% { box-shadow: 0 8px 24px rgba(12,51,64,0.3), 0 0 0 8px rgba(153,238,254,0); }
}

/* ---- FOOTER ---- */
.site-footer {
  background: #061e28;
  color: #90c4d4;
}
.footer-link {
  color: #90c4d4;
  font-size: 0.875rem;
  transition: color 0.2s ease;
  text-decoration: none;
}
.footer-link:hover { color: var(--accent); }

/* ---- PAGE HERO (inner pages) ---- */
.page-hero {
  background: linear-gradient(135deg, #061e28 0%, #0c3340 60%, #1a5f7a 100%);
  padding: 8rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%2399eefe' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ---- COMPARISON TABLE ---- */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.compare-table th {
  padding: 0.875rem 1rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.compare-table th:first-child { text-align: left; }
.compare-table td {
  padding: 0.75rem 1rem;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
}
.compare-table td:first-child { text-align: left; font-weight: 500; }
.compare-table .highlight-col {
  background: rgba(153,238,254,0.08);
  border-left: 2px solid var(--accent-dark);
  border-right: 2px solid var(--accent-dark);
}
.compare-table tr:last-child .highlight-col {
  border-bottom: 2px solid var(--accent-dark);
}
.compare-table .check { color: #22c55e; }
.compare-table .cross { color: #ef4444; }
.compare-table .partial { color: #f59e0b; }

/* ---- MOBILE MENU ---- */
#mobile-menu {
  display: none;
  border-top: 1px solid rgba(153,238,254,0.15);
}
#mobile-menu.open { display: block; }

/* ---- ANIMATIONS (AOS supplement) ---- */
[data-aos] { transition-duration: 700ms !important; }

/* ---- UTILS ---- */
.text-accent { color: var(--accent); }
.bg-primary { background: var(--primary); }
.bg-accent { background: var(--accent); }
.divider {
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  margin: 1rem 0 1.5rem;
}
.tag-pill {
  display: inline-block;
  background: var(--light-blue);
  color: var(--secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  margin: 0.2rem;
}

/* Responsive helpers */
/* ---- SOLUTION CARD IMAGES ---- */
.solution-card img { transition: transform 0.3s ease; }
.solution-card:hover img { transform: scale(1.05); }
.img-cover { width: 100%; height: 100%; object-fit: cover; }

/* ---- SOLUTION CARD WITH BG IMAGE ---- */
.solution-card-img {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  min-height: 380px;
}
.solution-card-img .card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
}
.solution-card-img:hover .card-bg {
  transform: scale(1.05);
}
.solution-card-img .card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12,51,64,0.55) 0%, rgba(12,51,64,0.92) 100%);
}
.solution-card-img .card-content {
  position: relative;
  z-index: 2;
  color: #fff;
}
.solution-card-img .card-content h3 { color: #fff; }
.solution-card-img .card-content p { color: rgba(255,255,255,0.8); }
.solution-card-img .card-content .text-gray-500 { color: rgba(255,255,255,0.7) !important; }
.solution-card-img .card-content .text-secondary { color: #99eefe !important; }

/* ---- LANGUAGE SWITCHER ---- */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 1rem;
  font-size: 0.875rem;
}
.lang-switcher a {
  text-decoration: none;
  white-space: nowrap;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
  transition: all 0.2s ease;
}
.lang-switcher a.active {
  background: #99eefe;
  color: #0c3340;
}
.lang-switcher a:not(.active) {
  color: #9ca3af;
}
.lang-switcher a:not(.active):hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* RTL Support */
[dir="rtl"] { direction: rtl; text-align: right; }
[dir="rtl"] .flex { flex-direction: row-reverse; }
[dir="rtl"] .ml-4 { margin-left: 0; margin-right: 1rem; }
[dir="rtl"] .mr-2 { margin-right: 0; margin-left: 0.5rem; }
[dir="rtl"] .mr-1 { margin-right: 0; margin-left: 0.25rem; }
[dir="rtl"] .ml-2 { margin-left: 0; margin-right: 0.5rem; }
[dir="rtl"] .ml-1 { margin-left: 0; margin-right: 0.25rem; }
[dir="rtl"] .text-left { text-align: right; }
[dir="rtl"] .text-right { text-align: left; }
[dir="rtl"] .pl-8 { padding-left: 0; padding-right: 2rem; }
[dir="rtl"] .pl-6 { padding-left: 0; padding-right: 1.5rem; }
[dir="rtl"] .fa-arrow-right::before { content: "\f060"; }
[dir="rtl"] .space-x-2 > :not([hidden]) ~ :not([hidden]) {
  margin-left: 0;
  margin-right: 0.5rem;
}
[dir="rtl"] .gap-3 { direction: rtl; }
[dir="rtl"] .grid { direction: rtl; }
[dir="rtl"] .border-l { border-left: none; border-right: 1px solid; }
[dir="rtl"] .border-r { border-right: none; border-left: 1px solid; }
[dir="rtl"] blockquote { border-left: none; border-right: 4px solid #99eefe; }
[dir="rtl"] .lang-switcher { margin-left: 0; margin-right: 1rem; }
[dir="rtl"] .step-connector { left: auto; right: 27px; }
[dir="rtl"] .specs-table td:first-child { text-align: right; }
[dir="rtl"] .specs-table th { text-align: right; }
[dir="rtl"] .compare-table th:first-child { text-align: right; }
[dir="rtl"] .compare-table td:first-child { text-align: right; }
[dir="rtl"] .floating-cta { right: auto; left: 2rem; }

/* Mobile overflow fix */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}
.hero-section, .page-hero, section {
  overflow-x: hidden;
}
img, svg, video {
  max-width: 100%;
  height: auto;
}

/* Mobile responsive fixes */
@media (max-width: 640px) {
  .hero-section h1, .page-hero h1 { font-size: 1.75rem !important; line-height: 1.2; }
  .hero-section .grid { gap: 1.5rem; }
  .hero-glow, .hero-glow-2 { display: none; }
  .trust-badge { font-size: 0.7rem; padding: 0.25rem 0.5rem; }
  .stat-number { font-size: 1.75rem; }
  .floating-cta span.label { display: none; }
  .floating-cta { padding: 0.875rem 1rem; border-radius: 50%; }
  .btn-primary, .btn-outline { width: 100%; justify-content: center; }
  table { font-size: 0.75rem; }
  td, th { padding: 0.5rem 0.25rem; }
}
