/* =========================================================
   finanzhack Home
   Datei: assets/css/finanzhack-home.css
   Zweck: Startseiten-Shortcodes und Startseiten-spezifische Module
   ========================================================= */

/* =========================================================
   Homepage: Neueste Hacks Uebersicht
   Shortcode: [finanzhack_latest_hacks]
   ========================================================= */

.fh-home-hacks {
  background: transparent;
  padding: 48px 0 56px;
}

.fh-home-hacks-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 30px;
}

.fh-home-eyebrow {
  margin: 0 0 12px;
  color: #c45100;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.28em;
}

.fh-home-hacks-head h2 {
  margin: 0;
  color: #070709;
  font-family: var(--fh-font-headline, "Arial Black", Arial, Helvetica, sans-serif);
  font-size: clamp(42px, 4.8vw, 68px);
  line-height: 0.92;
  letter-spacing: -0.075em;
}

.fh-home-all-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: #fffdfa;
  color: #070709 !important;
  border: 2px solid rgba(7, 7, 9, 0.12);
  border-radius: 999px;
  text-decoration: none !important;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.fh-home-all-link:hover {
  transform: translateY(-2px);
  border-color: #070709;
}

.fh-home-all-link span {
  font-size: 22px;
  line-height: 1;
}

.fh-home-hacks-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.fh-home-hack-card {
  display: flex;
  flex-direction: column;
  min-height: 360px;
  padding: 26px;
  background: #fffdfa;
  border: 3px solid #070709;
  box-shadow: 6px 6px 0 rgba(7, 7, 9, 0.18);
  color: #070709;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.fh-home-hack-card:hover {
  transform: translateY(-4px);
  box-shadow: 8px 8px 0 #070709;
}

.fh-home-hack-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.fh-home-hack-badge,
.fh-home-hack-time {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 8px 14px;
  border-radius: 999px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
}

.fh-home-hack-badge {
  background: #f28a1a;
  color: #ffffff;
}

.fh-home-hack-time {
  background: #17181d;
  color: #ffffff;
}

.fh-home-hack-card h3 {
  margin: 0 0 16px;
  color: #070709;
  font-family: var(--fh-font-headline, "Arial Black", Arial, Helvetica, sans-serif);
  font-size: clamp(30px, 2.5vw, 42px);
  line-height: 0.96;
  letter-spacing: -0.065em;
}

.fh-home-hack-card h3 a {
  color: #070709 !important;
  text-decoration: none !important;
}

.fh-home-hack-card p {
  margin: 0;
  color: #2f3440;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.55;
}

.fh-home-hack-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.fh-home-hack-meta span {
  display: inline-flex;
  padding: 7px 11px;
  background: #f3efe7;
  border: 1px solid rgba(7, 7, 9, 0.14);
  border-radius: 999px;
  color: #070709;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
}

.fh-home-hack-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin-top: auto;
  padding: 16px 20px;
  background: #070709;
  color: #ffffff !important;
  border: 2px solid #070709;
  text-decoration: none !important;
  font-family: var(--fh-font-headline, "Arial Black", Arial, Helvetica, sans-serif);
  font-size: 15px;
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.fh-home-hack-button:hover {
  background: #f28a1a;
  border-color: #f28a1a;
  transform: translateY(-2px);
}

.fh-home-hack-button span {
  font-size: 20px;
  line-height: 1;
}

@media (max-width: 1100px) {
  .fh-home-hacks-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .fh-home-hacks {
    padding: 36px 0 44px;
  }

  .fh-home-hacks-head {
    display: block;
  }

  .fh-home-all-link {
    margin-top: 20px;
  }

  .fh-home-hacks-grid {
    grid-template-columns: 1fr;
  }

  .fh-home-hack-card {
    min-height: auto;
  }
}

@media (max-width: 430px) {
  .fh-home-hack-top {
    flex-direction: column;
    align-items: flex-start;
  }
}
.fh-home-wide-section {
  width: 100%;
  padding: 0;
}

.fh-home-wide-inner {
  width: min(1180px, calc(100% - 48px));
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.fh-home-wide-inner .fh-home-hacks {
  width: 100%;
  max-width: none;
  margin: 0;
}
/* Notfall-Fix, falls der Bereich dunkel ist, aber keine fh-section-dark Klasse hat */
body.dark-mode .fh-home-hacks-head h2,
body.is-dark-mode .fh-home-hacks-head h2,
body.dark .fh-home-hacks-head h2,
[data-theme="dark"] .fh-home-hacks-head h2 {
  color: #fffdfa !important;
  opacity: 1 !important;
}
/* =========================================================
   NOTFALL-FIX DARK MODE:
   Ueberschriften sichtbar machen ohne fh-section-dark Klasse
   ========================================================= */

/* 15-Minuten-Hacks */
body.dark-mode .fh-home-hacks-head h2,
body.is-dark-mode .fh-home-hacks-head h2,
body.dark .fh-home-hacks-head h2,
[data-theme="dark"] .fh-home-hacks-head h2 {
  color: #fffdfa !important;
  -webkit-text-fill-color: #fffdfa !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Problem-Bereich: "Was willst du heute loesen?" */
body.dark-mode .fh-problem-header-retro h2,
body.is-dark-mode .fh-problem-header-retro h2,
body.dark .fh-problem-header-retro h2,
[data-theme="dark"] .fh-problem-header-retro h2 {
  color: #fffdfa !important;
  -webkit-text-fill-color: #fffdfa !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Eyebrow Problem-Bereich: "Starte mit deinem Problem" */
body.dark-mode .fh-problem-eyebrow-retro,
body.is-dark-mode .fh-problem-eyebrow-retro,
body.dark .fh-problem-eyebrow-retro,
[data-theme="dark"] .fh-problem-eyebrow-retro {
  color: #f28a1a !important;
  -webkit-text-fill-color: #f28a1a !important;
  opacity: 1 !important;
  visibility: visible !important;
}
/* Fallende Coins nur fuer diesen Problem-Block */
.fh-problem-section-retro {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.fh-problem-section-retro > *:not(.fh-falling-coin) {
  position: relative;
  z-index: 2;
}

.fh-falling-coin {
  position: absolute;
  top: -48px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #f28a1a;
  border: 3px solid #070709;
  box-shadow: 4px 4px 0 #070709;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  animation-name: fhCoinFall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.fh-falling-coin::before {
  content: "\20AC";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #070709;
  font-family: Arial Black, Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1;
}

.fh-coin-1 {
  left: 8%;
  animation-duration: 7.5s;
  animation-delay: 0.2s;
}

.fh-coin-2 {
  left: 28%;
  width: 24px;
  height: 24px;
  animation-duration: 8.8s;
  animation-delay: 1.7s;
}

.fh-coin-2::before {
  font-size: 12px;
}

.fh-coin-3 {
  left: 52%;
  animation-duration: 7.9s;
  animation-delay: 3.1s;
}

.fh-coin-4 {
  left: 73%;
  width: 26px;
  height: 26px;
  animation-duration: 9.4s;
  animation-delay: 0.9s;
}

.fh-coin-4::before {
  font-size: 13px;
}

.fh-coin-5 {
  left: 91%;
  animation-duration: 8.2s;
  animation-delay: 4.4s;
}

@keyframes fhCoinFall {
  0% {
    transform: translateY(-60px) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 0.9;
  }

  90% {
    opacity: 0.9;
  }

  100% {
    transform: translateY(720px) rotate(360deg);
    opacity: 0;
  }
}

/* Respektiert Nutzer, die Animationen reduziert haben */
@media (prefers-reduced-motion: reduce) {
  .fh-falling-coin {
    animation: none;
    display: none;
  }
}
/* =========================================================
   Mobile Typo Guard
   Mobile Browser besitzen "Arial Black" nicht immer. Diese Regeln
   halten globale Module in derselben Font-Kette.
   ========================================================= */

@media (max-width: 820px) {
  .fh-module h1,
  .fh-module h2,
  .fh-module h3,
  .fh-module h4,
  .fh-home-hacks-head h2,
  .fh-home-hack-card h3,
  .fh-problem-header-retro h2 {
    font-family: var(--fh-font-headline, "Arial Black", Impact, Haettenschweiler, "Arial Narrow Bold", Arial, Helvetica, sans-serif) !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
    text-rendering: geometricPrecision;
  }

  .fh-module,
  .fh-module p,
  .fh-module li,
  .fh-module small,
  .fh-home-hack-card p {
    font-family: var(--fh-font-body, Georgia, "Times New Roman", serif) !important;
  }
}

