/* =============================================================
   Clubrive Blog — Frontend Stylesheet
   Aesthetic: Editorial Magazine — Playfair + Source Serif 4
   ============================================================= */

/* --- Custom Properties --- */
:root {
  --ink: #1a1a2e;
  --ink-soft: #3d3d5c;
  --ink-muted: #6b6b8a;
  --ink-light: #9b9bb8;
  --cream: #fdfaf6;
  --white: #ffffff;
  --accent: #c0392b;
  --accent-dark: #96281b;
  --accent-light: #f7e8e6;
  --border: #e8e4df;
  --border-strong: #d0c8bf;
  --shadow-sm: 0 1px 3px rgba(26,26,46,.08);
  --shadow-md: 0 4px 16px rgba(26,26,46,.12);
  --shadow-lg: 0 8px 32px rgba(26,26,46,.16);
  --radius: 8px;
  --radius-sm: 4px;
  --radius-lg: 16px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-ui: 'DM Sans', system-ui, sans-serif;
  --container: 1200px;
  --sidebar-w: 300px;
  --transition: 0.2s ease;
}

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

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

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
ul { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin-bottom: 1rem; }

/* --- Container --- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}

/* --- AD BAR --- */
.ad-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  text-align: center;
}
.ad-bar--bottom { border-top: 1px solid var(--border); border-bottom: none; }

/* =============================================================
   HEADER / NAV
   ============================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253,250,246,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow-md); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.site-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  text-decoration: none;
}
.logo-text {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  user-select: none;
}
.logo-club { color: var(--ink); }
.logo-rive { color: #00b4d8; }
.site-logo:hover .logo-club { color: #2d2d4e; }
.site-logo:hover .logo-rive { color: #0096b4; }

.main-nav { flex: 1; }

/* Nav list */
.nav-list {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Nav item */
.nav-item { position: relative; }

/* Nav link */
.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-ui);
  font-size: .84rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
  text-decoration: none;
}
.nav-link:hover,
.nav-item:hover > .nav-link { color: var(--ink); background: rgba(26,26,46,.05); }
.nav-item.has-dropdown > .nav-link { padding-right: 8px; }

/* Dropdown chevron */
.nav-arrow {
  width: 10px; height: 10px;
  flex-shrink: 0;
  transition: transform .2s ease;
  opacity: .5;
}
.nav-item:hover > .nav-link .nav-arrow { transform: rotate(180deg); opacity: 1; }

/* Dropdown menu */
.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 190px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.10);
  padding: 6px 0;
  list-style: none;
  z-index: 200;
  animation: dropIn .15s ease;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav-item:hover > .dropdown,
.nav-item:focus-within > .dropdown { display: block; }

.dropdown li a {
  display: block;
  padding: 9px 18px;
  font-family: var(--font-ui);
  font-size: .83rem;
  font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
  text-decoration: none;
}
.dropdown li a:hover { color: var(--ink); background: rgba(26,26,46,.04); }
.dropdown li + li { border-top: 1px solid rgba(0,0,0,.04); }

/* Active state — current page highlight */
.nav-link.active { color: var(--accent); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.header-search {
  display: flex;
  align-items: center;
  background: rgba(26,26,46,.05);
  border: 1px solid transparent;
  border-radius: 24px;
  padding: 0 6px 0 14px;
  transition: border var(--transition), background var(--transition);
  gap: 4px;
}
.header-search:focus-within {
  background: var(--white);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.header-search input {
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-ui);
  font-size: .875rem;
  color: var(--ink);
  width: 150px;
  padding: 8px 0;
}
.header-search button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--ink-muted);
  display: flex;
}
.header-search svg { width: 16px; height: 16px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* =============================================================
   HERO SECTION
   ============================================================= */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2px;
  margin: 32px 0;
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 6px 6px 0 var(--ink);
}

.hero-main { display: flex; }
.hero-secondary { display: flex; flex-direction: column; border-left: 2px solid var(--ink); }

.hero-card { display: flex; flex-direction: column; flex: 1; }
.hero-card--primary { flex-direction: column; }
.hero-card--secondary { border-bottom: 1px solid var(--border); }
.hero-card--secondary:last-child { border-bottom: none; flex: 1; }

.hero-img-wrap {
  display: block;
  overflow: hidden;
  flex-shrink: 0;
}
.hero-card--primary .hero-img-wrap { height: 340px; }
.hero-card--secondary .hero-thumb { height: 160px; display: block; overflow: hidden; }

.hero-img-wrap img, .hero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.hero-img-wrap:hover img, .hero-thumb:hover img { transform: scale(1.04); }

/* Skeleton shimmer — shows while images are loading */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}
.skeleton {
  background: linear-gradient(90deg, #e8e4df 25%, #f0ece8 50%, #e8e4df 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite linear;
}

.hero-img-placeholder, .card-img-placeholder {
  background: linear-gradient(135deg, #e8e4df 25%, #d8d0c8 100%);
}

/* Image containers show shimmer while their child img is loading */
.hero-img-wrap:not(.img-failed):not(:has(img[complete])),
.hero-thumb:not(.img-failed),
.card-img-wrap:not(.img-failed):not(.card-img-placeholder) {
  background: linear-gradient(90deg, #e8e4df 25%, #f0ece8 50%, #e8e4df 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite linear;
}

/* Stop shimmer once image is loaded (img becomes visible) */
.hero-img-wrap img, .hero-thumb img, .card-img-wrap img {
  /* Ensures container shimmer is hidden behind loaded image */
  position: relative;
  z-index: 1;
}

.hero-body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.hero-card--secondary .hero-body { padding: 16px; }

.hero-title {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  line-height: 1.2;
}
.hero-title a { color: var(--ink); }
.hero-title a:hover { color: var(--accent); }

.hero-excerpt { font-size: .95rem; color: var(--ink-soft); line-height: 1.6; }

/* =============================================================
   CATEGORY BADGE
   ============================================================= */
.cat-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-ui);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--cat-color, var(--accent)) 12%, transparent);
  color: var(--cat-color, var(--accent));
  border: 1px solid color-mix(in srgb, var(--cat-color, var(--accent)) 30%, transparent);
  text-decoration: none;
  transition: background var(--transition);
  align-self: flex-start;
}
.cat-badge:hover { background: color-mix(in srgb, var(--cat-color, var(--accent)) 20%, transparent); color: var(--cat-color, var(--accent)); }
.cat-badge--large { font-size: .75rem; padding: 4px 14px; }

/* =============================================================
   POST META
   ============================================================= */
.post-meta {
  font-family: var(--font-ui);
  font-size: .8rem;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.meta-sep { color: var(--border-strong); }
.meta-author { font-weight: 600; color: var(--ink-soft); }

/* =============================================================
   CONTENT LAYOUT (posts + sidebar)
   ============================================================= */
.content-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 48px;
  margin: 40px 0;
  align-items: start;
}

.main-content { min-width: 0; }

/* Section title */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  position: relative;
  padding-bottom: 10px;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* Category tabs */
.cat-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-tab {
  font-family: var(--font-ui);
  font-size: .8rem;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--ink-soft);
  transition: all var(--transition);
  cursor: pointer;
}
.cat-tab:hover, .cat-tab.active {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

/* =============================================================
   POST CARDS GRID
   ============================================================= */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}
.posts-grid--related { margin-top: 16px; }
.posts-grid__ad { grid-column: 1 / -1; }

.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

.card-img-wrap {
  display: block;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #e8e4df 25%, #d8d0c8 100%);
  position: relative;
}
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; display: block; }
.post-card:hover .card-img-wrap img { transform: scale(1.05); }
/* When image fails to load */
.card-img-wrap.img-failed { background: linear-gradient(135deg, #e8e4df 25%, #d8d0c8 100%); }
.card-img-wrap.img-failed::after {
  content: '';
  display: block;
  width: 100%; height: 100%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='1.5'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E") center/48px no-repeat;
  position: absolute; inset: 0;
}

.card-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

.card-title { font-size: 1.05rem; line-height: 1.35; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--accent); }

.card-excerpt { font-size: .875rem; color: var(--ink-soft); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Ad block in content */
.ad-block { margin: 2rem 0; text-align: center; }
.ad-block--content { padding: 12px; background: var(--white); border: 1px dashed var(--border-strong); border-radius: var(--radius); }

/* =============================================================
   SIDEBAR
   ============================================================= */
.sidebar { display: flex; flex-direction: column; gap: 28px; position: sticky; top: 80px; }

.widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.widget-title {
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
}

/* Categories widget */
.cat-list { display: flex; flex-direction: column; gap: 6px; }
.cat-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ui);
  font-size: .875rem;
  color: var(--ink-soft);
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}
.cat-list a:hover { background: rgba(26,26,46,.04); color: var(--ink); }
.cat-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.cat-name { flex: 1; }
.cat-count {
  background: rgba(26,26,46,.06);
  color: var(--ink-muted);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: .75rem;
  font-family: var(--font-ui);
  font-weight: 600;
}

/* Popular posts */
.popular-list { display: flex; flex-direction: column; gap: 14px; }
.popular-item { display: flex; align-items: flex-start; gap: 12px; }
.pop-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--border-strong);
  line-height: 1;
  min-width: 28px;
  flex-shrink: 0;
}
.pop-info { display: flex; flex-direction: column; gap: 4px; }
.pop-cat { font-family: var(--font-ui); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.pop-title { font-family: var(--font-ui); font-size: .85rem; font-weight: 500; color: var(--ink); line-height: 1.35; }
.pop-title:hover { color: var(--accent); }
.pop-views { font-family: var(--font-ui); font-size: .75rem; color: var(--ink-muted); }

/* Tag cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pill {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: .75rem;
  font-weight: 500;
  padding: 5px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  color: var(--ink-soft);
  transition: all var(--transition);
  text-decoration: none;
}
.tag-pill:hover { background: var(--ink); border-color: var(--ink); color: var(--cream); }

/* =============================================================
   SINGLE POST
   ============================================================= */
.page-post { padding: 32px 0 48px; }

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: .8rem;
  color: var(--ink-muted);
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--ink-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

.post-header { margin-bottom: 32px; display: flex; flex-direction: column; gap: 16px; }
.post-title { font-size: clamp(1.75rem, 4vw, 2.75rem); line-height: 1.15; }
.post-subtitle { font-size: 1.15rem; color: var(--ink-soft); font-style: italic; line-height: 1.6; }

.post-meta--large { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.meta-author-block { display: flex; align-items: center; gap: 12px; }
.author-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.meta-sub { display: flex; align-items: center; gap: 8px; font-family: var(--font-ui); font-size: .8rem; color: var(--ink-muted); margin-top: 2px; }

/* Share buttons */
.share-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: .8rem;
  font-weight: 600;
  transition: all var(--transition);
  text-decoration: none;
}
.share-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.share-btn--twitter { background: #000; color: #fff; }
.share-btn--twitter:hover { background: #333; color: #fff; }
.share-btn--fb { background: #1877f2; color: #fff; }
.share-btn--fb:hover { background: #1464d0; color: #fff; }
.share-btn--li { background: #0077b5; color: #fff; }
.share-btn--li:hover { background: #005e8e; color: #fff; }

.post-featured-img {
  margin: 32px 0 36px;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #e8e4df 25%, #d8d0c8 100%);
  position: relative;
}
.post-featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.post-featured-img.img-failed {
  background: linear-gradient(135deg, #e8e4df 25%, #d8d0c8 100%);
}

/* Post body */
.post-body {
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: 72ch;
}
.post-body h2 { font-size: 1.6rem; margin: 2.5rem 0 1rem; color: var(--ink); }
.post-body h3 { font-size: 1.25rem; margin: 2rem 0 .75rem; color: var(--ink); }
.post-body p { margin-bottom: 1.4rem; }
.post-body ul, .post-body ol { padding-left: 1.5rem; margin-bottom: 1.4rem; }
.post-body li { margin-bottom: .5rem; }
.post-body blockquote {
  border-left: 4px solid var(--accent);
  padding: 16px 24px;
  margin: 2rem 0;
  background: var(--accent-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  font-size: 1.1rem;
}
.post-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.post-body img { border-radius: var(--radius); margin: 1.5rem 0; }
.post-body .video-embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--radius); margin: 1.5rem 0; background: #000; }
.post-body .video-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.post-body code {
  background: rgba(26,26,46,.06);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: .9em;
  font-family: 'Courier New', monospace;
}
.post-body pre { background: var(--ink); color: var(--cream); padding: 20px; border-radius: var(--radius); overflow-x: auto; margin: 1.5rem 0; }
.post-body pre code { background: none; padding: 0; color: inherit; font-size: .9rem; }

.post-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 32px 0; }
.tags-label { font-family: var(--font-ui); font-size: .8rem; font-weight: 600; color: var(--ink-muted); }

.post-share-footer {
  margin: 32px 0;
  padding: 24px;
  background: var(--accent-light);
  border-radius: var(--radius);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.post-share-footer p { font-family: var(--font-ui); font-weight: 600; margin: 0; color: var(--ink); }

/* Related posts */
.related-posts { margin: 48px 0; border-top: 1px solid var(--border); padding-top: 40px; }

/* =============================================================
   ARCHIVE HEADER
   ============================================================= */
.archive-header {
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  margin: 32px 0;
  position: relative;
  overflow: hidden;
}
.archive-header::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--cat-color, var(--accent)) 25%, transparent);
}
.archive-header__inner { position: relative; }
.archive-label { font-family: var(--font-ui); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; opacity: .6; }
.archive-title { font-size: clamp(2rem, 5vw, 3.5rem); color: var(--cream); margin: 8px 0; }
.archive-desc { opacity: .75; max-width: 500px; }
.archive-count { display: inline-block; margin-top: 12px; font-family: var(--font-ui); font-size: .8rem; padding: 4px 14px; border: 1px solid rgba(255,255,255,.3); border-radius: 20px; opacity: .8; }

/* =============================================================
   STATIC PAGES
   ============================================================= */
.page-static { padding: 40px 0 60px; }
.static-content { max-width: 70ch; }
.static-content h1 { font-size: 2.25rem; margin-bottom: 1.5rem; }
.static-content h2 { font-size: 1.4rem; margin: 2rem 0 .75rem; }
.static-content p { color: var(--ink-soft); }
.static-content ul { padding-left: 1.5rem; color: var(--ink-soft); margin-bottom: 1rem; }
.static-content a { color: var(--accent); text-decoration: underline; }
.static-content .lead { font-size: 1.15rem; color: var(--ink); font-style: italic; }

/* Contact form */
.contact-form { max-width: 600px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label { font-family: var(--font-ui); font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.form-group input, .form-group textarea, .form-group select {
  font-family: var(--font-body);
  font-size: .95rem;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  transition: border var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--ink-soft);
  box-shadow: 0 0 0 3px rgba(26,26,46,.08);
}
.form-group textarea { resize: vertical; min-height: 120px; }

/* 404 */
.page-404 { display: flex; justify-content: center; padding: 80px 0; }
.error-block { text-align: center; }
.error-code { font-family: var(--font-display); font-size: 8rem; font-weight: 700; color: var(--border); line-height: 1; }
.error-block h1 { margin: 16px 0 8px; }
.error-block p { color: var(--ink-soft); margin-bottom: 28px; }

/* =============================================================
   SEARCH
   ============================================================= */
.search-form-large {
  display: flex;
  gap: 10px;
  margin-bottom: 32px;
  max-width: 600px;
}
.search-form-large input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 18px;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius);
  outline: none;
  transition: border var(--transition);
}
.search-form-large input:focus { border-color: var(--ink); }
.no-posts { padding: 60px 0; text-align: center; color: var(--ink-soft); }

/* =============================================================
   BUTTONS
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: .9rem;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.btn-primary:hover { background: var(--ink-soft); border-color: var(--ink-soft); color: var(--cream); }
.btn-outline { background: transparent; border-color: var(--border-strong); color: var(--ink-soft); }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm { padding: 6px 14px; font-size: .8rem; }
.btn-block { width: 100%; }

/* =============================================================
   ALERTS
   ============================================================= */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-family: var(--font-ui); font-size: .9rem; }
.alert-success { background: #e8f8f0; border: 1px solid #6fcf97; color: #1a6635; }
.alert-error { background: #fde8e8; border: 1px solid #eb5757; color: #8b1a1a; }

/* =============================================================
   PAGINATION
   ============================================================= */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 40px 0;
}
.page-btn {
  font-family: var(--font-ui);
  font-size: .875rem;
  font-weight: 600;
  padding: 9px 20px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  background: var(--white);
  transition: all var(--transition);
  text-decoration: none;
  cursor: pointer;
}
.page-btn:hover, .page-btn.active, .page-btn--current {
  background: var(--ink); border-color: var(--ink); color: var(--cream);
}
.page-btn--current { cursor: default; pointer-events: none; }
.page-info { font-family: var(--font-ui); font-size: .8rem; color: var(--ink-muted); }

/* =============================================================
   FOOTER
   ============================================================= */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  margin-top: 80px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding: 56px 0;
}
.footer-brand .logo-text { font-size: 1.6rem; }
.footer-brand .logo-club { color: #fdfaf6; }
.footer-brand .logo-rive { color: #00b4d8; }
.footer-tagline { color: rgba(253,250,246,.6); margin-top: 12px; font-size: .9rem; max-width: 280px; }
.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.7);
  transition: all var(--transition);
  text-decoration: none;
}
.footer-social a:hover { background: var(--accent); color: var(--white); }
.footer-social svg { width: 16px; height: 16px; }

.footer-col h4 {
  font-family: var(--font-ui);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(253,250,246,.5);
  margin-bottom: 18px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: rgba(253,250,246,.7); font-family: var(--font-ui); font-size: .875rem; transition: color var(--transition); text-decoration: none; }
.footer-col a:hover { color: var(--cream); }
.footer-col span { font-size: .75rem; opacity: .5; }

.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 20px 0; }
.footer-bottom p { font-family: var(--font-ui); font-size: .8rem; color: rgba(253,250,246,.45); text-align: center; }

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 1024px) {
  :root { --sidebar-w: 260px; }
  .hero-section { grid-template-columns: 1fr 280px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: fixed;
    top: 64px; left: 0; right: 0; bottom: 0;
    background: #fff;
    padding: 16px 0;
    z-index: 150;
    overflow-y: auto;
    border-top: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
  }
  .main-nav.open { display: block; }
  .nav-list { flex-direction: column; gap: 0; align-items: stretch; }
  .nav-item { border-bottom: 1px solid var(--border); }
  .nav-item:last-child { border-bottom: none; }
  .nav-link { padding: 14px 20px; font-size: .95rem; justify-content: space-between; border-radius: 0; }
  .nav-link:hover { background: var(--bg); }

  /* Mobile dropdown — always visible when parent clicked */
  .dropdown {
    display: none;
    position: static;
    box-shadow: none;
    border: none;
    border-top: 1px solid var(--border);
    border-radius: 0;
    background: var(--bg);
    padding: 4px 0;
    animation: none;
  }
  .nav-item.mobile-open > .dropdown { display: block; }
  .nav-item:hover > .dropdown { display: none; } /* disable hover on mobile */
  .nav-item.mobile-open > .dropdown { display: block; }
  .dropdown li a { padding: 11px 20px 11px 36px; font-size: .9rem; }
  .dropdown li + li { border-top: 1px solid rgba(0,0,0,.04); }

  .mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.3);
    z-index: 140;
  }
  .mobile-nav-overlay.open { display: block; }

  .nav-toggle { display: flex; }
  .header-search { display: none; }

  .hero-section { grid-template-columns: 1fr; box-shadow: 4px 4px 0 var(--ink); }
  .hero-secondary { border-left: none; border-top: 2px solid var(--ink); }
  .hero-card--primary .hero-img-wrap { height: 240px; }
  .hero-card--secondary .hero-thumb { height: 120px; }

  .content-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }

  .posts-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  .post-meta--large { flex-direction: column; align-items: flex-start; }

  .footer-inner { grid-template-columns: 1fr; gap: 32px; padding: 40px 0; }
  .footer-brand { grid-column: auto; }

  .archive-header { padding: 32px 24px; }
}

@media (max-width: 480px) {
  .hero-body { padding: 16px; }
  .hero-title { font-size: 1.3rem; }
  .post-title { font-size: 1.6rem; }
}

/* =============================================================
   STATIC PAGES — Privacy, About, Contact
   ============================================================= */
.static-page-layout { max-width: 820px; margin: 0 auto; padding: 40px 0 60px; }
.static-page-header { margin-bottom: 2.5rem; padding-bottom: 1.5rem; border-bottom: 2px solid var(--border); }
.static-page-header h1 { font-size: 2.4rem; font-family: var(--font-display); color: var(--ink); }
.static-page-date { font-size: .85rem; color: var(--ink-muted); margin-top: 8px; }
.static-page-body h2 { font-size: 1.4rem; font-family: var(--font-display); color: var(--ink); margin: 2.5rem 0 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.static-page-body h3 { font-size: 1.1rem; font-family: var(--font-display); color: var(--ink); margin: 1.8rem 0 .75rem; }
.static-page-body p { font-size: 1rem; line-height: 1.85; color: var(--ink-soft); margin-bottom: 1.2rem; }
.static-page-body a { color: var(--accent); }
.static-page-body a:hover { text-decoration: underline; }
.static-page-body ul, .static-page-body ol { padding-left: 1.5rem; margin-bottom: 1.2rem; }
.static-page-body li { line-height: 1.8; color: var(--ink-soft); margin-bottom: .3rem; }

/* Alert (contact/forms) */
.alert { padding: 14px 18px; border-radius: 8px; font-size: .875rem; line-height: 1.6; }
.alert-error { background: #fef2f2; border: 1.5px solid #fecaca; color: #991b1b; }
.alert-success { background: #f0fdf4; border: 1.5px solid #86efac; color: #166534; }

/* Button used in static pages */
.static-page-body .btn-primary {
  display: inline-flex; align-items: center;
  background: var(--ink); color: #fdfaf6;
  padding: 12px 24px; border-radius: 8px; font-family: 'DM Sans', system-ui;
  font-size: .9rem; font-weight: 600; text-decoration: none;
  transition: background .15s;
}
.static-page-body .btn-primary:hover { background: #2d2d4e; text-decoration: none; }

