/*
Theme Name: ESG Messages
Theme URI: https://esgmessages.com
Author: ESG Messages
Description: Custom theme for ESG Messages blog matching the main site design.
Version: 1.0
*/

:root {
  --navy: #0B1F3A;
  --teal: #1A7A6E;
  --gold: #C9A84C;
  --offwhite: #F8F7F4;
  --light: #E8E8E4;
  --mid: #666660;
  --white: #FFFFFF;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--offwhite);
  color: #333;
  line-height: 1.6;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--navy); }

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

/* NAV */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--navy);
  padding: 0 4rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.nav-logo { font-family: 'Playfair Display', serif; font-size: 1.3rem; color: var(--white); font-weight: 700; }
.nav-logo span { color: var(--gold); }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { font-size: 0.85rem; color: rgba(255,255,255,0.75); font-weight: 500; letter-spacing: 0.02em; transition: color 0.2s; }
.nav-links a:hover { color: var(--gold); }
.nav-cta {
  background: var(--gold); color: var(--navy);
  padding: 0.5rem 1.2rem; border-radius: 2px;
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em;
  transition: opacity 0.2s;
}
.nav-cta:hover { opacity: 0.9; color: var(--navy); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: white; margin: 4px 0; transition: 0.3s; }

/* HERO */
.blog-hero {
  background: var(--navy);
  padding: 5rem 4rem 4rem;
  text-align: center;
}
.blog-hero .eyebrow {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 1rem;
}
.blog-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem; color: var(--white); line-height: 1.2;
  margin-bottom: 1rem;
}
.blog-hero p { color: rgba(255,255,255,0.6); font-size: 1rem; max-width: 560px; margin: 0 auto; }

/* LAYOUT */
.blog-layout {
  max-width: 1200px; margin: 0 auto;
  padding: 4rem 2rem;
  display: grid; grid-template-columns: 1fr 340px; gap: 3rem;
}

/* POSTS */
.post-card {
  background: var(--white); border-radius: 4px;
  overflow: hidden; margin-bottom: 2rem;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--light);
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(11,31,58,0.08); }
.post-card-body { padding: 2rem; }
.post-category {
  display: inline-block; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.2rem 0.6rem; border-radius: 2px;
  background: rgba(26,122,110,0.1); color: var(--teal);
  margin-bottom: 0.8rem;
}
.post-card h2 { font-family: 'Playfair Display', serif; font-size: 1.4rem; color: var(--navy); margin-bottom: 0.6rem; line-height: 1.3; }
.post-card h2 a { color: var(--navy); }
.post-card h2 a:hover { color: var(--teal); }
.post-meta { font-size: 0.78rem; color: var(--mid); margin-bottom: 1rem; }
.post-excerpt { font-size: 0.9rem; line-height: 1.6; color: #555; margin-bottom: 1.5rem; }
.read-more {
  display: inline-block; font-size: 0.8rem; font-weight: 700;
  color: var(--teal); letter-spacing: 0.04em; text-transform: uppercase;
  border-bottom: 2px solid var(--gold); padding-bottom: 2px;
}

/* SINGLE POST */
.single-hero { background: var(--navy); padding: 4rem; }
.single-hero .eyebrow { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
.single-hero h1 { font-family: 'Playfair Display', serif; font-size: 2.4rem; color: var(--white); line-height: 1.25; margin-bottom: 1rem; max-width: 800px; }
.single-meta { font-size: 0.82rem; color: rgba(255,255,255,0.5); }

.single-layout { max-width: 1200px; margin: 0 auto; padding: 4rem 2rem; display: grid; grid-template-columns: 1fr 300px; gap: 3rem; }

.post-content { background: var(--white); border-radius: 4px; padding: 3rem; border: 1px solid var(--light); }
.post-content h2 { font-family: 'Playfair Display', serif; font-size: 1.6rem; color: var(--navy); margin: 2rem 0 1rem; }
.post-content h3 { font-size: 1.1rem; font-weight: 700; color: var(--navy); margin: 1.5rem 0 0.6rem; }
.post-content p { font-size: 0.95rem; line-height: 1.8; color: #444; margin-bottom: 1.2rem; }
.post-content ul, .post-content ol { margin: 1rem 0 1.2rem 1.5rem; }
.post-content li { font-size: 0.95rem; line-height: 1.7; color: #444; margin-bottom: 0.4rem; }
.post-content blockquote { border-left: 3px solid var(--gold); padding: 1rem 1.5rem; margin: 1.5rem 0; background: var(--offwhite); font-style: italic; color: var(--mid); }

/* SIDEBAR */
.sidebar { }
.sidebar-widget { background: var(--white); border-radius: 4px; padding: 1.8rem; margin-bottom: 1.5rem; border: 1px solid var(--light); }
.sidebar-widget h3 { font-family: 'Playfair Display', serif; font-size: 1rem; color: var(--navy); margin-bottom: 1rem; padding-bottom: 0.6rem; border-bottom: 2px solid var(--gold); }
.sidebar-widget ul { list-style: none; }
.sidebar-widget ul li { padding: 0.5rem 0; border-bottom: 1px solid var(--light); font-size: 0.85rem; }
.sidebar-widget ul li:last-child { border-bottom: none; }
.sidebar-widget ul li a { color: var(--navy); }
.sidebar-widget ul li a:hover { color: var(--teal); }
.alert-box { background: var(--navy); border-radius: 4px; padding: 1.8rem; margin-bottom: 1.5rem; }
.alert-box h3 { font-family: 'Playfair Display', serif; font-size: 1rem; color: var(--white); margin-bottom: 0.6rem; }
.alert-box p { font-size: 0.82rem; color: rgba(255,255,255,0.6); margin-bottom: 1rem; }
.alert-box input { width: 100%; padding: 0.6rem 0.8rem; border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.1); color: var(--white); border-radius: 2px; font-size: 0.85rem; margin-bottom: 0.6rem; }
.alert-box input::placeholder { color: rgba(255,255,255,0.4); }
.alert-box button { width: 100%; background: var(--gold); color: var(--navy); border: none; padding: 0.6rem; font-weight: 700; font-size: 0.82rem; border-radius: 2px; cursor: pointer; }

/* FOOTER */
.site-footer { background: var(--navy); padding: 3rem 4rem; margin-top: 4rem; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.footer-logo { font-family: 'Playfair Display', serif; font-size: 1.2rem; color: var(--white); font-weight: 700; }
.footer-logo span { color: var(--gold); }
.footer-links { display: flex; gap: 1.5rem; list-style: none; }
.footer-links a { font-size: 0.82rem; color: rgba(255,255,255,0.5); }
.footer-links a:hover { color: var(--gold); }
.footer-copy { font-size: 0.78rem; color: rgba(255,255,255,0.35); }

/* PAGINATION */
.pagination { display: flex; gap: 0.5rem; justify-content: center; margin-top: 2rem; }
.pagination a, .pagination span { padding: 0.5rem 0.9rem; border: 1px solid var(--light); border-radius: 2px; font-size: 0.85rem; color: var(--navy); background: var(--white); }
.pagination .current { background: var(--teal); color: var(--white); border-color: var(--teal); }

/* NO RESULTS */
.no-results { background: var(--white); border-radius: 4px; padding: 3rem; text-align: center; border: 1px solid var(--light); }
.no-results h2 { font-family: 'Playfair Display', serif; color: var(--navy); margin-bottom: 1rem; }
.no-results p { color: var(--mid); font-size: 0.9rem; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .blog-layout, .single-layout { grid-template-columns: 1fr; }
  .blog-hero { padding: 3rem 1.5rem; }
  .blog-hero h1 { font-size: 2rem; }
  .site-nav { padding: 0 1.5rem; }
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--navy); padding: 1.5rem; gap: 1rem; }
  .nav-toggle { display: block; }
  .site-footer { padding: 2rem 1.5rem; }
  .footer-inner { flex-direction: column; gap: 1.5rem; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}
