/* ../css/style.css */
/* Basic reset */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: #111; background: #fff; }
img { max-width: 100%; height: auto; display: block; }
a { color: #0a58ca; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Width container */
.container { width: 1100px; margin: 0 auto; padding: 0 0; }

/* Header * /
.site-header { background: #f5f5f5; border-bottom: 1px solid #e2e2e2; }
.header-top { display: flex; align-items: center; width:100%; }
.logo { }
.logo img { height: 56px; width: auto; }
.masthead-text { flex: 1; text-align:right; padding: 0 1rem;}
.site-name { font-size: 1.2rem; line-height: 0.8; margin: 0;}
.tagline { margin: 4px 0 0; color: #555; }

/* Navigation * /
.site-nav {background: #666; color: #fff; border-top: 3px solid black; font-size: 0.9rem; display:flex;}
.site-nav .container {margin-left: 0;}
.cta {
  margin-left: auto; /* pushes it to the right end * /
  align-self: center; /* vertically centers it in the flex line * /
}
.site-nav .container { }
.menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.menu > li { margin: 0; }
.menu > li > a { display: block; padding: 0.25rem 1rem 0.3rem; color: #fff; }
.menu > li > a:hover { background: #333; text-decoration: none; }

a.btn{display:inline-block;padding:8px 16px;border-radius:999px;border:1px solid #0a58ca;background:#0a58ca;color:#fff;text-decoration:none;font-weight:600;transition:background .2s,border-color .2s;}
a.btn:hover{background:#0847a8;border-color:#0847a8;}
.btn--small{padding:6px 12px;font-size:.85rem;}

/* ===== Header (refactor) ===== */
.site-header { background:#f5f5f5; border-bottom:1px solid #e2e2e2; }
.header-top { display:flex; align-items:center; width:100%; }
.logo img { height:65px; width:auto; }
.masthead-text { flex:1; text-align:right; padding:0 1rem; }
.site-name { font-size:1.2rem; line-height:0.8; margin:0; }
.tagline { margin:4px 0 0; color:#555; }

/* ===== Primary Navigation (refactor) ===== */
.site-nav {
  background:#666;
  color:#fff;
  border-top:3px solid #000;
  display:flex;            /* children: .container (menu) + .cta (contacts) */
  align-items:stretch;
  position:relative;
  z-index:50;
  overflow:visible;        /* ensure dropdowns can escape */
  font-size: 0.9rem;
}

/* Row that holds the main menu */
.site-nav > .container {
  margin-left:0;           /* as you had */
  padding:0;
  display:flex;
  align-items:stretch;
  flex:1 1 auto;
  overflow:visible;
}

/* Top-level menu */
.site-nav .menu {
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-wrap:nowrap;
}

.site-nav .menu > li {
  position:relative;       /* anchor for absolute submenu */
}

.site-nav .menu > li > a {
  display:block;
  padding:10px 14px;
  color:#fff;
  text-decoration:none;
  line-height:1.2;
}

.site-nav .menu > li > a:hover { background:#333; text-decoration:none; }
.site-nav .menu > li.active > a { background:#2a2a2a; }

/* caret (rendered by <span class="caret"> in PHP) */
.site-nav .menu > li.has-children > a .caret {
  margin-left:6px;
  font-size:.8em;
  line-height:1;
  color:#fff;
}

/* Dropdown (second level) */
.site-nav .submenu {
  display:none;
  position:absolute;
  left:0;
  top:100%;
  background:#444;
  min-width:180px;
  padding:6px 0;
  z-index:1000;
  box-shadow:0 6px 16px rgba(0,0,0,.15);
}

.site-nav .submenu li { list-style:none; }
.site-nav .submenu li a {
  display:block;
  padding:8px 12px;
  color:#fff;
  white-space:nowrap;
  text-decoration:none;
}
.site-nav .submenu li a:hover { background:#333; }
.site-nav .submenu li.active > a { background:#2a2a2a; }

/* Show submenu on hover or keyboard focus */
.site-nav .menu > li.has-children:hover > .submenu,
.site-nav .menu > li.has-children:focus-within > .submenu {
  display:block;
}

.site-nav .submenu--nested {
  display:none;
  position:absolute;
  left:100%;
  top:0;
  min-width:200px;
  background:#444;
  padding:6px 0;
  box-shadow:0 6px 16px rgba(0,0,0,.15);
}

.site-nav .submenu li.has-children {
  position:relative;
}

.site-nav .submenu li.has-children:hover > .submenu--nested,
.site-nav .submenu li.has-children:focus-within > .submenu--nested {
  display:block;
}

/* CTA block (right-aligned) */
.site-nav .cta {
  margin-left:auto;        /* push to far right */
  display:flex;
  align-items:center;
  padding-right:0;         /* keeps right edge tight */
}

.site-nav .cta .menu {
  display:flex;
  gap:8px;
  list-style:none;
  margin:0;
  padding:0;
}

.site-nav .cta .menu > li > a {
  display:block;
  padding:10px 8px;
  color:#fff;
  font-weight:600;
  text-decoration:none;
  white-space:nowrap;
}

.site-nav .cta .menu > li > a:hover { background:#333; text-decoration:none; }

/***********************/



/* Main layout */
.main-layout { display: flex; align-items: flex-start; gap: 0; padding: 24px 0; }
.content { width: 740px; padding-right: 24px; border-right: 1px solid #eee; }
.sidebar { width: 360px; padding-left: 24px; }

/* Story */
.story { margin-bottom: 2rem; 
    /* border-bottom: 1px solid #eee; padding-bottom: 24px; */ }
.story-title { margin: 0 0 8px; font-size: 28px; line-height: 1.25; }
.story .meta { margin: 0 0 12px; color: #666; font-size: 14px; }

/* Story grids (reusable) */
.story-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding-bottom: 24px;
  margin-bottom: 24px;
/*  border-bottom: 1px solid #eee; */
}

/* Two-up variant */
.story-grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

/* Card style for small teasers */
.story--tease {
  border: 1px solid #eee;
  padding: 12px;
  margin: 0;                 /* override .story defaults */
  /* border-bottom: 0;          /* avoid double borders inside grid */
}

.story-grid .story--tease .story-title {
  font-size: 20px;
  line-height: 1.3;
  margin: 8px 0 6px;
}

.story-grid .story--tease .meta {
  font-size: 13px;
  color: #777;
  margin: 0 0 8px;
}

/* Helpful image constraints for teasers */
.story-grid .story--tease img {
  width: 100%;
  aspect-ratio: 16 / 9;      /* crops tall images nicely */
  object-fit: cover;
  display: block;
}

/* Keep .story default look for full-width lead stories */
.story--lead { /* marker only for clarity; uses existing .story styles */ }

/* Contact page */
.contact-layout {
  display:flex;
  align-items:flex-start;
  gap:32px;
  padding:32px 0;
}

.contact-layout .content {
  flex:1 1 60%;
  max-width:720px;
}

.contact-sidebar {
  flex:1 1 35%;
  position:relative;
}

.contact-card {
  background:#f5f8ff;
  border:1px solid #dce6ff;
  border-radius:16px;
  padding:20px 22px;
  margin-bottom:20px;
}

.desk-list {
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:16px;
}

.desk-list li {
  border:1px solid #eee;
  border-radius:12px;
  padding:16px;
  background:#fff;
  transition:border-color .2s ease, box-shadow .2s ease;
}

.desk-list li.active {
  border-color:#0b62f0;
  box-shadow:0 0 0 2px rgba(11,98,240,0.12);
}

.desk-list h3 {
  margin:0 0 6px;
  font-size:1.05rem;
}

.desk-list p {
  margin:0 0 8px;
  color:#555;
  font-size:.95rem;
}

.desk-note {
  margin:0;
  color:#2d6cdf;
  font-weight:600;
  font-size:.9rem;
}

.desk-list a {
  color:#0b62f0;
  font-weight:600;
  text-decoration:none;
}

.desk-list a:hover { text-decoration:underline; }

.contact-form {
  margin-top:16px;
  border:1px solid #e5e7eb;
  border-radius:16px;
  padding:24px;
  background:#fff;
}

.contact-form .field-group {
  margin-bottom:16px;
  display:flex;
  flex-direction:column;
}

.contact-form label {
  font-weight:600;
  margin-bottom:6px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  font:inherit;
  border:1px solid #d1d5db;
  border-radius:10px;
  padding:10px 12px;
  background:#fff;
}

.contact-form textarea {
  resize:vertical;
  min-height:120px;
}

.field-grid {
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:16px;
}

.btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 24px;
  font-weight:600;
  border-radius:999px;
  border:0;
  cursor:pointer;
  text-decoration:none;
}

.btn--primary {
  background:#0b62f0;
  color:#fff;
}

.btn--primary:hover {
  background:#094ecc;
}

.form-note {
  margin-top:12px;
  color:#555;
  font-size:.95rem;
}

.alert {
  border-radius:12px;
  padding:16px;
  margin-bottom:20px;
}

.alert ul {
  margin:8px 0 0 18px;
}

.alert--success {
  background:#ecfdf5;
  border:1px solid #a7f3d0;
  color:#065f46;
}

.alert--error {
  background:#fef2f2;
  border:1px solid #fecaca;
  color:#7f1d1d;
}

@media (max-width: 960px) {
  .contact-layout {
    flex-direction:column;
  }

  .contact-sidebar {
    width:100%;
  }

  .field-grid {
    grid-template-columns:1fr;
  }
}

.static-layout {
  padding:32px 0;
  display:flex;
  justify-content:center;
}

.static-layout .content {
  max-width:720px;
}

.lead {
  font-size:1.1rem;
  line-height:1.6;
  color:#333;
  margin-bottom:20px;
}

.info-card {
  border:1px solid #d1d5db;
  border-radius:16px;
  padding:20px 24px;
  background:#f8fafc;
  box-shadow:0 6px 18px rgba(15,23,42,0.08);
}

.info-card h2 {
  margin:0 0 12px;
  font-size:1.2rem;
}

.info-card a {
  color:#0b62f0;
  font-weight:600;
}

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

.issue-list li {
  border-bottom:1px solid #e5e7eb;
}

.issue-list li a {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 0;
  text-decoration:none;
  color:#1f2933;
}

.issue-list li a:hover {
  color:#0b62f0;
}

.issue-list__title {
  font-weight:600;
}

.issue-list__meta {
  font-size:.9rem;
  color:#6b7280;
  margin-left:16px;
}

.issue-list--archive li:last-child {
  border-bottom:0;
}

/* Responsive: collapse two-up to single column on narrow screens */
@media (max-width: 900px) {
  .story-grid--2 { grid-template-columns: 1fr; }
}



/* Right rail */
.rail-block { margin-bottom: 24px; }
.rail-block h3 { margin: 0 0 12px; font-size: 18px; }
.link-list { margin: 0; padding: 0; list-style: none; }
.link-list li { font-size: 0.9rem; border-bottom: 1px dashed #e5e5e5; }
.link-list li:last-child { font-weight: 400;
    padding: 0.5rem 0; border-bottom: 0; }

/* Ads */
.ad .ad-box { width: 300px; height: 250px; background: #f0f0f0; border: 1px solid #ddd; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.ad .ad-box.tall { height: 600px; }

.author-bio-card{display:flex;gap:20px;padding:18px;border:1px solid #eee;border-radius:12px;background:#fafafa;margin:32px 0;}
.author-bio-card__media img{width:90px;height:90px;object-fit:cover;border-radius:50%;border:1px solid #ddd;background:#f5f5f5;}
.author-bio-card__body{flex:1;}
.author-bio-card__body h4{margin:0;}
.author-bio-card__meta{margin:0 0 12px;font-size:.8rem;color:#555;display:flex;gap:12px;flex-wrap:wrap;}
.author-bio-card__bio p{margin:0 0 8px; font-size: 0.9rem;}
.author-bio-card__note{margin:12px 0 0;font-size:.85rem;color:#555;}

/* Footer */
.site-footer { background: #111; color: #eee; margin-top: 32px; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 60px; padding: 24px 0; }
.foot-col h4 { margin: 0 0 12px; font-size: 16px; color: #fff; }
.foot-col p, .foot-col li, .foot-col address { color: #cfcfcf; font-style: normal; margin: 0 0 8px; }
.foot-col ul { margin: 0; padding: 0; list-style: none; }
.foot-col a { color: #cfe1ff; }

/* Footer Links */
.footer-grid-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 0; }

/* Helpers */
.hidden { display: none !important; }

/* Inline banner ad below stories */
.ad--banner {
  margin: 16px 0 32px;
  display: flex;
  justify-content: center;
  /* border-bottom: 1px solid #eee; /* mimics story divider */
  padding-bottom: 24px;
}

.ad--banner .ad-box.banner {
  width: 728px;
  height: 176px; /* 90px; */
  background: #f0f0f0;
  border: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

/* Responsive scaling for narrower screens */
@media (max-width: 900px) {
  .ad--banner .ad-box.banner {
    width: 100%;
    max-width: 100%;
    height: 90px;
  }
}


/* Optional: simple narrow-screen stacking (keeps desktop spec intact) */
@media (max-width: 1180px) {
  .container { width: 100%; padding: 0 16px; }
}
@media (max-width: 900px) {
  .main-layout { flex-direction: column; }
  .content, .sidebar { width: 100%; padding: 0; border: 0; }
  .ad .ad-box, .ad .ad-box.tall { width: 100%; }
  .author-bio-card { flex-direction: column; align-items: flex-start; }
  .author-bio-card__media img { width: 96px; height: 96px; }
}


/* Ad label overlay (universal) */
.ad {
  position: relative;
}

/* Small 'ADVERTISEMENT' label */
.ad::before {
  content: "ADVERTISEMENT";
  position: absolute;
  top: -15px;
  left: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #999;
}

/** Photo attribution**/
.credit {
    font-size: 0.7rem;
    color: #666;
}
 /** Image carousel **/
 .story-gallery__thumb {
    border: none;
    background-color: white;
    padding: 0;
    width: 150px;
 }