/*
Theme Name: TCF Seychelles
Theme URI: https://www.tcfseychelles.org/
Author: The Civic Forum Seychelles
Description: A custom editorial WordPress theme for The Civic Forum Seychelles, designed for news, stories, opinions and civic issues.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 8.0
Text Domain: tcf-seychelles
*/

:root {
  --tcf-navy: #0a1628;
  --tcf-navy-dark: #050d1a;
  --tcf-red: #7c0e0f;
  --tcf-red-bright: #9d1719;
  --tcf-teal: #0e7c7b;
  --tcf-teal-light: #4dd8d7;
  --tcf-gold: #d5a63f;
  --tcf-ink: #131a24;
  --tcf-muted: #667085;
  --tcf-line: #e4e7ec;
  --tcf-surface: #f5f7fa;
  --tcf-white: #ffffff;
  --tcf-radius: 14px;
  --tcf-shadow: 0 14px 40px rgba(10, 22, 40, 0.13);
  --tcf-heading: "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
  --tcf-body: Inter, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--tcf-ink);
  background: var(--tcf-white);
  font-family: var(--tcf-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.admin-bar .site-header { top: 32px; }
img { max-width: 100%; height: auto; }
a { color: var(--tcf-red); text-decoration: none; }
a:hover { color: var(--tcf-teal); }
button, input, textarea, select { font: inherit; }
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.section { padding: 76px 0; }
.section-soft { background: var(--tcf-surface); }
.section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.section-title {
  margin: 0;
  color: var(--tcf-navy);
  font-family: var(--tcf-heading);
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.eyebrow {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--tcf-red);
  color: #fff;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.text-link { font-weight: 750; }
.button, .wp-element-button, input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 20px;
  border: 0;
  border-radius: 7px;
  background: var(--tcf-red);
  color: #fff;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
.button:hover, .wp-element-button:hover, input[type="submit"]:hover {
  color: #fff;
  background: var(--tcf-teal);
  transform: translateY(-1px);
}
.button-outline { border: 1px solid rgba(255,255,255,.35); background: transparent; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 1000; box-shadow: 0 4px 20px rgba(0,0,0,.16); }
.header-main { background: var(--tcf-navy); }
.header-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 26px; }
.site-branding { display: flex; align-items: center; gap: 12px; min-width: 240px; }
.custom-logo-link, .brand-fallback { display: inline-flex; align-items: center; }
.custom-logo { width: auto; max-width: 120px; max-height: 58px; }
.brand-fallback img { width: 74px; height: auto; }
.site-title { color: #fff; font-family: var(--tcf-heading); font-size: 1.24rem; font-weight: 900; line-height: 1.05; }
.primary-nav ul { display: flex; align-items: center; gap: 4px; padding: 0; margin: 0; list-style: none; }
.primary-nav a { display: block; padding: 10px 13px; border-radius: 6px; color: rgba(255,255,255,.82); font-size: .9rem; font-weight: 750; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { color: #fff; background: rgba(255,255,255,.1); }
.primary-nav .menu-item-contact > a, .primary-nav li:last-child > a { margin-left: 8px; background: var(--tcf-red); color: #fff; }
.menu-toggle { display: none; padding: 9px 11px; border: 1px solid rgba(255,255,255,.2); border-radius: 6px; background: transparent; color: #fff; font-size: 1.3rem; }
.ticker { display: flex; align-items: stretch; overflow: hidden; background: #10151c; color: #fff; }
.ticker-label { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 10px 18px; background: var(--tcf-red); font-size: .72rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.ticker-window { overflow: hidden; flex: 1; }
.ticker-track { display: flex; gap: 52px; width: max-content; padding: 9px 28px; animation: tcfTicker 42s linear infinite; }
.ticker-track:hover { animation-play-state: paused; }
.ticker-item { white-space: nowrap; color: rgba(255,255,255,.92); font-size: .78rem; font-weight: 650; }
.ticker-item::before { content: "◆"; margin-right: 12px; color: var(--tcf-teal-light); }
@keyframes tcfTicker { to { transform: translateX(-50%); } }

/* Hero */
.hero {
  position: relative;
  min-height: min(790px, 88vh);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: linear-gradient(135deg, var(--tcf-navy), #15385c);
  color: #fff;
}
.hero-media, .hero-overlay { position: absolute; inset: 0; }
.hero-media { background-size: cover; background-position: center; }
.hero-overlay { background: linear-gradient(to top, rgba(5,13,26,.96), rgba(5,13,26,.22) 72%), linear-gradient(90deg, rgba(5,13,26,.6), transparent); }
.hero-content { position: relative; z-index: 2; max-width: 880px; padding: 150px 0 78px; }
.hero h1 { margin: 22px 0 24px; font-family: var(--tcf-heading); font-size: clamp(3.4rem, 8vw, 7rem); font-weight: 950; letter-spacing: -.055em; line-height: .91; }
.hero p { max-width: 760px; margin: 0; color: rgba(255,255,255,.87); font-size: clamp(1.08rem, 2vw, 1.35rem); font-weight: 550; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* Cards */
.story-grid { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 20px; }
.story-card { position: relative; min-height: 230px; overflow: hidden; border-radius: var(--tcf-radius); background: var(--tcf-navy); box-shadow: var(--tcf-shadow); }
.story-card:first-child { grid-row: 1 / span 2; min-height: 500px; }
.story-card > a { position: absolute; inset: 0; color: #fff; }
.story-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.story-card:hover img { transform: scale(1.045); }
.story-card-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, #143559, #0e7c7b); }
.story-card-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(5,13,26,.95), rgba(5,13,26,.05) 75%); }
.story-card-content { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 28px; }
.story-card h3 { margin: 10px 0 8px; color: #fff; font-family: var(--tcf-heading); font-size: clamp(1.25rem, 2.5vw, 2.05rem); line-height: 1.08; }
.story-card:not(:first-child) h3 { font-size: 1.18rem; }
.story-card-meta { display: flex; flex-wrap: wrap; gap: 8px; color: rgba(255,255,255,.67); font-size: .76rem; }
.category-pill { display: inline-block; padding: 4px 8px; border-radius: 4px; background: var(--tcf-teal); color: #fff; font-size: .68rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.latest-list { display: flex; flex-direction: column; border-top: 1px solid var(--tcf-line); }
.latest-item { display: grid; grid-template-columns: 120px 1fr auto; align-items: center; gap: 20px; padding: 19px 0; border-bottom: 1px solid var(--tcf-line); }
.latest-item h3 { margin: 0; font-family: var(--tcf-heading); font-size: 1.06rem; line-height: 1.25; }
.latest-item h3 a { color: var(--tcf-ink); }
.latest-item h3 a:hover { color: var(--tcf-red); }
.latest-time { color: var(--tcf-muted); font-size: .78rem; white-space: nowrap; }

/* Mission */
.mission { position: relative; overflow: hidden; background: var(--tcf-navy-dark); color: #fff; }
.mission::before, .mission-media { position: absolute; inset: 0; content: ""; }
.mission-media { background-size: cover; background-position: center; opacity: .28; }
.mission::before { z-index: 1; background: linear-gradient(180deg, rgba(5,13,26,.5), rgba(5,13,26,.94)); }
.mission-inner { position: relative; z-index: 2; max-width: 900px; padding: 100px 0; text-align: center; }
.mission h2 { margin: 22px 0 8px; font-family: var(--tcf-heading); font-size: clamp(3.2rem, 8vw, 6.8rem); font-weight: 950; letter-spacing: -.05em; line-height: .9; }
.mission-tagline { color: var(--tcf-teal-light); font-family: var(--tcf-heading); font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 850; }
.mission-intro { max-width: 760px; margin: 32px auto; font-size: 1.15rem; }
.mission-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 42px; text-align: left; }
.mission-item { display: flex; align-items: center; gap: 15px; min-height: 82px; padding: 18px 22px; border: 1px solid rgba(77,216,215,.28); border-radius: 12px; background: rgba(14,124,123,.12); font-weight: 800; }
.mission-icon { font-size: 1.8rem; }

/* Newsletter and forms */
.newsletter { background: var(--tcf-navy); color: #fff; text-align: center; }
.newsletter-inner { max-width: 700px; }
.newsletter h2 { margin: 0; font-family: var(--tcf-heading); font-size: clamp(2rem, 4vw, 3.1rem); }
.newsletter p { color: rgba(255,255,255,.68); }
.inline-form { display: flex; gap: 10px; max-width: 520px; margin: 28px auto 0; }
.inline-form input { flex: 1; min-width: 0; }
input[type="text"], input[type="email"], input[type="url"], textarea, select {
  width: 100%; padding: 13px 15px; border: 1px solid #cfd4dc; border-radius: 7px; background: #fff; color: var(--tcf-ink);
}
textarea { min-height: 180px; resize: vertical; }
label { display: block; margin-bottom: 7px; font-weight: 750; }
.form-field { margin-bottom: 21px; }
.form-help { color: var(--tcf-muted); font-size: .85rem; }
.tcf-form { max-width: 760px; padding: 30px; border: 1px solid var(--tcf-line); border-radius: var(--tcf-radius); background: #fff; box-shadow: var(--tcf-shadow); }
.form-notice { margin: 0 0 24px; padding: 14px 16px; border-left: 4px solid var(--tcf-teal); background: #ecfafa; }
.form-notice.error { border-color: var(--tcf-red); background: #fff1f1; }
.honeypot { position: absolute !important; left: -9999px !important; }

/* Archives and articles */
.page-hero { padding: 76px 0 56px; background: linear-gradient(135deg, var(--tcf-navy), #14375b); color: #fff; }
.page-hero h1 { max-width: 900px; margin: 12px 0 0; font-family: var(--tcf-heading); font-size: clamp(2.8rem, 6vw, 5rem); line-height: .96; }
.page-hero p { max-width: 720px; color: rgba(255,255,255,.72); font-size: 1.12rem; }
.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.archive-card { overflow: hidden; border: 1px solid var(--tcf-line); border-radius: var(--tcf-radius); background: #fff; box-shadow: 0 8px 25px rgba(10,22,40,.08); }
.archive-thumb { aspect-ratio: 16/10; overflow: hidden; background: linear-gradient(135deg, #143559, #0e7c7b); }
.archive-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.archive-card:hover .archive-thumb img { transform: scale(1.04); }
.archive-content { padding: 22px; }
.archive-content h2 { margin: 10px 0; font-family: var(--tcf-heading); font-size: 1.4rem; line-height: 1.15; }
.archive-content h2 a { color: var(--tcf-navy); }
.archive-content p { color: var(--tcf-muted); font-size: .92rem; }
.pagination { margin-top: 42px; }
.pagination .nav-links { display: flex; gap: 8px; }
.pagination .page-numbers { padding: 8px 13px; border: 1px solid var(--tcf-line); border-radius: 5px; }
.pagination .current { background: var(--tcf-red); color: #fff; border-color: var(--tcf-red); }
.article-wrap { width: min(820px, calc(100% - 40px)); margin: 0 auto; padding: 70px 0; }
.article-header h1 { margin: 14px 0 18px; font-family: var(--tcf-heading); font-size: clamp(2.5rem, 6vw, 4.8rem); letter-spacing: -.04em; line-height: .98; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--tcf-muted); font-size: .86rem; }
.article-featured { margin: 34px 0; overflow: hidden; border-radius: var(--tcf-radius); }
.entry-content { font-size: 1.08rem; }
.entry-content h2, .entry-content h3 { color: var(--tcf-navy); font-family: var(--tcf-heading); line-height: 1.1; }
.entry-content blockquote { margin: 30px 0; padding: 20px 28px; border-left: 5px solid var(--tcf-red); background: var(--tcf-surface); font-size: 1.2rem; font-style: italic; }
.entry-content figure { margin: 32px 0; }
.entry-content figcaption { color: var(--tcf-muted); font-size: .82rem; }

/* Issues */
.issues-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.issue-card { padding: 28px; border-top: 5px solid var(--tcf-teal); border-radius: 10px; background: #fff; box-shadow: var(--tcf-shadow); }
.issue-card:nth-child(even) { border-top-color: var(--tcf-red); }
.issue-card h3 { margin: 10px 0; color: var(--tcf-navy); font-family: var(--tcf-heading); font-size: 1.4rem; }
.issue-icon { font-size: 2.1rem; }

/* Footer */
.site-footer { background: var(--tcf-navy); color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 40px; padding: 64px 0 48px; }
.footer-title { margin: 0 0 16px; font-family: var(--tcf-heading); font-size: 1.2rem; }
.footer-about, .footer-contact { color: rgba(255,255,255,.58); font-size: .88rem; }
.footer-heading { margin: 0 0 17px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.1); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; }
.footer-menu { padding: 0; margin: 0; list-style: none; }
.footer-menu li { margin: 8px 0; }
.footer-menu a { color: rgba(255,255,255,.63); font-size: .88rem; }
.footer-menu a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 70px; color: rgba(255,255,255,.42); font-size: .78rem; }

@media (max-width: 960px) {
  .primary-nav { display: none; position: absolute; top: 82px; left: 0; right: 0; padding: 18px 20px; background: var(--tcf-navy); box-shadow: 0 15px 25px rgba(0,0,0,.2); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { align-items: stretch; flex-direction: column; }
  .primary-nav .menu-item-contact > a, .primary-nav li:last-child > a { margin: 4px 0 0; text-align: center; }
  .menu-toggle { display: inline-block; }
  .story-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .story-card:first-child { grid-column: 1 / -1; grid-row: auto; min-height: 440px; }
  .archive-grid, .issues-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  body.admin-bar .site-header { top: 46px; }
  .container, .article-wrap { width: min(100% - 28px, 1180px); }
  .site-title { font-size: 1rem; }
  .custom-logo { max-width: 92px; max-height: 50px; }
  .hero { min-height: 680px; }
  .hero-content { padding-bottom: 58px; }
  .hero h1 { font-size: clamp(3.1rem, 16vw, 5rem); }
  .story-grid, .archive-grid, .issues-grid, .mission-grid, .footer-grid { grid-template-columns: 1fr; }
  .story-card, .story-card:first-child { min-height: 390px; }
  .latest-item { grid-template-columns: 1fr; gap: 8px; }
  .latest-time { display: none; }
  .mission-inner { padding: 76px 0; }
  .inline-form { flex-direction: column; }
  .section { padding: 58px 0; }
  .section-title-row { align-items: flex-start; }
  .footer-bottom-inner { align-items: flex-start; flex-direction: column; justify-content: center; padding: 18px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
