/* ============================================================
   Homepage Férovémilovice
   ============================================================ */

.fm-home { overflow-x: hidden; }

/* ---- HERO ---- */
.fm-hero {
    position: relative;
    min-height: 78vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.fm-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    animation: fmHeroZoom 18s ease-in-out infinite alternate;
}
@keyframes fmHeroZoom {
    from { transform: scale(1.05); }
    to   { transform: scale(1.14); }
}
.fm-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(105deg,
        rgba(20,63,99,0.92) 0%,
        rgba(29,91,143,0.78) 45%,
        rgba(29,91,143,0.30) 100%);
}
.fm-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1180px;
    margin: 0 auto;
    padding: 60px 24px;
    width: 100%;
}
.fm-hero-kicker {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffd9d0;
    background: rgba(240,100,73,0.22);
    border: 1px solid rgba(240,100,73,0.5);
    padding: 6px 16px;
    border-radius: 999px;
    margin-bottom: 24px;
    animation: fmFadeUp 0.6s ease backwards;
    animation-delay: 0.1s;
}
.fm-hero-title {
    color: var(--fm-bila);
    font-size: clamp(2.6rem, 6vw, 4.6rem);
    margin: 0 0 20px;
    max-width: 14ch;
    animation: fmFadeUp 0.6s ease backwards;
    animation-delay: 0.2s;
}
.fm-hero-title em {
    font-style: italic;
    color: var(--fm-zlata);
}
.fm-hero-lead {
    color: rgba(255,255,255,0.92);
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    max-width: 42ch;
    margin: 0 0 36px;
    animation: fmFadeUp 0.6s ease backwards;
    animation-delay: 0.3s;
}
.fm-hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    animation: fmFadeUp 0.6s ease backwards;
    animation-delay: 0.4s;
}
.fm-btn-secondary--light {
    border-color: rgba(255,255,255,0.7);
    color: var(--fm-bila);
}
.fm-btn-secondary--light:hover {
    background: var(--fm-bila);
    color: var(--fm-modra);
    border-color: var(--fm-bila);
}

/* ---- SEKCE ---- */
.fm-section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 84px 24px;
}
.fm-section--alt {
    max-width: none;
    background: var(--fm-svetla);
    padding-left: 24px;
    padding-right: 24px;
}
.fm-section--alt > * {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
}
.fm-section-head {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 16px;
}
.fm-eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fm-koral);
    margin-bottom: 12px;
}
.fm-eyebrow--light { color: #ffd9d0; }
.fm-section-head h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin: 0 0 12px;
}
.fm-section-head p {
    color: var(--fm-text-mid);
    font-size: 1.1rem;
    margin: 0;
}

/* ---- MAPA CTA ---- */
.fm-mapa-cta {
    max-width: none;
    background: linear-gradient(115deg, var(--fm-modra-tmava), var(--fm-modra));
    position: relative;
    overflow: hidden;
}
.fm-mapa-cta::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(240,100,73,0.35), transparent 70%);
    border-radius: 50%;
}
.fm-mapa-cta-inner {
    position: relative;
    z-index: 2;
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}
.fm-mapa-cta h2 {
    color: var(--fm-bila);
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin: 0 0 16px;
}
.fm-mapa-cta p {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    margin: 0 0 32px;
}

/* ---- Rozvoj vs. stagnace blok na homepage ---- */
.fm-vysledky-cta { }
.fm-vysledky-cta-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 48px;
    align-items: center;
}
@media (max-width: 820px) {
    .fm-vysledky-cta-grid { grid-template-columns: 1fr; gap: 32px; }
}
.fm-vysledky-cta-text h2 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 8px 0 16px; }
.fm-vysledky-cta-text p { color: var(--fm-text-mid); font-size: 1.12rem; line-height: 1.6; margin: 0 0 28px; max-width: 46ch; }

.fm-vysledky-cta-cisla { display: flex; flex-direction: column; gap: 16px; }
.fm-cislo-box {
    border-radius: 16px;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.fm-cislo-box strong { font-size: 2.6rem; line-height: 1; font-weight: 800; }
.fm-cislo-box span { font-size: 0.98rem; color: var(--fm-text-mid); }
.fm-cislo-box--my {
    background: linear-gradient(135deg, rgba(46,156,74,0.12), rgba(46,156,74,0.04));
    border: 1px solid rgba(46,156,74,0.3);
}
.fm-cislo-box--my strong { color: #2e9c4a; }
.fm-cislo-box--oni {
    background: linear-gradient(135deg, rgba(240,100,73,0.12), rgba(240,100,73,0.04));
    border: 1px solid rgba(240,100,73,0.3);
}
.fm-cislo-box--oni strong { color: var(--fm-koral); }

/* ---- Hero kandidátů (skupinová koláž) ---- */
.fm-hero--kandidati {
    min-height: 460px;
    background: linear-gradient(135deg, #123a5e, #1f5f92);  /* fallback */
}
/* Slider — vrstvené snímky, fade mezi nimi */
.fm-hero-slider { position: absolute; inset: 0; z-index: 0; }
.fm-hero-slide {
    position: absolute;
    inset: 0;
    background-image: var(--hero-desktop);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    opacity: 0;
    transition: opacity 0.9s ease;
}
.fm-hero-slide.aktivni { opacity: 1; }

/* Tečky */
.fm-hero-tecky {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}
.fm-hero-tecka {
    width: 11px; height: 11px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.75);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}
.fm-hero-tecka:hover { background: rgba(255,255,255,0.5); }
.fm-hero-tecka.aktivni { background: #fff; transform: scale(1.15); }
@media (max-width: 768px) {
    .fm-hero-tecky { bottom: 12px; }
}
/* Overlay zleva — text čitelný, lidé vpravo vidět */
.fm-hero-overlay--kandidati {
    background: linear-gradient(90deg,
        rgba(18,58,94,0.97) 0%,
        rgba(18,58,94,0.85) 30%,
        rgba(18,58,94,0.30) 52%,
        rgba(18,58,94,0) 68%);
}
.fm-hero--kandidati .fm-hero-title { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.fm-hero--kandidati .fm-hero-lead { max-width: 40ch; }
.fm-hero--kandidati .fm-hero-inner { padding-top: 48px; padding-bottom: 48px; }
.fm-kandidati-page .fm-section { padding-top: 56px; }

/* Mobil: text NAHOŘE na plné modré, obrázek jako samostatný pás DOLE.
   Blokový layout (žádné absolutně poziciované vrstvy přes sebe). */
@media (max-width: 768px) {
    .fm-hero--kandidati {
        min-height: 0;
        display: flex;
        flex-direction: column;
        background: linear-gradient(180deg, #123a5e, #1a4f7a);
        position: relative;
    }
    /* Text nahoře (order 1) — v běžném toku, zabírá jen svou výšku */
    .fm-hero--kandidati .fm-hero-inner {
        position: relative;
        order: 1;
        z-index: 2;
        padding: 32px 24px 24px;
        max-width: none;
    }
    /* Overlay se na mobilu nepoužívá (text je na plné modré) */
    .fm-hero--kandidati .fm-hero-overlay--kandidati { display: none; }
    /* Slider = spodní obrázkový pás (order 2) */
    .fm-hero--kandidati .fm-hero-slider {
        position: relative;
        order: 2;
        width: 100%;
        align-self: stretch;
        height: 44vh;
        min-height: 300px;
        flex: 0 0 auto;
    }
    /* Na mobilu použij mobilní slide (skupina na výšku, celá) */
    .fm-hero--kandidati .fm-hero-slide {
        background-image: var(--hero-mobile);
        background-position: center bottom;
        background-size: cover;
    }
    /* Tečky na spodní hraně obrázkového pásu */
    .fm-hero--kandidati .fm-hero-tecky { bottom: 14px; }
}

/* ---- Program hero varianta (nižší než homepage) ---- */
.fm-hero--program { min-height: 46vh; }
.fm-hero--program .fm-hero-inner { padding-top: 48px; padding-bottom: 48px; }
.fm-hero--program .fm-hero-title { font-size: clamp(2.3rem, 5vw, 3.6rem); }
.fm-program .fm-section { padding-top: 64px; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .fm-hero { min-height: 70vh; }
    .fm-hero--program { min-height: 38vh; }
    .fm-section { padding: 56px 20px; }
}

/* ---- Homepage hero slider (rozvoj / kauzy) ---- */
/* Snímky se střídají pod společným overlayem; texty se překrývají a fadují. */
.fm-hero--home .fm-hero-slide {
    /* jemný zoom jako u původního statického hero */
    animation: fmHeroZoom 18s ease-in-out infinite alternate;
}
/* Texty leží přes sebe — první drží výšku sekce, další jsou absolutní. */
.fm-hero--home .fm-hero-text {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease;
}
.fm-hero--home .fm-hero-text.aktivni {
    opacity: 1;
    visibility: visible;
}
.fm-hero--home .fm-hero-text:not(:first-of-type) {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}
/* Vnitřní odsazení musí sedět s .fm-hero-inner (max-width + padding) */
.fm-hero--home .fm-hero-text:not(:first-of-type) {
    left: 50%;
    right: auto;
    width: min(1180px, 100%);
    transform: translateX(-50%);
}
/* Tečky na homepage o kousek výš, ať nekolidují s CTA */
.fm-hero--home .fm-hero-tecky { bottom: 26px; }
@media (max-width: 768px) {
    .fm-hero--home .fm-hero-tecky { bottom: 14px; }
}

/* Mobil: CTA tlačítka na plnou šířku, ať jsou zarovnaná pod sebou
   (jinak má každé jinou šířku podle délky textu a působí to rozházeně). */
@media (max-width: 560px) {
    .fm-hero-cta { flex-direction: column; align-items: stretch; gap: 12px; }
    .fm-hero-cta .fm-btn-primary,
    .fm-hero-cta .fm-btn-secondary { justify-content: center; width: 100%; }
}

/* ---- Volební číslo — pruh pod hero ----
   Jedno písmo (Outfit), hierarchie jen velikostí a vahou. */
.fm-cislo-pruh {
    background: var(--fm-modra);
    color: #fff;
    padding: 30px 24px;
}
.fm-cislo-pruh-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
}
.fm-cislo-pruh-cislo {
    font-size: 3.4rem;
    font-weight: 700;
    line-height: 1;
    color: var(--fm-modra);
    background: #fff;
    border-radius: 14px;
    width: 82px;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.fm-cislo-pruh-text {
    margin: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.35;
}
.fm-cislo-pruh-text strong {
    font-size: 1.65rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.fm-cislo-pruh-text span {
    font-size: 1.02rem;
    opacity: 0.8;
}
@media (max-width: 560px) {
    .fm-cislo-pruh { padding: 18px 20px; }
    .fm-cislo-pruh-inner { gap: 14px; }
    .fm-cislo-pruh-cislo { font-size: 2.6rem; width: 64px; height: 64px; border-radius: 12px; }
    .fm-cislo-pruh-text strong { font-size: 1.3rem; }
    .fm-cislo-pruh-text span { font-size: 0.95rem; }
}

/* ---- Setkání s občany (pozvánky s videem) ---- */
.fm-akce-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 28px;
    max-width: 1180px;
    margin: 0 auto;
}
.fm-akce-karta {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: var(--fm-bila);
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius-lg);
    padding: 22px;
    box-shadow: var(--fm-shadow-sm);
}
.fm-akce-video {
    position: relative;
    flex: 0 0 230px;
    padding-bottom: calc(230px * 16 / 9);   /* 9:16 na pevnou šířku */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
}
.fm-akce-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
/* Fasáda: náhled videa bez YouTube UI, přehrávač až po kliknutí */
.fm-video-fasada {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    cursor: pointer;
    background: #000;
    display: block;
}
.fm-video-fasada img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}
.fm-video-fasada:hover img { transform: scale(1.04); }
.fm-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(10,91,168,0.92);
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
    transition: background 0.2s;
}
.fm-video-play::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 54%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 11px 0 11px 18px;
    border-color: transparent transparent transparent #fff;
}
.fm-video-fasada:hover .fm-video-play,
.fm-video-fasada:focus-visible .fm-video-play { background: var(--fm-koral); }
.fm-video-fasada:focus-visible { outline: 3px solid var(--fm-koral); outline-offset: 2px; }
.fm-akce-info h3 { margin: 4px 0 6px; font-size: 1.25rem; }
.fm-akce-kdy {
    font-weight: 600;
    color: var(--fm-modra);
    font-size: 0.95rem;
    margin: 0 0 10px;
}
.fm-akce-text {
    color: var(--fm-text-mid);
    font-size: 0.95rem;
    margin: 0;
}
@media (max-width: 560px) {
    .fm-akce-karta { flex-direction: column; align-items: center; text-align: center; }
    .fm-akce-video { flex-basis: auto; width: 180px; padding-bottom: calc(180px * 16 / 9); }
}
