/*
Theme Name: Stack Theme
Theme URI: https://example.com/stack-theme
Author: Stack Theme
Author URI: https://example.com
Description: Premium cigar and spirits blog theme inspired by a dark luxury editorial style.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: stack-theme
*/

:root {
  --bg-main: #0f0f0f;
  --bg-surface: #1a1a1a;
  --bg-surface-2: #242424;
  --bg-muted: #2a2a2a;
  --text-primary: #f3f3f3;
  --text-secondary: #b8b8b8;
  --text-dim: #8c8c8c;
  --accent: #c9a66b;
  --border: #333333;
  --shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background:
    radial-gradient(circle at 10% 10%, rgba(201, 166, 107, 0.1), transparent 40%),
    radial-gradient(circle at 90% 20%, rgba(201, 166, 107, 0.08), transparent 35%),
    var(--bg-main);
  color: var(--text-primary);
  font-family: "Lora", serif;
  line-height: 1.65;
}

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

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

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

.site-wrap {
  max-width: 1440px;
  margin: 0 auto;
}

.container {
  width: min(1344px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(8px);
  background: rgba(26, 26, 26, 0.93);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-branding {
  display: flex;
  align-items: center;
}

.site-title {
  margin: 0;
  font: 700 1.75rem/1 "Playfair Display", serif;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.site-nav .menu {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-nav a {
  color: var(--text-primary);
  font-size: 0.94rem;
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.circle-action {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-muted);
  color: var(--accent);
  font-size: 1.2rem;
}

.hero {
  min-height: 560px;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 24px;
  align-items: stretch;
  padding: 28px 0;
}

.hero-image,
.hero-content {
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-image {
  min-height: 420px;
  background: linear-gradient(140deg, #1e1e1e, #3a3022);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
}

.hero-content {
  background: linear-gradient(160deg, rgba(26, 26, 26, 0.96), rgba(26, 26, 26, 0.88));
  border: 1px solid var(--border);
  padding: clamp(28px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  background: var(--accent);
  color: #111;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 12px;
}

.hero-title {
  margin: 0;
  font: 700 clamp(1.8rem, 4vw, 2.6rem) / 1.2 "Playfair Display", serif;
}

.hero-excerpt {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1.06rem;
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  background: var(--accent);
  color: #111;
  font-weight: 700;
  border: 0;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(201, 166, 107, 0.25);
  color: #111;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 24px;
  padding-bottom: 40px;
}

.section {
  margin-bottom: 40px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.section-title {
  margin: 0;
  font: 700 1.5rem/1.2 "Playfair Display", serif;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: "";
  width: 4px;
  height: 26px;
  background: var(--accent);
  border-radius: 2px;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
}

.post-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: translateY(12px);
  opacity: 0;
  animation: rise 0.5s ease forwards;
}

.card:nth-child(2) {
  animation-delay: 0.1s;
}

.card:nth-child(3) {
  animation-delay: 0.16s;
}

.card:nth-child(4) {
  animation-delay: 0.22s;
}

@keyframes rise {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.card-thumb {
  aspect-ratio: 16 / 9;
  background: var(--bg-muted);
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 15px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.card-cat {
  color: var(--accent);
  font-weight: 700;
}

.card-title {
  margin: 0 0 6px;
  font: 700 1.1rem/1.35 "Playfair Display", serif;
}

.card-excerpt {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.recipe-strip {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.recipe-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.recipe-card {
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.recipe-card .card-body {
  display: grid;
  gap: 10px;
}

.recipe-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.recipe-tags span {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.74rem;
}

.sidebar-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow: hidden;
}

.widget-title {
  margin: 0;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 700;
  background: var(--bg-muted);
  border-bottom: 1px solid var(--border);
}

.widget-body {
  padding: 16px;
}

.cat-list,
.popular-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cat-list li a {
  min-height: 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #252525;
}

.cat-list li:last-child a {
  border-bottom: 0;
}

.cat-count {
  background: var(--accent);
  color: #111;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.popular-list li + li {
  margin-top: 12px;
}

.popular-item-title {
  margin: 0 0 4px;
  font-size: 0.95rem;
}

.newsletter-form {
  display: grid;
  gap: 10px;
}

.newsletter-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  background: var(--bg-muted);
  color: var(--text-primary);
  padding: 0 12px;
}

.newsletter-form button {
  min-height: 46px;
  border: 0;
  background: var(--accent);
  color: #111;
  font-weight: 700;
  cursor: pointer;
}

.site-footer {
  margin-top: 20px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}

.footer-top {
  padding: 46px 0 24px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 26px;
}

.footer-title {
  margin: 0 0 14px;
  font: 700 1rem/1.3 "Playfair Display", serif;
}

.footer-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--text-secondary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.post-list .entry {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
}

.entry-title {
  margin: 0 0 8px;
  font: 700 1.9rem/1.2 "Playfair Display", serif;
}

.entry-meta {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  font-family: "Playfair Display", serif;
}

.pagination,
.nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.page-numbers {
  min-width: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.current.page-numbers {
  background: var(--accent);
  color: #111;
}

.menu-toggle {
  display: none;
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100%, calc(100% - 28px));
  }

  .site-header-inner {
    min-height: 64px;
  }

  .menu-toggle {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: var(--bg-muted);
    color: var(--accent);
    cursor: pointer;
  }

  .site-nav {
    display: none;
    position: absolute;
    inset: 64px 14px auto;
    background: #151515;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
  }

  .site-nav.open {
    display: block;
  }

  .site-nav .menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .post-cards {
    grid-template-columns: 1fr;
  }

  .recipe-cards {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .entry-title {
    font-size: 1.6rem;
  }
}
