/*
Theme Name: CrushBrew
Theme URI: https://crushbrew.com
Author: CrushBrew
Author URI: https://crushbrew.com
Description: A modern editorial magazine theme for wine, beer, food, and travel content. Converted from a React/Vite SPA design system.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: crushbrew
Tags: blog, news, entertainment, one-column, custom-logo, custom-menu, featured-images, translation-ready, block-styles

CrushBrew — Your guide to the world of wine, beer, food & travel.
*/

/* ==========================================================================
   CSS Custom Properties (Design Tokens)
   ========================================================================== */

:root {
  --background: hsl(50, 14%, 97%);
  --foreground: hsl(0, 0%, 13%);

  --card: hsl(0, 0%, 100%);
  --card-foreground: hsl(0, 0%, 13%);

  --primary: hsl(358, 55%, 39%);
  --primary-foreground: hsl(50, 14%, 97%);

  --secondary: hsl(48, 10%, 92%);
  --secondary-foreground: hsl(0, 0%, 13%);

  --muted: hsl(48, 10%, 92%);
  --muted-foreground: hsl(0, 0%, 45%);

  --accent: hsl(48, 10%, 92%);
  --accent-foreground: hsl(0, 0%, 13%);

  --border: hsl(45, 8%, 86%);
  --input: hsl(45, 8%, 86%);
  --ring: hsl(358, 55%, 39%);

  --radius: 0.125rem;

  --font-display: 'EB Garamond', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --zone-bg: hsl(48, 10%, 93%);

  --shadow-card: 0 1px 3px 0 hsl(0 0% 0% / 0.04), 0 1px 2px -1px hsl(0 0% 0% / 0.04);
  --shadow-card-hover: 0 10px 40px -12px hsl(0 0% 0% / 0.12), 0 4px 16px -4px hsl(0 0% 0% / 0.06);
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0 solid var(--border);
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  font-weight: 500;
}

button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
}

input {
  font-family: inherit;
}

ul, ol {
  list-style: none;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */

.container-editorial {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

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

.container-reading {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

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

/* ==========================================================================
   Typography Classes
   ========================================================================== */

.headline-display {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

@media (min-width: 768px) {
  .headline-display {
    font-size: 3rem;
  }
}

@media (min-width: 1024px) {
  .headline-display {
    font-size: 3.5rem;
  }
}

.headline-section {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 500;
  line-height: 1.15;
}

@media (min-width: 768px) {
  .headline-section {
    font-size: 2.5rem;
  }
}

.headline-card {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.25;
}

@media (min-width: 768px) {
  .headline-card {
    font-size: 1.4rem;
  }
}

.category-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--primary);
}

.body-text {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.625;
  color: var(--muted-foreground);
}

/* ==========================================================================
   Site Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: hsla(50, 14%, 97%, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

@media (min-width: 768px) {
  .site-header__inner {
    height: 4.5rem;
  }
}

.site-header__logo img {
  height: 3.5rem;
  width: auto;
  display: block;
}

@media (min-width: 768px) {
  .site-header__logo img {
    height: 4rem;
  }
}

.site-header__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Desktop Navigation */
.site-header__nav {
  display: none;
  align-items: center;
  gap: 1.75rem;
}

@media (min-width: 768px) {
  .site-header__nav {
    display: flex;
  }
}

.site-header__nav a,
.site-header__nav .menu-item a {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.025em;
  color: hsla(0, 0%, 13%, 0.6);
  transition: color 0.2s ease;
  text-decoration: none;
}

.site-header__nav a:hover,
.site-header__nav .menu-item a:hover {
  color: var(--primary);
}

.site-header__nav .current-menu-item a,
.site-header__nav .current-menu-parent a,
.site-header__nav .current_page_item a {
  color: var(--primary);
}

/* Reset wp_nav_menu list styles */
.site-header__nav ul {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header__nav li {
  margin: 0;
  padding: 0;
}

/* Actions */
.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-header__search-toggle,
.site-header__menu-toggle {
  padding: 0.625rem;
  border-radius: var(--radius);
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-header__search-toggle:hover,
.site-header__menu-toggle:hover {
  background-color: var(--secondary);
}

.site-header__search-toggle svg,
.site-header__menu-toggle svg {
  width: 18px;
  height: 18px;
  color: hsla(0, 0%, 13%, 0.6);
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-header__menu-toggle svg {
  width: 20px;
  height: 20px;
  color: var(--foreground);
}

.site-header__menu-toggle {
  display: flex;
}

@media (min-width: 768px) {
  .site-header__menu-toggle {
    display: none;
  }
}

.site-header__subscribe {
  display: none;
  padding: 0.5rem 1rem;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-body);
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-radius: var(--radius);
  transition: background-color 0.2s ease;
  text-decoration: none;
}

.site-header__subscribe:hover {
  background-color: hsla(358, 55%, 39%, 0.9);
}

@media (min-width: 768px) {
  .site-header__subscribe {
    display: inline-flex;
  }
}

/* Search Bar */
.site-header__search {
  border-top: 1px solid var(--border);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.2s ease;
}

.site-header__search.is-open {
  max-height: 100px;
  opacity: 1;
}

.site-header__search-inner {
  padding: 1rem 0;
}

.site-header__search input[type="search"],
.site-header__search input[type="text"] {
  width: 100%;
  background-color: var(--secondary);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-family: var(--font-body);
  border: none;
  outline: none;
  color: var(--foreground);
}

.site-header__search input[type="search"]::placeholder,
.site-header__search input[type="text"]::placeholder {
  color: var(--muted-foreground);
}

.site-header__search input[type="search"]:focus,
.site-header__search input[type="text"]:focus {
  box-shadow: 0 0 0 2px hsla(358, 55%, 39%, 0.2);
}

/* Mobile Menu */
.site-header__mobile-menu {
  display: none;
  border-top: 1px solid var(--border);
  overflow: hidden;
  background-color: var(--background);
}

.site-header__mobile-menu.is-open {
  display: block;
}

@media (min-width: 768px) {
  .site-header__mobile-menu {
    display: none !important;
  }
}

.site-header__mobile-nav {
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.site-header__mobile-nav a,
.site-header__mobile-nav .menu-item a {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--foreground);
  transition: color 0.2s ease;
  text-decoration: none;
}

.site-header__mobile-nav a:hover,
.site-header__mobile-nav .menu-item a:hover {
  color: var(--primary);
}

.site-header__mobile-nav ul {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header__mobile-nav li {
  margin: 0;
  padding: 0;
}

.site-header__mobile-subscribe {
  margin-top: 1rem;
  display: inline-flex;
  justify-content: center;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-body);
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-radius: var(--radius);
  text-decoration: none;
}

/* ==========================================================================
   Site Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border);
}

.site-footer__inner {
  padding: 4rem 0;
}

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

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .site-footer__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.site-footer__brand {
  grid-column: span 2;
}

@media (min-width: 768px) {
  .site-footer__brand {
    grid-column: span 1;
  }
}

.site-footer__brand img {
  height: 3.5rem;
  width: auto;
  margin-bottom: 1rem;
}

.site-footer__brand p {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.625;
  max-width: 200px;
}

.site-footer__heading {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--foreground);
  margin-bottom: 1.25rem;
}

.site-footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.site-footer__links a,
.site-footer__links .menu-item a {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: color 0.2s ease;
  text-decoration: none;
}

.site-footer__links a:hover,
.site-footer__links .menu-item a:hover {
  color: var(--primary);
}

.site-footer__links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.site-footer__links li {
  margin: 0;
  padding: 0;
}

.site-footer__bottom {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 768px) {
  .site-footer__bottom {
    flex-direction: row;
  }
}

.site-footer__copyright {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.site-footer__legal {
  display: flex;
  gap: 1.5rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.site-footer__legal a {
  transition: color 0.2s ease;
}

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

/* ==========================================================================
   Hero Feature
   ========================================================================== */

.hero-feature {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
  display: block;
}

@media (min-width: 768px) {
  .hero-feature {
    aspect-ratio: 2.4 / 1;
  }
}

.hero-feature__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s ease-out;
}

.hero-feature:hover .hero-feature__image {
  transform: scale(1.02);
}

.hero-feature__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    hsl(0 0% 8% / 0.8) 0%,
    hsl(0 0% 8% / 0.35) 40%,
    hsl(0 0% 8% / 0.05) 65%,
    transparent 80%
  );
}

.hero-feature__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.75rem;
}

@media (min-width: 768px) {
  .hero-feature__content {
    padding: 3rem;
  }
}

@media (min-width: 1024px) {
  .hero-feature__content {
    padding: 4rem;
  }
}

.hero-feature__category {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: hsla(50, 14%, 97%, 0.6);
  margin-bottom: 0.75rem;
}

.hero-feature__title {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--primary-foreground);
  max-width: 48rem;
  margin-bottom: 0.75rem;
}

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

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

.hero-feature__excerpt {
  display: none;
  font-family: var(--font-body);
  font-size: 1rem;
  color: hsla(50, 14%, 97%, 0.65);
  max-width: 42rem;
  margin-bottom: 1.25rem;
  line-height: 1.625;
}

@media (min-width: 768px) {
  .hero-feature__excerpt {
    display: block;
    font-size: 1.0625rem;
  }
}

.hero-feature__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: hsla(50, 14%, 97%, 0.45);
}

.hero-feature__meta-separator {
  display: inline;
}

/* ==========================================================================
   Article Card (Default — Vertical)
   ========================================================================== */

.article-card {
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: block;
  color: inherit;
  text-decoration: none;
}

.article-card:hover {
  transform: translateY(-2px);
}

.article-card__image-wrap {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
}

.article-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease-out;
}

.article-card:hover .article-card__image {
  transform: scale(1.04);
}

.article-card__category {
  margin-bottom: 0.625rem;
  display: block;
}

.article-card__title {
  color: var(--foreground);
  transition: color 0.2s ease;
}

.article-card:hover .article-card__title {
  color: var(--primary);
}

.article-card__excerpt {
  margin-top: 0.625rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: 0.75rem;
}

.article-card__meta-separator {
  color: var(--border);
}

/* Article Card Horizontal Variant */
.article-card--horizontal {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.3s ease;
  color: inherit;
  text-decoration: none;
}

.article-card--horizontal:last-child {
  border-bottom: 0;
}

.article-card--horizontal:hover {
  transform: translateY(-2px);
}

.article-card--horizontal .article-card__image-wrap {
  width: 6rem;
  height: 6rem;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 0;
  aspect-ratio: auto;
}

@media (min-width: 768px) {
  .article-card--horizontal .article-card__image-wrap {
    width: 7rem;
    height: 7rem;
  }
}

.article-card--horizontal .article-card__body {
  flex: 1;
  min-width: 0;
  padding: 0.125rem 0;
}

.article-card--horizontal .article-card__category {
  margin-bottom: 0.375rem;
}

.article-card--horizontal .article-card__h-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--foreground);
  transition: color 0.2s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card--horizontal:hover .article-card__h-title {
  color: var(--primary);
}

.article-card--horizontal .article-card__meta {
  margin-top: 0.5rem;
}

/* ==========================================================================
   Zone Section
   ========================================================================== */

.zone-section {
  padding: 5rem 0;
}

@media (min-width: 768px) {
  .zone-section {
    padding: 7rem 0;
  }
}

.zone-section--alternate {
  background: var(--zone-bg);
}

.zone-section__header {
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .zone-section__header {
    margin-bottom: 3.5rem;
  }
}

.zone-section__header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.zone-section__subtitle {
  margin-top: 0.625rem;
  max-width: 32rem;
}

.zone-section__view-all {
  display: none;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  transition: color 0.2s ease;
  flex-shrink: 0;
  padding-bottom: 0.25rem;
  text-decoration: none;
}

.zone-section__view-all:hover {
  color: hsla(358, 55%, 39%, 0.7);
}

@media (min-width: 768px) {
  .zone-section__view-all {
    display: inline-flex;
  }
}

.zone-section__view-all svg {
  width: 14px;
  height: 14px;
}

.zone-section__divider {
  margin-top: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.zone-section__view-all-mobile {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  margin-top: 2.5rem;
  text-decoration: none;
}

@media (min-width: 768px) {
  .zone-section__view-all-mobile {
    display: none;
  }
}

.zone-section__view-all-mobile svg {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   Article Grids
   ========================================================================== */

.article-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem 2rem;
}

@media (min-width: 768px) {
  .article-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.article-grid--2col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem 2.5rem;
}

@media (min-width: 768px) {
  .article-grid--2col {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   Newsletter CTA
   ========================================================================== */

.newsletter-cta {
  padding: 6rem 0;
  border-top: 1px solid var(--border);
}

@media (min-width: 768px) {
  .newsletter-cta {
    padding: 8rem 0;
  }
}

.newsletter-cta__inner {
  max-width: 36rem;
  margin: 0 auto;
  text-align: center;
}

.newsletter-cta__label {
  margin-bottom: 1.25rem;
  display: block;
}

.newsletter-cta__title {
  color: var(--foreground);
  margin-bottom: 1.25rem;
}

.newsletter-cta__text {
  margin-bottom: 2.5rem;
}

.newsletter-cta__form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 24rem;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .newsletter-cta__form {
    flex-direction: row;
  }
}

.newsletter-cta__input {
  flex: 1;
  background-color: var(--secondary);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-family: var(--font-body);
  border: none;
  outline: none;
  color: var(--foreground);
}

.newsletter-cta__input::placeholder {
  color: var(--muted-foreground);
}

.newsletter-cta__input:focus {
  box-shadow: 0 0 0 2px hsla(358, 55%, 39%, 0.2);
}

.newsletter-cta__button {
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-body);
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-radius: var(--radius);
  transition: background-color 0.2s ease;
  flex-shrink: 0;
  cursor: pointer;
  border: none;
}

.newsletter-cta__button:hover {
  background-color: hsla(358, 55%, 39%, 0.9);
}

/* ==========================================================================
   Front Page — Hero Section
   ========================================================================== */

.front-hero {
  padding-top: 2rem;
}

@media (min-width: 768px) {
  .front-hero {
    padding-top: 3rem;
  }
}

/* ==========================================================================
   Single Post — Article Page
   ========================================================================== */

.single-hero {
  position: relative;
  height: 70vh;
  overflow: hidden;
}

@media (min-width: 768px) {
  .single-hero {
    height: 85vh;
  }
}

.single-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

@supports (-webkit-touch-callout: none) {
  .single-hero__bg {
    background-attachment: scroll;
  }
}

.single-hero__fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    hsl(50 14% 97% / 1) 0%,
    hsl(50 14% 97% / 0) 15%
  );
}

.single-content {
  position: relative;
  background-color: var(--background);
  margin-top: -6rem;
}

@media (min-width: 768px) {
  .single-content {
    margin-top: -8rem;
  }
}

.single-content__inner {
  padding-top: 3rem;
}

@media (min-width: 768px) {
  .single-content__inner {
    padding-top: 4rem;
  }
}

.single-back {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.2s ease;
  margin-bottom: 2rem;
  text-decoration: none;
}

.single-back:hover {
  color: var(--primary);
}

.single-back svg {
  width: 14px;
  height: 14px;
}

.single-category {
  margin-bottom: 1rem;
  display: block;
}

.single-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--foreground);
  margin-bottom: 1.5rem;
}

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

@media (min-width: 1024px) {
  .single-title {
    font-size: 3.75rem;
  }
}

.single-meta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

@media (min-width: 640px) {
  .single-meta {
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
  }
}

.single-meta__author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.single-meta__avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.single-meta__avatar span {
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--foreground);
}

.single-meta__name {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

.single-meta__date {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.single-meta__share {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted-foreground);
  transition: color 0.2s ease;
  background: none;
  border: none;
  cursor: pointer;
}

@media (min-width: 640px) {
  .single-meta__share {
    margin-left: auto;
  }
}

.single-meta__share:hover {
  color: var(--primary);
}

.single-meta__share svg {
  width: 14px;
  height: 14px;
}

/* Single Post Body (the_content) */
.single-body p {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

.single-body > p:first-child {
  font-size: 1.125rem;
  line-height: 1.625;
  color: hsla(0, 0%, 13%, 0.8);
  margin-bottom: 2rem;
}

.single-body h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--foreground);
  margin-top: 3rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .single-body h2 {
    font-size: 1.875rem;
  }
}

.single-body h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--foreground);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .single-body h3 {
    font-size: 1.5rem;
  }
}

.single-body h4 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--foreground);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.single-body blockquote {
  border-left: 2px solid var(--primary);
  padding-left: 1.5rem;
  margin: 2.5rem 0;
}

.single-body blockquote p {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--foreground);
  line-height: 1.625;
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .single-body blockquote p {
    font-size: 1.5rem;
  }
}

.single-body blockquote cite {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: 0.75rem;
  display: block;
  font-style: normal;
}

.single-body ul,
.single-body ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
  color: var(--muted-foreground);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
}

.single-body ul {
  list-style-type: disc;
}

.single-body ol {
  list-style-type: decimal;
}

.single-body li {
  margin-bottom: 0.5rem;
}

.single-body a {
  color: var(--primary);
  text-decoration: underline;
  transition: color 0.2s ease;
}

.single-body a:hover {
  color: hsla(358, 55%, 39%, 0.7);
}

.single-body img,
.single-body .wp-block-image img {
  border-radius: var(--radius);
  margin: 2rem 0;
}

.single-body figure {
  margin: 2rem 0;
}

.single-body figcaption {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  text-align: center;
  margin-top: 0.5rem;
}

/* Tags */
.single-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.single-tags a {
  padding: 0.375rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-foreground);
  background-color: var(--secondary);
  border-radius: var(--radius);
  transition: color 0.2s ease;
  text-decoration: none;
}

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

/* Related Posts */
.related-posts {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}

@media (min-width: 768px) {
  .related-posts {
    padding: 7rem 0;
  }
}

.related-posts__header {
  margin-bottom: 3rem;
}

.related-posts__divider {
  margin-top: 1.5rem;
  border-bottom: 1px solid var(--border);
}

/* ==========================================================================
   Category / Archive Pages
   ========================================================================== */

.category-hero {
  position: relative;
  overflow: hidden;
}

.category-hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    hsl(0 0% 8% / 0.82) 0%,
    hsl(0 0% 8% / 0.5) 50%,
    hsl(0 0% 8% / 0.3) 100%
  );
}

.category-hero__content {
  position: relative;
  padding: 5rem 0;
  max-width: 42rem;
}

@media (min-width: 768px) {
  .category-hero__content {
    padding: 7rem 0;
  }
}

@media (min-width: 1024px) {
  .category-hero__content {
    padding: 8rem 0;
  }
}

.category-hero__label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: hsla(50, 14%, 97%, 0.6);
  margin-bottom: 1rem;
}

.category-hero__title {
  color: var(--primary-foreground);
  margin-bottom: 1.25rem;
}

.category-hero__desc {
  font-family: var(--font-body);
  font-size: 1rem;
  color: hsla(50, 14%, 97%, 0.7);
  line-height: 1.625;
  max-width: 36rem;
}

@media (min-width: 768px) {
  .category-hero__desc {
    font-size: 1.125rem;
  }
}

/* Filter bar */
.filter-bar {
  position: sticky;
  top: 4rem;
  z-index: 40;
  background: hsla(50, 14%, 97%, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

@media (min-width: 768px) {
  .filter-bar {
    top: 4.5rem;
  }
}

.filter-bar__inner {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  overflow-x: auto;
  padding: 0.75rem 0;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.filter-bar__inner::-webkit-scrollbar {
  display: none;
}

.filter-bar__btn {
  flex-shrink: 0;
  padding: 0.375rem 1rem;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  color: var(--muted-foreground);
  background: transparent;
  border: none;
  cursor: pointer;
}

.filter-bar__btn:hover {
  color: var(--foreground);
  background-color: var(--secondary);
}

.filter-bar__btn.is-active {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

/* Archive Grid Section */
.archive-grid {
  padding: 3.5rem 0;
}

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

.archive-empty {
  text-align: center;
  padding: 5rem 0;
}

/* ==========================================================================
   Search Results Page
   ========================================================================== */

.search-results-header {
  padding: 4rem 0 2rem;
}

.search-results-header h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  color: var(--foreground);
}

@media (min-width: 768px) {
  .search-results-header h1 {
    font-size: 2.5rem;
  }
}

/* ==========================================================================
   404 Page
   ========================================================================== */

.page-404 {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 4rem 1.5rem;
}

.page-404__title {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 1rem;
}

.page-404__text {
  font-family: var(--font-body);
  font-size: 1.25rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.page-404__link {
  color: var(--primary);
  text-decoration: underline;
  font-family: var(--font-body);
  transition: color 0.2s ease;
}

.page-404__link:hover {
  color: hsla(358, 55%, 39%, 0.9);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 3rem 0;
  font-family: var(--font-body);
  font-size: 0.875rem;
}

.pagination a,
.pagination span {
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  color: var(--muted-foreground);
  text-decoration: none;
}

.pagination a:hover {
  background-color: var(--secondary);
  color: var(--foreground);
}

.pagination .current {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

/* ==========================================================================
   Animations — Scroll-triggered fade-up
   ========================================================================== */

.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Safety net: if JS hasn't run after 2s, show all fade-up elements */
@keyframes crushbrew-fallback-reveal {
  to { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: crushbrew-fallback-reveal 0s 2s forwards;
}

/* ==========================================================================
   WordPress Alignment Classes
   ========================================================================== */

.alignnone,
.aligncenter,
.alignleft,
.alignright {
  max-width: 100%;
  height: auto;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.alignleft {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}

.alignright {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  text-align: center;
  margin-top: 0.5rem;
}

/* Screen reader text (accessibility) */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: #f1f1f1;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  color: #21759b;
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* ==========================================================================
   Searchform
   ========================================================================== */

.searchform-inline {
  position: relative;
}

.searchform-inline label {
  display: block;
  width: 100%;
}

.searchform-inline .search-field {
  width: 100%;
  background-color: var(--secondary);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-family: var(--font-body);
  border: none;
  outline: none;
  color: var(--foreground);
}

.searchform-inline .search-field::placeholder {
  color: var(--muted-foreground);
}

.searchform-inline .search-field:focus {
  box-shadow: 0 0 0 2px hsla(358, 55%, 39%, 0.2);
}

.searchform-inline .search-submit {
  position: absolute;
  right: 0;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}

/* ==========================================================================
   Generic Page Template
   ========================================================================== */

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

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

.page-content__title {
  margin-bottom: 2rem;
}
