/*
Theme Name: Bits & Canvas
Theme URI: https://blog.redouan.net
Author: Redouan Kacimi
Author URI: https://redouan.net
Description: A from-scratch WordPress theme built as the direct companion to the redouan.net portfolio — same tokens, same component language, same signature dot-grid animation, purpose-built rather than adapted from an older theme.
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: bits-canvas
Tags: blog, custom-colors, custom-menu, light, featured-images, flexible-header, full-width-template, post-formats, sticky-post, theme-options, threaded-comments, translation-ready
*/

/* ================================
   ROOT VARIABLES
   Matches the design tokens in the redouan.net Angular site's styles.scss —
   keep these two in sync if either changes.
   ================================ */
:root {
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;

  --bg: #F7F8F7;
  --surface: #FFFFFF;
  --surface-alt: #F1F3F2;
  --border: #E4E7E5;

  --ink: #1F437A;
  --ink-muted: #5B6B7A;
  --ink-faint: #93A3B0;

  --green: #00AE8F;
  --green-dark: #00875A;
  --green-light: #66BEA8;
  --navy: #3868B4;
  --navy-dark: #1F437A;

  --gradient-1: linear-gradient(135deg, #0AC999, #1F437A);
  --gradient-2: linear-gradient(135deg, #0AC999, #00875A);

  --red: #D64545;

  /* Dark accent used sparingly — code blocks and the footer only, as a
     deliberate callback to the old terminal-era identity. */
  --dark-accent: #16283F;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(31, 67, 122, 0.06);
  --shadow-md: 0 12px 30px rgba(31, 67, 122, 0.08);
  --shadow-hover: 0 20px 44px rgba(31, 67, 122, 0.14);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --container-width: 1280px;
}

/* ================================
   FONT IMPORTS
   ================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ================================
   GLOBAL STYLES
   ================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-display);
  background: var(--bg);
  color: var(--ink);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  color: #fff;
  background: var(--green-dark);
}

/* ================================
   TYPOGRAPHY
   ================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.15rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1.5rem;
  color: var(--ink-muted);
  font-size: 1.05rem;
}

a {
  color: var(--navy);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--green-dark);
}

strong, b {
  font-weight: 700;
  color: var(--ink);
}

em, i {
  font-style: italic;
}

code {
  font-family: var(--font-mono);
  background: rgba(0, 174, 143, 0.08);
  color: var(--green-dark);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* Code blocks are the one deliberate dark accent inside post content — a
   quiet callback to the old terminal aesthetic, used sparingly. */
pre {
  background: var(--dark-accent);
  border: 1px solid var(--navy-dark);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  color: #E4E7E5;
}

pre code {
  font-family: var(--font-mono);
  background: none;
  color: var(--green-light);
  padding: 0;
  border-radius: 0;
}

blockquote {
  border-left: 3px solid var(--green);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--ink-muted);
}

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

/* ================================
   LAYOUT
   ================================ */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-content {
  flex: 1;
  padding: 4rem 0;
  background: var(--bg);
}

/* ================================
   HEADER
   ================================ */
.site-header {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  transition: box-shadow 0.2s var(--ease);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  margin: 0;
  font-size: 1.15rem;
}

.site-title a {
  display: inline-flex;
  align-items: baseline;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
  transition: color 0.2s var(--ease);
}

.site-title a:hover {
  color: var(--green-dark);
}

.site-title a::before {
  content: '// ';
  color: var(--green);
}

.custom-logo-link img {
  display: block;
  max-height: 44px;
  width: auto;
}

/* Navigation */
.main-navigation {
  display: flex;
  align-items: center;
}

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

.main-navigation li {
  margin: 0;
}

.main-navigation a {
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.2s var(--ease);
  padding: 0.5rem 0;
  font-weight: 500;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  color: var(--green-dark);
  text-decoration: none;
}

/* Last menu item reads as a CTA pill, matching the portfolio nav's
   "Contact" treatment. */
.main-navigation > ul > li:last-child > a {
  color: #fff;
  background: var(--green-dark);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
}

.main-navigation > ul > li:last-child > a:hover {
  background: var(--green);
  color: #fff;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: var(--green-dark);
  color: #fff;
  border: none;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s var(--ease);
}

.menu-toggle:hover {
  background: var(--green);
  transform: translateY(-2px);
}

/* ================================
   SITE HERO — homepage only
   The one signature moment: the same dot-grid canvas animation as the
   portfolio hero (see js/dot-grid.js). Everywhere else stays quiet.
   ================================ */
.site-hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 4rem;
}

.site-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.dot-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.site-hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.site-hero .section-label {
  justify-content: center;
  margin-bottom: 0.75rem;
}

.site-hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.75rem);
  margin: 0;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ================================
   ARCHIVE / SEARCH INTRO — quieter header for category, tag, date,
   and search-result pages. No canvas here; the hero stays a homepage-only
   signature moment.
   ================================ */
.archive-intro {
  padding: 3.5rem 0 1rem;
  text-align: center;
}

.archive-intro .section-label {
  justify-content: center;
  margin-bottom: 0.5rem;
}

.archive-intro h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin: 0 0 0.5rem;
}

.archive-intro h1 span {
  color: var(--green-dark);
}

.archive-description {
  color: var(--ink-muted);
  max-width: 640px;
  margin: 0 auto;
}

/* ================================
   POSTS & ENTRIES
   ================================ */
.posts-container {
  display: grid;
  gap: 2rem;
}

.post-card,
.page-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  overflow: hidden;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.entry-header {
  margin-bottom: 1.5rem;
}

.entry-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.entry-title a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.entry-title a:hover {
  color: var(--green-dark);
  text-decoration: none;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.1rem;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  margin-bottom: 1rem;
}

.entry-meta span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.entry-meta .reading-time::before {
  content: '·';
  margin-right: 0.6rem;
  color: var(--border);
}

.entry-meta a {
  color: var(--ink-faint);
}

.entry-meta a:hover {
  color: var(--green-dark);
  text-decoration: none;
}

.entry-meta .byline a {
  color: var(--navy);
}

.entry-thumbnail {
  margin-bottom: 1.5rem;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.entry-thumbnail img {
  height: auto;
  width: 100%;
  display: block;
  transition: transform 0.4s var(--ease);
}

.entry-thumbnail-index img {
  height: 350px;
  object-fit: cover;
}

.post-card:hover .entry-thumbnail img {
  transform: scale(1.04);
}

.entry-content,
.entry-summary {
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
  line-height: 1.75;
}

.entry-content img {
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
}

.page-links {
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--green-dark);
  background: rgba(0, 174, 143, 0.1);
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s var(--ease);
  text-decoration: none;
}

.read-more:hover {
  background: var(--green);
  color: #fff;
  text-decoration: none;
}

/* Tags and categories */
.entry-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  margin-top: 1.5rem;
}

.tags-links,
.cat-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.tags-links span:first-child,
.cat-links span:first-child {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  margin-right: 0.25rem;
}

.tags-links a {
  color: var(--ink);
  font-family: var(--font-mono);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

.cat-links a {
  background: rgba(0, 174, 143, 0.1);
  color: var(--green-dark);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.78rem;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.2s var(--ease);
}

.tags-links a:hover,
.cat-links a:hover {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
  text-decoration: none;
}

/* ================================
   POST NAVIGATION — prev/next, single posts only
   ================================ */
.nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: -0.5rem;
}

.nav-links .nav-previous,
.nav-links .nav-next {
  min-width: 0;
}

.nav-links .nav-next {
  text-align: right;
}

.nav-links a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  transition: all 0.2s var(--ease);
}

.nav-links a:hover {
  border-color: var(--green);
  box-shadow: var(--shadow-sm);
}

.nav-subtitle {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  margin-bottom: 0.35rem;
}

.nav-title {
  display: block;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.4;
}

/* ================================
   PAGINATION
   ================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 4rem;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink-muted);
  text-decoration: none;
  transition: all 0.2s var(--ease);
  background: var(--surface);
}

.pagination a:hover,
.pagination .current {
  background: var(--green-dark);
  color: #fff;
  border-color: var(--green-dark);
  text-decoration: none;
}

.pagination .current {
  font-weight: 700;
}

/* ================================
   SIDEBAR
   ================================ */
.sidebar {
  margin-top: 4rem;
}

.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  color: var(--ink);
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.widget-title::before {
  content: '// ';
  color: var(--green);
  font-family: var(--font-mono);
}

.widget ul {
  list-style: none;
  padding: 0;
}

.widget li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

.widget li:last-child {
  border-bottom: none;
}

.widget a {
  color: var(--navy);
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
  display: inline-block;
}

.widget a:hover {
  color: var(--green-dark);
  text-decoration: none;
  transform: translateX(4px);
}

.widget_search form {
  display: flex;
  gap: 0.5rem;
}

.widget_search input[type="search"] {
  flex: 1;
  padding: 0.7rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink);
  font-family: var(--font-display);
}

.widget_search input[type="search"]:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 174, 143, 0.12);
}

.widget_search button {
  padding: 0.7rem 1.4rem;
  background: var(--green-dark);
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s var(--ease);
}

.widget_search button:hover {
  background: var(--green);
  transform: translateY(-2px);
}

/* ================================
   COMMENTS
   ================================ */
.comments-area {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.comments-title {
  color: var(--ink);
  margin-bottom: 2rem;
  font-size: 1.5rem;
}

.comments-title::before {
  content: '// ';
  color: var(--green);
  font-family: var(--font-mono);
}

.comments-title span {
  color: var(--ink);
}

.comment-list {
  list-style: none;
  padding: 0;
}

.comment {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  margin-left: 1rem;
  box-shadow: var(--shadow-sm);
}

.comment-author {
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.comment-author img {
  border-radius: 50%;
}

.comment-meta {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  margin-bottom: 1rem;
}

.comment-content {
  color: var(--ink-muted);
}

.reply {
  margin-bottom: 2rem;
}

.reply a {
  color: var(--green-dark);
  padding: 0.3rem 0.9rem;
  border: 1px solid var(--green);
  border-radius: 999px;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s var(--ease);
}

.reply a:hover {
  background: var(--green);
  color: #fff;
}

.comment-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: var(--shadow-sm);
}

#reply-title,
.comment-reply-title {
  color: var(--ink);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-family: var(--font-display);
  margin-bottom: 1rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 174, 143, 0.12);
}

.comment-form textarea {
  min-height: 150px;
  resize: vertical;
}

.comment-form input[type="submit"] {
  background: var(--gradient-1);
  color: #fff;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s var(--ease);
}

.comment-form input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.comment-navigation {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.no-comments {
  color: var(--ink-faint);
  font-style: italic;
}

/* ================================
   HOME / ARCHIVE POST GRID
   ================================ */
.posts-grid {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  align-items: start;
}

.posts-grid .post-card {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
}

.posts-grid .entry-thumbnail-index img {
  height: 190px;
}

.posts-grid .entry-summary {
  font-size: 0.95rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.posts-grid .read-more {
  align-self: flex-start;
  margin-top: auto;
}

.posts-grid .no-results {
  grid-column: 1 / -1;
}

.featured-post {
  grid-column: 1 / -1;
  padding: 2.5rem !important;
}

.featured-post .entry-thumbnail {
  position: relative;
}

.featured-post .entry-thumbnail-index img {
  height: 380px;
}

.featured-post .entry-title {
  font-size: 2.25rem;
}

.featured-post .entry-summary {
  font-size: 1.05rem;
  -webkit-line-clamp: 3;
}

.featured-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  background: var(--gradient-1);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
}

/* ================================
   FOOTER
   The one place the site stays dark — a deliberate contrast band, the same
   way the portfolio keeps one dark/mono accent moment rather than going
   fully light everywhere.
   ================================ */
.site-footer {
  background: var(--gradient-1);
  color: rgba(255, 255, 255, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3rem 0;
  margin-top: 4rem;
}

.footer-widgets-area {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-widget {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.75);
}

.footer-widget .widget-title {
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-widget .widget-title::before {
  color: var(--green-light);
}

.footer-widget a {
  color: var(--navy);
}

.footer-widget a:hover {
  color: var(--green-dark);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  transition: color 0.2s var(--ease);
}

.footer-links a:hover {
  color: var(--green-light);
  text-decoration: none;
}

.footer-text {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

.footer-text span {
  color: var(--green-light);
}

/* ================================
   404 / RECENT POSTS LIST
   ================================ */
.recent-posts-list {
  list-style: none;
  margin: 1rem 0 1.5rem;
}

.recent-posts-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

.recent-posts-list li:last-child {
  border-bottom: none;
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */
@media screen and (max-width: 992px) {
  .container {
    padding: 0 1.5rem;
  }

  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.9rem; }
  h3 { font-size: 1.55rem; }
}

@media screen and (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .main-navigation {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 1rem;
    display: none;
  }

  .main-navigation.toggled {
    display: block;
  }

  .main-navigation ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .main-navigation li {
    width: 100%;
    border-bottom: 1px solid var(--border);
  }

  .main-navigation li:last-child {
    border-bottom: none;
  }

  .main-navigation a {
    display: block;
    padding: 1rem;
  }

  .main-navigation > ul > li:last-child > a {
    display: inline-block;
    margin: 0.5rem 1rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-widgets-area {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .nav-links {
    grid-template-columns: 1fr;
  }

  .nav-links .nav-next {
    text-align: left;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.7rem; }
  h3 { font-size: 1.4rem; }
}

@media screen and (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .post-card,
  .page-content,
  .widget,
  .comment-form,
  .wpcf7 {
    padding: 1.5rem;
  }

  .featured-post {
    padding: 1.5rem !important;
  }

  .featured-post .entry-thumbnail-index img {
    height: 220px;
  }

  .featured-post .entry-title {
    font-size: 1.75rem;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
}

/* ================================
   SCROLLBAR
   ================================ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--surface-alt);
}

::-webkit-scrollbar-thumb {
  background: var(--ink-faint);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--green-dark);
}

/* ================================
   UTILITY CLASSES
   ================================ */
.highlight {
  color: var(--green-dark);
  font-family: var(--font-mono);
  background: rgba(0, 174, 143, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.section-label {
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--green-dark);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.text-center {
  text-align: center;
}

/* WordPress core convention — many templates/plugins expect this exact
   class name for visually-hidden, screen-reader-only text. */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  clip: auto !important;
  clip-path: none;
  color: var(--ink);
  display: block;
  font-size: 0.9rem;
  height: auto;
  left: 1rem;
  line-height: normal;
  padding: 1rem 1.5rem;
  text-decoration: none;
  top: 1rem;
  width: auto;
  z-index: 100000;
}

/* ================================
   FORMS (general — search form, etc.)
   ================================ */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  font-family: var(--font-display);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 174, 143, 0.12);
}

.search-form {
  display: flex;
  gap: 0.5rem;
  max-width: 480px;
}

.search-form .search-field {
  flex: 1;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
}

.search-form .search-submit {
  padding: 0.75rem 1.5rem;
  background: var(--green-dark);
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s var(--ease);
}

.search-form .search-submit:hover {
  background: var(--green);
  transform: translateY(-2px);
}

/*
========================================================================
WORDPRESS CORE BLOCK OVERRIDES
========================================================================
*/

.wp-block-separator {
  border: none;
  border-top: 1px dashed var(--border);
  margin: 12px 0;
}

.wp-block-list {
  list-style: none;
  padding-left: 2rem;
  margin-bottom: 1.5rem;
}

.wp-block-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.wp-block-list li::before {
  content: '›';
  color: var(--green-dark);
  font-weight: 700;
  position: absolute;
  left: 0;
  top: 0;
}

.wp-block-list ul,
.wp-block-list ol {
  margin-top: 0.75rem;
  padding-left: 2rem;
}

.wp-block-quote {
  border-left: 3px solid var(--green);
  padding-left: 1.5rem;
  margin: 2rem 0;
}

.wp-block-image img,
.wp-block-gallery img {
  border-radius: var(--radius-md);
}

.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  background: var(--gradient-1);
  color: #fff;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  transition: all 0.2s var(--ease);
}

.wp-block-button__link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: #fff;
}

/* ================================
   CONTACT FORM 7 STYLING
   ================================ */
.wpcf7 {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.wpcf7 p {
  margin-bottom: 1.5rem;
}

.wpcf7 label {
  display: block;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1rem;
}

.wpcf7 input:focus,
.wpcf7 textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 174, 143, 0.12);
}

.wpcf7 textarea {
  min-height: 150px;
  resize: vertical;
}

.wpcf7 input[type="submit"] {
  background: var(--gradient-1);
  color: #fff;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s var(--ease);
}

.wpcf7 input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.wpcf7-response-output {
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-top: 1rem;
}

.wpcf7-validation-errors {
  border: 1px solid var(--red);
  color: var(--red);
}

.wpcf7-mail-sent-ok {
  border: 1px solid var(--green);
  color: var(--green-dark);
  background: rgba(0, 174, 143, 0.08);
}
