/*
Theme Name: Fiscal Africa
Theme URI: https://fiscalafrica.com
Author: Fiscal Africa
Author URI: https://fiscalafrica.com
Description: A clean, editorial WordPress theme for Fiscal Africa — covering taxes, spending, and budgets across Africa.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fiscal-africa
*/

/* ===== CSS Variables ===== */
:root {
  --color-primary: #3d6b8a; /* steel blue */
  --color-primary-light: #5a8fad;
  --color-foreground: #1c1917;
  --color-muted: #78716c;
  --color-border: #e7e5e4;
  --color-background: #fdf8f3;
  --color-card: #ffffff;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-foreground);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (min-width: 768px) {
  body {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
}

@media (min-width: 1024px) {
  body {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-primary);
}

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

/* ===== Layout ===== */
.container {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 3rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 6rem;
  }
}

/* ===== Header ===== */
.site-header {
  border-bottom: 1px solid rgba(231, 229, 228, 0.3);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
  padding-left: 0;
  padding-right: 0;
}

.site-branding a {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--color-foreground);
}

@media (min-width: 768px) {
  .site-branding a {
    font-size: 2rem;
  }
}

.site-branding .highlight {
  color: #8b1a3a;
}

/* Desktop Navigation */
.main-navigation {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.main-navigation ul {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.main-navigation li {
  list-style: none;
  padding: 0;
  margin: 0;
}

.main-navigation a {
  font-size: 0.875rem;
  color: var(--color-muted);
  transition: color 0.2s ease;
  text-decoration: none;
}

.main-navigation a:hover {
  color: var(--color-foreground);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-foreground);
}

.menu-toggle svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Mobile Navigation */
.mobile-navigation {
  display: none;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(231, 229, 228, 0.3);
  list-style: none;
}

.mobile-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-navigation li {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-navigation a {
  display: block;
  padding: 0.75rem 0;
  font-size: 0.875rem;
  color: var(--color-muted);
  text-decoration: none;
  border-bottom: 1px solid rgba(231, 229, 228, 0.2);
}

.mobile-navigation a:last-child {
  border-bottom: none;
}

.mobile-navigation a:hover {
  color: var(--color-foreground);
}

.mobile-navigation.is-active {
  display: block;
}

@media (max-width: 768px) {
  .main-navigation {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
}

/* ===== Hero / Tagline ===== */
.hero-section {
  padding: 2.5rem 0 2rem;
}

.hero-tagline {
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.025em;
  color: #334155;
}

.hero-tagline .highlight {
  color: #6b1530;
}

@media (min-width: 768px) {
  .hero-tagline {
    font-size: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .hero-tagline {
    font-size: 1.5rem;
  }
}

/* ===== Search Bar ===== */
.search-section {
  padding-bottom: 2rem;
}

.search-wrapper {
  position: relative;
}

.search-wrapper .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-muted);
  width: 1rem;
  height: 1rem;
}

.search-wrapper input[type="search"],
.search-wrapper input[type="text"] {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.25rem;
  font-size: 0.875rem;
  font-family: var(--font-sans);
  color: var(--color-foreground);
  background: transparent;
  border: 1px solid rgba(231, 229, 228, 0.4);
  border-radius: 0.375rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.search-wrapper input:focus {
  border-color: rgba(124, 45, 18, 0.5);
}

.search-wrapper input::placeholder {
  color: rgba(120, 113, 108, 0.6);
}

/* ===== Divider ===== */
.divider {
  border: none;
  border-top: 1px solid rgba(231, 229, 228, 0.3);
  margin: 0;
}

/* ===== Section Headers ===== */
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  margin-bottom: 2rem;
}

/* ===== Blog Post Cards ===== */
.posts-section {
  padding: 3rem 0;
}

.post-card {
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(231, 229, 228, 0.2);
}

.post-card:last-child {
  border-bottom: none;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.post-card-category {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-primary);
  background: rgba(61, 107, 138, 0.1);
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
}

.post-card-author {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text);
}

.post-card-date {
  font-size: 0.75rem;
  color: var(--color-muted);
}

.post-card-title {
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  color: #1e3a5f;
}

.post-card-title a:hover {
  color: #3d6b8a;
}

.post-card-excerpt {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-muted);
}

.post-card-content {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--color-text);
}

.post-card-content p {
  margin-bottom: 1rem;
}

.post-card-content p:last-child {
  margin-bottom: 0;
}

/* Hide any WordPress-generated "Read More" links (from excerpt or content) */
.post-card .more-link,
.post-card-excerpt .more-link,
.post-card-excerpt a[href*="more-"],
.post-card-excerpt a.more-link,
.post-card-content .more-link {
  display: none !important;
}

.read-more-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.read-more-link:hover {
  color: #1e3a5f;
}

/* ===== Single Post ===== */
.single-post-header {
  padding: 3rem 0 2rem;
}

.single-post-title {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
  color: #1e3a5f;
}

@media (min-width: 768px) {
  .single-post-title {
    font-size: 1.75rem;
  }
}

.single-post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--color-muted);
}

.single-post-content {
  padding-bottom: 4rem;
}

.single-post-content p {
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-foreground);
}

.single-post-content h2 {
  font-size: 1.375rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
  color: var(--color-foreground);
}

.single-post-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  color: var(--color-foreground);
}

.single-post-content a {
  color: #1e3a5f;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.single-post-content a:hover {
  color: #3d6b8a;
}

.post-card-content a {
  color: #1e3a5f;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-card-content a:hover {
  color: #3d6b8a;
}

.single-post-content strong {
  font-weight: 600;
}

.single-post-content ul,
.single-post-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
}

.single-post-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.single-post-content blockquote {
  border-left: 3px solid var(--color-primary);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--color-muted);
}

/* ===== Page Template ===== */
.page-header {
  padding: 3rem 0 2rem;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.025em;
}

@media (min-width: 768px) {
  .page-title {
    font-size: 1.75rem;
  }
}

.page-content {
  padding-bottom: 4rem;
}

.page-content p {
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.8;
}

.page-content h2 {
  font-size: 1.25rem;
  font-weight: 500;
  margin: 2rem 0 1rem;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--color-border);
  margin-top: 5rem;
}

.site-footer .container {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
  text-align: center;
}

.site-footer p {
  font-size: 0.875rem;
  color: var(--color-muted);
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 0;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  font-size: 0.875rem;
  border-radius: 0.25rem;
  color: var(--color-muted);
  transition: all 0.2s ease;
}

.pagination a:hover {
  color: var(--color-foreground);
  background: rgba(231, 229, 228, 0.5);
}

.pagination .current {
  color: var(--color-foreground);
  font-weight: 600;
}

/* ===== Utility ===== */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}