/* ============================================================
   SimplySpaces Blog Theme — screen.css
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --color-white:      #FFFFFF;
  --color-light-grey: #ECECEC;
  --color-green:      #69BD45;
  --color-navy:       #26283F;
  --color-body-text:  #3c3f5a;
  --color-mid-grey:   #6b7080;
  --color-light-text: #9198ad;

  --font-main: 'Montserrat', sans-serif;

  --radius: 10px;
  --max-width: 1200px;
  --content-width: 720px;

  --shadow-card:    0 2px 12px rgba(38,40,63,0.08);
  --shadow-card-hover: 0 8px 28px rgba(38,40,63,0.16);
  --shadow-header:  0 2px 16px rgba(38,40,63,0.10);
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  font-weight: 400;
  color: var(--color-body-text);
  background: var(--color-white);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

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

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

ul, ol {
  list-style: none;
}

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

.container--narrow {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-main);
  color: var(--color-navy);
  line-height: 1.2;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn--primary {
  background: var(--color-green);
  color: var(--color-white);
}

.btn--primary:hover {
  background: #5aac38;
  transform: translateY(-1px);
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  transition: box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-header);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.site-logo {
  font-family: var(--font-main);
  font-weight: 900;
  font-size: 1.375rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-simply {
  color: var(--color-navy);
}

.logo-spaces {
  color: var(--color-green);
}

/* Desktop nav */
.site-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-link {
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-navy);
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--color-green);
}

.nav-link--active {
  color: var(--color-green);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-navy);
  border-radius: 2px;
  transition: all 0.25s ease;
}

.hamburger.is-active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.is-active span:nth-child(2) {
  opacity: 0;
}

.hamburger.is-active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  background: var(--color-white);
  border-top: 1px solid var(--color-light-grey);
  padding: 16px 24px 24px;
  box-shadow: var(--shadow-header);
}

.mobile-menu.is-open {
  display: block;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav-link {
  display: block;
  padding: 12px 0;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-navy);
  border-bottom: 1px solid var(--color-light-grey);
  transition: color 0.2s ease;
}

.mobile-nav-link:last-child {
  border-bottom: none;
}

.mobile-nav-link:hover,
.mobile-nav-link--active {
  color: var(--color-green);
}

/* ============================================================
   BLOG LISTING — HERO
   ============================================================ */
.blog-hero {
  background: var(--color-white);
  padding: 72px 24px 48px;
  text-align: center;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-title {
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--color-navy);
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--color-mid-grey);
  max-width: 560px;
  margin: 0 auto;
}

/* ============================================================
   POST FEED / CARD GRID
   ============================================================ */
.post-feed-section {
  padding: 48px 0 80px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-bottom: 56px;
}

/* ── Post Card ─────────────────────────────────────────────── */
.post-card {
  background: var(--color-white);
  border-radius: var(--radius);
  border: 1px solid var(--color-light-grey);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.card-image-link {
  display: block;
}

.card-image-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
  transition: transform 0.35s ease;
}

.post-card:hover .card-image {
  transform: scale(1.04);
}

.card-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-tag {
  display: inline-block;
  background: var(--color-green);
  color: var(--color-white);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  text-decoration: none;
  transition: background 0.2s ease;
  width: fit-content;
}

.card-tag:hover {
  background: #5aac38;
}

.card-title {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--color-navy);
  margin-bottom: 10px;
  line-height: 1.3;
}

.card-title--small {
  font-size: 0.9375rem;
}

.card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.card-title a:hover {
  color: var(--color-green);
}

.card-excerpt {
  font-size: 0.9rem;
  color: var(--color-mid-grey);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--color-light-text);
}

.card-sep {
  color: var(--color-light-grey);
}

/* ── Pagination ─────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-top: 16px;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  border-radius: var(--radius);
  background: var(--color-light-grey);
  color: var(--color-navy);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.pagination-btn:hover {
  background: var(--color-green);
  color: var(--color-white);
}

.pagination-info {
  font-size: 0.875rem;
  color: var(--color-mid-grey);
  font-weight: 600;
}

/* ============================================================
   INDIVIDUAL POST
   ============================================================ */
.post-feature-image-wrap {
  width: 100%;
  max-height: 540px;
  overflow: hidden;
}

.post-feature-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-header-wrap {
  padding: 48px 24px 32px;
  text-align: center;
}

.post-tag-label {
  display: inline-block;
  background: var(--color-green);
  color: var(--color-white);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  text-decoration: none;
}

.post-tag-label:hover {
  background: #5aac38;
}

.post-title {
  font-weight: 900;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  color: var(--color-navy);
  margin-bottom: 20px;
  line-height: 1.15;
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--color-mid-grey);
}

.post-meta-sep {
  color: var(--color-light-grey);
}

.post-author {
  font-weight: 600;
  color: var(--color-body-text);
}

/* ── Post Content ───────────────────────────────────────────── */
.post-content-wrap {
  padding: 8px 24px 48px;
}

.post-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--color-body-text);
}

/* Headings */
.post-content h2 {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--color-navy);
  margin: 2.5rem 0 1rem;
}

.post-content h3 {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-navy);
  margin: 2rem 0 0.75rem;
}

.post-content h4 {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-navy);
  margin: 1.75rem 0 0.5rem;
}

/* Paragraphs */
.post-content p {
  margin-bottom: 1.5rem;
}

/* Links */
.post-content a {
  color: var(--color-green);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.post-content a:hover {
  border-bottom-color: var(--color-green);
}

/* Blockquote */
.post-content blockquote {
  border-left: 3px solid var(--color-green);
  background: var(--color-light-grey);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin: 2rem 0;
  font-style: italic;
  color: var(--color-body-text);
}

.post-content blockquote p {
  margin: 0;
}

/* Code inline */
.post-content code {
  background: var(--color-light-grey);
  color: var(--color-navy);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.875em;
}

/* Code blocks */
.post-content pre {
  background: var(--color-navy);
  color: var(--color-white);
  border-radius: var(--radius);
  padding: 24px;
  overflow-x: auto;
  margin: 2rem 0;
}

.post-content pre code {
  background: none;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: 0.9rem;
}

/* Images */
.post-content img {
  border-radius: var(--radius);
  width: 100%;
  height: auto;
  margin: 1.5rem 0;
}

/* Lists */
.post-content ul {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
}

.post-content ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
}

.post-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-green);
}

.post-content ol {
  list-style: decimal;
  padding-left: 24px;
  margin: 1.5rem 0;
}

.post-content ol li {
  margin-bottom: 8px;
  padding-left: 4px;
}

/* Horizontal rule */
.post-content hr {
  border: none;
  border-top: 1px solid var(--color-light-grey);
  margin: 2.5rem 0;
}

/* Tables */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9rem;
}

.post-content th {
  background: var(--color-light-grey);
  color: var(--color-navy);
  font-weight: 700;
  padding: 12px 16px;
  text-align: left;
}

.post-content td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--color-light-grey);
}

/* Ghost card styles */
.post-content .kg-card {
  margin: 2rem 0;
}

.post-content .kg-image-card img {
  border-radius: var(--radius);
}

.post-content .kg-gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}

.post-content .kg-gallery-image img {
  border-radius: var(--radius);
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.post-content .kg-video-card video,
.post-content .kg-embed-card iframe {
  max-width: 100%;
  border-radius: var(--radius);
}

/* ── Post Footer ────────────────────────────────────────────── */
.post-footer-wrap {
  padding: 0 24px 64px;
}

.post-divider {
  height: 2px;
  background: var(--color-green);
  border-radius: 2px;
  margin-bottom: 28px;
}

.post-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-tag-pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--color-green);
  color: var(--color-green);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.post-tag-pill:hover {
  background: var(--color-green);
  color: var(--color-white);
}

/* ── Related Posts ──────────────────────────────────────────── */
.related-posts-section {
  background: var(--color-light-grey);
  padding: 64px 0;
}

.related-title {
  font-weight: 700;
  font-size: 1.375rem;
  color: var(--color-navy);
  margin-bottom: 32px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ============================================================
   TAXONOMY PAGES (TAG / AUTHOR)
   ============================================================ */
.taxonomy-hero {
  background: var(--color-white);
  padding: 64px 24px 48px;
}

.taxonomy-title {
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--color-navy);
  margin-bottom: 8px;
}

.taxonomy-title-text {
  display: block;
}

.taxonomy-title-accent {
  display: block;
  width: 60px;
  height: 4px;
  background: var(--color-green);
  border-radius: 2px;
  margin-top: 12px;
}

.taxonomy-desc {
  font-size: 1.0625rem;
  color: var(--color-mid-grey);
  margin-top: 12px;
  max-width: 600px;
}

.taxonomy-count {
  font-size: 0.875rem;
  color: var(--color-light-text);
  font-weight: 600;
  margin-top: 8px;
}

/* Author page */
.author-hero {
  padding-bottom: 40px;
}

.author-profile {
  display: flex;
  align-items: flex-start;
  gap: 28px;
}

.author-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-avatar--placeholder {
  background: var(--color-green);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: 2rem;
  font-weight: 700;
}

.author-name {
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--color-navy);
  margin-bottom: 8px;
}

.author-bio {
  color: var(--color-mid-grey);
  max-width: 540px;
  margin-bottom: 8px;
}

/* ============================================================
   ERROR PAGES
   ============================================================ */
.error-page {
  display: flex;
  align-items: center;
  min-height: 60vh;
  padding: 80px 24px;
}

.error-content {
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.error-code {
  font-weight: 900;
  font-size: 6rem;
  color: var(--color-green);
  line-height: 1;
  margin-bottom: 16px;
}

.error-message {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--color-navy);
  margin-bottom: 12px;
}

.error-desc {
  color: var(--color-mid-grey);
  margin-bottom: 32px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-navy);
  padding: 80px 0 0;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 48px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 64px;
  padding-bottom: 64px;
}

/* Footer logo */
.footer-logo {
  display: inline-block;
  text-decoration: none;
  margin-bottom: 24px;
}

.logo-simply--white {
  color: var(--color-white);
}

.footer-desc {
  color: #9da5c0;
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

.footer-rating {
  color: #9da5c0;
  font-size: 0.875rem;
  font-weight: 600;
}

.rating-score,
.rating-stars {
  color: var(--color-green);
}

/* Footer headings */
.footer-heading {
  color: var(--color-white);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 28px;
}

/* Footer links */
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.footer-links a {
  color: #9da5c0;
  font-size: 0.9rem;
  font-weight: 400;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--color-green);
}

/* Footer contact */
.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #9da5c0;
  font-size: 0.9rem;
}

.footer-contact-list svg {
  flex-shrink: 0;
  margin-top: 1px;
  opacity: 0.7;
}

.footer-contact-list a {
  color: #9da5c0;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-contact-list a:hover {
  color: var(--color-green);
}

/* Footer divider */
.footer-divider {
  border-top: 1px solid rgba(255,255,255,0.08);
  margin: 0 48px;
}

/* Footer bottom */
.footer-bottom {
  padding: 24px 48px;
  text-align: center;
}

.footer-copy {
  color: #6b7590;
  font-size: 0.825rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 960px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 0 32px 48px;
  }

  .footer-col--brand {
    grid-column: 1 / -1;
  }

  .footer-divider {
    margin: 0 32px;
  }

  .footer-bottom {
    padding: 24px 32px;
  }
}

/* Mobile */
@media (max-width: 680px) {
  /* Header */
  .site-nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .header-inner {
    height: 64px;
  }

  /* Hero */
  .blog-hero {
    padding: 48px 24px 36px;
  }

  /* Grid */
  .post-grid {
    grid-template-columns: 1fr;
  }

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

  /* Post */
  .post-header-wrap {
    padding: 36px 24px 24px;
  }

  .post-content {
    font-size: 1rem;
  }

  /* Author */
  .author-profile {
    flex-direction: column;
    gap: 16px;
  }

  /* Footer */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 0 24px 40px;
  }

  .footer-col--brand {
    grid-column: auto;
  }

  .footer-divider {
    margin: 0 24px;
  }

  .footer-bottom {
    padding: 20px 24px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .post-title {
    font-size: 1.75rem;
  }

  .taxonomy-title {
    font-size: 1.75rem;
  }

  .error-code {
    font-size: 5rem;
  }
}
