/*
Theme Name: Hotellid Blog
Theme URI: https://hotellid.ee/blog
Description: Minimal blog theme matching the hotellid.ee catalog (header, footer, colors, typography). Text-first; no marketing layout.
Author: hotellid.ee
Version: 0.2.6
Text Domain: hotellid
*/

:root {
  --brand-50: #f0f7f4;
  --brand-500: #2d6a4f;
  --brand-600: #245a42;
  --brand-700: #1b4332;
  --ink-100: #eeede9;
  --ink-500: #5c5a52;
  --ink-700: #3a3832;
  --ink-900: #1a1916;
  --bg: #fafaf8;
  --border: #e5e3dc;
  --font-display: "Fraunces", Georgia, serif;
  --font-sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --max: 72rem;
  --content-max: 42rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  width: 100%;
}

body {
  margin: 0 !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-900);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(45, 106, 79, 0.08), transparent),
    linear-gradient(180deg, #fafaf8 0%, #f3f1eb 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--brand-600);
}

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

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1rem;
}

/* —— Header —— */
.site-header {
  border-bottom: 1px solid var(--ink-100);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex-shrink: 1;
}

.site-logo:hover {
  color: inherit;
  text-decoration: none;
}

.site-logo__mark {
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  translate: 0 1px;
}

.site-logo__wordmark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.site-logo__name {
  color: var(--ink-900);
}

.site-logo__tld {
  color: var(--brand-600);
}

.site-logo--footer .site-logo__mark {
  width: 1.25rem;
  height: 1.25rem;
}

.site-logo--footer .site-logo__wordmark {
  font-size: 1.125rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.site-nav a {
  color: var(--ink-700);
  padding-bottom: 0.125rem;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  color: var(--brand-600);
  text-decoration: none;
}

.site-nav a.is-active {
  color: var(--brand-700);
  border-bottom-color: var(--brand-600);
}

/* —— Main —— */
.site-main {
  display: block;
  width: 100%;
  flex: 1 0 auto;
  padding: 2rem 0 3rem;
  min-height: 50vh;
}

.page-header {
  margin-bottom: 2rem;
}

.page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.02em;
}

.page-intro {
  margin: 0.5rem 0 0;
  max-width: 36rem;
  color: var(--ink-500);
  font-size: 1.05rem;
}

/* —— Post cards —— */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post-card {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  grid-template-rows: auto auto auto auto;
  column-gap: 1rem;
  align-items: start;
  background: #fff;
  border: 1px solid var(--ink-100);
  padding: 1.25rem;
  transition: border-color 0.15s ease;
}

.post-card:hover {
  border-color: #b8ddd0;
}

.post-card:not(:has(.post-card__media)) {
  grid-template-columns: 1fr;
}

.post-card__media {
  grid-column: 1;
  grid-row: 1 / span 4;
  display: block;
  width: 7.5rem;
  overflow: hidden;
  border: 1px solid var(--ink-100);
  background: var(--ink-100);
  align-self: start;
}

.post-card__media:hover {
  color: inherit;
  text-decoration: none;
}

.post-card__img {
  display: block;
  width: 100%;
  height: 5.5rem;
  object-fit: cover;
}

.post-card__badge {
  grid-column: 2;
}

.post-card__title,
.post-card__meta,
.post-card__excerpt,
.post-card__more {
  grid-column: 2;
}

.post-card:not(:has(.post-card__media)) .post-card__badge,
.post-card:not(:has(.post-card__media)) .post-card__title,
.post-card:not(:has(.post-card__media)) .post-card__meta,
.post-card:not(:has(.post-card__media)) .post-card__excerpt,
.post-card:not(:has(.post-card__media)) .post-card__more {
  grid-column: 1;
}

.post-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.3;
}

@media (max-width: 520px) {
  .post-card {
    grid-template-columns: 5.5rem 1fr;
    column-gap: 0.75rem;
    padding: 1rem;
  }

  .post-card__media {
    width: 5.5rem;
    grid-row: 1 / span 2;
  }

  .post-card__img {
    height: 4.25rem;
  }

  .post-card__excerpt,
  .post-card__more {
    grid-column: 1 / -1;
  }
}

.post-card__title a {
  color: var(--ink-900);
}

.post-card__title a:hover {
  color: var(--brand-700);
  text-decoration: none;
}

.post-card__meta {
  margin: 0.4rem 0 0;
  color: var(--ink-500);
  font-size: 0.875rem;
}

.post-card__excerpt {
  margin: 0.75rem 0 0;
  color: var(--ink-700);
  font-size: 0.98rem;
}

.post-card__excerpt p {
  margin: 0;
}

.post-card__more {
  display: inline-block;
  margin-top: 0.85rem;
  color: var(--brand-600);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: underline;
}

.post-card__more:hover {
  color: var(--brand-700);
}

.post-card--sample {
  opacity: 0.72;
  border-style: dashed;
}

.post-card--sample .post-card__badge {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--ink-100);
  color: var(--ink-500);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* —— Single post —— */
.post-back {
  max-width: var(--content-max);
  margin: 0 auto 1.25rem;
  font-size: 0.9rem;
}

.post-back a {
  color: var(--brand-600);
  font-weight: 600;
  text-decoration: underline;
}

.post-back a:hover {
  color: var(--brand-700);
}

.single-post {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
}

.single-post .entry-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink-900);
}

.single-post .entry-meta {
  margin: 0.75rem 0 0;
  color: var(--ink-500);
  font-size: 0.9rem;
}

.single-post .entry-featured {
  margin: 1rem 0 0;
  padding: 0;
  max-width: 22rem;
  border: 1px solid var(--ink-100);
  border-radius: 2px;
  background: #fff;
  overflow: hidden;
}

.single-post .entry-featured__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 12.5rem;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.single-post .entry-content {
  margin-top: 1.75rem;
  color: var(--ink-700);
  width: 100%;
  max-width: none;
}

/* Avoid double hero if publisher also inlined the featured image */
.single-post .entry-content > .featured-inline:first-child {
  display: none;
}

.single-post .entry-content > *:first-child {
  margin-top: 0;
}

.single-post .entry-content p {
  margin: 0 0 1.25rem;
}

.single-post .entry-content > *:last-child {
  margin-bottom: 0;
}

/* Neutralize WP block layout classes if present in imported content */
.single-post .entry-content .is-layout-flex,
.single-post .entry-content .is-layout-grid,
.single-post .entry-content .wp-block-group {
  display: block !important;
  max-width: none !important;
}

.entry-content h2,
.entry-content h3 {
  font-family: var(--font-display);
  color: var(--ink-900);
  margin-top: 1.75rem;
}

.entry-content a {
  color: var(--brand-600);
  text-decoration: underline;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.25rem;
}

.pagination {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pagination a {
  color: var(--brand-600);
  text-decoration: underline;
}

.empty-state {
  color: var(--ink-500);
  max-width: 36rem;
}

/* —— Footer —— */
.site-footer {
  flex-shrink: 0;
  margin-top: auto;
  border-top: 1px solid var(--ink-100);
  background: #fff;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2.5rem 0;
  font-size: 0.875rem;
  color: var(--ink-500);
}

@media (min-width: 768px) {
  .site-footer__inner {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.site-footer__copy {
  margin: 0.5rem 0 0;
  max-width: 28rem;
}

.site-footer__copy a {
  color: inherit;
  text-decoration: underline;
}

.site-footer__copy a:hover {
  color: var(--brand-600);
}

.site-footer__nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-footer__nav a {
  color: var(--ink-500);
}

.site-footer__nav a:hover {
  color: var(--brand-600);
  text-decoration: none;
}

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