/* ================================================================
   THE ISLAND TRIBUNE — Stylesheet
   A serious regional newspaper for a serious island nation.
   Aesthetic: Editorial gravitas. Ink and paper translated to screen.
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,900;1,400;1,600&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;1,8..60,300;1,8..60,400&family=Source+Sans+3:wght@300;400;600;700&display=swap');

/* ── Variables ─────────────────────────────────────────────────── */
:root {
  --ink:        #1a1a1a;
  --ink-mid:    #3a3a3a;
  --ink-light:  #666;
  --rule:       #c8b97a;       /* aged gold rule — the Tribune's accent */
  --rule-light: #e8d89a;
  --paper:      #faf8f3;       /* warm newsprint */
  --paper-mid:  #f0ede4;
  --masthead-bg:#0f0f0f;
  --section-bg: #1c1c1c;
  --red:        #9b1c1c;       /* breaking news accent */
  --col-width:  680px;
  --gutter:     24px;
}

/* ── Reset & Base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }

/* ── Utilities ─────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.rule-gold  { border: none; border-top: 2px solid var(--rule); margin: 0; }
.rule-thin  { border: none; border-top: 1px solid #ddd; margin: 0; }
.tag {
  display: inline-block;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
  padding: 2px 0;
}

/* ── Masthead ──────────────────────────────────────────────────── */
.masthead {
  background: var(--masthead-bg);
  color: #fff;
  padding: 0;
}
.masthead-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px var(--gutter);
  border-bottom: 1px solid #333;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  color: #888;
}
.masthead-top a { color: #aaa; }
.masthead-top a:hover { color: #fff; }
.masthead-date { letter-spacing: .04em; }

.masthead-title {
  text-align: center;
  padding: 28px var(--gutter) 20px;
  border-bottom: 1px solid #333;
}
.masthead-title h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 900;
  letter-spacing: .02em;
  color: #fff;
  line-height: 1;
  margin-bottom: 8px;
}
.masthead-title .strapline {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--rule);
}

/* ── Navigation ────────────────────────────────────────────────── */
.main-nav {
  background: var(--section-bg);
  border-bottom: 2px solid var(--rule);
}
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 0;
  justify-content: center;
  flex-wrap: wrap;
}
.main-nav ul li a {
  display: block;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #ccc;
  padding: 14px 18px;
  transition: color .2s, background .2s;
}
.main-nav ul li a:hover,
.main-nav ul li a.active {
  color: #fff;
  background: rgba(200, 185, 122, .15);
}

/* ── Ticker / Breaking bar ─────────────────────────────────────── */
.ticker-bar {
  background: var(--red);
  color: #fff;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 36px;
}
.ticker-label {
  background: #6b1212;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 11px;
  flex-shrink: 0;
}
.ticker-track {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.ticker-inner {
  display: inline-block;
  white-space: nowrap;
  animation: ticker-scroll 60s linear infinite;
  padding-left: 100%;
}
.ticker-inner span { margin-right: 80px; }
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ── Page layout ───────────────────────────────────────────────── */
.page-wrapper {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  padding: 32px var(--gutter);
  max-width: 1200px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .page-wrapper { grid-template-columns: 1fr; }
}

/* ── Section labels ────────────────────────────────────────────── */
.section-label {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--ink);
  display: block;
}

/* ── Lead story ────────────────────────────────────────────────── */
.lead-story {
  margin-bottom: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid #ddd;
}
.lead-story .tag { margin-bottom: 8px; }
.lead-story h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--ink);
}
.lead-story h2 a:hover { color: var(--red); }
.lead-story .deck {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--ink-mid);
  line-height: 1.6;
  margin-bottom: 12px;
}
.lead-story .byline {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  color: var(--ink-light);
  letter-spacing: .04em;
}
.lead-story .byline strong { color: var(--ink-mid); }

/* ── Article grid ──────────────────────────────────────────────── */
.article-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid #ddd;
}
@media (max-width: 600px) { .article-grid { grid-template-columns: 1fr; } }

.article-card .tag { margin-bottom: 6px; }
.article-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--ink);
}
.article-card h3 a:hover { color: var(--red); }
.article-card p {
  font-size: .9rem;
  color: var(--ink-mid);
  line-height: 1.6;
  margin-bottom: 8px;
}
.article-card .byline {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  color: var(--ink-light);
}

/* ── Single article view ───────────────────────────────────────── */
.article-full { max-width: var(--col-width); }
.article-full .tag { margin-bottom: 10px; }
.article-full h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 14px;
}
.article-full .deck {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--ink-mid);
  margin-bottom: 16px;
  line-height: 1.6;
  font-style: italic;
}
.article-full .byline-full {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 13px;
  color: var(--ink-light);
  padding: 12px 0;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  margin-bottom: 24px;
}
.article-full .body p {
  margin-bottom: 20px;
  font-size: 1.05rem;
  line-height: 1.85;
}
.article-full .body p:first-child::first-letter {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 3.8rem;
  font-weight: 900;
  float: left;
  line-height: .75;
  margin-right: 8px;
  margin-top: 6px;
  color: var(--ink);
}
.article-full .body blockquote {
  border-left: 3px solid var(--rule);
  padding-left: 20px;
  margin: 24px 0;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-mid);
}

/* ── Sidebar ───────────────────────────────────────────────────── */
.sidebar {}

.sidebar-widget {
  margin-bottom: 32px;
}

/* World news widget */
.world-news-list { list-style: none; }
.world-news-list li {
  padding: 10px 0;
  border-bottom: 1px solid #e8e4d8;
  font-size: .88rem;
  line-height: 1.5;
}
.world-news-list li:last-child { border-bottom: none; }
.world-news-list .wn-source {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-light);
  display: block;
  margin-bottom: 2px;
}
.world-news-list a { color: var(--ink); }
.world-news-list a:hover { color: var(--red); }
.wn-loading {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  color: var(--ink-light);
  font-style: italic;
  padding: 8px 0;
}

/* About Elin widget */
.elin-widget {
  background: var(--paper-mid);
  border: 1px solid #ddd;
  padding: 16px;
}
.elin-widget img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--rule);
  float: left;
  margin-right: 12px;
  margin-bottom: 8px;
  object-fit: cover;
  background: #ccc;
}
.elin-widget h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.elin-widget .elin-title {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink-light);
  margin-bottom: 8px;
  clear: none;
}
.elin-widget p {
  font-size: .85rem;
  color: var(--ink-mid);
  line-height: 1.55;
  clear: both;
}
.elin-widget .contact-note {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  color: var(--ink-light);
  margin-top: 8px;
  font-style: italic;
}

/* Archive widget */
.archive-list { list-style: none; }
.archive-list li {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 13px;
  padding: 7px 0;
  border-bottom: 1px solid #e8e4d8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink-mid);
}
.archive-list li:last-child { border-bottom: none; }
.archive-list a { color: var(--ink); }
.archive-list a:hover { color: var(--red); }
.archive-list .count {
  font-size: 11px;
  color: var(--ink-light);
  background: var(--paper-mid);
  padding: 1px 7px;
  border-radius: 10px;
}

/* ── Footer ────────────────────────────────────────────────────── */
.site-footer {
  background: var(--masthead-bg);
  color: #666;
  margin-top: 48px;
  padding: 32px var(--gutter);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; } }

.footer-inner h4 {
  font-family: 'Playfair Display', Georgia, serif;
  color: #ccc;
  font-size: 1rem;
  margin-bottom: 12px;
}
.footer-inner p, .footer-inner li {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 13px;
  line-height: 1.7;
}
.footer-inner ul { list-style: none; }
.footer-inner ul li a { color: #666; }
.footer-inner ul li a:hover { color: #aaa; }
.footer-bottom {
  max-width: 1200px;
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px solid #333;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  color: #444;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom a { color: #555; }
.footer-bottom a:hover { color: #888; }

/* ── About / Contact pages ─────────────────────────────────────── */
.page-content {
  max-width: 720px;
  padding: 32px var(--gutter);
  margin: 0 auto;
}
.page-content h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 3px solid var(--ink);
}
.page-content h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
}
.page-content p {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 16px;
  color: var(--ink-mid);
}
.page-content strong { color: var(--ink); font-weight: 600; }

.staff-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 24px 0;
  border-bottom: 1px solid #ddd;
}
.staff-card:last-child { border-bottom: none; }
.staff-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 2px solid var(--rule);
  flex-shrink: 0;
  background: #ddd;
  object-fit: cover;
}
.staff-info h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.staff-info .staff-role {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 8px;
}
.staff-info p {
  font-size: .9rem;
  color: var(--ink-mid);
  line-height: 1.6;
  margin-bottom: 6px;
}
.staff-info .staff-contact {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  color: var(--ink-light);
  font-style: italic;
}

/* ── Responsive tweaks ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .masthead-title h1 { font-size: 2.4rem; }
  .page-wrapper { padding: 20px 16px; gap: 24px; }
}
