/* ------------------------------
   Hintergrundbild + beige Overlay
------------------------------ */

body {
    margin: 0;
    padding: 0;
    font-family: system-ui, sans-serif;

    background: url("../assets/images/flex-how-bg.png") no-repeat center top fixed;
    background-size: cover;
    position: relative;
}

/* Beige Overlay */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(245, 235, 220, 0.55);
    pointer-events: none;
    z-index: -1;
}

/* ------------------------------
   Header
------------------------------ */

.fh-header {
    text-align: center;
    padding: 25px 20px;
    background: #ffffff;
    border-bottom: 3px solid #ec639a;
}

.fh-logo {
    width: 200px;
    max-width: 70%;
    height: auto;
    display: block;
    margin: 0 auto 8px;
}

.fh-sub {
    margin-top: 0;
    font-size: 0.95rem;
    color: #555;
}

/* ------------------------------
   Main Content
------------------------------ */

.fh-main {
    margin: 20px;
}
@media (max-width: 600px) {
    .fh-main {
        margin: 5px;
    }
}

/* ------------------------------
   Sektionen
------------------------------ */

.fh-section {
    padding: 40px 20px;
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.793);
    backdrop-filter: blur(3px);
    border-radius: 10px;
}

@media (max-width: 600px) {
    .fh-section {
        padding: 15px;
    }
}



.fh-section h1 {
    margin-top: -5px;
    margin-bottom: -5px;
    font-size: 2.7rem;
    color: #ec639a;
    text-align: center;
}

.fh-section h2 {
    margin-top: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #432544;
    text-align: center;
}

/* Divider */
.fh-divider {
    border: none;
    border-top: 1px solid #ddd;
    margin: 30px auto;
    width: 90%;
}

/* ------------------------------
   Freischalten
------------------------------ */

.fh-unlock-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

@media (min-width: 640px) {
    .fh-unlock-box {
        flex-direction: row;
    }
}

.fh-input {
    flex: 1;
    padding: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom:10px;
}

.fh-message {
    margin-top: 12px;
    font-weight: 600;
    color: #ec639a;
}

/* ------------------------------
   Buttons
------------------------------ */

.fh-btn {
    background: #ec639a;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
}

.fh-btn:hover {
    background: #c4006b;
    
box-shadow: 0 4px 14px rgba(0,0,0,0.1);
transform: translateY(-3px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (max-width: 600px) {
    .fh-btn {
       padding-top:15px;
    }
}





/* ------------------------------
   Installationsbereich
------------------------------ */

.fh-install.hidden {
    display: none;
}

/* Install-Button – groß, mittig, luftig */
.install-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;

    width: 100%;
    max-width: 360px;

    margin: 20px auto;
    padding: 20px 28px;

    font-size: 1.3rem;
    font-weight: 600;

    background-color: #E5007D;
    color: white;
    border: none;
    border-radius: 14px;

    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Icon */
.install-btn .install-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Hover */
.install-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(229, 0, 125, 0.35);
}

.firefox-btn .install-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Hover */
.firefox-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(229, 0, 125, 0.35);
}



/* Hidden */
.hidden {
    display: none;
}

/* Nur Install-Bereich zentrieren */
.fh-install,
#install-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.heft-desc {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 15px;
  line-height: 1.4;
}

/* =========================
   OVERLAY (FIX)
========================= */

#unlock-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.693);

  display: none; /* ← WICHTIG */
  
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#unlock-overlay.active {
  display: flex; /* ← wird beim Öffnen gesetzt */
}

.unlock-modal {
  background: white;
  padding: 25px;
  margin: 10px;
  color:#432544;
  border-radius: 10px;
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.unlock-close {
  margin-top: 15px;
  background: transparent;
  color: #E5007D;
  border: none;
  cursor: pointer;
}
/* =========================
   HEFT GRID
========================= */

.heft-grid {   
    display: grid;
    gap: 20px;
    margin-top: 25px;
    
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

/* Desktop: 3 Spalten */
@media (min-width: 900px) {
    .heft-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile: immer 1 Spalte */
@media (max-width: 600px) {
    .heft-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================
   HEFT CARD
========================= */

.heft {
    padding: 16px;
    border: 1px solid #eee;
    border-radius: 10px;
    text-align: center;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(3px);
    transition: 0.2s;
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);

    position: relative;
    overflow: hidden;
}

.heft:hover {
    background: rgba(255, 255, 255, 0.85);
}

.heft h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1rem;
}


/* =========================
   HEFT COVER (FIX)
========================= */

.heft-cover {
    width: 100%;
    height: auto;           /* ✅ KEIN Abschneiden mehr */
    aspect-ratio: 1 / 1;    /* ✅ immer quadratisch */
    object-fit: cover;

    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 10px;

    display: block;
}

/* Hover (nur Desktop sinnvoll) */
.heft-cover:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
    transform: translateY(-3px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}


/* =========================
   HEFT NUMBER (FIX)
========================= */

.heft-number {
    position: absolute;

    top: 8px;          /* ✅ NICHT mehr 0 */
    left: 8px;

    transform: none;   /* ✅ KEIN Verschieben mehr */

    width: 60px;
    height: 60px;
    object-fit: contain;

    z-index: 5;
    pointer-events: none;
}

/* Mobile */
@media (max-width: 600px) {
    .heft-number {
        width: 40px;
        height: 40px;

        top: 6px;
        left: 6px;
    }
}