/* Paul Graham style with LEFT SIDEBAR - GEC fonts and colors */

/* Keep your fonts */
/* Self-hosted League Spartan to reduce FOUT */
@font-face {
  font-family: 'League Spartan';
  font-style: normal;
  font-weight: 400;
  font-display: fallback;
  src: url('/fonts/LeagueSpartan-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'League Spartan';
  font-style: normal;
  font-weight: 700;
  font-display: fallback;
  src: url('/fonts/LeagueSpartan-Bold.ttf') format('truetype');
}

:root {
  /* GEC Brand Colors from theme */
  --gec-primary: #E4F577;      /* Bright Yellow-Green */
  --gec-secondary: #363D46;    /* Dark Grey */
  --gec-accent: #23648D;       /* Blue */
  --gec-green: #2D6F31;        /* Deep Dark Green */
  --gec-white: #FCFFFE;        /* Off-White */
  --gec-black: #000000;        /* Black */
  --gec-grey-light: #DCDCDC;   /* Light Grey */

  --text-color: var(--gec-secondary);
  --bg-color: var(--gec-white);
  --border-color: var(--gec-green);
  --muted-color: #666666;
  --sidebar-width: 150px;
  --content-max-width: 44rem;
  --font-primary: 'League Spartan', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
}

body {
  margin: 0;
  color: var(--text-color);
  background: var(--bg-color);
}

/* Layout with LEFT sidebar */
.layout-wrapper {
  display: flex;
  min-height: 100vh;
}

/* LEFT SIDEBAR */
.sidebar {
  width: var(--sidebar-width);
  padding: 1.5rem 1rem;
  border-right: 1px solid #e5e5e5; /* Subtle divider */
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-content { flex: 1; display: flex; flex-direction: column; }

/* Logo styling - matches WordPress exactly */
.logo {
  margin-bottom: 2rem;
}

.logo a { color: inherit; text-decoration: none; display: inline-block; }

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

.logo-game {
  font-weight: 900;
  font-size: 1.4rem;
  color: var(--gec-green); /* Deep dark green */
  letter-spacing: -0.02em;
}

.logo-economist {
  font-weight: 300;
  font-size: 0.9rem;
  color: var(--gec-secondary);
  letter-spacing: 0.15em;
}

.logo-consulting {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--gec-secondary);
  letter-spacing: 0.03em;
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav li {
  margin: 0.5rem 0;
}

.sidebar-nav a {
  color: var(--gec-black); /* Black by default */
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase; /* All caps */
  display: block;
  padding: 0.25rem 0;
  transition: color 0.2s ease;
}

.sidebar-nav a:hover {
  color: var(--gec-green); /* Green on hover */
  text-decoration: none;
}

.sidebar-nav a.active {
  font-weight: 900;
  color: var(--gec-black); /* Black when active */
  text-decoration: underline; /* Underline when active */
}

/* Social links in sidebar */
.sidebar-social {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e5e5;
  display: flex;
  gap: 1rem;
}

.sidebar-social a {
  color: var(--gec-black);
  transition: color 0.2s ease;
}

.sidebar-social a:hover {
  color: var(--gec-green);
}

/* Main content area */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width); /* Space for fixed sidebar */
  padding: 2rem;
}

/* Sidebar footer subscribe link */
.sidebar-footer { margin-top: auto; padding-top: 1rem; }
.sidebar-subscribe-link {
  display: inline-block;
  font-weight: 700;
  color: var(--gec-green);
  text-decoration: none;
}
.sidebar-subscribe-link:hover { text-decoration: underline; }

.content-wrapper {
  max-width: var(--content-max-width);
  margin: 0 auto;
}

/* Typography - your sizing */
h1 {
  font-size: 2rem;
  font-weight: 600;
  margin: 2.4rem 0 0.75rem;
  line-height: 1.2;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  line-height: 1.3;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  line-height: 1.4;
}

p {
  margin: 0 0 1.2rem;
  line-height: 1.6;
}

/* Links */
a {
  color: #0000EE;
}

a:visited {
  color: #551A8B;
}

/* HR elements */
hr {
  border: 0;
  border-top: 1px solid #e5e5e5;
  margin: 1.25rem 0;
}

/* Service blocks */
.service-block {
  margin: 2rem 0;
}

.service-block h3 {
  margin-top: 0;
}

/* Social links */
.social-links { margin: 2rem 0; }

.social-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 1rem; }
.social-links a { margin-right: 0; display: inline-flex; align-items: center; gap: 0.35rem; text-decoration: none; padding: 0.2rem 0; }
.social-links a:hover { text-decoration: underline; }

/* Meta text */
.meta {
  color: var(--muted-color);
  font-size: 0.9rem;
  margin: 0.5rem 0 2rem;
}

/* Page Headers - WordPress style */
.page-header {
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  padding: 3rem 2rem;
  margin: -2rem -2rem 2rem -2rem;
  position: relative;
  overflow: hidden;
  min-height: 200px;
  background-size: cover;
  background-position: center;
}

/* Different background images for each page */
body[data-page="home"] .page-header {
  /* Fallback for browsers without image-set support */
  background-image: url('/images/blog-header.jpg');
  background-image: image-set(
    url('/images/blog-header-home.webp') type('image/webp') 1x,
    url('/images/blog-header.jpg') type('image/jpeg') 1x
  );
}

body[data-page="podcast"] .page-header {
  /* Fallback for browsers without image-set support */
  background-image: url('/images/podcast-header.png');
  background-image: image-set(
    url('/images/podcast-header.webp') type('image/webp') 1x,
    url('/images/podcast-header.png') type('image/png') 1x
  );
}

body[data-page="blog"] .page-header {
  /* Fallback for browsers without image-set support */
  background-image: url('/images/blog-header.png');
  background-image: image-set(
    url('/images/blog-header.webp') type('image/webp') 1x,
    url('/images/blog-header.png') type('image/png') 1x
  );
}

body[data-page="join"] .page-header {
  /* Fallback for browsers without image-set support */
  background-image: url('/images/join-header.png');
  background-image: image-set(
    url('/images/join-header.webp') type('image/webp') 1x,
    url('/images/join-header.png') type('image/png') 1x
  );
}

.page-header-content {
  position: relative;
  z-index: 2;
}

.page-header h1 {
  font-size: 4rem;
  font-weight: 900;
  color: var(--gec-green); /* Deep dark green instead of yellow */
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 0.9;
  text-shadow: 2px 2px 4px rgba(255,255,255,0.8);
}

.page-header-image {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  opacity: 0.3;
  z-index: 1;
}

/* Contact section dual columns */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin: 2rem 0;
}

/* Service images - bigger and centered */
.service-with-image {
  display: grid;
  grid-template-columns: 1fr 1fr; /* True two-column layout */
  gap: 2rem;
  align-items: center; /* Center vertically */
  margin: 1.25rem 0;
}

.service-with-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9; /* default for non-home pages */
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.service-with-image.reverse {
  grid-template-columns: 1fr 1fr; /* Keep equal columns like normal layout */
}

.service-with-image.reverse > *:first-child {
  order: 2; /* Move first child (image) to second position */
}

.service-with-image.reverse > *:last-child {
  order: 1; /* Move last child (text) to first position */
}

.service-content {
  max-width: 100%; /* Prevent text from bleeding over */
}

/* Make text sizing consistent across all service sections */
.service-content h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem; /* tighter spacing under section heading */
  font-weight: 600;
}

.service-content h3,
.service-content p strong {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1rem 0 0.35rem; /* tighter spacing for consistency */
  line-height: 1.35;
  display: block;
}

.service-content p {
  margin-bottom: 0.75rem;
  line-height: 1.55;
}

/* Remove default strong styling when used as heading */
.service-content p strong { font-weight: 600; }

/* Firm Types image: match width and crop behavior to other sections */
.service-with-image .firm-types-media { width: 100% !important; }

/* Home page: make images taller by ~40% (20% top + 20% bottom) */
body[data-page="home"] .service-with-image img,
body[data-page="home"] .service-with-image .firm-types-media {
  aspect-ratio: 1.27 / 1; /* ~16:9 height x 1.4 */
}

/* Hero intro text sizing */
.hero-intro p { font-size: 1.6rem; line-height: 1.35; }

/* Yellow highlight effect for key phrase */
.highlight-yellow {
  background: linear-gradient(180deg, rgba(255, 234, 0, 0) 60%, var(--gec-primary) 60%);
  padding: 0 0.1em;
}

/* Buzzsprout embed */
.buzzsprout-embed {
  margin: 2rem 0;
  width: 100%;
  max-width: 600px;
}

.buzzsprout-embed iframe {
  width: 100%;
  border: none;
  border-radius: 8px;
}

/* Blog table styling */

/* Podcast two column layout */
.podcast-two-col { display: grid; grid-template-columns: 320px 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 768px) { .podcast-two-col { grid-template-columns: 1fr; } }

.blog-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
}

.blog-table th {
  background: var(--gec-green);
  color: white;
  padding: 0.5rem 0.6rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.9rem;
}

.blog-table td {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--gec-grey-light);
  font-size: 0.9rem;
}

/* Compact date column to reduce row width */
.blog-table .col-date { white-space: nowrap; font-size: 0.75rem; }

.blog-table tr:hover {
  background: #f9f9f9;
}

.blog-table a {
  color: var(--gec-secondary);
  text-decoration: none;
  font-weight: 500;
}

.blog-table a:hover {
  color: var(--gec-green);
}

/* Mobile: Stack layout */
@media (max-width: 768px) {
  .layout-wrapper {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #e5e5e5;
    padding: 1rem;
  }

  .sidebar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .main-content {
    margin-left: 0;
    padding: 1rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  /* Hide date column on small screens */
  .blog-table .col-date { display: none; }
}
.blog-table.compact td, .blog-table.compact th {
  line-height: 1.2;
}

/* Inline subscribe box under JOIN */
.sidebar-subscribe {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e5e5;
}
.sidebar-subscribe label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.sidebar-subscribe form { display: flex; flex-direction: column; gap: 0.5rem; }
.sidebar-subscribe input[type="email"] { width: 100%; padding: 0.5rem 0.6rem; border: 1px solid #d0d5db; border-radius: 4px; font-size: 0.95rem; }
.sidebar-subscribe button { width: 100%; max-width: none; align-self: stretch; padding: 0.5rem 0.6rem; background: var(--gec-green); color: #fff; border: none; border-radius: 4px; font-weight: 700; cursor: pointer; font-size: 0.9rem; }
.sidebar-subscribe button:hover { opacity: 0.95; }
.sidebar-subscribe .subscribe-status { margin-top: 0.35rem; font-size: 0.85rem; }
.sidebar-subscribe .subscribe-status.ok { color: #256320; }
.sidebar-subscribe .subscribe-status.err { color: #8b0000; }
