/* ============================================
   Ecava.com — Main Stylesheet
   Brand: Engineering, Commerce, Advance Visualized Applications
   ============================================ */

/* --- CSS Variables --- */
:root {
  --color-primary: #1b687b;
  --color-primary-light: #92b6c5;
  --color-accent: #ff7302;
  --color-accent-hover: #e56800;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f6f8;
  --color-dark: #1a2b3c;
  --color-border: #e8ecf0;
  --font-stack: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --max-width: 1200px;
  --header-height: 70px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .02);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, .07);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .1);
  --radius-sm: 8px;
  --radius-md: 12px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-stack);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-accent);
}

ul, ol {
  list-style: none;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Header / Nav --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: transform 0.3s ease;
}

.site-header.header-hidden {
  transform: translateY(-100%);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo img {
  height: 36px;
  width: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  padding: 8px 14px;
  color: var(--color-text);
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.nav-link:hover,
.nav-item.active > .nav-link {
  color: var(--color-primary);
  background: var(--color-bg-alt);
}

/* Dropdown arrow */
.nav-link.has-dropdown::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 5px;
  vertical-align: middle;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
}

/* Dropdown menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .1), 0 2px 6px rgba(0, 0, 0, .04);
  padding: 6px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.nav-item:hover > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 9px 16px;
  color: var(--color-text);
  font-size: 0.875rem;
  border-radius: 6px;
  margin: 0 4px;
  transition: background 0.15s, color 0.15s;
}

.dropdown-menu a:hover {
  background: var(--color-bg-alt);
  color: var(--color-primary);
}

/* Hamburger */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Main content offset for fixed header --- */
.site-main {
  margin-top: var(--header-height);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  background: var(--color-dark);
  color: #ffffff;
  padding: 100px 0;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26, 43, 60, .85) 0%, rgba(26, 43, 60, .5) 100%);
  z-index: 0;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}

.hero .container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 40px;
}

.hero-content {
  flex: 1;
}

.hero-content h1 {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin-bottom: 16px;
}

.hero-content p {
  font-size: 1.1875rem;
  opacity: 0.9;
  margin-bottom: 28px;
  max-width: 540px;
  line-height: 1.65;
}

.hero-image {
  flex: 1;
  text-align: center;
}

.hero-image img {
  max-width: 100%;
  display: inline-block;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 13px 32px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  text-align: center;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, #ff8520 0%, var(--color-accent) 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(255, 115, 2, .3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(255, 115, 2, .35);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, .8);
}

.btn-outline:hover {
  background: #ffffff;
  color: var(--color-primary);
  border-color: #ffffff;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(27, 104, 123, .25);
}

.btn-secondary:hover {
  background: #145a6b;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(27, 104, 123, .3);
  transform: translateY(-1px);
}

/* --- Section --- */
.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-dark {
  background: var(--color-dark);
  color: #ffffff;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 12px;
  letter-spacing: -.02em;
}

.section-dark .section-header h2 {
  color: #ffffff;
}

.section-header p {
  font-size: 1.0625rem;
  color: var(--color-text-light);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.65;
}

.section-dark .section-header p {
  color: rgba(255, 255, 255, 0.8);
}

/* --- Grid --- */
.grid {
  display: grid;
  gap: 30px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* --- Card --- */
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s, transform 0.25s;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card h3 {
  font-size: 1.25rem;
  color: var(--color-primary);
  margin-bottom: 10px;
  letter-spacing: -.01em;
}

.card p {
  color: var(--color-text-light);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.card-img {
  margin-bottom: 16px;
  text-align: center;
}

.card-img img {
  max-height: 180px;
  margin: 0 auto;
}

/* --- Trust Badges --- */
.trust-badges {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding: 20px 0;
}

.trust-badge {
  text-align: center;
}

.trust-badge img {
  display: block;
  height: 72px;
  width: auto;
  margin: 0 auto 16px;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.trust-badge img:hover {
  opacity: 1;
}

.trust-badge h3 {
  font-size: 1rem;
  margin-bottom: 8px;
  color: var(--color-primary);
}

.trust-badge p {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--color-text-light);
}

/* --- Logo Carousel --- */
.logo-carousel {
  position: relative;
  overflow: hidden;
}

.logo-track {
  display: flex;
  gap: 48px;
  align-items: center;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 8px 48px;
}

.logo-track::-webkit-scrollbar { display: none; }

.logo-track img {
  flex-shrink: 0;
  height: 40px;
  width: auto;
  opacity: .45;
  filter: grayscale(100%);
  transition: opacity .3s, filter .3s;
}

.logo-track img:hover {
  opacity: .8;
  filter: grayscale(0%);
}

.logo-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, background .2s;
  z-index: 2;
  color: var(--color-text-light);
  font-size: 18px;
  line-height: 1;
  padding: 0;
}

.logo-nav:hover {
  box-shadow: var(--shadow-md);
  background: var(--color-bg-alt);
}

.logo-nav--prev { left: 0; }
.logo-nav--next { right: 0; }

/* Fade edges */
.logo-carousel::before,
.logo-carousel::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 48px;
  z-index: 1;
  pointer-events: none;
}

.logo-carousel::before {
  left: 0;
  background: linear-gradient(to right, var(--color-bg-alt), transparent);
}

.logo-carousel::after {
  right: 0;
  background: linear-gradient(to left, var(--color-bg-alt), transparent);
}

@media (max-width: 768px) {
  .logo-track { gap: 32px; }
  .logo-track img { height: 32px; }
  .logo-nav { display: none; }
}

/* --- Feature Row (image + text side by side) --- */
.feature-row {
  display: flex;
  align-items: center;
  gap: 48px;
}

.feature-row.reverse {
  flex-direction: row-reverse;
}

.feature-row .feature-text {
  flex: 1;
}

.feature-row .feature-image {
  flex: 1;
  text-align: center;
}

.feature-text h2 {
  font-size: 1.75rem;
  color: var(--color-primary);
  margin-bottom: 12px;
  letter-spacing: -.02em;
}

.feature-text p {
  color: var(--color-text-light);
  margin-bottom: 16px;
  line-height: 1.65;
}

/* --- Footer --- */
.site-footer {
  background: var(--color-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 56px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1rem;
  margin-bottom: 16px;
  letter-spacing: -.01em;
}

.footer-col p {
  font-size: 0.875rem;
  line-height: 1.7;
}

.footer-col a {
  display: block;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.875rem;
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--color-accent);
}

.footer-logo img {
  height: 30px;
  margin-bottom: 12px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 20px 0;
  text-align: center;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.4);
}

/* --- WhatsApp Floating Button --- */
.whatsapp-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 42px;
  height: 42px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(37, 211, 102, .35);
  z-index: 999;
  transition: transform 0.2s, box-shadow 0.2s;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 22px rgba(37, 211, 102, .45);
}

.whatsapp-btn svg {
  width: 21px;
  height: 21px;
  fill: #ffffff;
}

/* --- Forms --- */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--color-text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.9375rem;
  font-family: var(--font-stack);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(27, 104, 123, .12);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-message {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 16px;
  display: none;
}

.form-message.success {
  display: block;
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.form-message.error {
  display: block;
  background: #fbe9e7;
  color: #c62828;
  border: 1px solid #ffccbc;
}

/* Honeypot - hidden from humans */
.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

/* --- Page Hero (inner-page title banner with dot pattern) --- */
.page-hero {
  background: linear-gradient(135deg, #1a2b3c 0%, var(--color-primary) 100%);
  color: #ffffff;
  padding: 56px 0;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.06) 1.5px, transparent 0);
  background-size: 24px 24px;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero .section-header {
  margin-bottom: 0;
}

.page-hero .section-header h1 {
  color: #ffffff;
  font-size: 2.25rem;
  letter-spacing: -.02em;
}

.page-hero .section-header p {
  color: rgba(255, 255, 255, .8);
  max-width: 580px;
}

@media (max-width: 768px) {
  .page-hero {
    padding: 40px 0;
  }
  .page-hero .section-header h1 {
    font-size: 1.6rem;
  }
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger cards within a grid */
.grid .reveal:nth-child(2) { transition-delay: .08s; }
.grid .reveal:nth-child(3) { transition-delay: .16s; }
.grid .reveal:nth-child(4) { transition-delay: .24s; }
.grid .reveal:nth-child(5) { transition-delay: .32s; }
.grid .reveal:nth-child(6) { transition-delay: .4s; }

/* --- Utility --- */
.text-center { text-align: center; }
.text-primary { color: var(--color-primary); }
.text-accent { color: var(--color-accent); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.gap-sm { gap: 16px; }

/* --- Responsive --- */
@media (max-width: 992px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-row,
  .feature-row.reverse {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  .site-header {
    background: rgba(255, 255, 255, .95);
  }

  .menu-toggle {
    display: block;
  }

  .nav-list {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg);
    flex-direction: column;
    padding: 20px;
    gap: 0;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s;
  }

  .nav-list.open {
    transform: translateX(0);
  }

  .nav-link {
    padding: 12px 16px;
    font-size: 1rem;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0 0 0 16px;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .dropdown-menu.open {
    display: block;
  }

  .dropdown-menu a {
    padding: 10px 16px;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
    margin: 0;
  }

  .hero .container {
    flex-direction: column;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 1.75rem;
  }

  .hero-content p {
    margin: 0 auto 24px;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .trust-badges {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .section {
    padding: 52px 0;
  }

  .hero {
    padding: 60px 0;
  }

  /* Disable stagger on mobile (single column) */
  .grid .reveal:nth-child(n) { transition-delay: 0s; }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.5rem;
  }

  .btn {
    padding: 11px 24px;
    font-size: 0.875rem;
  }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .grid .reveal:nth-child(n) { transition-delay: 0s; }
}

/* --- Utilities --- */
p.small { font-size: 0.7rem; opacity: 0.7; }
