/* ================================================================
   Hamburgo Palace Hotel — Blog CSS
   home.php · single.php · category.php
   ================================================================ */

/* ---- Utility ---- */
.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;
}

/* ================================================================
   BLOG HERO (home + category)
   ================================================================ */
.blog-hero {
  position: relative;
  height: clamp(52vh, 65vh, 680px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.blog-hero-bg {
  position: absolute;
  inset: 0;
}
.blog-hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  animation: hpKen 12s ease-out both;
}
.blog-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(13,20,15,.85) 0%,
    rgba(13,20,15,.45) 55%,
    rgba(13,20,15,.15) 100%
  );
}
.blog-hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  color: var(--hp-offwhite, #F2EBE1);
}
.blog-hero-content h1 {
  font-family: var(--font-serif, 'Playfair Display', serif);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 400;
  line-height: 1.1;
  margin: .35rem 0 .9rem;
  color: #fff;
}
.blog-hero-content h1 em {
  font-style: italic;
  color: var(--hp-gold-pale, #BCB195);
}
.blog-hero-sub {
  font-size: clamp(.9rem, 1.6vw, 1.1rem);
  color: rgba(242,235,225,.8);
  max-width: 52ch;
  line-height: 1.65;
}
.blog-hero--cat .blog-hero-bg img {
  object-position: center 40%;
}

/* ================================================================
   TOOLBAR (filtro + busca)
   ================================================================ */
.blog-toolbar {
  background: var(--hp-forest, #233527);
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 4px 20px -4px rgba(13,20,15,.35);
}
.blog-toolbar-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-top: .85rem;
  padding-bottom: .85rem;
  flex-wrap: wrap;
}

/* Pills de categoria */
.blog-cats {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
  flex: 1 1 auto;
}
.blog-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .85rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: rgba(242,235,225,.7);
  border: 1.5px solid rgba(188,177,149,.25);
  transition: background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.blog-cat-pill:hover {
  background: rgba(138,111,66,.2);
  color: var(--hp-offwhite, #F2EBE1);
  border-color: rgba(138,111,66,.5);
}
.blog-cat-pill.active {
  background: var(--hp-gold, #8A6F42);
  color: #fff;
  border-color: var(--hp-gold, #8A6F42);
}
.blog-cat-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  font-size: .68rem;
  font-weight: 600;
}
.blog-cat-pill.active .blog-cat-count {
  background: rgba(255,255,255,.25);
}

/* Campo de busca */
.blog-search {
  flex-shrink: 0;
}
.blog-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.blog-search-icon {
  position: absolute;
  left: .75rem;
  color: rgba(242,235,225,.45);
  pointer-events: none;
}
.blog-search-input {
  background: rgba(255,255,255,.07);
  border: 1.5px solid rgba(188,177,149,.2);
  border-radius: 999px;
  color: var(--hp-offwhite, #F2EBE1);
  font-size: .82rem;
  padding: .42rem 2.6rem .42rem 2.3rem;
  width: clamp(170px, 22vw, 240px);
  transition: background .2s, border-color .2s, width .3s;
  outline: none;
}
.blog-search-input::placeholder { color: rgba(242,235,225,.4); }
.blog-search-input:focus {
  background: rgba(255,255,255,.12);
  border-color: var(--hp-gold, #8A6F42);
  width: clamp(200px, 26vw, 280px);
}
.blog-search-btn {
  position: absolute;
  right: .55rem;
  background: var(--hp-gold, #8A6F42);
  border: none;
  border-radius: 50%;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: background .2s, transform .15s;
}
.blog-search-btn:hover {
  background: var(--hp-gold-light, #A6884F);
  transform: scale(1.08);
}

/* ================================================================
   BLOG SECTION
   ================================================================ */
.blog-section {
  padding: clamp(3rem,6vw,5.5rem) 0 clamp(4rem,8vw,7rem);
}

/* ================================================================
   BLOG GRID
   ================================================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

/* Card normal */
.blog-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 44px -34px rgba(13,20,15,.3);
  display: flex;
  flex-direction: column;
  transition: box-shadow .3s, transform .3s;
}
.blog-card:hover {
  box-shadow: 0 34px 60px -28px rgba(13,20,15,.4);
  transform: translateY(-4px);
}

/* Card destaque (primeiro post, página 1) */
.blog-card--featured {
  grid-column: 1 / -1;
  flex-direction: row;
  min-height: 380px;
}
.blog-card--featured .blog-card-img-wrap {
  flex: 0 0 55%;
  height: auto;
}
.blog-card--featured .blog-card-img-wrap img {
  height: 100%;
}
.blog-card--featured .blog-card-body {
  flex: 1;
  padding: 2.5rem;
  justify-content: center;
}
.blog-card--featured .blog-card-title {
  font-size: clamp(1.35rem, 2.5vw, 1.9rem);
}

/* Imagem */
.blog-card-img-wrap {
  position: relative;
  display: block;
  height: 220px;
  overflow: hidden;
  background: var(--hp-forest-mid, #415945);
}
.blog-card-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.blog-card:hover .blog-card-img-wrap img { transform: scale(1.05); }
.blog-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,20,15,.4) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .3s;
}
.blog-card:hover .blog-card-overlay { opacity: 1; }

/* Body */
.blog-card-body {
  padding: 1.4rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  flex: 1;
}
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}
.blog-card-tag {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 999px;
  background: var(--hp-forest, #233527);
  color: var(--hp-offwhite, #F2EBE1);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: background .2s;
}
.blog-card-tag:hover { background: var(--hp-gold, #8A6F42); }
.blog-card-date {
  font-size: .75rem;
  color: rgba(13,20,15,.5);
}
.blog-card-title {
  font-family: var(--font-serif, 'Playfair Display', serif);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  flex: 1;
}
.blog-card-title a { color: var(--hp-ink, #0D140F); transition: color .2s; }
.blog-card-title a:hover { color: var(--hp-gold, #8A6F42); }
.blog-card-excerpt {
  font-size: .88rem;
  color: rgba(13,20,15,.65);
  line-height: 1.7;
}
.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-top: auto;
}
.blog-card-author {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  color: rgba(13,20,15,.6);
}
.blog-card-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.blog-card-read {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--hp-gold, #8A6F42);
  transition: gap .2s;
  white-space: nowrap;
}
.blog-card-read:hover { gap: .6rem; }

/* ================================================================
   PAGINAÇÃO
   ================================================================ */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin-top: 3.5rem;
  flex-wrap: wrap;
}
.blog-page-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.2rem;
  border-radius: 999px;
  border: 1.5px solid var(--hp-border, rgba(188,177,149,.45));
  font-size: .82rem;
  font-weight: 600;
  color: var(--hp-ink, #0D140F);
  background: #fff;
  transition: background .2s, border-color .2s, color .2s;
}
.blog-page-btn:hover {
  background: var(--hp-forest, #233527);
  color: #fff;
  border-color: var(--hp-forest, #233527);
}
.blog-page-nums {
  display: flex;
  align-items: center;
  gap: .35rem;
}
.blog-page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  font-size: .82rem;
  font-weight: 600;
  color: rgba(13,20,15,.65);
  transition: background .2s, color .2s;
}
a.blog-page-num:hover {
  background: var(--hp-offwhite, #F2EBE1);
  color: var(--hp-ink, #0D140F);
}
.blog-page-num.active {
  background: var(--hp-gold, #8A6F42);
  color: #fff;
}
.blog-page-ellipsis {
  color: rgba(13,20,15,.4);
  font-size: .85rem;
  width: 22px;
  text-align: center;
}

/* ================================================================
   EMPTY STATE
   ================================================================ */
.blog-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  padding: 5rem 1rem;
  color: rgba(13,20,15,.55);
}
.blog-empty h2 {
  font-family: var(--font-serif, 'Playfair Display', serif);
  font-size: 1.5rem;
  color: var(--hp-ink, #0D140F);
}
.blog-empty p { font-size: .9rem; max-width: 36ch; }
.blog-empty .btn-outline-sq { margin-top: .5rem; }

/* ================================================================
   POST HERO (single)
   ================================================================ */
.post-hero {
  position: relative;
  height: clamp(55vh, 70vh, 720px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.post-hero-bg {
  position: absolute;
  inset: 0;
}
.post-hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.post-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(13,20,15,.9) 0%,
    rgba(13,20,15,.5) 50%,
    rgba(13,20,15,.1) 100%
  );
}
.post-hero-content {
  position: relative;
  z-index: 1;
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  color: #fff;
}
.post-hero-content h1 {
  font-family: var(--font-serif, 'Playfair Display', serif);
  font-size: clamp(1.75rem, 4vw, 3.2rem);
  line-height: 1.15;
  margin: .5rem 0 1.25rem;
}
.post-hero-tag {
  display: inline-block;
  margin-bottom: .25rem;
}

/* Breadcrumb */
.post-breadcrumb {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .75rem;
  color: rgba(242,235,225,.6);
  margin-bottom: .9rem;
  flex-wrap: wrap;
}
.post-breadcrumb a { color: rgba(242,235,225,.7); transition: color .2s; }
.post-breadcrumb a:hover { color: var(--hp-gold-pale, #BCB195); }
.post-breadcrumb span[aria-hidden] { color: rgba(242,235,225,.35); }

/* Meta do autor */
.post-hero-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.post-hero-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.3);
  object-fit: cover;
}
.post-hero-meta-info {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.post-hero-author {
  font-size: .82rem;
  font-weight: 600;
  color: #fff;
}
.post-hero-details {
  font-size: .75rem;
  color: rgba(242,235,225,.6);
}

/* ================================================================
   POST LAYOUT (aside + article)
   ================================================================ */
.post-layout {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0 2.5rem;
  padding-top: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  align-items: start;
}

/* Aside de compartilhamento */
.post-aside {
  position: sticky;
  top: 6rem;
}
.post-share {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
}
.post-share-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(13,20,15,.4);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  margin-bottom: .3rem;
}
.post-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  transition: transform .2s, opacity .2s;
  color: #fff;
}
.post-share-btn:hover { transform: scale(1.12); }
.post-share-fb { background: #1877f2; }
.post-share-wa { background: #25d366; }
.post-share-li { background: #0a66c2; }

/* Conteúdo do artigo */
.post-content {
  min-width: 0;
}

/* Tipografia do corpo do post */
.post-body.wp-content {
  font-size: clamp(.9rem, 1.5vw, 1.05rem);
  line-height: 1.85;
  color: var(--hp-ink, #0D140F);
}
.post-body.wp-content h2,
.post-body.wp-content h3,
.post-body.wp-content h4 {
  font-family: var(--font-serif, 'Playfair Display', serif);
  color: var(--hp-forest, #233527);
  margin: 2rem 0 .75rem;
  line-height: 1.25;
}
.post-body.wp-content h2 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); }
.post-body.wp-content h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }
.post-body.wp-content p  { margin-bottom: 1.4rem; }
.post-body.wp-content a  { color: var(--hp-gold, #8A6F42); text-decoration: underline; text-underline-offset: 3px; }
.post-body.wp-content img {
  border-radius: 12px;
  margin: 1.5rem 0;
  width: 100%;
  height: auto;
}
.post-body.wp-content ul,
.post-body.wp-content ol {
  margin: 0 0 1.4rem 1.5rem;
}
.post-body.wp-content li { margin-bottom: .45rem; }
.post-body.wp-content blockquote {
  border-left: 3px solid var(--hp-gold, #8A6F42);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--hp-cream, #FBF8F3);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: rgba(13,20,15,.75);
}

/* Tags */
.post-tags {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
  padding-top: 1.75rem;
  margin-top: 2rem;
  border-top: 1px solid var(--hp-border, rgba(188,177,149,.45));
}
.post-tags-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: rgba(13,20,15,.45);
}
.post-tag {
  display: inline-block;
  padding: .25rem .7rem;
  border-radius: 999px;
  border: 1.5px solid var(--hp-border, rgba(188,177,149,.45));
  font-size: .75rem;
  color: rgba(13,20,15,.65);
  transition: background .2s, border-color .2s, color .2s;
}
.post-tag:hover {
  background: var(--hp-forest, #233527);
  border-color: var(--hp-forest, #233527);
  color: #fff;
}

/* Navegação prev/next */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--hp-border, rgba(188,177,149,.45));
}
.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1.2rem 1.4rem;
  background: #fff;
  border-radius: 12px;
  border: 1.5px solid var(--hp-border, rgba(188,177,149,.35));
  transition: border-color .2s, box-shadow .2s;
}
.post-nav-link:hover {
  border-color: var(--hp-gold, #8A6F42);
  box-shadow: 0 8px 24px -10px rgba(138,111,66,.3);
}
.post-nav-next { text-align: right; align-items: flex-end; }
.post-nav-dir {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--hp-gold, #8A6F42);
}
.post-nav-next .post-nav-dir { justify-content: flex-end; }
.post-nav-title {
  font-size: .88rem;
  font-weight: 500;
  color: var(--hp-ink, #0D140F);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ================================================================
   ARTIGOS RELACIONADOS
   ================================================================ */
.sec-related {
  background: var(--hp-cream, #FBF8F3);
  padding: clamp(4rem,8vw,6.5rem) 0;
}

/* ================================================================
   RESPONSIVO
   ================================================================ */
@media (max-width: 1100px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-card--featured { flex-direction: column; }
  .blog-card--featured .blog-card-img-wrap { flex: 0 0 280px; width: 100%; }
  .blog-card--featured .blog-card-body { padding: 1.5rem; }
}

@media (max-width: 860px) {
  .blog-toolbar-inner { flex-direction: column; align-items: stretch; gap: .75rem; }
  .blog-search { align-self: stretch; }
  .blog-search-wrap { width: 100%; }
  .blog-search-input { width: 100% !important; }

  .post-layout { grid-template-columns: 1fr; }
  .post-aside {
    position: static;
    order: 2;
    margin-top: 2rem;
  }
  .post-share { flex-direction: row; justify-content: flex-start; }
  .post-share-label { writing-mode: horizontal-tb; transform: none; }
}

@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-card--featured { min-height: unset; }

  .post-nav { grid-template-columns: 1fr; }
  .post-nav-next { text-align: left; align-items: flex-start; }
  .post-nav-next .post-nav-dir { justify-content: flex-start; }

  .blog-pagination { gap: .4rem; }
  .blog-page-btn { padding: .5rem .9rem; font-size: .78rem; }
  .blog-page-num { width: 32px; height: 32px; font-size: .78rem; }
}
