/* ============================================================
   kroatien-immobilien.de — Premium Real Estate Advisory
   Designed for DACH audience — trustworthy, elegant, conversion-
   optimized.
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --color-primary: #0f2b4a;
  --color-primary-light: #1a3f62;
  --color-secondary: #2b6cb0;
  --color-secondary-light: #4a8fd4;
  --color-accent: #d4a017;
  --color-accent-light: #e8b830;
  --color-text: #1a202c;
  --color-text-light: #4a5568;
  --color-text-muted: #718096;
  --color-bg: #ffffff;
  --color-bg-alt: #f0f4f8;
  --color-bg-card: #ffffff;
  --color-border: #e2e8f0;
  --color-success: #38a169;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --max-width: 1200px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --transition: all 0.3s ease;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-secondary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--color-primary-light); }
ul, ol { padding-left: 1.5rem; }
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.3; color: var(--color-primary); }
h1 { font-size: 2.75rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-align: center;
  font-family: var(--font-main);
}
.btn--primary {
  background: var(--color-accent);
  color: var(--color-primary);
}
.btn--primary:hover {
  background: var(--color-accent-light);
  color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn--secondary {
  background: var(--color-secondary);
  color: #fff;
}
.btn--secondary:hover {
  background: var(--color-secondary-light);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn--outline {
  background: transparent;
  color: var(--color-secondary);
  border: 2px solid var(--color-secondary);
}
.btn--outline:hover {
  background: var(--color-secondary);
  color: #fff;
}
.btn--large { padding: 1.125rem 2.5rem; font-size: 1.125rem; }

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 70px;
}
.nav__logo { font-family: var(--font-heading); font-size: 1.5rem; color: var(--color-primary); }
.nav__logo span { color: var(--color-accent); }
.nav__links { display: flex; align-items: center; gap: 2rem; list-style: none; padding: 0; }
.nav__links a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}
.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: var(--transition);
}
.nav__links a:hover::after, .nav__links a.active::after { width: 100%; }
.nav__links a.active { color: var(--color-secondary); }
.nav__cta { margin-left: 0.5rem; }
.nav__hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; }
.nav__hamburger span { width: 28px; height: 2px; background: var(--color-text); border-radius: 2px; transition: var(--transition); }

/* --- Hero --- */
.hero {
  padding: 140px 0 80px;
  background:
    linear-gradient(135deg, rgba(15,43,74,0.92) 0%, rgba(26,63,98,0.88) 50%, rgba(13,39,64,0.95) 100%),
    url('/images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero__content { position: relative; z-index: 2; max-width: 800px; }
.hero__content h1 { color: #fff; font-size: 3.25rem; margin-bottom: 1.25rem; }
.hero__content h1 span { color: var(--color-accent); }
.hero__content p { font-size: 1.2rem; color: rgba(255,255,255,0.85); margin-bottom: 2rem; line-height: 1.8; }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero--sub {
  padding: 120px 0 60px;
  text-align: center;
}
.hero--sub h1 { font-size: 2.5rem; }
.hero--sub .container { max-width: 700px; }

/* --- Page Header (for subpages without full hero) --- */
.page-header {
  padding: 120px 0 40px;
  background:
    linear-gradient(135deg, rgba(15,43,74,0.92) 0%, rgba(26,63,98,0.88) 100%),
    url('/images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: center;
}
.page-header h1 { color: #fff; font-size: 2.25rem; margin-bottom: 0.5rem; }
.page-header p { color: rgba(255,255,255,0.8); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* --- Sections --- */
.section { padding: 5rem 0; }
.section--alt { background: var(--color-bg-alt); }
.section__title { text-align: center; margin-bottom: 3rem; }
.section__title h2 { font-size: 2.25rem; }
.section__title p { color: var(--color-text-muted); max-width: 600px; margin: 0.5rem auto 0; }

/* --- Cards --- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 2rem; }
.card {
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--color-border);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card__image { width: 100%; height: 200px; object-fit: cover; }
.card__body { padding: 1.5rem; }
.card__icon { font-size: 2.5rem; margin-bottom: 1rem; }
.card__title { font-size: 1.25rem; margin-bottom: 0.75rem; }
.card__text { color: var(--color-text-muted); font-size: 0.95rem; margin-bottom: 1rem; }
.card__link { font-weight: 600; color: var(--color-secondary); display: inline-flex; align-items: center; gap: 0.5rem; }
.card__link:hover { gap: 0.75rem; }
.card__category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
}

/* --- Article Content --- */
.article-content { max-width: 800px; margin: 0 auto; padding: 120px 1.5rem 5rem; }
.article-content h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.article-meta { color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--color-border); }
.article-section { margin-bottom: 2.5rem; }
.article-section h2 { font-size: 1.75rem; margin-top: 2rem; }
.article-section h3 { font-size: 1.25rem; margin-top: 1.5rem; }
.article-section ul, .article-section ol { margin-bottom: 1rem; }
.article-section li { margin-bottom: 0.5rem; }
.article-section blockquote {
  border-left: 4px solid var(--color-accent);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--color-bg-alt);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--color-text-light);
}
.article-section .table-wrap { overflow-x: auto; margin: 1.5rem 0; }
.article-section table { width: 100%; border-collapse: collapse; }
.article-section th, .article-section td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.article-section th { background: var(--color-bg-alt); font-weight: 600; }
.article-section tr:hover { background: var(--color-bg-alt); }
.article-section .highlight-box {
  background: linear-gradient(135deg, #ebf4ff, #e6f0ff);
  border: 1px solid #c3d9ff;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 1.5rem 0;
}
.article-section .highlight-box strong { color: var(--color-primary); }

/* --- In-Article CTA --- */
.cta-box {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin: 3rem 0;
  text-align: center;
}
.cta-box h3 { color: #fff; font-size: 1.5rem; margin-bottom: 0.75rem; }
.cta-box p { color: rgba(255,255,255,0.85); margin-bottom: 1.5rem; }

/* --- Lead Capture --- */
.lead-section {
  background: var(--color-bg-alt);
  padding: 5rem 0;
  text-align: center;
}
.lead-section__inner { max-width: 600px; margin: 0 auto; }
.lead-section h2 { margin-bottom: 0.5rem; }
.lead-section p { color: var(--color-text-muted); margin-bottom: 2rem; }

.lead-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
}
.lead-form__row { display: flex; gap: 1rem; }
.lead-form input, .lead-form textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font-main);
  transition: var(--transition);
  background: var(--color-bg);
}
.lead-form input:focus, .lead-form textarea:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(43,108,176,0.15);
}
.lead-form textarea { min-height: 120px; resize: vertical; }

.lead-magnet {
  background: var(--color-bg);
  border: 2px dashed var(--color-accent);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin: 3rem auto;
  max-width: 500px;
  text-align: center;
}
.lead-magnet__icon { font-size: 3rem; margin-bottom: 1rem; }
.lead-magnet h3 { color: var(--color-primary); margin-bottom: 0.5rem; }
.lead-magnet p { color: var(--color-text-muted); font-size: 0.95rem; margin-bottom: 1.5rem; }
.lead-magnet .btn { width: 100%; }

/* --- Facts / Data Points --- */
.data-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin: 2rem 0; }
.data-point { text-align: center; padding: 1.5rem; }
.data-point__number { font-size: 2.5rem; font-weight: 700; color: var(--color-secondary); font-family: var(--font-heading); }
.data-point__label { color: var(--color-text-muted); font-size: 0.95rem; }

/* --- Trust Bar --- */
.trust-bar {
  background: var(--color-primary);
  color: #fff;
  padding: 3rem 0;
  text-align: center;
}
.trust-bar__inner { display: flex; justify-content: center; gap: 4rem; flex-wrap: wrap; }
.trust-bar__item { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.trust-bar__icon { font-size: 2rem; }
.trust-bar__text { font-weight: 500; font-size: 0.95rem; color: rgba(255,255,255,0.85); }

/* --- Footer --- */
.footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.8);
  padding: 4rem 0 2rem;
}
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer__brand .nav__logo { color: #fff; margin-bottom: 1rem; display: inline-block; }
.footer__brand p { font-size: 0.9rem; color: rgba(255,255,255,0.6); }
.footer h4 { color: #fff; font-family: var(--font-main); font-weight: 600; margin-bottom: 1rem; font-size: 1rem; }
.footer ul { list-style: none; padding: 0; }
.footer li { margin-bottom: 0.5rem; }
.footer a { color: rgba(255,255,255,0.65); font-size: 0.9rem; }
.footer a:hover { color: var(--color-accent); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 2rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer__bottom p { font-size: 0.85rem; color: rgba(255,255,255,0.5); margin: 0; }
.footer__bottom a { color: rgba(255,255,255,0.5); }
.footer__bottom a:hover { color: var(--color-accent); }
.footer__legal { display: flex; gap: 1.5rem; }

/* --- Breadcrumb --- */
.breadcrumb { padding: 90px 0 0; background: var(--color-bg-alt); font-size: 0.85rem; }
.breadcrumb__inner { max-width: var(--max-width); margin: 0 auto; padding: 0.75rem 1.5rem; color: var(--color-text-muted); }
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-secondary); }

/* --- Subnav (Pillar navigation) --- */
.subnav { background: var(--color-bg); border-bottom: 1px solid var(--color-border); position: sticky; top: 70px; z-index: 100; }
.subnav__inner { display: flex; gap: 0; max-width: var(--max-width); margin: 0 auto; overflow-x: auto; }
.subnav a {
  padding: 0.875rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
}
.subnav a:hover, .subnav a.active { color: var(--color-secondary); border-bottom-color: var(--color-secondary); }

/* --- Table of Contents --- */
.toc { background: var(--color-bg-alt); border-radius: var(--radius-md); padding: 1.5rem; margin-bottom: 2rem; border: 1px solid var(--color-border); }
.toc h3 { font-family: var(--font-main); font-size: 1rem; margin-bottom: 0.75rem; color: var(--color-text); }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc li { padding: 0.35rem 0; }
.toc a { color: var(--color-text-muted); font-size: 0.95rem; }
.toc a:hover { color: var(--color-secondary); }

/* --- Comparison Table --- */
.comparison { margin: 2rem 0; }
.comparison__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-bottom: 1px solid var(--color-border); }
.comparison__row:last-child { border-bottom: none; }
.comparison__cell { padding: 1rem; }
.comparison__cell:first-child { font-weight: 600; background: var(--color-bg-alt); }

/* --- Accordion (FAQ) --- */
.accordion { margin: 1.5rem 0; }
.accordion__item { border: 1px solid var(--color-border); border-radius: var(--radius-sm); margin-bottom: 0.5rem; overflow: hidden; }
.accordion__header {
  padding: 1rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-bg);
  transition: var(--transition);
}
.accordion__header:hover { background: var(--color-bg-alt); }
.accordion__header::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--color-secondary);
  transition: var(--transition);
}
.accordion__item.active .accordion__header::after { content: '−'; }
.accordion__body { padding: 0 1.25rem; max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; }
.accordion__item.active .accordion__body { padding: 1rem 1.25rem; max-height: 500px; }

/* --- Pillar Intro --- */
.pillar-intro { padding: 4rem 0; text-align: center; }
.pillar-intro h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.pillar-intro p { max-width: 700px; margin: 0 auto 1.5rem; color: var(--color-text-muted); font-size: 1.1rem; }

/* --- Author Box --- */
.author-box { display: flex; gap: 1.5rem; align-items: center; background: var(--color-bg-alt); border-radius: var(--radius-md); padding: 1.5rem; margin: 2rem 0; }
.author-box__avatar { width: 60px; height: 60px; border-radius: 50%; background: var(--color-secondary); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 1.5rem; flex-shrink: 0; }
.author-box__name { font-weight: 600; margin-bottom: 0.25rem; }
.author-box__desc { color: var(--color-text-muted); font-size: 0.9rem; margin: 0; }

/* --- Related Articles --- */
.related-articles { margin: 3rem 0; padding-top: 2rem; border-top: 1px solid var(--color-border); }
.related-articles h3 { margin-bottom: 1.5rem; }

/* --- Mobile Responsive --- */
@media (max-width: 968px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 2rem; }
  .hero__content h1 { font-size: 2.25rem; }
  .hero--sub h1 { font-size: 1.75rem; }
  .section__title h2 { font-size: 1.75rem; }
  .article-content h1 { font-size: 1.75rem; }
  .data-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav__links { display: none; flex-direction: column; position: absolute; top: 70px; left: 0; right: 0; background: var(--color-bg); padding: 1.5rem; gap: 1rem; border-bottom: 1px solid var(--color-border); box-shadow: var(--shadow-md); }
  .nav__links.open { display: flex; }
  .nav__hamburger { display: flex; }
  .hero { padding: 110px 0 50px; }
  .hero__content h1 { font-size: 1.75rem; }
  .hero__content p { font-size: 1rem; }
  .hero__actions { flex-direction: column; }
  .lead-form__row { flex-direction: column; }
  .card-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer__bottom { flex-direction: column; text-align: center; }
  .trust-bar__inner { gap: 2rem; }
  .article-content { padding-top: 100px; }
  .page-header { padding: 100px 0 30px; }
  .page-header h1 { font-size: 1.75rem; }
  .subnav { top: 70px; }
  .comparison__row { grid-template-columns: 1fr; }
}

/* --- Skip link (accessibility) --- */
.skip-link { position: absolute; top: -40px; left: 0; background: var(--color-primary); color: #fff; padding: 8px 16px; z-index: 9999; }
.skip-link:focus { top: 0; }

/* --- Print styles --- */
@media print {
  .nav, .subnav, .footer, .lead-section, .cta-box, .hero__actions { display: none; }
  .hero { padding: 2rem 0; background: none; color: var(--color-text); }
  .hero__content h1 { color: var(--color-primary); }
  .article-content { padding-top: 0; }
}
