/* ==========================================================
   GOLDEN CHRONICLE THEME
   Visual DNA: Warm amber + cream palette, zero border-radius,
   dotted border accents, uppercase section labels, image hover
   zoom, dark overlays, geometric sans headings, generous spacing
   ========================================================== */

:root {
  --color-primary: #E8A948;
  --color-primary-dark: #C6882E;
  --color-primary-light: #F5D38E;
  --color-secondary: #F0DBBF;
  --color-secondary-light: #F8F0E3;
  --color-dark: #1E1E1E;
  --color-dark-soft: #2C2C2C;
  --color-body: #6B6B6B;
  --color-heading: #1E1E1E;
  --color-light: #F4F4F4;
  --color-white: #FFFFFF;
  --color-border: #E0D5C4;
  --color-overlay-gold: rgba(232, 169, 72, 0.35);

  --font-heading: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --container-width: 1200px;
  --section-padding: 5rem 0;
  --section-padding-mobile: 3rem 0;
  --transition: 0.4s ease;
}

/* 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.7;
  color: var(--color-body);
  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: var(--transition); }
a:hover { color: var(--color-primary-dark); }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  font-weight: 600;
  line-height: 1.25;
}
h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.15rem; }
p { margin-bottom: 1rem; }

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

/* ===== SECTION LABEL (uppercase primary small text) ===== */
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

/* ===== BUTTONS (filled, sharp corners, hover swaps to secondary) ===== */
.btn {
  display: inline-block;
  padding: 0.7rem 1.8rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}
.btn-primary:hover {
  background: var(--color-secondary);
  color: var(--color-primary-dark);
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

/* ===== HEADER & NAVIGATION ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  transition: var(--transition);
}
.header-top {
  background: var(--color-primary);
  padding: 0.35rem 0;
  font-size: 0.8rem;
}
.header-top a {
  color: var(--color-white);
}
.header-top a:hover {
  color: var(--color-secondary);
}
.header-top .container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.header-main {
  padding: 0.8rem 0;
}
.header-main .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-logo {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-primary);
}
.site-logo:hover { color: var(--color-primary-dark); }
.site-logo img {
  max-height: 42px;
  width: auto;
}

.main-nav { display: flex; align-items: center; gap: 0; }
.main-nav a {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-heading);
  position: relative;
}
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transition: var(--transition);
}
.main-nav a:hover::after { transform: scaleX(1); }
.main-nav a:hover { color: var(--color-primary); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  z-index: 1001;
}
.hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--color-heading);
  transition: var(--transition);
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--color-white);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 0.25rem;
    transition: var(--transition);
    box-shadow: -4px 0 20px rgba(0,0,0,0.08);
  }
  .main-nav.open { right: 0; }
  .main-nav a { padding: 0.75rem 0; font-size: 1rem; }
  .main-nav a::after { display: none; }
  .header-top { display: none; }
}

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  min-height: 75vh;
  display: flex;
  align-items: flex-end;
  padding: 0;
  margin-top: 90px;
  background: var(--color-dark);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-soft) 100%);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(30,30,30,0.95) 0%, rgba(30,30,30,0.3) 60%, rgba(30,30,30,0.5) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 4rem 0;
  max-width: 720px;
}
.hero .section-label {
  color: var(--color-primary-light);
}
.hero h1 {
  color: var(--color-white);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin-bottom: 1.25rem;
  font-weight: 700;
}
.hero-subtitle {
  color: rgba(255,255,255,0.75);
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}
.hero-subtitle p { color: rgba(255,255,255,0.75); }
.hero-accent {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 40%;
  height: 100%;
  background: var(--color-overlay-gold);
  clip-path: polygon(40% 0, 100% 0, 100% 100%, 0% 100%);
  z-index: 0;
}

@media (max-width: 768px) {
  .hero { min-height: 60vh; margin-top: 60px; }
  .hero-content { padding: 3rem 0; }
  .hero-accent { display: none; }
}

/* ===== TOPICS SECTION ===== */
.topics-section {
  padding: var(--section-padding);
  background: var(--color-white);
}
.topics-header {
  margin-bottom: 3rem;
}
.topics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}
.topic-card {
  padding: 2rem 2.25rem;
  border: 1px dotted var(--color-border);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.topic-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: var(--color-primary);
  transition: var(--transition);
}
.topic-card:hover::before { height: 100%; }
.topic-card:hover {
  background: var(--color-secondary-light);
}
.topic-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.topic-card p, .topic-card div {
  font-size: 0.9rem;
  color: var(--color-body);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .topics-grid { grid-template-columns: 1fr; }
  .topics-section { padding: var(--section-padding-mobile); }
}

/* ===== LATEST POSTS SECTION ===== */
.posts-section {
  padding: var(--section-padding);
  background: var(--color-light);
}
.posts-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

/* Post Card (image overlay with hover reveal, sharp corners, dotted bottom border) */
.post-card {
  background: var(--color-white);
  overflow: hidden;
  transition: var(--transition);
  border-bottom: 3px dotted var(--color-border);
}
.post-card:hover {
  border-bottom-color: var(--color-primary);
}
.post-card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
}
.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.post-card:hover .post-card-image img {
  transform: scale(1.12);
}
.post-card-image-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.15);
  transition: var(--transition);
}
.post-card:hover .post-card-image-overlay {
  background: rgba(0,0,0,0.45);
}
.post-card-body {
  padding: 1.5rem 1.5rem 1.75rem;
}
.post-card-date {
  font-size: 0.78rem;
  color: var(--color-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}
.post-card-body h3 {
  margin-bottom: 0.75rem;
}
.post-card-body h3 a {
  color: var(--color-heading);
}
.post-card-body h3 a:hover {
  color: var(--color-primary);
}
.post-card-excerpt {
  font-size: 0.9rem;
  color: var(--color-body);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .posts-section { padding: var(--section-padding-mobile); }
  .posts-grid { grid-template-columns: 1fr; }
}

/* ===== FAQ SECTION ===== */
.faq-section {
  padding: var(--section-padding);
  background: var(--color-white);
}
.faq-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: start;
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.faq-item {
  border-bottom: 1px dotted var(--color-border);
  overflow: hidden;
}
.faq-item:first-child {
  border-top: 1px dotted var(--color-border);
}
.faq-question {
  padding: 1.25rem 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-heading);
  transition: var(--transition);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}
.faq-question:hover { color: var(--color-primary); }
.faq-question-icon {
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--color-primary);
  transition: var(--transition);
  flex-shrink: 0;
  margin-left: 1rem;
}
.faq-item.active .faq-question-icon {
  transform: rotate(45deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}
.faq-item.active .faq-answer {
  max-height: 500px;
  padding-bottom: 1.25rem;
}
.faq-answer-content {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--color-body);
}
.faq-answer-content p { margin-bottom: 0.5rem; }

@media (max-width: 768px) {
  .faq-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .faq-section { padding: var(--section-padding-mobile); }
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--color-dark);
  color: rgba(255,255,255,0.6);
  border-top: 3px dotted var(--color-primary);
}
.footer-main {
  padding: 4rem 0 3rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}
.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1rem;
  display: block;
}
.footer-desc {
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}
.footer-heading {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-primary);
  margin-bottom: 1.25rem;
}
.footer-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-nav a {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  transition: var(--transition);
}
.footer-nav a:hover {
  color: var(--color-primary);
  padding-left: 4px;
}
.footer-contact a {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}
.footer-contact a:hover {
  color: var(--color-primary);
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.8rem;
}

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

/* ===== PAGE TEMPLATE ===== */
.page-header {
  margin-top: 90px;
  padding: 4rem 0 3rem;
  background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-soft) 100%);
  position: relative;
}
.page-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--color-primary);
}
.page-header h1 {
  color: var(--color-white);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}
.page-content {
  padding: var(--section-padding);
}
.page-content .content-body {
  max-width: 780px;
  font-size: 1rem;
  line-height: 1.85;
}
.page-content .content-body h2, .page-content .content-body h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}
.page-content .content-body p { margin-bottom: 1.25rem; }
.page-content .content-body img { margin: 1.5rem 0; }
.page-content .content-body ul, .page-content .content-body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}
.page-content .content-body a { text-decoration: underline; }

/* ===== BLOG INDEX ===== */
.blog-header {
  margin-top: 90px;
  padding: 4rem 0 3rem;
  background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-soft) 100%);
  position: relative;
}
.blog-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--color-primary);
}
.blog-header h1 { color: var(--color-white); }

.blog-listing {
  padding: var(--section-padding);
  background: var(--color-light);
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-listing { padding: var(--section-padding-mobile); }
  .page-header, .blog-header { margin-top: 60px; padding: 3rem 0 2rem; }
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-heading);
  background: var(--color-white);
  border: 1px dotted var(--color-border);
  transition: var(--transition);
}
.pagination a:hover, .pagination a.active {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

/* ===== SINGLE POST ===== */
.post-header {
  margin-top: 90px;
  padding: 4rem 0 3rem;
  background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-soft) 100%);
  position: relative;
}
.post-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--color-primary);
}
.post-header h1 { color: var(--color-white); max-width: 780px; }
.post-meta {
  color: var(--color-primary-light);
  font-size: 0.85rem;
  margin-top: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.post-single {
  padding: var(--section-padding);
}
.post-cover {
  max-width: 900px;
  margin-bottom: 2.5rem;
  overflow: hidden;
}
.post-cover img {
  width: 100%;
  height: auto;
}
.post-excerpt {
  max-width: 780px;
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--color-heading);
  border-left: 4px solid var(--color-primary);
  padding-left: 1.5rem;
  margin-bottom: 2.5rem;
  font-style: italic;
}
.post-body {
  max-width: 780px;
  font-size: 1rem;
  line-height: 1.85;
}
.post-body h2, .post-body h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}
.post-body p { margin-bottom: 1.25rem; }
.post-body img { margin: 1.5rem 0; }
.post-body ul, .post-body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}
.post-body a { text-decoration: underline; }

@media (max-width: 768px) {
  .post-header { margin-top: 60px; padding: 3rem 0 2rem; }
  .post-single { padding: var(--section-padding-mobile); }
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 44px;
  height: 44px;
  background: var(--color-primary);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 99;
  border: none;
  cursor: pointer;
}
.back-to-top:hover {
  background: var(--color-secondary);
  color: var(--color-primary-dark);
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 0.5rem 1rem;
  z-index: 9999;
  font-weight: 600;
}
.skip-link:focus { top: 0.5rem; }

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

/* ===== UTILITY ===== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
