/* page: post */

/* page: post — page-specific styles only */

/* page: post — extracted from post.html; keep page-specific rules only */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink: #1A0F0D;
  --brown: #2C1810;
  --teal: #006B62;
  --teal-light: #00A896;
  --copper: #B07040;
  --amber: #D4925A;
  --ivory: #FAF7F1;
  --cream: #F3EAD6;
  --slate: #8A7E76;
  --white: #FFFFFF;
  --ease-expo: ease;
}

html { scroll-behavior: auto; }

body {
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: var(--brown);
  background: var(--ivory);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ════ HEADER ════ */
.post-header {
  margin-top: 140px;
  padding: clamp(60px, 12vw, 100px) clamp(20px, 5vw, 80px);
  background: linear-gradient(135deg, var(--brown) 0%, rgba(44,24,16,0.95) 100%);
  background-blend-mode: overlay;
  text-align: center;
  position: relative;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.post-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(195,127,88,0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(0,168,150,0.05) 0%, transparent 50%);
  pointer-events: none;
}

.post-header > * {
  position: relative;
  z-index: 1;
}

.post-category {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--teal-light);
  margin-bottom: 16px;
  font-family: 'Inter', sans-serif;
}

.post-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: white;
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.post-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  font-family: 'Inter', sans-serif;
  flex-wrap: wrap;
}

.post-meta-item { display: flex; align-items: center; gap: 8px; }

.post-meta-item div { color: rgba(255,255,255,0.9); }

.post-meta-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--teal-light);
  color: var(--brown);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  box-shadow: 0 4px 12px rgba(0,168,150,0.3);
}

/* ════ CONTENT ════ */
.post-content {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 80px) clamp(60px, 10vw, 120px);
  font-size: 18px;
  line-height: 1.8;
  color: var(--brown);
}

.post-content p {
  margin-bottom: 24px;
}

.post-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  margin: 48px 0 24px;
  color: var(--brown);
  line-height: 1.2;
}

.post-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 36px 0 18px;
  color: var(--brown);
}

.post-content img,
.post-content iframe,
.post-content video {
  max-width: 100%;
  height: auto;
  margin: 36px 0;
  border-radius: 8px;
  display: block;
}

.post-video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  margin: 2em 0;
  border-radius: 8px;
  overflow: hidden;
}

.post-content .video-container {
  margin: 48px 0;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}

.post-content .video-container iframe,
.post-content .video-container video {
  display: block;
  margin: 0;
  border-radius: 0;
}

.post-content .video-caption {
  padding: 16px 20px;
  background: rgba(61, 35, 33, 0.95);
  color: #FDFCFB;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  font-style: italic;
  border-top: 1px solid rgba(253, 252, 251, 0.2);
}

.post-content a {
  color: var(--teal);
  text-decoration: underline;
  transition: color 0.3s;
}

.post-content a:hover {
  color: var(--teal-light);
}

.post-content ul, .post-content ol {
  margin-left: 24px;
  margin-bottom: 24px;
}

.post-content li {
  margin-bottom: 12px;
}

.post-content figure.blog-inline-image-block {
  margin: 40px 0;
}

.post-content figure.blog-inline-image-block img {
  margin: 0;
  cursor: zoom-in;
}

.post-content figure.blog-inline-image-block figcaption {
  margin-top: 12px;
  font-size: 14px;
  color: var(--slate);
  text-align: center;
  font-style: italic;
}

.post-content hr.blog-inline-divider {
  border: none;
  border-top: 1px solid rgba(61,35,33,0.16);
  width: 36%;
  margin: 44px auto;
}

/* ════ BACK LINK ════ */
.post-back {
  max-width: 940px;
  margin: 60px auto 0;
  padding: 0 clamp(20px, 5vw, 80px) 40px;
  text-align: center;
}

.post-back a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--teal);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  transition: background .25s ease, color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.post-back a:hover {
  color: var(--teal-light);
  transform: translateX(-4px);
}

/* ════ SIDEBAR ════ */
.post-wrapper {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 70px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 80px);
}

.post-main { flex: 1; }

.post-sidebar {
  position: sticky;
  top: 160px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  padding-right: 20px;
}

.sidebar-section {
  margin-bottom: 40px;
}

.sidebar-title {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--brown);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--teal);
}

.sidebar-posts { display: flex; flex-direction: column; gap: 16px; }

.sidebar-post {
  display: flex;
  gap: 12px;
  text-decoration: none;
  border-radius: 6px;
  overflow: hidden;
  transition: background .25s ease, color .25s ease, box-shadow .25s ease, transform .25s ease;
  border: 1px solid rgba(44,24,16,0.1);
}

.sidebar-post:hover {
  border-color: var(--teal);
  box-shadow: 0 4px 12px rgba(0,168,150,0.15);
  transform: translateX(4px);
}

.sidebar-post-thumb {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  background: var(--cream);
  background-size: cover;
  background-position: center;
  border-radius: 4px;
}

.sidebar-post-body {
  flex: 1;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sidebar-post-title {
  font-family: 'Playfair Display', serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--brown);
  line-height: 1.3;
  margin-bottom: 4px;
}

.sidebar-post-meta {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: var(--slate);
}

@media (max-width: 1024px) {
  .post-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .post-sidebar {
    position: static;
    max-height: none;
    padding-right: 0;
    padding-top: 40px;
    border-top: 2px solid rgba(44,24,16,0.1);
  }

  .sidebar-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
  }

  .sidebar-post {
    flex-direction: column;
  }

  .sidebar-post-thumb {
    width: 100%;
    height: 100px;
  }
}

/* ════ FOOTER ════ */
footer {
  background: var(--brown);
  color: white;
  padding: 80px clamp(20px, 5vw, 80px) 40px;
  margin-top: 80px;
}

.f-wrap { max-width: 1240px; margin: 0 auto; }

.f-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }

.f-brand img { height: 48px; margin-bottom: 16px; }

.f-brand p { font-size: 14px; color: rgba(255,255,255,0.7); line-height: 1.6; margin-bottom: 16px; }

.f-col h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 20px; color: rgba(255,255,255,0.5); }

.f-col ul { list-style: none; }

.f-col li { margin-bottom: 12px; }

.f-col a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 14px; transition: color 0.3s; }

.f-col a:hover { color: white; }

.f-bot { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; font-size: 12px; color: rgba(255,255,255,0.5); }

.f-bot a { color: inherit; text-decoration: none; transition: color 0.3s; }

.f-bot a:hover { color: white; }

.f-socials { display: flex; gap: 16px; }

.f-socials a { color: rgba(255,255,255,0.5); font-size: 16px; transition: color 0.3s; }

.f-socials a:hover { color: white; }

/* ════ PHOTO GALLERY ════ */
.post-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 40px 0;
}

.post-gallery figure {
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--cream);
}

.post-gallery img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  margin: 0;
  border-radius: 0;
  transition: transform 0.4s var(--ease-expo);
  cursor: zoom-in;
}

.post-gallery figure:hover img { transform: scale(1.04); }

.post-gallery figcaption {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--slate);
  padding: 8px 12px 10px;
  line-height: 1.4;
}

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

.post-gallery.single img { height: 420px; }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: fixed;
  top: 20px; right: 24px;
  font-size: 32px;
  color: white;
  cursor: pointer;
  line-height: 1;
  background: none;
  border: none;
  z-index: 9001;
  opacity: 0.8;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-caption {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  text-align: center;
  max-width: 600px;
  z-index: 9001;
}

/* ════ ERROR STATE ════ */
.post-error {
  max-width: 600px;
  margin: 140px auto 0;
  padding: 60px clamp(20px, 5vw, 80px);
  text-align: center;
}

.post-error h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin-bottom: 16px;
}

.post-error p {
  font-family: 'Inter', sans-serif;
  color: var(--slate);
  margin-bottom: 32px;
  font-size: 16px;
}

@media (max-width: 768px) {
  .post-meta { flex-direction: column; gap: 12px; }

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

  .f-bot { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
