/* ========================================================= 
   CO₂ EMISSIONS DASHBOARD - COMPLETE CSS
   ========================================================= 
   This file contains all styling for the entire website
   including homepage and dashboard styles
*/

/* ========================================================= 
   CSS CUSTOM PROPERTIES (VARIABLES)
========================================================= */
:root {
  /* Main color palette */
  --bg-color: #222831; /* Main dark charcoal background */
  --bg-color-rgb: 34, 40, 49; /* RGB for transparency */
  --text-color: #eeeeee; /* Light gray text */
  --text-color-rgb: 238, 238, 238; /* RGB for transparency */
  --primary-color: #eeeeee; /* Primary text color */
  --primary-color-rgb: 238, 238, 238; /* RGB for transparency */
  --accent-color: #00e6d2; /* Vibrant teal accent color */
  --accent-color-rgb: 0, 173, 181; /* RGB for transparency */
  --nav-bg: #222831; /* Navigation background */
  --border-color: #393e46; /* Border color */
  --border-color-rgb: 57, 62, 70; /* RGB for transparency */
  --secondary-bg: #393e46; /* Medium gray for cards */

    /* Dashboard specific colors */

  --dashboard-card-header-text: #000; /* Black text for contrast on accent color headers */
  --dashboard-header-gradient-end: #008c92; /* Darker shade of accent for gradient */
  --dashboard-transparent-bg-alpha: 0.3; /* Alpha for transparent backgrounds */
  --dashboard-transparent-border-alpha: 0.1; /* Alpha for transparent borders */
  --dashboard-hover-accent-alpha: 0.2; /* Alpha for accent hover effects */
  --dashboard-tooltip-bg-alpha: 0.9; /* Alpha for tooltip background */

  /* Status colors */

  --danger-color: #ff2e63; /* Red for warnings/errors */
  --danger-color-rgb: 255, 46, 99;
  --warning-color: #f9ed69; /* Yellow for cautions */
  --warning-color-rgb: 249, 237, 105;
  --success-color: #6bcb77; /* Green for success/positive */
  --success-color-rgb: 107, 203, 119;

  /* Typography */
  --font-main: "lora", "Barlow Condensed", -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif;
  --font-digit: "Courier New", "Barlow", Monaco, Consolas, monospace;
  /* Spacing and effects */

  --border-radius: 8px;
  --transition-speed: 0.3s;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);

  /*  Section theming helpers (add at end) */

  --light-bg: #EEEEEE;     /* light section background */
  --ink-color: #222831;    /* text color on light bg */

}

/* ========================================================= 
   BASE STYLES
========================================================= */
body {
  font-family: var(--font-main);
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  padding-top: 62px; /* Account for fixed navbar */
  line-height: 1.6;
  letter-spacing: .7px;
  overscroll-behavior-y: contain;
    -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,h2,h3,.display-1,.display-2,.about-title{ font-family: var(--font-main);
 margin-top: 0;                        /* avoid double top gaps */
  color: var(--text-color); }

/* tighter but clear headings */
#hero h1, .about-title{ letter-spacing:.4px; }

/* ========================================================= 
   NAVIGATION STYLES
========================================================= */
.transparent-nav {
  background-color: transparent !important;
  transition: all 0.3s ease;
}

.transparent-nav.scrolled {
  background-color: rgba(var(--bg-color-rgb), 0.9) !important;
  backdrop-filter: blur(10px);
}

.navbar-brand {
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 1.5rem;
}

.navbar-brand .text-accent {
  color: var(--accent-color) !important;
}

.nav-link:hover {
  color: var(--accent-color) !important;
}

.nav-link.active {
  color: var(--accent-color) !important;
  font-weight: bold;
}

.navbar-nav .nav-link {
  padding: 12px 16px;
  transition: background-color 0.3s ease;
}

.navbar-nav .nav-link:hover {
  background-color: rgba(var(--accent-color-rgb), 0.1);
}

.navbar.sticky-top {
  z-index: 100;
}

@media (max-width: 991.98px){
  .navbar-collapse {
    background: rgba(0,0,0,.92);
    backdrop-filter: blur(6px);
    padding: .75rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
}


/* ========================================================= 
   HERO SECTION (Homepage)
========================================================= */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-color) 0%, var(--secondary-bg) 100%);
}

#hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 20% 30%,
      rgba(var(--accent-color-rgb), 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(var(--accent-color-rgb), 0.08) 0%,
      transparent 50%
    );
  z-index: 0;
}

#hero video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero-overlay {
  background: rgba(var(--bg-color-rgb), 0.3);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--primary-color);
}

/* Scroll Indicator */
.scroll-indicator-container {
  position: relative;
  height: 120px;
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 40px;
  z-index: 10;
}

#scroll-wrapper {
  display: table;
  width: 100%;
  height: 100%;
}

#scroll-wrapper-inner {
  display: table-cell;
  vertical-align: middle;
  width: 100%;
  height: 100%;
}

#scroll-down {
  display: block;
  position: relative;
  padding-top: 79px;
  text-align: center;
}

#scroll-title {
  display: block;
  text-transform: uppercase;
  color: rgb(255, 255, 255);
  font-family: "raleway";
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 0.4em;
  text-align: center;
  transform: rotate(90deg);
  margin-bottom: 45px;
  letter-spacing: 1.2px;
}

#scroll-down::before {
  animation: elasticus 2.9s cubic-bezier(1, 0, 0, 1) infinite;
  position: absolute;
  top: 0px;
  left: 50%;
  margin-left: -1px;
  width: 2px;
  height: 90px;
  background: rgb(255, 255, 255);
  content: " ";
}

@keyframes elasticus {
  0% {
    transform-origin: 0% 0%;
    transform: scale(1, 0);
  }
  50% {
    transform-origin: 0% 0%;
    transform: scale(1, 1);
  }
  50.1% {
    transform-origin: 0% 100%;
    transform: scale(1, 1);
  }
  100% {
    transform-origin: 0% 100%;
    transform: scale(1, 0);
  }
}

@supports (height: 100dvh) {
  #hero { min-height: 100dvh; }
}

/* ========================================================= 
   DASHBOARD SECTION (Homepage)
========================================================= */
#dashboard {
  background-color: var(--bg-color);
  color: var(--text-color);
  padding: 3rem 0;
}

.datadash-border {
  padding-right: 20px;
  border-right: 1px solid #ffffff;
}

.meter-border {
  border-bottom: solid #ffffff;
  border-right-style: none;
  padding: 0 0 20px;
  margin-bottom: 20px;
}

.border-card1 {
  padding-right: 20px;
  border-right: 1px solid #ffffff;
}

.border-card3 {
  padding-left: 20px;
  border-left: 1px solid #ffffff;
}

/* CO₂ Display Styling */
.co2-display {
  display: flex;
  align-items: center;
  font-family: var(--font-digit);
  font-size: 2.5rem;
  color: var(--accent-color);
  margin: 1rem 0;
  gap: 0.1em;
}

.digit {
  width: 1ch;
  height: 1.2em;
  display: inline-block;
  overflow: hidden;
  position: relative;
  text-align: center;
}

.digit-stack {
  display: block;
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  will-change: transform;
}

.digit-stack span {
  display: block;
  height: 1.2em;
  line-height: 1.2em;
}

.decimal-point {
  font-size: 0.9em;
  color: var(--accent-color);
  height: auto;
  margin: 0 0.1em;
}

/* Dashboard Main Container */
.dashboard-main-container {
  display: flex;
  background-color: transparent;
  border: none;
  border-radius: 8px;
  overflow: hidden;
  max-width: 900px;
  margin: 0 auto;
  height: 100%;
}

.data-dash-section {
  flex: 1;
  padding: 2rem;
  border-right: 1px solid var(--border-color);
  background-color: transparent;
}

.data-dash-title {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 1rem;
  line-height: 1.1;
  color: var(--primary-color);
}

.data-dash-description {
  font-size: 0.9rem;
  color: #cccccc;
  margin-bottom: 1.5rem;
  line-height: 1.4;
  letter-spacing: 1.2px;
}

.explore-btn {
  font-size: 0.75rem;
  padding: 0.5rem 1rem;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid #666;
  background-color: transparent;
  color: var(--primary-color);
  transition: all 0.3s ease;
}

.explore-btn:hover {
  background-color: #333;
  color: var(--primary-color);
}

.main-content-section {
  flex: 3;
  padding: 3rem;
}

.co2-main-display {
  margin-bottom: 3rem;
}

.co2-unit-text {
  font-size: 0.9rem;
  color: #cccccc;
  margin: 0;
  font-weight: normal;
}

.co2-number {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-family: var(--font-digit);
  font-size: 4rem;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  gap: 0.05em;
  font-weight: normal;
}

.separator-line {
  width: 100%;
  height: 1px;
  background-color: var(--primary-color);
  margin: 1.5rem 0;
}

.bottom-stats-container {
  display: flex;
  gap: 0;
}

.stat-item {
  flex: 1;
  padding: 0 1rem;
  text-align: center;
}

.stat-item:not(:last-child) {
  border-right: 1px solid var(--border-color);
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.temperature-number {
  color: var(--accent-color);
}

.stat-description {
  font-size: 0.8rem;
  color: #cccccc;
  line-height: 1.3;
  letter-spacing: 1.2px;
}

.world-map-placeholder {
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 60px;
}

.world-map-img {
  max-width: 158%;
  max-height: 158%;
  object-fit: contain;
  border-radius: 4px;
  opacity: 1;
}

/* ========================================================= 
   CLIMATE FACTS SECTION
========================================================= */
.climate-facts-section{
  background: rgba(57,62,70,.55);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(238,238,238,.08);
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
}
.facts-header {
  background: linear-gradient(90deg, var(--accent-color), #00a1a8);
  border-bottom: 1px solid rgba(0,0,0,.15);
  padding: 1rem;
  color: var(--bg-color);
}

.facts-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0;
  color: var(--bg-color);
  display: flex;
  align-items: center;
}

.facts-subtitle {
  font-size: 0.7rem;
  margin-top: 0.25rem;
  opacity: 0.9;
  font-weight: 500;
  color: var(--bg-color);
}

.facts-items {
  padding: 1rem;
  flex-grow: 1;
  overflow-y: auto;
   border-bottom: 1px dashed rgba(238,238,238,.12);
}

.fact-item {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(238, 238, 238, 0.1);
   align-items: center;         /* vertically center icon and text */
  gap: 12px;                   /* a little more breathing room */
}


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

.fact-icon {
  width: 36px;
  height: 38px;
  background: var(--accent-color);
  border-radius: var(--border-radius);
  display: grid;
  align-items: center;
  justify-content: center;
  color: var(--bg-color);
  font-size: 0.8rem;
  flex-shrink: 0;
  place-items: center;
  margin: 0; 
  flex: 0 0 36px; 
}

.fact-heading {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0 0 0.25rem 0;
  line-height: 1.2;
}

.fact-description {
  font-size: 0.78rem;
  color: #b0b0b0;
  margin: 0;
  line-height: 1.3;
  letter-spacing: 1.2px;
}

.facts-footer {
  padding: 1rem;
  border-top: 1px solid rgba(238, 238, 238, 0.1);
}

.btn-outline-accent {
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  background: transparent;
  font-weight: 500;
  font-size: 0.75rem;
  padding: 0.5rem 1rem;
  transition: all var(--transition-speed) ease;
}

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

/* ==============================
   About Section ---The air we breathe
is changing  
   ============================== */
.about-section {
  padding-top: 4rem;
  padding-bottom: 4rem;
  background: #171c22;  /* subtle dark shade */
}

.about-title {
  font-size: 7.5rem;
  font-weight: 700;
  line-height: 1.18;
  color: var(--primary-color, #ffffff);
  margin-bottom: 1.5rem;
  letter-spacing: -0.5px;
}

.about-description {
  font-size: 1.2rem;
  line-height: 1.75;
  color: #c8d3df;
  margin-bottom: 0;
}

/* Responsive adjustment for mobile */
@media (max-width: 700px) {
  .about-title {
    font-size: 2.45rem;
  }
  .about-description {
    font-size: 1.02rem;
  }
}


/* ========================================================= 
   CLIMATE SCIENCE DISCOVERY SECTION
========================================================= */
.climate-science-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

.climate-science-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 30px;
}

.discovery-card {
  height: 500px;
  cursor: pointer;
  transition: transform 0.3s ease;
  border-radius: 8px;
  overflow: hidden;
}

.discovery-card:hover {
  transform: translateY(-6px);
  box-shadow:0 15px 8px rgba(0,0,0,.25);
}

.card-image {
  position: relative;
  height: 100%;
  width: 100%;
}

.card-bg-pic {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.discovery-card .card-bg-pic{ filter:saturate(1.05) contrast(1.02); }

.discovery-card:focus-within{ outline:2px solid var(--accent-color); outline-offset:2px; }

.discovery-card:hover .card-bg-pic {
  transform: scale(1.05);
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
}

.card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  color: white;
  z-index: 2;
}

.card-title {
  font-size: 1.7rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.card-description {
  font-size: 0.9rem;
  color: #cccccc;
  margin-bottom: 1rem;
}

.card-arrow {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  font-size: 1.5rem;
  color: var(--accent-color);
  transition: transform 0.3s ease;
}

.discovery-card:hover .card-arrow {
  transform: translateX(5px);
}
/* === FIX: keep card title from touching the arrow, all screens === */
.discovery-card .card-content{
  /* keep your original layout/look */
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  color: #fff;
  z-index: 2;

  /* make sure text and arrow don't fight for space */
  display: block;          /* back to normal block flow */
}

.discovery-card .card-title{
  /* your original style, plus space for the arrow */
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 .5rem 0;

  /* this is the key line—gives the title some room on the right */
  padding-right: 2.2rem;   /* ~35px, enough for the arrow */
  word-break: break-word;  /* safe wrapping if needed */
  position: relative;
  z-index: 3;              /* sits above the overlay nicely */
}

.discovery-card .card-arrow{
  /* lock the arrow to the bottom-right corner as before */
  position: absolute;
  bottom: 1.4rem;
  right: 1.2rem;
  font-size: 1.5rem;
  color: var(--accent-color);
  z-index: 3;
  transition: transform .3s ease;
}

.discovery-card:hover .card-arrow{
  transform: translateX(4px);
}

/* slightly smaller title on medium widths so it wraps nicer */
@media (max-width: 1200px){
  .discovery-card .card-title{
    font-size: 1.55rem;
    padding-right: 2rem;
  }
}


/* ========================================================= 
   FOOTER STYLES
========================================================= */
footer {
  background-color: var(--bg-color);
}

.footer-logo h2 {
  font-family: var(--font-main);
  letter-spacing: 2px;
}

.social-icons {
  margin-top: 1rem;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--border-color);
  color: #fff;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background-color: var(--accent-color);
  color: #000;
  transform: translateY(-2px);
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent-color) !important;
}

/* ========================================================= 
   MOBILE responsive odometer section/co2 numbers
========================================================= */
@media (max-width: 767px) {
  
  /* Dashboard Main Container - Stack vertically on mobile */
  .dashboard-main-container {
    flex-direction: column;
    margin: 0 1rem;
    align-items: center; /* Center the container */
    text-align: center; /* Center all text content */
  }

  /* Data Dash Section - Remove border and center content */
  .data-dash-section {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 1rem 1.5rem 1rem; /* Adjust padding */
    text-align: center; /* Center align text */
    width: 100%; /* Full width */
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content horizontally */
  }

  /* Main Content Section - Center align */
  .main-content-section {
    padding: 1.5rem 1rem; /* Reduce padding */
    text-align: center; /* Center align all content */
    width: 100%; /* Full width */
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content horizontally */
  }

  /* CO₂ Main Display - Center everything */
  .co2-main-display {
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content */
  }

  /* CO₂ Number Display - Center the digits */
  .co2-number {
    font-size: 3rem; /* Slightly smaller for mobile */
    justify-content: center; /* Center the digits */
    margin-bottom: 1rem;
    flex-wrap: wrap; /* Allow wrapping if needed */
  }

  /* CO₂ Unit Text - Center and adjust */
  .co2-unit-text {
    text-align: center;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    max-width: 280px; /* Limit width for better readability */
    letter-spacing: 1.2px;
  }

  /* Bottom Stats Container - Stack vertically */
  .bottom-stats-container {
    flex-direction: column;
    gap: 1.5rem; /* Increase gap between items */
    align-items: center; /* Center items */
    width: 100%;
  }

  /* Individual Stat Items - Center everything */
  .stat-item {
    text-align: center;
    padding: 1rem; /* Add padding */
    border-right: none; /* Remove right border */
    border-bottom: 1px solid var(--border-color); /* Add bottom border instead */
    padding-bottom: 1rem;
    width: 100%; /* Full width */
    max-width: 300px; /* Limit max width */
  }

  /* Remove border from last stat item */
  .stat-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  /* Stat Numbers - Center and adjust size */
  .stat-number {
    font-size: 1.8rem; /* Slightly smaller */
    text-align: center;
    margin-bottom: 0.75rem;
  }

  /* Stat Descriptions - Center and adjust */
  .stat-description {
    text-align: center;
    font-size: 0.85rem;
    line-height: 1.4;
    max-width: 250px; /* Limit width */
    margin: 0 auto; /* Center the text block */
  }

  /* World Map - Center and adjust */
  .world-map-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.75rem;
    height: 50px; /* Slightly smaller */
  }

  /* Data Dash Title - Center and adjust */
  .data-dash-title {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 1rem;
  }

  /* Data Dash Description - Center */
  .data-dash-description {
    text-align: center;
    margin-bottom: 1.5rem;
    max-width: 280px; /* Limit width for readability */
  }

  /* Explore Button - Center */
  .explore-btn {
    margin: 0 auto; /* Center the button */
    display: block;
    width: auto;
    text-align: center;
  }

  /* Climate Facts Section - Adjust spacing */
  .climate-facts-section {
    margin-top: 2rem;
  }

  /* Separator Line - Center and adjust width */
  .separator-line {
    width: 90%; /* Slightly narrower */
    margin: 1.5rem auto; /* Center the line */
  }
}

/* ========================================================= 
   VERY SMALL MOBILE STYLES - UPDATED (below 576px)
========================================================= */
@media (max-width: 575px) {
  
  /* Further adjustments for very small screens */
  .dashboard-main-container {
    margin: 0 0.5rem;
  }

  .data-dash-section,
  .main-content-section {
    padding: 1.5rem 0.75rem; /* Reduce padding further */
  }

  /* CO₂ Display - Even smaller on tiny screens */
  .co2-number {
    font-size: 2.5rem; /* Smaller font size */
  }

  /* Stat Numbers - Smaller */
  .stat-number {
    font-size: 1.5rem;
  }

  /* Data Dash Title - Smaller */
  .data-dash-title {
    font-size: 1.5rem;
  }

  /* Adjust text sizes */
  .co2-unit-text,
  .data-dash-description,
  .stat-description {
    font-size: 0.8rem;
  }

  /* Stat Items - Adjust padding */
  .stat-item {
    padding: 0.75rem;
    max-width: 280px;
    align-items: center;       /* keep center alignment on phones */
  }
  .fact-icon{
    margin: 0;                 /* no extra top/bottom margins */
  }
}

/* ========================================================= 
   ADDITIONAL CENTERING UTILITIES
========================================================= */

/* Ensure proper centering for mobile dashboard */
@media (max-width: 767px) {
  
  /* Force center alignment for all dashboard text */
  #dashboard * {
    text-align: center;
  }

  /* Override any left-aligned text in dashboard */
  #dashboard .text-start,
  #dashboard .text-left {
    text-align: center !important;
  }

  /* Center any flex containers */
  #dashboard .d-flex {
    justify-content: center !important;
    align-items: center !important;
  }

  /* Ensure buttons are centered */
  #dashboard .btn {
    margin-left: auto;
    margin-right: auto;
  }
}
/* Desktop styles (992px and up) */
@media (min-width: 992px) {
  .container {
    max-width: 1200px;
  }
  
  .card-body {
    padding: 1.5rem;
  }
}

/* Large desktop styles (1200px and up) */
@media (min-width: 1200px) {
  .hero-content h1 {
    font-size: 4rem;
  }
  
  .co2-number {
    font-size: 4rem;
  }
  
  .big-title {
    font-size: 5rem;
  }
}

/* ============================================
   FIX: Key Climate Facts icon/text alignment
   (robust at ~540px and other breakpoints)
   ============================================ */

/* Each row is a flex row; vertically center icon + text */
.facts-items .fact-item{
  display: flex;           /* already present, restating for clarity */
  align-items: center;     /* vertical centering of the two columns */
  gap: 12px;               /* consistent spacing between icon and text */
}

/* Make the icon box a strict square and center its glyph */
.facts-items .fact-icon{
  flex: 0 0 36px;          /* fixed column width; never shrink/grow */
  width: 36px;
  height: 36px;
  display: grid;           /* easiest way to perfectly center contents */
  place-items: center;
  background: var(--accent-color);
  border-radius: var(--border-radius);
  color: var(--bg-color);
  margin: 0;               /* kill any residual margins */
  line-height: 1;          /* avoid baseline drift if glyph is text-based */
}

/* Normalize common glyph types inside the icon box */
.facts-items .fact-icon i,
.facts-items .fact-icon svg{
  display: block;
  line-height: 1;          /* no extra baseline space */
  height: 1em;             /* keep intrinsic size sane for many icon sets */
}

/* Make the text column center itself vertically as a block next to the icon */
.facts-items .fact-item > :nth-child(2){
  display: flex;
  flex-direction: column;
  justify-content: center; /* centers heading + description within the row */
  min-width: 0;            /* prevents weird wrapping push */
}

/* Optional: if you really want stacked layout ONLY on very small screens,
   stack cleanly without re-introducing vertical misalignment. */
@media (max-width: 480px){
  .facts-items .fact-item{
    align-items: flex-start; /* align tops when stacked looks better */
  }
  .facts-items .fact-item{
    flex-wrap: nowrap;       /* keep icon left, text right */
  }
}

/* =======================
   DASHBOARD PAGE STYLES
========================== */

/* PAGE CONTAINER */
.container {
  max-width: 1200px;
}

/* DATA SECTIONS */
.data-section {
  background-color: rgba(57, 62, 70, 0.3);
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 30px;
  border: 1px solid rgba(238, 238, 238, 0.1);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  color: #eeeeee;
}
.data-section h3 {
  color: #eeeeee;
}

/* CARD STYLES */
.card {
  border-radius: 10px;
  background-color: rgba(57,62,70,0.3);
  border: 1px solid rgba(238,238,238,0.1);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  margin-bottom: 20px;
  color: #eeeeee;
  transition: transform 0.3s ease;
}
.card:hover {
  transform: translateY(-5px);
}
.card-header {
  background: linear-gradient(90deg, #00adb5, #008c92);
  color: #000;
  font-weight: bold;
  border-bottom: none;
  border-top-left-radius: 10px !important;
  border-top-right-radius: 10px !important;
}
.card-title {
  color: #eeeeee;
}
.card-text {
  color: #cccccc;
}
.info-card { border-left: 4px solid #00adb5; }
.warning-card { border-left: 4px solid #f9ed69; }
.danger-card { border-left: 4px solid #ff2e63; }

/* PROGRESS BAR */
.progress {
  height: 25px;
  border-radius: 5px;
  background-color: #393e46;
}
.progress-bar {
  background-color: #00adb5;
}

/* ALERTS */
.alert {
  background-color: rgba(255,46,99,0.2);
  border-color: #ff2e63;
  color: #eeeeee;
}
.alert-heading { color: #ff2e63; }

/* BADGES */
.badge.bg-success {
  background-color: #6bcb77 !important;
  color: #000;
}
.badge.bg-info {
  background-color: rgba(0,173,181,0.5) !important;
  color: #eeeeee;
}

/* CHART CONTAINER */
.chart-container {
  position: relative;
  height: 500px;
  margin-bottom: 20px;
}
@media (max-width: 767px) {
  .chart-container {
    height: 300px !important;
  }
}

/* IMPACT FACTS */
.impact-fact {
  background-color: rgba(0,173,181,0.1);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  transition: background-color 0.3s;
}
.impact-fact:hover { background-color: rgba(0,173,181,0.15); }
.impact-fact h5 {
  color: #00adb5;
  margin-bottom: 10px;
}

/* COUNTRY FLAGS */
.country-flag {
  width: 20px;
  height: auto;
  margin-right: 8px;
  border-radius: 2px;
  object-fit: cover;
}

/* DATA HIGHLIGHT */
.data-highlight {
  font-size: 1.2rem;
  color: #00adb5;
  font-weight: bold;
}

/* TABLE STYLES */
.table {
  color: #eeeeee;
}
.table th {
  background-color: #00adb5;
  color: #000;
  border-color: #393e46;
  cursor: pointer;
  position: relative;
  padding-right: 25px;
}
.table td { color: #eeeeee; }
.table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: rgba(0,0,0,0.1);
}
.table-hover > tbody > tr:hover > * {
  background-color: rgba(0,173,181,0.2);
}
.table-dark {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(0,0,0,0.1);
  --bs-table-hover-bg: rgba(0,173,181,0.2);
  --bs-table-border-color: #393e46;
  color: #eeeeee;
}
/* Hide columns on very small screens */
@media (max-width: 575px) {
  .table th:nth-child(4),
  .table td:nth-child(4),
  .table th:nth-child(6),
  .table td:nth-child(6) {
    display: none;
  }
}

/* SORT ICONS */
.sort-icon {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(0,0,0,0.6);
}
.sortable.asc .sort-icon,
.sortable.desc .sort-icon {
  color: #000;
}

/* SEARCH BAR */
.custom-input {
  background-color: rgba(57,62,70,0.5);
  color: #eeeeee;
  border: 1px solid #393e46;
}
.custom-input::placeholder { color: #999; }
.custom-input:focus {
  border-color: #00adb5;
  box-shadow: 0 0 0 0.25rem rgba(0,173,181,0.25);
  outline: 0;
}

/* PAGINATION */
.pagination .page-link {
  background-color: transparent;
  border-color: #393e46;
  color: #eeeeee;
}
.pagination .page-link:hover {
  background-color: rgba(0,173,181,0.2);
  border-color: #00adb5;
  color: #eeeeee;
}
.pagination .page-item.active .page-link {
  background-color: #00adb5;
  border-color: #00adb5;
  color: #000;
}
.pagination .page-item.disabled .page-link {
  color: #666;
  border-color: #393e46;
}

/* DROPDOWN MENU */
.dropdown-menu {
  background-color: #222831;
  border: 1px solid #393e46;
}
.dropdown-item {
  color: #eeeeee;
}
.dropdown-item:hover {
  background-color: rgba(0,173,181,0.2);
  color: #eeeeee;
}

.text-yellow {
  color: #FFD600 !important;  /* Or any yellow you like */
}

.table td .status-label { white-space: nowrap; }
.status-label { font-weight: bold; }
.status-label.critical { color: #ff5252 !important; }    /* Red for Critical */
.status-label.high { color: #ffc107 !important; }        /* Amber for High Impact */
.status-label.moderate { color: #40c4ff !important; }    /* Green for Moderate */
.status-label.low { color: #00e676 !important; }         /* Blue for Low Impact */

.text-muted.text-white {
  color: #fff !important;
}


/* DASHBOARD RESPONSIVE TWEAKS */
@media (max-width: 767px) {
  .data-section { padding: 15px; margin-bottom: 20px; }
  .card { margin-bottom: 15px; }
  .d-flex.justify-content-between { flex-direction: column; gap: 15px; }
  .input-group { max-width: 100% !important; }
  .table-responsive { font-size: 0.9rem; }
}

/* UTILITIES */
.text-accent { color: #00e6d2  !important; }
.bg-accent { background-color: #00e6d2 !important; }
.border-accent { border-color: #00e6d2 !important; }
.error { border-color: #ff2e63 !important; background-color: rgba(255,46,99,0.1) !important; }
.success { border-color: #6bcb77 !important; background-color: rgba(107,203,119,0.1) !important; }
.loading { opacity: 0.5; pointer-events: none; }

/* =========================================================
   ARTICLES LANDING PAGE 
   =========================================================
   - For articles.html listing page
========================================================= */

/* Main Wrapper */
.articles-landing-container {
  max-width: 980px;
  margin: 0 auto;
  padding: 3.5rem 1.2rem 4rem 1.2rem;
}

.articles-subtitle {
  color: var(--primary-color, #eeeeee);  /* or any color you want */
}


/* Page Title (Centered) */
.articles-main-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 2rem;
  color: var(--primary-color, #fff);
  text-align: center;
  line-height: 1.1;
  letter-spacing: -1px;
}

/* Individual Article Row */
.article-row {
  display: flex;
  align-items: flex-start;
  gap: 1.6rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-color, #393e46);
  padding-bottom: 2rem;
}
.article-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

/* Thumbnail Image */
.article-thumb {
  flex: 0 0 300px;
  width: 300px;
  height: 168px;
  border-radius: 8px;
  object-fit: cover;
  background: #292e36;
  box-shadow: 0 1px 6px rgba(0,0,0,0.13);
  overflow: hidden;
}
.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

/* Content Section */
.article-content {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Article Title */
.article-title {
  font-size: 1.18rem;
  font-weight: bold;
  color: var(--primary-color, #eeeeee);
  text-decoration: none;
  margin-bottom: 0.1rem;
  transition: color 0.18s;
  line-height: 1.35;
}
.article-title:hover { color: var(--accent-color, #00adb5); }

/* Meta Info */
.article-meta {
  font-size: 0.9rem;
  color: #aaa;
  margin-bottom: 0.2rem;
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Short Description */
.article-desc {
  font-size: 1rem;
  color: #cccccc;
  margin-top: 0.35rem;
  line-height: 1.45;
}

/* Pagination */
.articles-pagination {
  display: flex;
  justify-content: flex-start;
  gap: 0.3rem;
  margin-top: 2.2rem;
}
.articles-pagination .page-link {
  display: inline-block;
  min-width: 36px;
  padding: 7px 0;
  background: transparent;
  border: 1px solid var(--border-color, #393e46);
  color: var(--primary-color, #eeeeee);
  border-radius: 4px;
  text-align: center;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.articles-pagination .page-link.active,
.articles-pagination .page-link:focus {
  background: var(--accent-color, #00adb5);
  color: #111;
  border-color: var(--accent-color, #00adb5);
}
.articles-pagination .page-link:hover:not(.active) {
  background: rgba(0,173,181,0.14);
  color: var(--accent-color, #00adb5);
}

/* Responsive: Stack on Mobile */
@media (max-width: 700px) {
  .articles-landing-container {
    padding: 1.2rem 0.5rem 2.5rem 0.5rem;
  }
  .article-row {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;  /* Stretch to full width */
    text-align: left;      /* Make sure text is left-aligned */
  }
  .article-thumb {
    width: 100%;
    max-width: 100%;
    height: 38vw;                /* Responsive height (try 38vw or 140px) */
    min-height: 120px;           /* Prevents collapse */
    max-height: 180px;           /* Limits huge images */
    margin-bottom: 0.7rem;
  }
  .article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
  }
  .article-content {
    padding: 0;
    text-align: left;
    min-width: 0;
  }
  .article-title {
    font-size: 1.03rem;
    margin-bottom: 0.35rem;
  }
  .article-meta,
  .article-desc {
    font-size: 0.93rem;
  }
}

/* =============================== */
/* ARTICLE DETAIL PAGE (e.g. co2-trends.html) */
/* =============================== */

/* --- Main Content Layout --- */
.article-main-content {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

/* --- Article Title --- */
.article-main-content h1.articles-main-title {
  font-size: 2.6rem;
  font-weight: bold;
  margin-bottom: 0.6rem;
  text-align: center;
  color: var(--primary-color, #fff);
}

/* --- Subtitle / Byline --- */
.article-main-content > .text-secondary {
  text-align: center;
  font-size: 1.08rem;
  margin-bottom: 2.5rem;
  color: #efefef !important;
}

/* --- Hero Image & Figure --- */
.article-main-content figure {
  margin: 0 auto 2.5rem auto;
  text-align: center;
}
.article-main-content figure img,
.article-hero-img {
  width: 100%;
  max-width: 860px;    /* Keeps image inside main content width */
  aspect-ratio: 5 / 3; /* Modern browsers, nice for hero image */
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.13);
  display: block;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 900px) {
  .article-main-content figure img,
  .article-hero-img {
    max-width: 100%;
  }
}
.article-main-content figcaption {
  font-size: 0.93rem;
  color: #8caab7;
  margin-top: 0.6rem;
}

/* --- Section Styling --- */
.article-main-content section {
  margin-bottom: 2.2rem;
}
.article-main-content h2 {
  font-size: 1.37rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--accent-color, #00adb5);
}
.article-main-content p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #e0e8ec;
  margin-bottom: 1.1rem;
}

/* --- "Did You Know?" Info Box --- */
.did-you-know-box {
  background: rgba(0,173,181,0.12);
  border-left: 5px solid var(--accent-color, #00adb5);
  border-radius: 8px;
  padding: 1rem 1.2rem 1rem 1.5rem;
  margin: 2rem 0;
  font-size: 1.05rem;
  color: #eafafa;
  box-shadow: 0 1px 10px 0 rgba(0,0,0,0.09);
  position: relative;
}
.did-you-know-box::before {
  content: "Did You Know?";
  display: block;
  font-weight: bold;
  color: var(--accent-color, #00adb5);
  margin-bottom: 0.45em;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
}

/* =============================== */
/* END ARTICLE LANDING DETAIL PAGE SECTION */
/* =============================== */
.card {
  border-radius: 10px;
  background-color: rgba(var(--border-color-rgb), var(--dashboard-transparent-bg-alpha));
  border: 1px solid rgba(var(--text-color-rgb), var(--dashboard-transparent-border-alpha));
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  color: var(--text-color);
  transition: transform 0.3s ease;
}

/* Fix for data sections (if they're missing) */
.data-section {
  background-color: rgba(var(--border-color-rgb), var(--dashboard-transparent-bg-alpha));
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 30px;
  border: 1px solid rgba(var(--text-color-rgb), var(--dashboard-transparent-border-alpha));
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  color: var(--text-color);
}

/* Fix for impact facts (if they're missing) */
.impact-fact {
  background-color: rgba(var(--accent-color-rgb), 0.1);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  transition: background-color 0.3s ease;
}


/* generic spacing */
.section{ padding:64px 0; }

/* dark section (default site look) */
.theme-dark{
  background-color: var(--bg-color);
  color: var(--text-color);
}

/* light section (for the light bands) */
.theme-light{
  background-color: var(--light-bg);
  color: var(--ink-color);
}
.theme-light a{ color:#006e73; }
.theme-light a:hover{ color:#004f53; }



/* hero video overlay little stronger for readability */
#hero .hero-overlay{
  background: linear-gradient(180deg, rgb(41, 65, 56), rgba(25, 236, 7, 0.13));
}

/* === ABOUT band: image + white text (like your mockup) === */
.about-hero{
  background: url("../images/polluted-city.jpg") center/cover no-repeat;
  position: relative;
  min-height: 420px;
  padding: 72px 0;
  padding-top: 84px
}
.about-hero::before{
  content:""; position:absolute; inset:0;
  /* green tint + dark alpha for readability */
  background: linear-gradient(180deg, rgba(20,40,25,.42), rgba(0,0,0,.28));
}
.about-hero .container{ position:relative; z-index:1; }
/* keep the two-column content aligned nicely */
.about-hero .row{ align-items:flex-start;}

/* BIG stacked heading (left column) */
.about-hero .about-title{
  text-transform: uppercase;
  letter-spacing: .4px;
  line-height: 1.02;              /* tight like the mock */
  font-weight: 800;
  font-size: clamp(2.4rem, 7vw, 7.66rem);/* correct order: min, preferred, max */
  color: #ffffff;                 /* bright white */
  text-shadow: 0 2px 8px rgba(0,0,0,.25);
  margin: 0;                      /* no extra gap so it doesn’t collide */
  margin-top: 24px;            /* slight top margin for alignment */
  max-width: 16ch;        /* keeps lines visually similar in width */
  text-wrap: balance;
}

/* Paragraph (right column) */
.about-hero .about-description{
  color: #f0f4f6;
  line-height: 1.55;
  font-size: 1.5rem;
  margin: 0;                      /* remove margin to keep alignment clean */
}

@media (max-width: 991.98px){
  .about-hero .about-title{
    margin: 8px 0 10px;
  }
}

/* Makes paragraph column visually narrow like screenshot */
.about-hero .about-narrow{
  max-width: 599px;
  margin-top: 6px;
}

/* on medium & below, give bottom gap so para se chipke nahi */
@media (max-width: 991.98px){
  .about-hero{
    min-height: 420px;
    padding: 56px 0;                 /* section spacing */
    background-position: center 30%;
   /* margin: 8px 0 10px;  /* image framing */
  }
  .about-hero .about-title{
    margin-top: 12px;
    margin-bottom: 10px;
    line-height: 1.04;
    font-size: clamp(2.2rem, 7vw, 3.4rem);  /* thoda compact on tablets */
  }
  .about-hero .about-narrow{
    max-width: 100%;
    margin-top: 6px;
  }
}


