/* ==========================================================================
   CIRCUFLOW - NEXT-GEN CIRCULAR ECONOMY & ECO-TECH TEMPLATE
   Light Mode Design System & Global Responsive Layout
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Manrope:wght@400;500;600;700;800&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Brand Color Palette - Modern Premium Eco-Tech (Light System) */
  --bg-main: #f7fbf8;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #eef8f2;
  --bg-surface-glass: rgba(255, 255, 255, 0.94);
  --bg-card-glass: rgba(255, 255, 255, 0.98);
  --bg-glass-hover: #e5f5ec;

  --border-subtle: rgba(16, 185, 129, 0.14);
  --border-medium: rgba(16, 185, 129, 0.28);
  --border-strong: rgba(16, 185, 129, 0.55);
  --border-glow: rgba(5, 150, 105, 0.4);

  --accent-emerald: #059669;
  --accent-mint: #10b981;
  --accent-cyan: #0891b2;
  --accent-amber: #d97706;
  --accent-forest: #064e3b;
  --accent-lime: #65a30d;

  --text-main: #0b1f17;
  --text-body: #2d3f37;
  --text-muted: #576d63;
  --text-subtle: #8a9e95;
  --text-highlight: #059669;
  --text-inverse: #ffffff;

  --gradient-brand: linear-gradient(135deg, #059669 0%, #10b981 50%, #0891b2 100%);
  --gradient-soft: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 50%, #f7fbf8 100%);
  --gradient-card: linear-gradient(180deg, #ffffff 0%, #f8fcf9 100%);

  --shadow-xs: 0 1px 3px rgba(6, 46, 36, 0.05);
  --shadow-sm: 0 4px 12px rgba(6, 46, 36, 0.06);
  --shadow-md: 0 10px 28px rgba(6, 46, 36, 0.08);
  --shadow-lg: 0 20px 48px rgba(6, 46, 36, 0.12);
  --shadow-glow: 0 0 24px rgba(16, 185, 129, 0.18);

  /* Typography - Human, Authoritative Corporate Architecture */
  --font-heading: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Sizing & Transitions */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);

  --container-max: 1240px;
}

/* Base Resets & Overflow Protection */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-body);
  line-height: 1.65;
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
  position: relative;
}

/* Background Ambient Canvas & Mesh (Zero horizontal scrollbar impact) */
.ambient-mesh {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-glow-1 {
  position: absolute;
  top: -12%;
  left: 5%;
  width: min(500px, 80vw);
  height: min(500px, 80vw);
  background: radial-gradient(circle, rgba(16, 185, 129, 0.14) 0%, transparent 70%);
  filter: blur(80px);
  border-radius: 50%;
  animation: floatOrb 24s infinite alternate ease-in-out;
}

.ambient-glow-2 {
  position: absolute;
  bottom: 8%;
  right: 0%;
  width: min(550px, 85vw);
  height: min(550px, 85vw);
  background: radial-gradient(circle, rgba(8, 145, 178, 0.1) 0%, transparent 70%);
  filter: blur(90px);
  border-radius: 50%;
  animation: floatOrb 28s infinite alternate-reverse ease-in-out;
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(16, 185, 129, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(16, 185, 129, 0.08) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 40%, transparent 80%);
  opacity: 0.75;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.22;
  color: var(--text-main);
  letter-spacing: -0.025em;
  word-break: break-word;
}

h1 { font-size: clamp(2.1rem, 4.4vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 2.1vw, 1.75rem); }
h4 { font-size: 1.2rem; }
h5 { font-size: 1.05rem; }
p { color: var(--text-body); font-size: 1rem; line-height: 1.7; word-break: break-word; }

.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.accent-text {
  color: var(--accent-emerald);
}

.mono-text {
  font-family: var(--font-mono);
}

a {
  color: inherit;
  text-decoration: none;
  transition: all var(--transition-fast);
}

ul {
  list-style: none;
}

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

svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Layout Containers & Spacing */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  position: relative;
  z-index: 1;
}

.section {
  padding: 86px 0;
  position: relative;
  z-index: 1;
  overflow: hidden;
  max-width: 100%;
}

.section-hero {
  padding: 130px 0 80px;
  min-height: 88vh;
  display: flex;
  align-items: center;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 48px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-emerald);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
  max-width: 100%;
  white-space: normal;
  text-align: left;
}

.section-tag svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.section-title {
  margin-bottom: 14px;
}

.section-desc {
  font-size: 1.06rem;
  color: var(--text-muted);
}

/* Header & Glass Navigation */
.header-glass {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-smooth);
}

.header-glass.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-md);
  border-bottom-color: var(--border-medium);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
  transition: height var(--transition-smooth);
}

.header-glass.scrolled .nav-bar {
  height: 68px;
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 1.38rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  flex-shrink: 0;
}

.logo-symbol {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.logo-symbol::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, transparent 60%);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-main {
  line-height: 1;
  font-weight: 800;
}

.logo-badge {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-emerald);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 3px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  max-width: 36px;
  max-height: 36px;
  flex-shrink: 0;
}

/* Nav Menu & Dropdown Architecture (Desktop) */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-item {
  position: relative;
}

.nav-link {
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--text-body);
  position: relative;
  padding: 8px 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-emerald);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-brand);
  border-radius: var(--radius-full);
}

/* Dropdown Submenu (Desktop) */
.nav-dropdown {
  position: relative;
}

.dropdown-chevron {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.nav-dropdown:hover .dropdown-chevron {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  width: 290px;
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 10px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-smooth);
  z-index: 1100;
  pointer-events: none;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(4px);
  pointer-events: auto;
}

.dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.dropdown-item:hover {
  background: var(--bg-surface-elevated);
}

.dropdown-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-emerald);
  flex-shrink: 0;
  margin-top: 2px;
}

.dropdown-item:hover .dropdown-icon {
  background: var(--accent-emerald);
  color: #ffffff;
}

.dropdown-item-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  display: block;
}

.dropdown-item-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: block;
  margin-top: 2px;
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  cursor: pointer;
  padding: 6px;
  align-items: center;
  justify-content: center;
}

.mobile-toggle svg {
  width: 24px;
  height: 24px;
}

/* Mobile Off-Canvas Backdrop Overlay */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 38, 28, 0.48);
  z-index: 1400;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-smooth), visibility var(--transition-smooth);
}

.nav-backdrop.open {
  opacity: 1;
  visibility: visible;
}

/* Mobile Sidebar Drawer Header (Inside Drawer) */
.mobile-drawer-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  width: 100%;
}

.mobile-drawer-close {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  white-space: nowrap;
  text-align: center;
  max-width: 100%;
}

.btn-primary {
  background: var(--gradient-brand);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.28);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(5, 150, 105, 0.38);
  filter: brightness(1.04);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  border-color: var(--border-medium);
}

.btn-secondary:hover {
  background: var(--bg-glass-hover);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border-color: var(--border-medium);
}

.btn-outline:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 14px 30px;
  font-size: 1.02rem;
}

/* Grid Systems */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  width: 100%;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  width: 100%;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  width: 100%;
}

/* Footer */
.footer-main {
  background: #ffffff;
  border-top: 1px solid var(--border-subtle);
  padding: 70px 0 30px;
  position: relative;
  z-index: 1;
  overflow: hidden;
  max-width: 100%;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
  gap: 36px;
  margin-bottom: 50px;
  width: 100%;
}

.footer-brand p {
  margin: 16px 0 20px;
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 320px;
}

.footer-cert-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cert-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent-emerald);
}

.footer-col h5 {
  font-size: 1rem;
  margin-bottom: 18px;
  color: var(--text-main);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--accent-emerald);
  transform: translateX(3px);
}

.footer-newsletter p {
  font-size: 0.88rem;
  margin-bottom: 14px;
  color: var(--text-muted);
}

.newsletter-form {
  display: flex;
  gap: 8px;
  max-width: 100%;
}

.newsletter-form input {
  flex: 1;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  padding: 10px 16px;
  color: var(--text-main);
  font-size: 0.88rem;
  outline: none;
  transition: border-color var(--transition-fast);
  min-width: 0;
}

.newsletter-form input:focus {
  border-color: var(--accent-emerald);
  background: #ffffff;
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-subtle);
  width: 100%;
}

.footer-legal-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-legal-links a:hover {
  color: var(--accent-emerald);
}

/* ==========================================================================
   Responsive Navigation Drawer & Off-Canvas Side Sliding Sidebar
   ========================================================================== */
@media (max-width: 1024px) {
  .section { padding: 75px 0; }
  .section-hero-slider { padding: 110px 0 45px; }
  .hero-wrapper { grid-template-columns: 1fr; gap: 32px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
  .footer-grid .footer-brand { grid-column: span 2; }
}

@media (max-width: 768px) {
  .section { padding: 58px 0; }
  .section-hero, .section-hero-slider { padding: 98px 0 40px; min-height: auto; }
  .hero-wrapper { grid-template-columns: 1fr; gap: 28px; }
  .hero-slide-tabs { width: 100%; }
  .hero-slide-tab { padding: 7px 14px; font-size: 0.8rem; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid .footer-brand { grid-column: auto; }
  
  .header-glass {
    z-index: 1500;
  }

  .mobile-toggle { display: flex; }
  .mobile-drawer-header { display: flex; }
  
  /* OFF-CANVAS SIDE DRAWER (Sliding in from the RIGHT side) */
  .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 86vw;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    opacity: 1 !important;
    flex-direction: column;
    align-items: stretch;
    padding: 24px 20px 40px;
    gap: 8px;
    transform: translateX(105%);
    transition: transform var(--transition-smooth);
    box-shadow: -8px 0 35px rgba(6, 38, 28, 0.22);
    z-index: 1600;
  }

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

  .nav-item {
    width: 100%;
  }

  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 12px 14px;
    font-size: 1rem;
    border-radius: var(--radius-sm);
  }

  .nav-link:hover, .nav-link.active {
    background: var(--bg-surface-elevated);
  }

  .nav-link.active::after {
    display: none;
  }

  .dropdown-menu {
    position: static;
    transform: none !important;
    opacity: 1;
    visibility: visible;
    width: 100%;
    box-shadow: none;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    margin-top: 4px;
    margin-bottom: 8px;
    padding: 6px;
    display: none;
    pointer-events: auto;
  }

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

  .nav-dropdown.mobile-open .dropdown-chevron {
    transform: rotate(180deg);
  }

  .nav-actions .btn {
    display: none;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 14px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container { padding-left: 16px; padding-right: 16px; width: 100%; max-width: 100%; }
  .section { padding: 44px 0; }
  .grid-4 { grid-template-columns: 1fr; }
  .btn-lg { width: 100%; padding: 13px 20px; white-space: normal; }
  .hero-actions .btn { width: 100%; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form .btn { width: 100%; }
}
