/* ==========================================================================
   GoldenPress Theme — Visual DNA transferred from Salone template
   Color palette: warm gold (#BF9456) on off-white (#F8F7F4) with dark (#252525)
   Typography: serif headings + sans body (system fonts, no CDN)
   Layout philosophy: split/asymmetric sections, border-divided grids, sharp corners
   ========================================================================== */

/* --- CSS Variables --- */
:root {
  --color-primary: #BF9456;
  --color-primary-hover: #a87e3f;
  --color-primary-light: #d4b47e;
  --color-dark: #252525;
  --color-dark-soft: #444444;
  --color-light: #F8F7F4;
  --color-light-alt: #f0ede7;
  --color-white: #ffffff;
  --color-border: #e0ddd6;
  --color-text: #444444;
  --color-text-muted: #7a7670;

  --font-heading: Georgia, "Times New Roman", "Noto Serif", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-accent: Georgia, "Times New Roman", serif;

  --container-max: 1200px;
  --gap: 1.5rem;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.3s;
}
a:hover { color: var(--color-primary-hover); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-dark);
}

/* --- Utility --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* --- Decorative label (cursive-style above headings) --- */
.section-label {
  font-family: var(--font-accent);
  font-style: italic;
  color: var(--color-primary);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.25rem;
  display: block;
}

.section-heading {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin-bottom: 1.5rem;
  text-transform: none;
  letter-spacing: -0.01em;
}

/* --- Double-border button (transferred from Salone's ::before/::after pattern) --- */
.btn-accent {
  display: inline-block;
  position: relative;
  padding: 0.75rem 2rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-dark);
  background: var(--color-primary);
  border: none;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
  margin: 10px;
}

.btn-accent::before,
.btn-accent::after {
  position: absolute;
  content: "";
}

.btn-accent::before {
  top: -8px; left: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 16px);
  border-left: 2px solid var(--color-primary);
  border-right: 2px solid var(--color-primary);
}

.btn-accent::after {
  top: -4px; left: -8px;
  width: calc(100% + 16px);
  height: calc(100% + 8px);
  border-top: 2px solid var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
}

.btn-accent:hover {
  background: var(--color-dark);
  color: var(--color-primary);
}

/* Ghost variant */
.btn-ghost {
  display: inline-block;
  position: relative;
  padding: 0.6rem 1.6rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-primary);
  background: transparent;
  border: 2px solid var(--color-primary);
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.btn-ghost:hover {
  background: var(--color-primary);
  color: var(--color-dark);
}

/* ========================================================================
   HEADER / NAVIGATION
   ======================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-light);
  border-bottom: 1px solid var(--color-border);
  transition: top 0.4s;
}

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

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-primary);
  padding: 0.9rem 1.6rem;
  margin: 0 1.25rem 0 0;
  color: var(--color-dark);
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: background 0.3s;
  flex-shrink: 0;
}

.brand-link:hover {
  background: var(--color-primary-hover);
  color: var(--color-dark);
}

.brand-link img {
  height: 28px;
  width: auto;
}

.main-nav { display: flex; align-items: center; gap: 0; }

.main-nav a {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-dark);
  padding: 0.5rem 0.9rem;
  transition: color 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--color-primary);
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-right: 0.5rem;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--color-dark);
  margin: 6px 0;
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 768px) {
  .hamburger { display: block; }

  .main-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--color-light);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 1.25rem;
    gap: 0;
  }

  .main-nav.is-open { display: flex; }

  .main-nav a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
    width: 100%;
  }

  .main-nav a:last-child { border-bottom: none; }

  .header-inner { flex-wrap: wrap; }
}

/* ========================================================================
   HERO SECTION — split layout (text left / accent right)
   ======================================================================== */
.hero {
  background: var(--color-light);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 520px;
  align-items: center;
}

.hero-text {
  padding: 4rem 3rem 4rem 0;
}

.hero-text .section-label {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.hero-text h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.hero-text .hero-subtitle {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.hero-text .hero-subtitle p { margin-bottom: 0.5rem; }

.hero-accent {
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  position: relative;
}

.hero-accent-inner {
  padding: 3rem;
  text-align: center;
  color: var(--color-dark);
}

.hero-accent-inner svg {
  width: 80px;
  height: 80px;
  opacity: 0.3;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-text { padding: 3rem 0; }
  .hero-accent { min-height: 200px; }
}

/* ========================================================================
   LATEST POSTS — editorial layout
   ======================================================================== */
.latest-posts {
  padding: 5rem 0;
}

.posts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.post-card {
  border-bottom: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  padding: 2rem;
  transition: background 0.3s;
}

.post-card:hover { background: var(--color-light); }

/* Remove right border on even items */
.post-card:nth-child(2n) { border-right: none; }

/* Feature first post larger */
.post-card--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  border-right: none;
  padding: 2.5rem 2rem;
}

.post-card__image {
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--color-light-alt);
}

.post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.post-card:hover .post-card__image img {
  transform: scale(1.05);
}

.post-card__date {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.post-card__title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.post-card__title a {
  color: var(--color-dark);
  transition: color 0.3s;
}

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

.post-card__excerpt {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.post-card__excerpt p { margin-bottom: 0; }

.post-card--featured .post-card__title {
  font-size: 1.6rem;
}

@media (max-width: 768px) {
  .posts-grid { grid-template-columns: 1fr; }
  .post-card { border-right: none; }
  .post-card--featured { grid-template-columns: 1fr; }
}

/* ========================================================================
   TOPICS — border-divided grid (Salone service grid DNA)
   ======================================================================== */
.topics-section {
  background: var(--color-light);
  padding: 5rem 0;
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  text-align: center;
}

.topic-item {
  padding: 2.5rem 2rem;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  transition: background 0.3s;
}

.topic-item:hover { background: var(--color-white); }

.topic-item:nth-child(3n) { border-right: none; }

/* If only 3 items or last row */
.topic-item:nth-last-child(-n+3) { border-bottom: none; }

.topic-item h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.topic-item .topic-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.topic-item .topic-desc p { margin-bottom: 0; }

@media (max-width: 768px) {
  .topics-grid { grid-template-columns: 1fr; }
  .topic-item { border-right: none; }
  .topic-item:last-child { border-bottom: none; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .topics-grid { grid-template-columns: repeat(2, 1fr); }
  .topic-item:nth-child(3n) { border-right: 1px solid var(--color-border); }
  .topic-item:nth-child(2n) { border-right: none; }
}

/* ========================================================================
   FAQ — editorial style with borders
   ======================================================================== */
.faq-section {
  padding: 5rem 0;
}

.faq-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: start;
}

.faq-sidebar {
  position: sticky;
  top: 100px;
}

.faq-list { list-style: none; }

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1.25rem 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-dark);
  gap: 1rem;
  transition: color 0.3s;
}

.faq-question:hover { color: var(--color-primary); }

.faq-question .faq-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--color-primary);
  transition: transform 0.3s;
}

.faq-item.is-open .faq-icon { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s;
}

.faq-answer-inner {
  padding: 0 0 1.25rem 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-text-muted);
}

.faq-item.is-open .faq-answer {
  max-height: 600px;
}

@media (max-width: 768px) {
  .faq-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .faq-sidebar { position: static; }
}

/* ========================================================================
   BLOG INDEX
   ======================================================================== */
.page-header-bar {
  background: var(--color-light);
  padding: 3rem 0;
  border-bottom: 1px solid var(--color-border);
}

.page-header-bar h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

.blog-grid .post-card { padding: 2rem; }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  padding: 3rem 0;
  border-top: 1px solid var(--color-border);
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 0.75rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-dark);
  border: 1px solid var(--color-border);
  transition: all 0.3s;
}

.pagination a:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-dark);
}

.pagination .active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-dark);
}

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

/* ========================================================================
   SINGLE POST
   ======================================================================== */
.post-single {
  padding: 3rem 0 5rem;
}

.post-single-layout {
  max-width: 780px;
  margin: 0 auto;
}

.post-single__meta {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 1rem;
}

.post-single__title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 1.5rem;
  line-height: 1.15;
}

.post-single__excerpt {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--color-text-muted);
  border-left: 3px solid var(--color-primary);
  padding-left: 1.25rem;
  margin-bottom: 2.5rem;
}

.post-single__cover {
  margin-bottom: 2.5rem;
}

.post-single__cover img {
  width: 100%;
}

/* Content HTML styling */
.content-body h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
}

.content-body h3 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
}

.content-body p {
  margin-bottom: 1rem;
  line-height: 1.75;
}

.content-body ul, .content-body ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.content-body li { margin-bottom: 0.35rem; }

.content-body blockquote {
  border-left: 3px solid var(--color-primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--color-text-muted);
  background: var(--color-light);
}

.content-body img {
  margin: 1.5rem 0;
}

.content-body a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ========================================================================
   STATIC PAGE
   ======================================================================== */
.page-single {
  padding: 3rem 0 5rem;
}

.page-single-layout {
  max-width: 780px;
  margin: 0 auto;
}

.page-single__title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 2rem;
  line-height: 1.15;
}

/* ========================================================================
   FOOTER — dark background (Salone DNA)
   ======================================================================== */
.site-footer {
  background: var(--color-dark);
  color: rgba(255,255,255,0.5);
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1rem;
  display: block;
}

.site-footer p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.site-footer a {
  color: rgba(255,255,255,0.5);
  transition: color 0.3s, letter-spacing 0.3s;
}

.site-footer a:hover {
  color: var(--color-primary);
  letter-spacing: 0.5px;
}

.footer-heading {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-nav-list {
  list-style: none;
}

.footer-nav-list li { margin-bottom: 0.5rem; }

.footer-nav-list a {
  font-size: 0.9rem;
  display: inline-block;
}

.footer-nav-list a::before {
  content: "\203A";
  margin-right: 0.5rem;
  color: rgba(255,255,255,0.3);
}

.footer-contact a {
  font-size: 0.9rem;
}

.footer-bottom {
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ========================================================================
   BACK TO TOP
   ======================================================================== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--color-primary);
  color: var(--color-dark);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  border: none;
  z-index: 900;
  transition: background 0.3s;
}

.back-to-top:hover { background: var(--color-primary-hover); }

.back-to-top.visible { display: flex; }

/* ========================================================================
   ANIMATIONS — fade in on scroll
   ======================================================================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ========================================================================
   FOCUS / ACCESSIBILITY
   ======================================================================== */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ========================================================================
   PRINT
   ======================================================================== */
@media print {
  .site-header, .site-footer, .back-to-top { display: none; }
  body { color: #000; background: #fff; }
}
