/*
Theme Name: The Hammer Times
Theme URI: https://thehammertimes.co.uk
Author: The Hammer Times
Description: A newspaper-style theme for The Hammer Times — independent West Ham United coverage, with occasional wider football content.
Version: 2.0
Text Domain: hammer-times
*/

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

:root {
  --claret: #7A003C;
  --claret-dark: #4E0027;
  --gold: #C9A84C;
  --steel: #3B6E91;
  --ink: #14100F;
  --mid: #5A5450;
  --rule: #E3D8CE;
  --bg: #F7F2EC;
  --cream: #F1E9DE;
  --photo-bg: #DCD1C2;
  --photo-line: #C7B9A8;
}

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

body {
  font-family: 'Source Serif 4', Georgia, serif;
  background: var(--bg);
  color: var(--ink);
}

a { color: inherit; }
img { max-width: 100%; display: block; }

.sheet {
  max-width: 1100px;
  margin: 0 auto;
  background: white;
  box-shadow: 0 0 60px rgba(0,0,0,0.06);
}

/* Photo placeholder (shown only when a post has no featured image) */
.photo {
  background: repeating-linear-gradient(135deg, var(--photo-bg), var(--photo-bg) 10px, #cfc2b0 10px, #cfc2b0 20px);
  border: 1px solid var(--photo-line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-label {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #7a6d58;
  background: rgba(255,255,255,0.9);
  padding: 5px 12px;
  border: 1px solid var(--photo-line);
}
.photo-caption {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  color: var(--mid);
  font-style: italic;
  margin-bottom: 20px;
}

/* Utility bar */
.util-bar {
  background: var(--ink);
  color: #cfc9c2;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 8px 32px;
  display: flex;
  justify-content: space-between;
}
.util-bar span.hl { color: var(--gold); font-weight: 700; }

/* Masthead */
.masthead {
  text-align: center;
  padding: 34px 24px 18px;
  background: linear-gradient(180deg, #fff, var(--cream) 200%);
  border-bottom: 4px double var(--ink);
}
.kicker {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--claret);
  margin-bottom: 12px;
}
.kicker::before, .kicker::after { content: '⚒'; margin: 0 12px; color: var(--gold); }
.title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  font-size: 68px;
  line-height: 1;
  letter-spacing: -1px;
}
.title a { text-decoration: none; color: inherit; }
.title .accent { color: var(--claret); }
.tagline {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: 14px;
  color: var(--mid);
  margin-top: 10px;
}

/* Nav */
.nav { background: var(--claret); display: flex; justify-content: center; flex-wrap: wrap; }
.nav ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; }
.nav a {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: white;
  text-decoration: none;
  padding: 13px 22px;
  display: block;
  border-right: 1px solid rgba(255,255,255,0.15);
}
.nav li:last-child a { border-right: none; }
.nav a:hover, .nav .current-menu-item a { background: var(--claret-dark); }

/* Compact masthead for single post / inner pages */
.mini-masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  border-bottom: 3px double var(--ink);
  flex-wrap: wrap;
  gap: 12px;
}
.mini-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  font-size: 28px;
  letter-spacing: -0.5px;
  text-decoration: none;
}
.mini-title .accent { color: var(--claret); }
.mini-nav ul { list-style: none; display: flex; gap: 22px; flex-wrap: wrap; }
.mini-nav a {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.mini-nav .current-menu-item a { color: var(--claret); }

.breadcrumb {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--mid);
  padding: 14px 28px 0;
}
.breadcrumb .sep { margin: 0 6px; color: var(--rule); }
.breadcrumb .cur { color: var(--claret); }
.breadcrumb a { text-decoration: none; }

/* Trending ticker */
.ticker { display: flex; align-items: center; background: var(--ink); border-bottom: 1px solid #000; }
.ticker .flag {
  background: var(--gold);
  color: var(--ink);
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 9px 16px;
  flex-shrink: 0;
}
.ticker .items {
  display: flex;
  gap: 28px;
  padding: 9px 20px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12.5px;
  color: #eae4dc;
  overflow-x: auto;
  white-space: nowrap;
}
.ticker .items a { text-decoration: none; color: #eae4dc; }
.ticker .items .n { color: #7a726a; margin-right: 4px; }

/* HERO — magazine style, image with text overlay (homepage lead story) */
.hero { position: relative; height: 460px; margin: 0; }
.hero .photo { height: 100%; width: 100%; border: none; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.55) 45%, rgba(0,0,0,0.05) 75%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px 44px;
}
.hero-tag {
  display: inline-block;
  background: var(--claret);
  color: white;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 14px;
  margin-bottom: 16px;
  width: fit-content;
}
.hero h1, .hero h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 42px;
  font-weight: 900;
  line-height: 1.1;
  color: white;
  max-width: 680px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.hero h1 a, .hero h2 a { text-decoration: none; color: inherit; }
.hero .dek {
  font-size: 17px;
  font-style: italic;
  color: #e9e2d8;
  max-width: 600px;
  margin-top: 14px;
  line-height: 1.5;
}
.hero .byline {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #cfc6b8;
  margin-top: 16px;
}

/* Section label */
.section-label {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--claret);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-label::after { content: ''; flex: 1; height: 2px; background: var(--rule); }

/* Main grid */
.main-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 36px; padding: 36px 32px; }

/* Secondary story cards — image-forward, color-coded tags, hover lift */
.secondary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.story-card { border: 1px solid var(--rule); transition: box-shadow 0.15s ease, transform 0.15s ease; }
.story-card:hover { box-shadow: 0 10px 24px rgba(0,0,0,0.08); transform: translateY(-2px); }
.story-card .story-photo { width: 100%; height: 170px; border: none; border-bottom: 1px solid var(--rule); }
.story-card-body { padding: 16px 18px 20px; }
.story-card .tag {
  display: inline-block;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: white;
  padding: 3px 9px;
  margin-bottom: 10px;
  text-decoration: none;
}
/* Category color coding — cycles through these classes; see functions.php irontimes_category_tag_class() */
.tag.tag-c0 { background: var(--claret); }
.tag.tag-c1 { background: var(--steel); }
.tag.tag-c2 { background: var(--gold); color: var(--ink); }
.tag.tag-c3 { background: var(--ink); }

.story-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 8px;
}
.story-card h3 a { text-decoration: none; color: inherit; }
.story-card p { font-size: 13.5px; color: var(--mid); line-height: 1.55; }

/* Sidebar */
.sidebar-item { display: flex; gap: 14px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--rule); align-items: flex-start; }
.sidebar-item:last-child { border-bottom: none; }
.sidebar-num { font-family: 'Playfair Display', Georgia, serif; font-size: 30px; font-weight: 900; color: var(--rule); line-height: 1; flex-shrink: 0; }
.sidebar-photo { width: 68px; height: 68px; flex-shrink: 0; }
.sidebar-photo .photo-label { font-size: 8px; padding: 2px 5px; }
.sidebar-text h4 { font-family: 'Playfair Display', Georgia, serif; font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.sidebar-text h4 a { text-decoration: none; color: inherit; }
.sidebar-text .meta { font-family: 'Source Sans 3', sans-serif; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--mid); margin-top: 4px; }

/* Newsletter box */
.newsletter-box { background: var(--claret); color: white; padding: 24px 22px; margin-top: 8px; position: relative; overflow: hidden; }
.newsletter-box::before { content: '⚒'; position: absolute; right: -10px; bottom: -20px; font-size: 110px; color: rgba(255,255,255,0.08); }
.newsletter-box h4 { font-family: 'Playfair Display', Georgia, serif; font-size: 19px; margin-bottom: 8px; }
.newsletter-box p { font-family: 'Source Sans 3', sans-serif; font-size: 12.5px; line-height: 1.5; color: #f0dde8; margin-bottom: 14px; }
.newsletter-box form { position: relative; z-index: 1; }
.newsletter-box input[type="email"] {
  width: 100%;
  background: white;
  color: var(--mid);
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12.5px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: none;
}
.newsletter-box button {
  width: 100%;
  background: var(--ink);
  color: white;
  text-align: center;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px;
  border: none;
  cursor: pointer;
}
.newsletter-box button:hover { background: var(--claret-dark); }

.standings-box { background: var(--cream); padding: 18px 20px; margin-top: 8px; }
.standings-box table { width: 100%; font-family: 'Source Sans 3', sans-serif; font-size: 12px; border-collapse: collapse; }
.standings-box th { text-align: left; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--mid); padding-bottom: 8px; border-bottom: 2px solid var(--rule); }
.standings-box td { padding: 6px 0; border-bottom: 1px solid var(--rule); }
.standings-box tr:last-child td { border-bottom: none; }
.standings-box .whu { color: var(--claret); font-weight: 800; }

/* Single article page */
.article-wrap { max-width: 720px; margin: 0 auto; padding: 20px 28px 60px; }
.section-tag {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--claret);
  margin-bottom: 14px;
}
h1.headline { font-family: 'Playfair Display', Georgia, serif; font-size: 40px; font-weight: 900; line-height: 1.12; margin-bottom: 16px; }
.dek { font-size: 20px; font-style: italic; font-weight: 300; color: var(--mid); line-height: 1.5; border-left: 3px solid var(--claret); padding-left: 16px; margin-bottom: 24px; }

.byline-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-bottom: 28px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--claret); color: white; display: flex; align-items: center; justify-content: center; font-family: 'Source Sans 3', sans-serif; font-size: 13px; font-weight: 700; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.byline-text { font-family: 'Source Sans 3', sans-serif; font-size: 12.5px; color: var(--mid); line-height: 1.4; }
.byline-text strong { color: var(--ink); }

.hero-photo { width: 100%; height: 420px; margin-bottom: 8px; }

.article-wrap p, .entry-content p { font-size: 18px; line-height: 1.75; margin-bottom: 22px; }
.article-wrap p.lede::first-letter, .entry-content > p:first-of-type::first-letter {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 58px;
  font-weight: 900;
  color: var(--claret);
  float: left;
  line-height: 0.8;
  padding: 6px 8px 0 0;
}
h2.subhead, .entry-content h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--claret);
  margin: 40px 0 14px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--claret);
}
.inline-photo { width: 100%; height: 260px; margin: 30px 0 8px; }
.entry-content blockquote, .pull-quote {
  margin: 34px 0;
  padding: 24px 28px;
  background: var(--cream);
  border-left: 5px solid var(--claret);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-style: italic;
  line-height: 1.45;
}

.category-tag {
  display: inline-block;
  background: var(--claret);
  color: white;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 10px;
  text-decoration: none;
  margin-right: 6px;
}

.pagination { display: flex; justify-content: center; gap: 10px; padding: 20px 0 40px; font-family: 'Source Sans 3', sans-serif; }
.pagination a, .pagination span { padding: 8px 14px; border: 1px solid var(--rule); text-decoration: none; font-size: 13px; color: var(--ink); }
.pagination .current { background: var(--claret); color: white; border-color: var(--claret); }

.footer {
  text-align: center;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  color: var(--mid);
  letter-spacing: 1px;
  padding: 22px 0 30px;
  border-top: 1px solid var(--rule);
  background: var(--cream);
}

@media (max-width: 780px) {
  .main-grid { grid-template-columns: 1fr; }
  .secondary-grid { grid-template-columns: 1fr; }
  .hero { height: 360px; }
  .hero h1, .hero h2 { font-size: 28px; }
  .title { font-size: 42px; }
  .mini-masthead { flex-direction: column; align-items: flex-start; }
  h1.headline { font-size: 28px; }
}
