/* polluer.com - Modern Sustainability Database Styles */

/* ============================================================================
   CSS VARIABLES & RESET
   ========================================================================= */
:root {
  --forest-green: #2D5016;
  --ocean-blue: #0077BE;
  --earth-brown: #8B7355;
  --success-green: #10B981;
  --warning-amber: #F59E0B;
  --danger-red: #EF4444;
  --white: #FFFFFF;
  --light-gray: #F3F4F6;
  --medium-gray: #9CA3AF;
  --dark-gray: #1F2937;
  --black: #111827;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  color: var(--dark-gray);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
}

/* ============================================================================
   TYPOGRAPHY
   ========================================================================= */
h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; color: var(--black); }
h2 { font-size: 1.875rem; font-weight: 600; margin-bottom: 0.75rem; color: var(--black); }
h3 { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--dark-gray); }

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

a:hover {
  color: var(--forest-green);
}

/* ============================================================================
   LAYOUT
   ========================================================================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.main-content {
  min-height: calc(100vh - 200px);
  padding-top: 2rem;
  padding-bottom: 4rem;
}

/* ============================================================================
   HEADER
   ========================================================================= */
.header {
  background: var(--white);
  border-bottom: 2px solid var(--light-gray);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--forest-green);
}

.logo a {
  color: var(--forest-green);
}

.header nav {
  display: flex;
  gap: 1.5rem;
}

.header nav a {
  color: var(--dark-gray);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.2s;
}

.header nav a:hover {
  background: var(--light-gray);
  color: var(--forest-green);
}

/* ============================================================================
   FOOTER
   ========================================================================= */
.footer {
  background: var(--dark-gray);
  color: var(--white);
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
}

.footer a {
  color: var(--white);
  margin: 0 0.5rem;
}

.footer a:hover {
  color: var(--success-green);
}

/* ============================================================================
   HOMEPAGE HERO
   ========================================================================= */
.hero-home {
  background: linear-gradient(135deg, var(--forest-green), var(--ocean-blue));
  color: var(--white);
  padding: 4rem 0;
  margin-bottom: 3rem;
}

.hero-title {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--white);
}

.hero-subtitle {
  text-align: center;
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

/* ============================================================================
   SEARCH
   ========================================================================= */
.search-container {
  max-width: 600px;
  margin: 0 auto 2rem;
  position: relative;
}

.search-input-home {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.125rem;
  border: none;
  border-radius: 50px;
  box-shadow: var(--shadow-lg);
  outline: none;
}

.search-input-home:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  margin-top: 0.5rem;
  max-height: 400px;
  overflow-y: auto;
  display: none;
  z-index: 50;
}

.search-results.active {
  display: block;
}

.search-result-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--light-gray);
  cursor: pointer;
  transition: background 0.2s;
  display: block;
  color: var(--dark-gray);
}

.search-result-item:hover {
  background: var(--light-gray);
}

.search-result-item:last-child {
  border-bottom: none;
}

.result-name {
  font-weight: 600;
  color: var(--black);
  margin-bottom: 0.25rem;
}

.result-meta {
  font-size: 0.875rem;
  color: var(--medium-gray);
}

/* ============================================================================
   STATS BAR
   ========================================================================= */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
}

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

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--white);
}

.stat-label {
  font-size: 0.875rem;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================================================
   TOP EMITTERS SECTION
   ========================================================================= */
.top-emitters {
  padding: 3rem 0;
  background: var(--light-gray);
}

.top-emitters h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.emitters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.emitter-card {
  background: var(--white);
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid var(--danger-red);
  display: flex;
  gap: 1rem;
  align-items: center;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
  color: var(--dark-gray);
}

.emitter-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.emitter-rank {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--medium-gray);
  min-width: 50px;
  text-align: center;
}

.emitter-name {
  font-weight: 600;
  color: var(--black);
  margin-bottom: 0.25rem;
}

.emitter-emissions {
  font-weight: 500;
  color: var(--danger-red);
  font-size: 0.9rem;
}

.emitter-year {
  font-size: 0.75rem;
  color: var(--medium-gray);
}

/* ============================================================================
   FEATURES SECTION
   ========================================================================= */
.features {
  padding: 4rem 0;
}

.features h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature-card {
  text-align: center;
  padding: 2rem;
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--medium-gray);
}

/* ============================================================================
   COMPANY PAGE HERO
   ========================================================================= */
.breadcrumb {
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--ocean-blue);
  font-weight: 500;
}

.hero {
  text-align: center;
  padding: 2rem 0;
  border-bottom: 2px solid var(--light-gray);
  margin-bottom: 2rem;
}

.company-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.company-name {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.company-subtitle {
  color: var(--medium-gray);
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.meta-info {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--medium-gray);
}

/* ============================================================================
   METRICS CARDS
   ========================================================================= */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.metric-card {
  background: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
  border-left: 4px solid var(--ocean-blue);
}

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

.metric-card.primary {
  border-left-color: var(--danger-red);
  background: linear-gradient(135deg, #FEF2F2, var(--white));
}

.metric-card.success {
  border-left-color: var(--success-green);
  background: linear-gradient(135deg, #F0FDF4, var(--white));
}

.metric-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.metric-label {
  font-size: 0.875rem;
  color: var(--medium-gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.metric-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 0.25rem;
}

.metric-sublabel,
.metric-year {
  font-size: 0.75rem;
  color: var(--medium-gray);
}

/* ============================================================================
   SECTIONS
   ========================================================================= */
.section {
  margin-bottom: 3rem;
}

.section h2 {
  border-bottom: 2px solid var(--light-gray);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

/* ============================================================================
   EMISSIONS BREAKDOWN
   ========================================================================= */
.emissions-breakdown {
  background: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: 12px;
  padding: 1.5rem;
}

.emission-row {
  display: grid;
  grid-template-columns: 200px 1fr 150px;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--light-gray);
}

.emission-row:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.emission-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.scope-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.scope-1 {
  background: #FEE2E2;
  color: #991B1B;
}

.scope-2 {
  background: #FEF3C7;
  color: #92400E;
}

.scope-3 {
  background: #DBEAFE;
  color: #1E40AF;
}

.emission-desc {
  font-size: 0.875rem;
  color: var(--medium-gray);
}

.emission-bar {
  background: var(--light-gray);
  border-radius: 8px;
  height: 12px;
  overflow: hidden;
}

.emission-fill {
  height: 100%;
  border-radius: 8px;
  transition: width 0.6s ease;
}

.scope-1-fill {
  background: linear-gradient(90deg, #EF4444, #DC2626);
}

.scope-2-fill {
  background: linear-gradient(90deg, #F59E0B, #D97706);
}

.scope-3-fill {
  background: linear-gradient(90deg, #3B82F6, #2563EB);
}

.emission-value {
  font-weight: 600;
  color: var(--black);
  text-align: right;
}

/* ============================================================================
   TIMELINE (Historical Emissions)
   ========================================================================= */
.timeline {
  background: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: 12px;
  padding: 1.5rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 80px 1fr 150px;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--light-gray);
}

.timeline-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.timeline-year {
  font-weight: 600;
  color: var(--dark-gray);
}

.timeline-bar-container {
  background: var(--light-gray);
  border-radius: 8px;
  height: 12px;
  overflow: hidden;
}

.timeline-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--forest-green), var(--ocean-blue));
  border-radius: 8px;
  transition: width 0.6s ease;
}

.timeline-value {
  font-weight: 500;
  color: var(--black);
  text-align: right;
}

/* ============================================================================
   LISTS
   ========================================================================= */
.achievement-list,
.challenge-list {
  list-style: none;
  padding: 0;
}

.achievement-list li,
.challenge-list li {
  padding: 0.75rem 0;
  padding-left: 2rem;
  position: relative;
  border-bottom: 1px solid var(--light-gray);
}

.achievement-list li:last-child,
.challenge-list li:last-child {
  border-bottom: none;
}

.achievement-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success-green);
  font-weight: 700;
  font-size: 1.25rem;
}

.challenge-list li::before {
  content: '⚠️';
  position: absolute;
  left: 0;
}

/* ============================================================================
   GOALS GRID
   ========================================================================= */
.goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.goal-card {
  background: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.goal-card h3 {
  margin-bottom: 1rem;
  color: var(--forest-green);
}

.goal-card ul {
  list-style: none;
  padding: 0;
}

.goal-card li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  border-bottom: 1px solid var(--light-gray);
}

.goal-card li:last-child {
  border-bottom: none;
}

.goal-card li::before {
  content: '🎯';
  position: absolute;
  left: 0;
}

/* ============================================================================
   FOCUS AREAS
   ========================================================================= */
.focus-areas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.focus-badge {
  background: var(--light-gray);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--dark-gray);
  border: 1px solid var(--medium-gray);
}

/* ============================================================================
   COLLAPSIBLE SECTIONS
   ========================================================================= */
.collapsible .section-toggle {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--light-gray);
  border-radius: 8px;
  transition: background 0.2s;
}

.collapsible .section-toggle:hover {
  background: var(--medium-gray);
}

.toggle-icon {
  font-size: 1.5rem;
  font-weight: 700;
}

.section-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.section-content.open {
  max-height: 3000px;
}

/* ============================================================================
   REPORT META
   ========================================================================= */
.report-meta {
  background: var(--light-gray);
  padding: 1.5rem;
  border-radius: 12px;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.meta-item {
  padding: 0.75rem;
}

.meta-item strong {
  color: var(--black);
  display: block;
  margin-bottom: 0.25rem;
}

/* ============================================================================
   PAGE FOOTER INFO
   ========================================================================= */
.page-footer-info {
  margin-top: 3rem;
  padding: 1.5rem;
  background: var(--light-gray);
  border-radius: 8px;
  border-left: 4px solid var(--warning-amber);
  font-size: 0.875rem;
  color: var(--dark-gray);
}

.page-footer-info p {
  margin-bottom: 0.5rem;
}

.page-footer-info p:last-child {
  margin-bottom: 0;
}

/* ============================================================================
   CONTENT PAGES
   ========================================================================= */
.content-page {
  max-width: 800px;
  margin: 0 auto;
}

.content-page h1 {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--forest-green);
}

.content-page h2 {
  margin-top: 2rem;
  color: var(--forest-green);
}

.content-page ul {
  margin: 1rem 0;
  padding-left: 2rem;
}

.content-page li {
  margin-bottom: 0.5rem;
}

.content-page .contact-email {
  font-size: 1.25rem;
  padding: 1.5rem;
  background: var(--light-gray);
  border-radius: 8px;
  text-align: center;
}

/* ============================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: 1rem; }

  .stats-bar {
    flex-direction: column;
    gap: 1.5rem;
  }

  .stat-value { font-size: 2rem; }

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

  .emission-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

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

  .header-content {
    flex-direction: column;
    gap: 1rem;
  }

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

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

@media print {
  .header, .footer, .breadcrumb, .search-container {
    display: none;
  }

  body {
    font-size: 12pt;
  }

  .section {
    page-break-inside: avoid;
  }
}
