/* 1. CSS Reset / Normalize */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
body { line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* 2. CSS Custom Properties (Variables) */
:root {
  /* Brand Colors */
  --color-primary: #0ea5e9;    /* Trust, Clean, Water */
  --color-primary-dark: #0284c7;
  --color-secondary: #10b981;  /* Eco-friendly, Fresh, Health */
  --color-secondary-dark: #059669;
  --color-accent: #f59e0b;     /* Shine, Gold */

  /* Neutral Colors */
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-text: #0f172a;
  --color-text-light: #64748b;
  --color-border: #e2e8f0;

  /* Typography */
  --font-heading: 'Nunito', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  /* Spacing Scale */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 4rem;
  --spacing-xxl: 6rem;

  /* Effects */
  --border-radius-sm: 8px;
  --border-radius: 12px;
  --border-radius-lg: 24px;
  --border-radius-pill: 9999px;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --transition-speed: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 3. Global / Base styles */
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  overflow-x: hidden;
}
main { display: block; }
section { padding: var(--spacing-xxl) 0; }
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

/* 4. Typography Scale */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 800; line-height: 1.2; color: var(--color-text); }
h1 { font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: var(--spacing-sm); }
h3 { font-size: 1.75rem; margin-bottom: var(--spacing-xs); }
p { font-size: 1.125rem; color: var(--color-text-light); margin-bottom: var(--spacing-sm); }
.text-center { text-align: center; }
.section-subtitle {
  color: var(--color-primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.875rem;
  display: block;
  margin-bottom: var(--spacing-xs);
}

/* 5. Utility classes */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.grid { display: grid; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.hidden { display: none !important; }
.bg-surface { background-color: var(--color-surface); }
.bg-dark { background-color: var(--color-text); color: var(--color-surface); }
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark p { color: var(--color-surface); }

/* 6. Component styles */
/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: var(--border-radius-pill);
  font-weight: 700;
  font-family: var(--font-heading);
  transition: all var(--transition-speed);
  cursor: pointer;
  border: none;
  text-align: center;
  gap: 0.5rem;
}
.btn-primary {
  background-color: var(--color-primary);
  color: white;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.4);
}
.btn-primary:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.6);
}
.btn-secondary {
  background-color: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-border);
}
.btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn-accent {
  background-color: var(--color-secondary);
  color: white;
}
.btn-accent:hover {
  background-color: var(--color-secondary-dark);
}
.btn-block { width: 100%; }

/* Cards */
.card {
  background: var(--color-surface);
  border-radius: var(--border-radius);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
  border: 1px solid var(--color-border);
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.card-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(14, 165, 233, 0.1);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--border-radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-secondary);
  float: right;
}

/* Forms */
.form-group { margin-bottom: var(--spacing-sm); }
.form-label { display: block; font-weight: 600; margin-bottom: 0.5rem; font-size: 0.9rem; }
.form-control {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  background: var(--color-surface);
  transition: border-color var(--transition-speed);
}
.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}
.form-error {
  color: #ef4444;
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: none;
}
.has-error .form-control { border-color: #ef4444; }
.has-error .form-error { display: block; }

/* 7. Layout components */
/* Navbar */
.navbar {
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  transition: all var(--transition-speed);
  background: transparent;
}
.navbar.scrolled {
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
  padding: 0.75rem 0;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.navbar-brand { font-size: 1.5rem; font-family: var(--font-heading); font-weight: 900; color: var(--color-text); }
.navbar-brand span { color: var(--color-primary); }
.nav-links { display: flex; gap: var(--spacing-md); align-items: center; }
.nav-links a { font-weight: 600; color: var(--color-text); transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--color-primary); }
.navbar.scrolled .navbar-brand, .navbar.scrolled .nav-links a { color: var(--color-text); }
.mobile-toggle { display: none; font-size: 1.5rem; cursor: pointer; color: var(--color-text); border: none; background: transparent; }

/* Preloader */
.preloader {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: var(--color-surface);
  z-index: 9999;
  display: flex; justify-content: center; align-items: center;
  transition: opacity 0.5s ease-out, visibility 0.5s;
}
.spinner {
  width: 50px; height: 50px;
  border: 4px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Floating WhatsApp */
.whatsapp-float {
  position: fixed; bottom: 20px; right: 20px;
  background-color: #25d366; color: white;
  width: 60px; height: 60px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
  z-index: 900;
  transition: transform var(--transition-speed);
}
.whatsapp-float:hover { transform: scale(1.1); color: white; }

/* Back to Top */
.back-to-top {
  position: fixed; bottom: 90px; right: 20px;
  background-color: var(--color-text); color: white;
  width: 45px; height: 45px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  opacity: 0; visibility: hidden;
  transition: all var(--transition-speed);
  z-index: 900;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { background-color: var(--color-primary); color: white; transform: translateY(-3px); }

/* Footer */
.footer { background: var(--color-text); color: white; padding: var(--spacing-xl) 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: var(--spacing-lg); margin-bottom: var(--spacing-lg); }
.footer-heading { color: white; font-size: 1.25rem; margin-bottom: var(--spacing-sm); font-weight: 700; }
.footer-text { color: #94a3b8; margin-bottom: var(--spacing-sm); }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a { color: #94a3b8; transition: color 0.2s; }
.footer-links a:hover { color: var(--color-primary); }
.social-icons { display: flex; gap: 1rem; margin-top: 1rem; }
.social-icons a { 
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.1); color: white;
  transition: all 0.2s;
}
.social-icons a:hover { background: var(--color-primary); transform: translateY(-3px); }
.footer-contact li { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 1rem; color: #94a3b8; }
.footer-contact i { color: var(--color-primary); margin-top: 5px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: var(--spacing-sm) 0; text-align: center; color: #94a3b8; font-size: 0.9rem; }

/* 8. Page-specific styles */
/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  position: relative;
  background: linear-gradient(135deg, rgba(235,248,255,1) 0%, rgba(255,255,255,1) 100%);
  padding-top: 80px;
}
.hero-content { max-width: 600px; z-index: 10; position: relative; }
.hero-image { position: absolute; right: 0; top: 0; height: 100%; width: 50%; opacity: 0.1; background: url('https://images.unsplash.com/photo-1581578731548-c64695cc6952?ixlib=rb-4.0.3&auto=format&fit=crop&w=1470&q=80') center/cover; }
.hero-btns { display: flex; gap: 1rem; margin-top: var(--spacing-md); }

/* Banner pages */
.page-header {
  padding: 150px 0 80px;
  background: var(--color-primary);
  color: white;
  text-align: center;
  border-radius: 0 0 50px 50px;
}
.page-header h1 { color: white; margin-bottom: 0; }
.page-header p { color: rgba(255,255,255,0.8); max-width: 600px; margin: 1rem auto 0; }

/* Services Grid */
.services-grid { grid-template-columns: repeat(3, 1fr); gap: var(--spacing-md); }

/* Stats Bar */
.stats-section { background: var(--color-surface); margin: -4rem auto 0; position: relative; z-index: 20; border-radius: var(--border-radius); box-shadow: var(--shadow-lg); padding: 2rem; display: flex; justify-content: space-around; width: calc(100% - 2rem); max-width: 1000px; }
.stat-item { text-align: center; }
.stat-number { font-size: 2.5rem; font-weight: 900; color: var(--color-primary); line-height: 1; font-family: var(--font-heading); }
.stat-label { font-size: 0.9rem; font-weight: 600; color: var(--color-text-light); text-transform: uppercase; letter-spacing: 1px; margin-top: 0.5rem; }

/* Pricing */
.pricing-toggle { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-bottom: var(--spacing-lg); font-weight: 600; }
.toggle-switch { position: relative; width: 60px; height: 32px; background: var(--color-primary); border-radius: 16px; cursor: pointer; transition: background 0.3s; }
.toggle-slider { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; background: white; border-radius: 50%; transition: transform 0.3s; }
.toggle-switch.annual { background: var(--color-secondary); }
.toggle-switch.annual .toggle-slider { transform: translateX(28px); }
.save-badge { background: rgba(16,185,129,0.1); color: var(--color-secondary); padding: 2px 8px; border-radius: 12px; font-size: 0.75rem; margin-left: 5px; }

.pricing-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; max-width: 1000px; margin: 0 auto; align-items: center; }
.price-card { border: 2px solid transparent; position: relative; overflow: hidden; }
.price-card.popular { border-color: var(--color-primary); transform: scale(1.05); box-shadow: var(--shadow-lg); z-index: 10; }
.price-card.popular:hover { transform: scale(1.05) translateY(-5px); }
.price-card .popular-banner { position: absolute; top: 20px; right: -30px; background: var(--color-primary); color: white; font-size: 0.75rem; font-weight: 700; padding: 5px 30px; transform: rotate(45deg); }
.price-header { text-align: center; padding-bottom: 1.5rem; border-bottom: 1px solid var(--color-border); margin-bottom: 1.5rem; }
.price-amount { font-size: 3rem; font-weight: 900; color: var(--color-text); line-height: 1; margin: 1rem 0 0.5rem; font-family: var(--font-heading); }
.price-period { color: var(--color-text-light); font-size: 0.9rem; }
.price-features li { padding: 0.5rem 0; display: flex; align-items: center; gap: 0.75rem; color: var(--color-text); }
.price-features i.fa-check { color: var(--color-secondary); }
.price-features i.fa-times { color: #cbd5e1; }

/* Testimonials */
.swiper-slide { padding: 2rem; background: var(--color-bg); border-radius: var(--border-radius); border: 1px solid var(--color-border); }
.stars { color: #fbbf24; margin-bottom: 1rem; font-size: 1.2rem; }
.testimonial-text { font-style: italic; font-size: 1.1rem; margin-bottom: 1.5rem; }
.client-info { display: flex; align-items: center; gap: 1rem; }
.client-avatar { width: 50px; height: 50px; border-radius: 50%; background: var(--color-primary); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.2rem; }

/* Checkout */
.checkout-grid { grid-template-columns: 1fr 400px; gap: var(--spacing-lg); }
.order-summary { background: rgba(14,165,233,0.05); padding: 2rem; border-radius: var(--border-radius); border: 1px solid rgba(14,165,233,0.1); position: sticky; top: 100px; }
.summary-row { display: flex; justify-content: space-between; padding: 0.75rem 0; border-bottom: 1px dashed var(--color-border); }
.summary-total { font-size: 1.5rem; font-weight: 800; border-bottom: none; padding-top: 1.5rem; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--color-border); padding: 1.5rem 0; cursor: pointer; }
.faq-question { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 1.1rem; }
.faq-question i { transition: transform 0.3s; color: var(--color-primary); }
.faq-answer { display: none; padding-top: 1rem; color: var(--color-text-light); }
.faq-item.active .faq-answer { display: block; animation: fadeIn 0.3s; }
.faq-item.active .faq-question i { transform: rotate(180deg); }

/* Features Split */
.split-layout { display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-xl); align-items: center; }
.feature-list li { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.feature-list .icon-box { background: rgba(16,185,129,0.1); color: var(--color-secondary); width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.feature-img-wrapper { position: relative; border-radius: var(--border-radius); overflow: hidden; box-shadow: var(--shadow-lg); }

/* Map */
.map-container { height: 400px; width: 100%; border-radius: var(--border-radius); overflow: hidden; box-shadow: var(--shadow-sm); }

/* 9. Animations & Keyframes */
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* 10. Media Queries */
@media (max-width: 992px) {
  .services-grid, .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .split-layout, .checkout-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-image { display: none; }
}

@media (max-width: 768px) {
  .nav-links { 
    position: fixed; top: 0; right: -100%; width: 250px; height: 100vh;
    background: var(--color-surface); box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    flex-direction: column; justify-content: center; align-items: center;
    transition: 0.3s ease-in-out;
  }
  .nav-links.active { right: 0; }
  .mobile-toggle { display: block; z-index: 1001; }
  .services-grid, .pricing-grid { grid-template-columns: 1fr; }
  .hero-btns { flex-direction: column; }
  .stats-section { flex-wrap: wrap; gap: 2rem; margin-top: var(--spacing-md); position: static; box-shadow: none; border: 1px solid var(--color-border); }
  .stat-item { width: 40%; }
  .price-card.popular { transform: none; }
  .price-card.popular:hover { transform: translateY(-5px); }
  section { padding: var(--spacing-xl) 0; }
}

@media (max-width: 576px) {
  h1 { font-size: 2.5rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .stat-item { width: 100%; }
}
