/* ==========================================================================
   WBA Economic Forecast Website - Main Styles
   ========================================================================== */

:root {
  /* WBA Brand */
  --wba-blue: #005571;
  --wba-light-blue: #e8f4f8;
  --accent-gold: #c9a227;

  /* OpSprocket Brand */
  --opsprocket-green: #0FC892;

  /* Neutral */
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #666666;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --border-light: #e0e0e0;

  /* Typography */
  --font-sans: 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Georgia', 'Times New Roman', serif;
  --max-content-width: 1200px;
  --max-article-width: 720px;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--bg-light);
  line-height: 1.6;
}

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

a {
  color: var(--wba-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--wba-blue);
  border-bottom: none;
  z-index: 1000;
}

.header-inner {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.wba-logo {
  height: 50px;
  width: auto;
}

.header-divider {
  width: 1px;
  height: 30px;
  background: rgba(255, 255, 255, 0.3);
}

.opsprocket-attribution {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.opsprocket-attribution img {
  height: 28px;
  width: auto;
}

/* Primary Navigation */
.primary-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  padding: 0.5rem 1rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  text-decoration: none;
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Dropdown Navigation */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 180px;
  z-index: 1001;
}

.nav-dropdown:hover .nav-dropdown-content {
  display: block;
}

.nav-dropdown-content a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border-light);
}

.nav-dropdown-content a:last-child {
  border-bottom: none;
}

.nav-dropdown-content a:hover {
  background: var(--wba-light-blue);
  color: var(--wba-blue);
  text-decoration: none;
}

/* Mobile Navigation */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  margin: 5px 0;
  transition: transform 0.3s;
}

/* ==========================================================================
   Main Content Area
   ========================================================================== */

.main-content {
  margin-top: 70px;
  min-height: calc(100vh - 70px - 200px);
}

.container {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.article-container {
  max-width: var(--max-article-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* ==========================================================================
   Landing Page
   ========================================================================== */

.hero {
  background: linear-gradient(135deg, var(--wba-blue) 0%, #003d52 100%);
  color: white;
  padding: 2rem 1rem;
  text-align: center;
}

.hero h1 {
  font-size: 2rem;
  margin: 0 0 0.5rem;
  font-weight: 700;
}

.hero .subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  margin: 0 0 0.25rem;
}

.hero .event-date {
  font-size: 1rem;
  opacity: 0.75;
}

/* Section Cards Grid */
.section-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  padding: 1.5rem 1rem;
  max-width: var(--max-content-width);
  margin: 0 auto;
}

.section-card {
  background: var(--bg-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.section-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.section-card-header {
  background: var(--wba-blue);
  color: white;
  padding: 1rem;
}

.section-card-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.section-card-body {
  padding: 1rem;
}

.section-card-body p {
  margin: 0 0 1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.section-card-link {
  display: inline-block;
  color: var(--wba-blue);
  font-weight: 500;
  font-size: 0.9rem;
}

.section-card-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Page Headers
   ========================================================================== */

.page-header {
  background: var(--wba-blue);
  color: white;
  padding: 1.5rem 1rem;
}

.page-header h1 {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
}

.page-header .subtitle {
  margin: 0;
  opacity: 0.85;
  font-size: 0.95rem;
}

/* Sub-navigation for magazine section */
.sub-nav {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  padding: 0.5rem 1rem;
}

.sub-nav-inner {
  max-width: var(--max-content-width);
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
}

.sub-nav a {
  padding: 0.5rem 1rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  border-radius: 4px;
}

.sub-nav a:hover {
  background: var(--wba-light-blue);
  text-decoration: none;
}

.sub-nav a.active {
  background: var(--wba-light-blue);
  color: var(--wba-blue);
  font-weight: 500;
}

/* ==========================================================================
   Download Components
   ========================================================================== */

.download-bar {
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 1rem;
  margin: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.download-bar-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.download-dropdown {
  position: relative;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: var(--wba-blue);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.download-btn:hover {
  background: #004561;
}

.download-btn svg {
  width: 16px;
  height: 16px;
}

.download-options {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 140px;
  z-index: 100;
}

.download-dropdown:hover .download-options,
.download-dropdown.open .download-options {
  display: block;
}

.download-options a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border-light);
}

.download-options a:last-child {
  border-bottom: none;
}

.download-options a:hover {
  background: var(--wba-light-blue);
  color: var(--wba-blue);
  text-decoration: none;
}

/* Image Download Button */
.img-download-btn {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  width: 32px;
  height: 32px;
  background: rgba(0, 85, 113, 0.9);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.article-figure:hover .img-download-btn,
.image-card:hover .img-download-btn {
  opacity: 1;
}

.img-download-btn:hover {
  background: var(--wba-blue);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: #1a1a1a;
  color: white;
  padding: 1.5rem 1rem;
}

.footer-inner {
  max-width: var(--max-content-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-brand img {
  height: 40px;
}

.footer-delivered {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.footer-delivered-text {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-delivered a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--opsprocket-green);
}

.footer-delivered a:hover {
  text-decoration: none;
  opacity: 0.8;
}

.footer-delivered img {
  height: 28px;
}

.footer-bottom {
  width: 100%;
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
  .header-inner {
    height: 60px;
  }

  .wba-logo {
    height: 40px;
  }

  .opsprocket-attribution {
    display: none;
  }

  .header-divider {
    display: none;
  }

  .primary-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    flex-direction: column;
    padding: 1rem;
    gap: 0;
  }

  .primary-nav.open {
    display: flex;
  }

  .nav-link {
    width: 100%;
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
  }

  .nav-dropdown-content {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
  }

  .nav-dropdown:hover .nav-dropdown-content {
    display: block;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .main-content {
    margin-top: 60px;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

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

  .section-cards {
    padding: 1rem;
  }

  .page-header {
    padding: 1rem;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }

  .download-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

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