/*
Theme Name: Realitní Rentiér
Theme URI: https://realitnirentier.cz
Author: JARVIS (AI COO)
Description: Minimální čisté téma pro Realitní Rentiér. Čisté HTML, žádné page buildery. Brand Guide v1.0.
Version: 1.0.0
License: Proprietary
Text Domain: realitni-rentier
*/

/* ===================================================================
   CSS VARIABLES (Brand Guide v1.0)
   =================================================================== */
:root {
  /* Barvy */
  --color-cream: #f8f4e6;
  --color-subtle-cream: #efe9d7;
  --color-dark: #393e52;
  --color-dark-deep: #202a31;
  --color-gold: #d0a763;
  --color-gold-dark: #96752e;
  --color-muted: #8a8d94;
  --color-wine: #8c3a4f;
  --color-forest: #3d6b52;
  --color-border-light: #e0d9c7;
  --color-border-dark: #4a4f63;
  --color-white: #ffffff;

  /* Fonty */
  --font-headline: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;

  /* Layout */
  --container-max: 1120px;
  --container-narrow: 780px;
  --section-padding: 80px;
  --section-padding-mobile: 48px;
}

/* ===================================================================
   RESET & BASE
   =================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-dark-deep);
  background: var(--color-cream);
}

a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
img { max-width: 100%; height: auto; display: block; }
h1, h2 { font-family: var(--font-headline); font-weight: 400; line-height: 1.2; }
h3, h4 { font-family: var(--font-body); }
h3 { font-weight: 700; }
h4 { font-weight: 600; }

h1 { font-size: 48px; }
h2 { font-size: 36px; }
h3 { font-size: 22px; line-height: 1.3; }
h4 { font-size: 18px; line-height: 1.4; }
p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

/* ===================================================================
   UTILITY CLASSES
   =================================================================== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 24px;
}
.text-center { text-align: center; }
.text-gold { color: var(--color-gold); }
.text-gold-dark { color: var(--color-gold-dark); }
.text-muted { color: var(--color-muted); }

/* ===================================================================
   SECTIONS — alternating light/dark
   =================================================================== */
.section {
  padding: var(--section-padding) 0;
}
.section--cream {
  background: var(--color-cream);
  color: var(--color-dark-deep);
}
.section--subtle {
  background: var(--color-subtle-cream);
  color: var(--color-dark-deep);
}
.section--dark {
  background: var(--color-dark);
  color: var(--color-cream);
}
.section--dark h1, .section--dark h2 { color: var(--color-cream); }
.section--dark-deep {
  background: var(--color-dark-deep);
  color: var(--color-cream);
}
.section--dark-deep h1, .section--dark-deep h2 { color: var(--color-cream); }

/* ===================================================================
   BUTTONS (Brand Guide CTA)
   =================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  padding: 14px 36px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
  line-height: 1;
  text-decoration: none;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.btn:active { transform: translateY(0); }

/* Gold on dark */
.btn--gold {
  background: var(--color-gold);
  color: var(--color-dark-deep);
}
.btn--gold:hover { background: #c49a58; }

/* Dark on light */
.btn--dark {
  background: var(--color-dark);
  color: var(--color-cream);
}
.btn--dark:hover { background: #2e3344; }

/* Deep dark on light */
.btn--deep {
  background: var(--color-dark-deep);
  color: var(--color-cream);
}

/* Wine accent */
.btn--wine {
  background: var(--color-wine);
  color: var(--color-cream);
}

/* Forest accent */
.btn--forest {
  background: var(--color-forest);
  color: var(--color-cream);
}

/* Outline variants */
.btn--outline-gold {
  background: transparent;
  border: 2px solid var(--color-gold);
  color: var(--color-gold);
}
.btn--outline-dark {
  background: transparent;
  border: 2px solid var(--color-dark);
  color: var(--color-dark);
}

/* Large CTA */
.btn--lg {
  font-size: 16px;
  padding: 18px 48px;
}

/* ===================================================================
   CARDS
   =================================================================== */
.card {
  border-radius: 12px;
  padding: 28px 24px;
}
.card--light {
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
}
.card--dark {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--color-border-dark);
}

/* ===================================================================
   SITE HEADER
   =================================================================== */
.site-header {
  background: var(--color-dark-deep);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--color-border-dark);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo img {
  height: 40px;
  width: auto;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.site-nav a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(248,244,230,0.7);
  transition: color 0.2s ease;
}
.site-nav a:hover { color: var(--color-gold); }
.site-nav .btn {
  font-size: 13px;
  padding: 10px 24px;
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-cream);
  margin: 5px 0;
  transition: 0.3s;
}

/* ===================================================================
   SITE FOOTER
   =================================================================== */
.site-footer {
  background: var(--color-dark-deep);
  padding: 48px 0 24px;
  color: var(--color-muted);
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.footer-col h4 {
  color: var(--color-cream);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 2;
}
.footer-col a:hover { color: var(--color-gold); }
.footer-bottom {
  border-top: 1px solid var(--color-border-dark);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.footer-bottom a { color: var(--color-muted); }
.footer-bottom a:hover { color: var(--color-gold); }

/* ===================================================================
   EXIT POPUP
   =================================================================== */
.exit-popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(32,42,49,0.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.exit-popup-overlay.active { display: flex; }
.exit-popup {
  background: var(--color-cream);
  border-radius: 16px;
  max-width: 520px;
  width: 90%;
  padding: 48px 40px;
  position: relative;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,0.4);
}
.exit-popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--color-muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.exit-popup-close:hover { color: var(--color-dark-deep); }
.exit-popup h3 {
  font-family: var(--font-headline);
  font-weight: 400;
  font-size: 28px;
  color: var(--color-dark-deep);
  margin-bottom: 12px;
}
.exit-popup p {
  color: var(--color-dark);
  font-size: 15px;
  margin-bottom: 24px;
}
.exit-popup .ecomail-form input[type="email"] {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 15px;
  margin-bottom: 12px;
  outline: none;
}
.exit-popup .ecomail-form input[type="email"]:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(208,167,99,0.15);
}
.exit-popup .btn { width: 100%; }

/* Exit popup — grid layout (ebook mockup + text) */
.exit-popup--grid {
  text-align: left;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 40px;
}
.exit-popup--grid .exit-popup-close { position: absolute; top: 12px; right: 12px; }
.exit-popup-visual {
  display: flex;
  align-items: flex-start;
}
.exit-popup-ebook-mock {
  width: 140px;
  height: 190px;
  background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-deep) 100%);
  border-radius: 4px;
  box-shadow: 4px 4px 16px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
}
.exit-popup-ebook-title {
  font-family: var(--font-headline);
  font-size: 22px;
  color: var(--color-gold);
  line-height: 1.2;
  display: block;
}
.exit-popup-ebook-sub {
  font-size: 12px;
  color: rgba(248,244,230,0.7);
  margin-top: 4px;
  display: block;
}
.exit-popup-content h3 {
  font-family: var(--font-headline);
  font-weight: 400;
  font-size: 28px;
  color: var(--color-dark-deep);
  margin-bottom: 8px;
}
.exit-popup-content p {
  font-size: 15px;
  color: var(--color-dark);
  margin-bottom: 16px;
}
.exit-popup-dismiss {
  margin-top: 8px !important;
}
.exit-popup-dismiss a {
  font-size: 13px;
  color: #999;
  text-decoration: none;
}
.exit-popup-dismiss a:hover {
  color: var(--color-dark);
}

/* ===================================================================
   MOBILE STICKY CTA BAR
   =================================================================== */
.mobile-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--color-dark-deep);
  padding: 12px 16px;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.2);
  display: none;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.mobile-cta-bar.visible {
  transform: translateY(0);
}
.mobile-cta-btn {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  text-align: center;
}

/* ===================================================================
   BLOG
   =================================================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
}
.blog-card {
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.blog-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.blog-card-img {
  aspect-ratio: 16/9;
  object-fit: cover;
  width: 100%;
}
.blog-card-body {
  padding: 24px;
}
.blog-card-meta {
  font-size: 13px;
  color: var(--color-muted);
  margin-bottom: 8px;
}
.blog-card-title {
  font-family: var(--font-headline);
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 12px;
  line-height: 1.3;
}
.blog-card-excerpt {
  font-size: 14px;
  color: var(--color-dark);
  line-height: 1.6;
}

/* Article content */
.article-content {
  max-width: var(--container-narrow);
  margin: 0 auto;
}
.article-content h2 {
  font-size: 30px;
  margin: 48px 0 20px;
}
.article-content h3 {
  font-size: 22px;
  margin: 36px 0 16px;
}
.article-content p {
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: 1.5em;
}
.article-content ul, .article-content ol {
  margin: 0 0 1.5em 1.5em;
  font-size: 17px;
  line-height: 1.8;
}
.article-content blockquote {
  border-left: 3px solid var(--color-gold);
  padding: 16px 24px;
  margin: 24px 0;
  background: var(--color-subtle-cream);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--color-dark);
}

/* FAQ Schema */
.faq-section { margin: 48px 0; }
.faq-item {
  border-bottom: 1px solid var(--color-border-light);
  padding: 20px 0;
}
.faq-question {
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-question::after {
  content: '+';
  font-size: 24px;
  color: var(--color-gold-dark);
  transition: transform 0.2s ease;
}
.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}
.faq-answer {
  padding-top: 12px;
  font-size: 15px;
  line-height: 1.7;
  display: none;
}
.faq-item.open .faq-answer { display: block; }

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 768px) {
  :root {
    --section-padding: var(--section-padding-mobile);
  }

  h1 { font-size: 32px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }

  /* Nav */
  .site-nav { display: none; }
  .site-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-dark-deep);
    padding: 24px;
    gap: 16px;
    border-top: 1px solid var(--color-border-dark);
  }
  .nav-toggle { display: block; }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  /* Blog */
  .blog-grid { grid-template-columns: 1fr; }

  /* Buttons full width on mobile */
  .btn--lg {
    width: 100%;
    max-width: 400px;
  }

  /* Exit popup — stacked on mobile */
  .exit-popup--grid {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 32px 24px;
  }
  .exit-popup-visual {
    justify-content: center;
  }
  .exit-popup-ebook-mock {
    width: 120px;
    height: 160px;
  }

  /* Mobile CTA bar — show on mobile only */
  .mobile-cta-bar {
    display: block;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 28px; }
  h2 { font-size: 24px; }
  .container { padding: 0 16px; }
}
