@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --primary: #0b3c5d;
  --secondary: #1d6fa5;
  --accent: #e63946;
  --bg: #f8fafc;
  --text: #334155;
  --muted: #64748b;
  --white: #ffffff;
  --container-width: 800px;
  --spacing-section: 80px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.8;
  overflow-x: hidden; /* Prevent horizontal scroll from full-width elements */
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  color: var(--primary);
  margin-top: 0;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
  position: relative; /* Context for absolute positioning if needed */
}

/* Typography styles */
h1 {
  font-size: 48px; /* Desktop */
  line-height: 1.2;
  margin-bottom: 24px;
  font-weight: 700;
}

h2 {
  font-size: 36px;
  margin-bottom: 20px;
  margin-top: 40px;
  position: relative;
  padding-bottom: 15px;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background-color: var(--secondary);
}

h3 {
  font-size: 24px;
  margin-bottom: 15px;
}

p {
  font-size: 18px;
  margin-bottom: 24px;
  color: #475569;
}

/* Hero Section */
.hero {
  padding: 100px 0 60px;
  text-align: center;
  background: linear-gradient(180deg, #eef2f6 0%, #f8fafc 100%);
}

.hero h1 {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  font-size: 20px;
  max-width: 700px;
  margin: 0 auto;
  color: var(--muted);
  font-style: italic;
}

/* Full Width Image Section */
.full-width-image {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-top: 60px;
  margin-bottom: 60px;
  overflow: hidden;
}

.full-width-image img {
  width: 100%;
  height: auto;
  min-height: 500px; /* Ensure visibility */
  max-height: 800px; /* Cap height for very large screens */
  object-fit: cover;
  display: block;
  transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.full-width-image:hover img {
  transform: scale(1.03); /* Subtle zoom effect */
}

/* Caption styling */
figcaption {
  text-align: center;
  font-size: 15px;
  color: var(--muted);
  font-style: italic;
  margin-top: 15px;
  padding: 0 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Charts & Data */
.data-section {
  background-color: var(--white);
  padding: 60px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  margin: 60px 0;
  overflow: hidden;
}

svg {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  max-width: 100%;
}

.bar-bg {
  fill: #f1f5f9;
}

.bar-fill {
  fill: var(--secondary);
  width: 0;
  transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.bar-text {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  fill: var(--text);
  font-weight: 500;
}

.bar-value {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  fill: var(--white);
  font-weight: 600;
  text-anchor: end; /* Align to end of bar */
}

/* Animation Classes */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Author Section */
.author-bio {
  border-top: 1px solid #e2e8f0;
  padding-top: 40px;
  margin-top: 80px;
  text-align: right;
  font-weight: 600;
  color: var(--primary);
  font-family: 'Playfair Display', serif;
  font-size: 18px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 32px;
  }
  
  h2 {
    font-size: 26px;
  }
  
  .container {
    padding: 0 16px;
  }
  
  .full-width-image img {
    height: 300px; /* Smaller height on mobile */
    min-height: 300px;
  }
  
  .data-section {
    padding: 30px 20px;
  }
  
  /* Adjust SVG text for mobile if needed */
  .bar-text {
    font-size: 12px;
  }
}
