/* ===================================
   Ecogloo Cleaning Theme - Base CSS
   =================================== */

/* Hide reCAPTCHA badge */
.grecaptcha-badge {
    visibility: hidden !important;
    display: none !important;
}

/* Performance optimizations */
* {
  box-sizing: border-box;
}

/* Optimize paint and layout */
.ecogloo-theme {
  background-color: var(--white);
  color: var(--text-dark);
  will-change: auto;
}

/* Optimize animations */
@media (prefers-reduced-motion: no-preference) {
  .smooth-transition {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* WebP support */
.webp .optimized-image {
  background-image: url('image.webp');
}

.no-webp .optimized-image {
  background-image: url('image.jpg');
}

/* CSS Variables for Brand Colors */
:root {
  --brand-blue: #1E3670;
  --brand-sky: #009DFF;
  --brand-lime: #10B981;
  /* Aliases and additional tokens used across sections/pages */
  --brand-green: #22C55E; /* maps to a vibrant green for accents */
  --text-dark: #111827;
  --text-light: #6B7280;
  --text-muted: var(--text-light);
  --bg-light: #F9FAFB;
  --border-light: #E5E7EB;
  --border-color: var(--border-light);
  --light-bg: var(--bg-light);
  --white: #FFFFFF;
}

/* Body */
.ecogloo-theme {
  background-color: var(--white);
  color: var(--text-dark);
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  margin: 0;
  padding: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 1rem 0;
  font-weight: 600;
  line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin: 0 0 1rem 0;
}

a {
  color: var(--brand-blue);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--brand-sky);
}

/* Layout Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

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

.hidden {
  display: none;
}

.block {
  display: block;
}

/* Grid Utilities */
.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

.gap-8 {
  gap: 2rem;
}

/* Spacing Utilities */
.m-0 { margin: 0; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }

.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-12 { padding: 3rem; }
.p-16 { padding: 4rem; }

.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }

.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }

/* Text Utilities */
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-dark { color: var(--text-dark); }
.text-light { color: var(--text-light); }
.text-white { color: var(--white); }
.text-blue { color: var(--brand-blue); }
.text-sky { color: var(--brand-sky); }
.text-lime { color: var(--brand-lime); }

/* Background Utilities */
.bg-white { background-color: var(--white); }
.bg-light { background-color: var(--bg-light); }
.bg-blue { background-color: var(--brand-blue); }
.bg-sky { background-color: var(--brand-sky); }
.bg-lime { background-color: var(--brand-lime); }

/* Border Utilities */
.border { border: 1px solid var(--border-light); }
.border-light { border-color: var(--border-light); }
.border-blue { border-color: var(--brand-blue); }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }

/* Shadow Utilities */
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }

/* Responsive Utilities */
@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  
  .md\:flex {
    display: flex;
  }
  
  .md\:hidden {
    display: none;
  }
  
  .md\:block {
    display: block;
  }
  
  .md\:text-left {
    text-align: left;
  }
  
  .md\:text-center {
    text-align: center;
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  
  .lg\:flex {
    display: flex;
  }
  
  .lg\:hidden {
    display: none;
  }
  
  .lg\:block {
    display: block;
  }
}

/* Accessibility */
.skip-link {
    background: var(--brand-blue);
    color: white;
    font-weight: 600;
    left: -9999px;
    padding: 8px 16px;
    position: absolute;
    top: 8px;
    z-index: 100000;
    text-decoration: none;
    border-radius: 4px;
    transition: none;
    opacity: 0;
    visibility: hidden;
}

.skip-link:focus {
    left: 8px;
    outline: 2px solid white;
    outline-offset: 2px;
    opacity: 1;
    visibility: visible;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}
