/* ============================================================
   blog.css
   Styles for: single.php (blog post) + archive.php (blog archive)
   ============================================================ */

/* ============================================================
   POST HERO — dark, featured image bg, content bottom-left
   ============================================================ */
.post-hero {
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding-top: var(--header-h, 72px);
}

@media (min-width: 768px)  { .post-hero { min-height: 360px; } }
@media (min-width: 1024px) { .post-hero { min-height: 420px; } }

.post-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.post-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.55;
}

.post-hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top,  rgba(13,31,20,0.95) 0%, rgba(13,31,20,0.35) 55%, transparent 100%),
    linear-gradient(to right, rgba(13,31,20,0.4) 0%, transparent 60%);
}

.post-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: var(--space-2xl);
  padding-top: var(--space-2xl);
  max-width: 760px;
}

/* Category badge */
.post-cat-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(116, 198, 157, 0.18);
  color: var(--pr-mint);
  border: 1px solid rgba(116, 198, 157, 0.25);
  margin-bottom: var(--space-sm);
}

/* Category color overrides */
.post-cat-badge--shuttles  { background: rgba(37,211,102,0.15); color: #25d366; border-color: rgba(37,211,102,0.25); }
.post-cat-badge--tours     { background: rgba(212,160,23,0.15);  color: var(--pr-gold); border-color: rgba(212,160,23,0.25); }
.post-cat-badge--guides    { background: rgba(116,198,157,0.15); color: var(--pr-mint); border-color: rgba(116,198,157,0.25); }
.post-cat-badge--tips      { background: rgba(231,111,81,0.15);  color: #e76f51; border-color: rgba(231,111,81,0.25); }

.post-hero__title {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 48px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -1.2px;
  color: var(--pr-cream);
  margin-bottom: var(--space-md);
}

/* Post meta row */
.post-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.post-meta__item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: rgba(244, 241, 232, 0.55);
}

.post-meta__item .ti { font-size: 13px; }

/* ============================================================
   POST LAYOUT — uses .page-layout__grid from components.css
   ============================================================ */
.post-layout { background: var(--pr-cream); }

/* ============================================================
   PROSE — rich text content
   ============================================================ */
.prose {
  font-size: 16px;
  line-height: 1.8;
  color: var(--pr-text-body);
  max-width: 680px;
}

.prose h2 {
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 700;
  color: var(--pr-text-dark);
  letter-spacing: -0.4px;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
}

.prose h3 {
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 700;
  color: var(--pr-text-dark);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

.prose p { margin-bottom: var(--space-md); }
.prose p:last-child { margin-bottom: 0; }

.prose ul,
.prose ol {
  padding-left: var(--space-xl);
  margin-bottom: var(--space-md);
}

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: var(--space-sm); }

.prose strong { color: var(--pr-text-dark); font-weight: 600; }
.prose em     { font-style: italic; }

.prose a {
  color: var(--pr-green);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition-fast);
}

.prose a:hover { color: var(--pr-green-hover); }

.prose blockquote {
  border-left: 3px solid var(--pr-mint);
  padding-left: var(--space-lg);
  margin: var(--space-xl) 0;
  font-style: italic;
  color: var(--pr-text-muted);
}

.prose img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: var(--space-xl) 0;
}

.prose figure { margin: var(--space-xl) 0; }

.prose figcaption {
  text-align: center;
  font-size: 12px;
  color: var(--pr-text-hint);
  margin-top: var(--space-sm);
}

.prose hr {
  border: none;
  border-top: 1px solid var(--pr-border);
  margin: var(--space-2xl) 0;
}

/* ============================================================
   POST SHARE ROW
   ============================================================ */
.post-share {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--pr-border);
  border-bottom: 1px solid var(--pr-border);
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.post-share__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--pr-text-dark);
}

.post-share__links {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.post-share__btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    transform var(--transition-fast);
}

.post-share__btn:hover { transform: scale(1.08); }

.post-share__btn--x    { background: #000; color: #fff; }
.post-share__btn--wa   { background: #25d366; color: #fff; }
.post-share__btn--copy { background: var(--pr-cream-dark); color: var(--pr-text-dark); border: 1px solid var(--pr-border); }

/* ============================================================
   RELATED POSTS
   ============================================================ */
.related-posts__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--pr-text-dark);
  letter-spacing: -0.3px;
  margin-bottom: var(--space-lg);
}

.related-posts__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

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

/* ============================================================
   BLOG CARD — shared component (also used in blog-preview on home)
   ============================================================ */
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--pr-white);
  border: 1px solid var(--pr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  transition:
    border-color var(--transition-base),
    transform var(--transition-base),
    box-shadow var(--transition-base);
}

.blog-card:hover {
  border-color: var(--pr-green);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.blog-card__media {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: var(--pr-jungle);
  flex-shrink: 0;
}

.blog-card--compact .blog-card__media { height: 140px; }

.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

.blog-card:hover .blog-card__media img { transform: scale(1.05); }

.blog-card__img-placeholder {
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 60%, #1b4332, #0d1f14);
}

.blog-card__category {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  z-index: 1;
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(13,31,20,0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: rgba(244, 241, 232, 0.9);
  border: 1px solid rgba(255,255,255,0.12);
}

/* Category color variants */
.blog-card__category--shuttles  { background: rgba(37,211,102,0.85);  color: #0d1f14; }
.blog-card__category--tours     { background: rgba(212,160,23,0.85);   color: #0d1f14; }
.blog-card__category--guides    { background: rgba(116,198,157,0.85);  color: #0d1f14; }

.blog-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-md);
}

.blog-card__title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--pr-text-dark);
  letter-spacing: -0.2px;
  line-height: 1.3;
  margin-bottom: var(--space-sm);
  flex: 1;
}

.blog-card--compact .blog-card__title { font-size: 13px; }

.blog-card__excerpt {
  font-size: 13px;
  color: var(--pr-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-sm);
  flex: 1;
}

.blog-card__footer {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: auto;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--pr-border-light);
}

.blog-card__date {
  font-size: 11px;
  color: var(--pr-text-hint);
  flex: 1;
}

.blog-card__readtime {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--pr-text-hint);
  flex-shrink: 0;
}

.blog-card__readtime .ti { font-size: 12px; }

/* ============================================================
   SIDEBAR WIDGETS
   ============================================================ */
.widget-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--pr-text-dark);
  letter-spacing: -0.2px;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--pr-border);
}

/* ── Sidebar CTA card ── */
.sidebar-cta-card {
  position: relative;
  background: var(--pr-jungle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.sidebar-cta-card__inner {
  position: relative;
  z-index: 2;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.sidebar-cta-card__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(116, 198, 157, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--pr-mint);
  margin-bottom: var(--space-xs);
}

.sidebar-cta-card__title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--pr-cream);
  letter-spacing: -0.3px;
  margin: 0;
}

.sidebar-cta-card__desc {
  font-size: 13px;
  color: rgba(244, 241, 232, 0.55);
  line-height: 1.55;
  margin: 0;
}

/* ── Popular posts ── */
.popular-posts-widget { /* uses .widget-title */ }

.popular-posts-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.popular-post-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--pr-border-light);
  text-decoration: none;
  transition: background var(--transition-fast);
}

.popular-post-item:last-child { border-bottom: none; }
.popular-post-item:hover .ppi-title { color: var(--pr-green); }

.ppi-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.ppi-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ppi-thumb--placeholder {
  background: radial-gradient(ellipse at 50% 50%, #1b4332, #0d1f14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: rgba(255,255,255,0.2);
}

.ppi-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ppi-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--pr-text-dark);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition-fast);
}

.ppi-meta {
  font-size: 11px;
  color: var(--pr-text-hint);
}

/* ── Newsletter widget ── */
.newsletter-widget {
  background: var(--pr-white);
  border: 1px solid var(--pr-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}

.newsletter-widget__desc {
  font-size: 13px;
  color: var(--pr-text-muted);
  margin-bottom: var(--space-md);
}

.newsletter-widget .form-field { margin-bottom: var(--space-sm); }

.newsletter-feedback {
  margin-top: var(--space-sm);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.4;
}

.newsletter-feedback--success {
  background: rgba(45,106,79,0.1);
  border: 1px solid rgba(45,106,79,0.2);
  color: var(--pr-green);
}

.newsletter-feedback--error {
  background: rgba(231,111,81,0.08);
  border: 1px solid rgba(231,111,81,0.25);
  color: #c0533a;
}

/* ── Keywords panel ── */
.keywords-panel {
  background: var(--pr-white);
  border: 1px solid var(--pr-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}

.keywords-panel__cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ============================================================
   ARCHIVE HERO — dark, no bg image
   ============================================================ */
.blog-hero {
  position: relative;
  background: #0d1f14;
  overflow: hidden;
  padding-top: var(--header-h, 72px);
}

.blog-hero__grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  padding: var(--space-3xl) 0 var(--space-2xl);
}

@media (min-width: 1024px) {
  .blog-hero__grid {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 72px 0 64px;
    gap: var(--space-3xl);
  }
}

.blog-hero__title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.5vw, 52px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -1.5px;
  color: var(--pr-cream);
  margin-bottom: var(--space-md);
}

.blog-hero__subtitle {
  font-size: clamp(14px, 1.6vw, 16px);
  color: rgba(244, 241, 232, 0.6);
  line-height: 1.7;
  max-width: 480px;
}

/* ── Keyword cloud ── */
.keyword-cloud {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
}

.kw-tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: rgba(244, 241, 232, 0.6);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
}

.kw-tag--sm { font-size: 12px; padding: 4px 10px; }

.kw--hot {
  color: var(--pr-gold);
  background: rgba(212, 160, 23, 0.12);
  border-color: rgba(212, 160, 23, 0.22);
}

/* ============================================================
   CATEGORY BAR
   ============================================================ */
.cat-bar {
  background: var(--pr-white);
  border-bottom: 1px solid var(--pr-border);
  position: sticky;
  top: var(--header-h, 72px);
  z-index: 10;
}

.cat-bar__inner {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 12px 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.cat-bar__tabs {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.cat-tab {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--pr-text-muted);
  background: transparent;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  transition:
    color var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast);
}

.cat-tab:hover {
  color: var(--pr-green);
  background: rgba(45, 106, 79, 0.06);
}

.cat-tab--active {
  color: var(--pr-green);
  background: rgba(45, 106, 79, 0.1);
  border-color: rgba(45, 106, 79, 0.2);
  font-weight: 600;
}

.cat-bar__sort {
  flex-shrink: 0;
}

.cat-bar__sort select {
  font-size: 12px;
  padding: 5px 10px;
  border: 1px solid var(--pr-border);
  border-radius: var(--radius-sm);
  color: var(--pr-text-muted);
  background: var(--pr-white);
  cursor: pointer;
}

/* ============================================================
   ARCHIVE LAYOUT
   ============================================================ */
.archive-section { background: var(--pr-cream); }

.archive-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}

@media (min-width: 1024px) {
  .archive-layout {
    grid-template-columns: 1fr 280px;
    gap: 0;
    align-items: start;
  }

  .archive-layout__main {
    padding-right: var(--space-2xl);
    border-right: 1px solid var(--pr-border);
  }

  .archive-layout__sidebar {
    padding-left: var(--space-2xl);
  }
}

.archive-layout__sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* ── Featured post ── */
.featured-post {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--pr-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-xl);
  text-decoration: none;
  background: var(--pr-white);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

@media (min-width: 640px) {
  .featured-post { grid-template-columns: 1fr 1fr; }
}

.featured-post:hover {
  border-color: var(--pr-green);
  box-shadow: var(--shadow-md);
}

.featured-post__media {
  position: relative;
  height: 240px;
  overflow: hidden;
  background: var(--pr-jungle);
}

@media (min-width: 640px) { .featured-post__media { height: auto; min-height: 260px; } }

.featured-post__media img,
.featured-post__img-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

.featured-post:hover .featured-post__media img { transform: scale(1.04); }

.featured-post__img-placeholder {
  background: radial-gradient(ellipse at 50% 60%, #1b4332, #0d1f14);
}

.featured-post__body {
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-sm);
}

.featured-post__title {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 700;
  color: var(--pr-text-dark);
  letter-spacing: -0.4px;
  line-height: 1.2;
  margin: var(--space-xs) 0;
}

.featured-post__excerpt {
  font-size: 14px;
  color: var(--pr-text-muted);
  line-height: 1.65;
  flex: 1;
}

.featured-post__footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--pr-border-light);
}

.featured-post__cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--pr-green);
  margin-left: auto;
}

/* ── Posts grid ── */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

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

/* ── Pagination ── */
.blog-pagination { margin-top: var(--space-2xl); }

.blog-pagination .nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--pr-text-muted);
  background: var(--pr-white);
  border: 1px solid var(--pr-border);
  text-decoration: none;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.blog-pagination .page-numbers:hover {
  border-color: var(--pr-green);
  color: var(--pr-green);
}

.blog-pagination .page-numbers.current {
  background: var(--pr-green);
  border-color: var(--pr-green);
  color: var(--pr-cream);
}

.blog-pagination .prev,
.blog-pagination .next {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 var(--space-md);
  font-size: 13px;
}

.no-posts {
  padding: var(--space-2xl);
  text-align: center;
  color: var(--pr-text-muted);
  background: var(--pr-white);
  border: 1px solid var(--pr-border);
  border-radius: var(--radius-md);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 767px) {
  .post-hero__content { max-width: 100%; padding-bottom: var(--space-xl); }
  .post-hero__title   { letter-spacing: -0.8px; }
  .post-meta-row      { gap: var(--space-sm); }
  .prose              { font-size: 15px; }
  .featured-post__body { padding: var(--space-md); }
  .blog-hero__title   { letter-spacing: -0.8px; }
}
