/* ToBeOut Ghost Theme v2.0 */

/* ===== LOCAL FONTS (Manrope) ===== */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/manrope-cyrillic-500-normal.woff2') format('woff2');
  unicode-range: U+0400-04FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/manrope-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/manrope-cyrillic-600-normal.woff2') format('woff2');
  unicode-range: U+0400-04FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/manrope-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/manrope-cyrillic-700-normal.woff2') format('woff2');
  unicode-range: U+0400-04FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/manrope-latin-700-normal.woff2') format('woff2');
}

/* ===== VARIABLES ===== */
:root {
  --primary: #E66C4A;
  --primary-dark: #C85535;
  --white: #FFFFFF;
  --light-gray: #F5F5F5;
  --gray: #A3A3A3;
  --text: #333333;
  --border: #E8E8E8;
  --font: 'Manrope', -apple-system, sans-serif;
  --radius: 8px;
  --radius-lg: 16px;
  --max-width: 1200px;
  --content-width: 720px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: var(--font);
  font-weight: 500;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ===== HEADER — matches tobeout.com exactly ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #ebebeb;
  padding: 0 32px;
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.site-logo img {
  height: 36px;
  width: auto;
  display: block;
}
.site-logo-text {
  font-family: var(--font);
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.3px;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.site-nav li a {
  color: #555;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.site-nav li a:hover {
  color: var(--text);
  background: var(--light-gray);
}
.nav-cta {
  background: var(--primary) !important;
  color: #fff !important;
  padding: 9px 20px !important;
  border-radius: var(--radius) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  transition: background 0.2s !important;
  white-space: nowrap;
}
.nav-cta:hover {
  background: var(--primary-dark) !important;
  color: #fff !important;
}
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* ===== HERO ===== */
.site-hero {
  position: relative;
  background: #222;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 380px;
  display: flex;
  align-items: center;
}
.site-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.55) 100%);
}
.site-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 72px 32px;
  text-align: center;
}
.site-hero-content h1 {
  font-size: 44px;
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 24px rgba(0,0,0,0.9);
}
.hero-accent {
  color: #ffcbb6;
  text-shadow: 0 2px 24px rgba(0,0,0,0.9);
}
.site-hero-content p {
  font-size: 18px;
  font-weight: 500;
  color: rgba(255,255,255,0.88);
  max-width: 540px;
  margin: 0 auto;
  text-shadow: 0 1px 12px rgba(0,0,0,0.7);
}

/* ===== MAIN ===== */
.site-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 52px 32px;
}

/* ===== POST GRID ===== */
.post-feed {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.post-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.post-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.post-card-image {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--light-gray);
}
.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.post-card:hover .post-card-image img { transform: scale(1.03); }
.post-card-content { padding: 20px; }
.post-card-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--primary);
  margin-bottom: 10px;
}
.post-card-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-title a { color: inherit; }
.post-card-title a:hover { color: var(--primary); }
.post-card-excerpt {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}
.post-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray);
}
.dot { color: var(--border); }

/* Featured post */
.post-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.post-card.featured .post-card-image {
  aspect-ratio: unset;
  min-height: 300px;
}
.post-card.featured .post-card-content {
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.post-card.featured .post-card-title {
  font-size: 26px;
  -webkit-line-clamp: 3;
}

/* ===== SINGLE POST ===== */
.post-header {
  max-width: var(--content-width);
  margin: 0 auto 40px;
  text-align: center;
}
.post-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  margin-bottom: 16px;
}
.post-title {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 20px;
  letter-spacing: -0.4px;
}
.post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  color: var(--gray);
}
.post-author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.post-author-name { font-weight: 600; color: var(--text); }
.post-feature-image {
  max-width: 900px;
  margin: 0 auto 48px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Post content */
.post-content {
  max-width: var(--content-width);
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.75;
  color: #444;
}
.post-content h2 { font-size: 24px; font-weight: 700; color: var(--text); margin: 40px 0 16px; }
.post-content h3 { font-size: 20px; font-weight: 600; color: var(--text); margin: 32px 0 12px; }
.post-content p { margin-bottom: 20px; }
.post-content ul, .post-content ol { margin: 0 0 20px 24px; }
.post-content li { margin-bottom: 8px; }
.post-content a { color: var(--primary); text-decoration: underline; }
.post-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 16px 24px;
  margin: 32px 0;
  background: var(--light-gray);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 18px;
  font-style: italic;
}
.post-content code {
  background: var(--light-gray);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
  font-family: monospace;
}
.post-content pre {
  background: var(--text);
  color: #fff;
  padding: 20px 24px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 24px 0;
}
.post-content pre code { background: none; padding: 0; color: inherit; }
.post-content img { border-radius: var(--radius); margin: 24px 0; }
.post-content hr { border: none; border-top: 1px solid var(--border); margin: 40px 0; }
.kg-card { margin: 32px 0; }
.kg-image-card img { border-radius: var(--radius); }
.kg-width-wide { margin-left: calc(50% - 45vw); margin-right: calc(50% - 45vw); max-width: 90vw; }
.kg-width-full { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; }

/* Post footer */
.post-footer {
  max-width: var(--content-width);
  margin: 48px auto 0;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.post-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.post-tag-pill {
  background: var(--light-gray);
  color: var(--gray);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  transition: background 0.2s, color 0.2s;
}
.post-tag-pill:hover { background: var(--primary); color: #fff; }

/* CTA block */
.post-cta {
  background: var(--text);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  margin: 48px 0;
}
.post-cta h3 {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}
.post-cta p {
  color: rgba(255,255,255,0.7);
  margin-bottom: 24px;
  font-size: 15px;
}
.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: var(--radius);
  transition: background 0.2s;
}
.btn-primary:hover { background: var(--primary-dark); color: #fff; }

/* Related posts */
.related-posts {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 32px;
  border-top: 1px solid var(--border);
}
.related-posts h3 { font-size: 20px; font-weight: 700; margin-bottom: 24px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 0;
}
.pagination a, .pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--gray);
  transition: all 0.2s;
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== FOOTER — matches tobeout.com exactly ===== */
.site-footer {
  background: #1a1a1a;
  padding: 48px 32px 32px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 40px;
  list-style: none;
  flex-wrap: wrap;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 28px;
}
.footer-links a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  transition: color 0.2s;
}
.footer-links a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-logo-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}
.footer-logo-wrap img {
  height: 28px;
  width: auto;
}
.footer-logo-text {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}
.footer-copy {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
}
.footer-email {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  transition: color 0.2s;
}
.footer-email:hover { color: #fff; }

/* ===== ERROR ===== */
.error-page { text-align: center; padding: 100px 32px; }
.error-code { font-size: 80px; font-weight: 700; color: var(--primary); line-height: 1; margin-bottom: 16px; }
.error-page h1 { font-size: 28px; margin-bottom: 12px; }
.error-page p { color: var(--gray); margin-bottom: 32px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .post-feed { grid-template-columns: repeat(2, 1fr); }
  .post-card.featured { grid-template-columns: 1fr; }
  .post-card.featured .post-card-image { min-height: 240px; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .site-header { padding: 0 20px; }
  .site-nav { display: none; }
  .site-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: #fff;
    padding: 12px 20px 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    gap: 2px;
  }
  .nav-hamburger { display: flex; }
  .site-hero-content h1 { font-size: 30px; }
  .site-hero-content { padding: 52px 20px; }
  .site-main { padding: 36px 20px; }
  .post-feed { grid-template-columns: 1fr; }
  .post-card.featured { grid-column: auto; }
  .post-title { font-size: 28px; }
  .post-content { font-size: 16px; }
  .related-grid { grid-template-columns: 1fr; }
  .related-posts { padding: 36px 20px; }
  .post-cta { padding: 28px 20px; }
  .footer-links { gap: 20px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ===== SUBSCRIBE BLOCK ===== */
.subscribe-block {
  max-width: var(--content-width);
  margin: 48px auto;
  background: var(--light-gray);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}
.subscribe-block-inner {
  padding: 36px 40px;
}
.subscribe-block-text h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.subscribe-block-text p {
  font-size: 15px;
  color: var(--gray);
  margin-bottom: 24px;
}
.subscribe-form-row {
  display: flex;
  gap: 10px;
}
.subscribe-input {
  flex: 1;
  height: 48px;
  padding: 0 16px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s;
}
.subscribe-input:focus {
  border-color: var(--primary);
}
.subscribe-btn {
  height: 48px;
  padding: 0 24px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  position: relative;
}
.subscribe-btn:hover { background: var(--primary-dark); }
.subscribe-btn-loading,
.subscribe-btn-success { display: none; }
.subscribe-form.loading .subscribe-btn-default { display: none; }
.subscribe-form.loading .subscribe-btn-loading { display: inline; }
.subscribe-form.success .subscribe-btn-default { display: none; }
.subscribe-form.success .subscribe-btn-success { display: inline; }
.subscribe-form.success .subscribe-input { opacity: 0.5; pointer-events: none; }
.subscribe-form.success .subscribe-btn { background: #2E7D32; }
.subscribe-notice {
  font-size: 12px;
  color: var(--gray);
  margin-top: 12px;
  margin-bottom: 0 !important;
}

@media (max-width: 600px) {
  .subscribe-block-inner { padding: 24px 20px; }
  .subscribe-form-row { flex-direction: column; }
  .subscribe-btn { width: 100%; }
}

/* Consent checkbox */
.subscribe-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  cursor: pointer;
}
.subscribe-checkbox {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
}
.subscribe-consent span {
  font-size: 12px;
  color: var(--gray);
  line-height: 1.5;
}
.subscribe-consent a {
  color: var(--primary);
  text-decoration: underline;
}
.subscribe-consent a:hover { color: var(--primary-dark); }
