/* ============================================================
   NEW DESIGN — one-page landing (branch: new-design)
   Keeps brand tokens:
   yellow #f8c94d | blue #2aa9e0 | red #e22a25
   slate #405665  | light bg #f3f8fe
   ============================================================ */

/* --- shared section shell --- */
.nd-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 90px 32px 0;
}

.nd-section-title {
    font-size: 2.6rem;
    font-weight: 900;
    color: #405665;
    margin-bottom: 0.6rem;
}

.nd-section-sub {
    font-size: 1.15rem;
    color: #405665;
    margin: 0 0 2.2rem;
    max-width: 640px;
}

/* ============ HERO ============ */
.nd-hero {
    background: #f3f8fe;
    text-align: center;
    padding: 90px 24px 0;
}

.nd-hero h1 {
    font-size: clamp(2.6rem, 6vw, 4.2rem);
    font-weight: 900;
    margin: 0 0 0.6rem;
    color: #405665;
}

.nd-hero-sub {
    font-size: clamp(1.15rem, 2.2vw, 1.6rem);
    max-width: 700px;
    margin: 0 auto 2rem;
    color: #405665;
}

/* CTA — brand button, red accent like the circled sketch CTA */
.nd-cta {
    display: inline-block;
    background: #f8c94d;
    color: #405665;
    border: none;
    padding: 20px 56px;
    font-size: 1.35rem;
    font-weight: 900;
    border-radius: 14px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 6px 0 #e22a25;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nd-cta:hover {
    background: #f6b939;
    color: #405665;
    transform: translateY(-2px);
    box-shadow: 0 8px 0 #e22a25;
}

.nd-cta:active {
    transform: translateY(2px);
    box-shadow: 0 4px 0 #e22a25;
}

/* big meetup photo overlapping into the white section below */
.nd-hero-photo {
    max-width: 940px;
    margin: 64px auto -140px;
    position: relative;
    z-index: 5;
}

.nd-hero-photo img,
.nd-hero-photo .nd-photo-ph {
    width: 100%;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(64, 86, 101, 0.25);
    aspect-ratio: 21 / 9;
    object-fit: cover;
}

.nd-hero-photo img {
    display: block;
    /* tinted slot instead of a white flash while the photo downloads */
    background: #e9f1fa;
}

/* placeholder tile until real photos are delivered — mirrors the sketch [FOTKA] boxes */
.nd-photo-ph {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: repeating-linear-gradient(
        45deg,
        #e9f1fa,
        #e9f1fa 18px,
        #f3f8fe 18px,
        #f3f8fe 36px
    );
    border: 3px dashed #2aa9e0;
    color: #405665;
    font-weight: 900;
    letter-spacing: 2px;
    box-sizing: border-box;
}

.nd-photo-ph::before {
    content: "📷";
    font-size: 2rem;
}

.nd-hero-photo figcaption {
    position: absolute;
    bottom: 18px;
    left: 22px;
    background: rgba(255, 255, 255, 0.92);
    color: #405665;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ============ WHY (Proč Hospodský kvíz?) ============ */
.nd-why {
    padding-top: 220px; /* room for the overlapping hero photo */
}

.nd-why-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.nd-why-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 38px 40px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nd-why-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.12);
}

.nd-why-card .card-icon {
    font-size: 42px;
    margin-bottom: 14px;
    color: #2aa9e0;
}

.nd-why-card h3 {
    font-size: 1.35rem;
    font-weight: 900;
    margin: 0 0 8px;
    color: #405665;
}

.nd-why-card p {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* ============ PHOTO STRIP (infinite auto-scrolling carousel) ============ */
.nd-strip {
    max-width: 1200px;
    margin: 0 auto;
    padding: 70px 32px 10px;
    overflow: hidden;
    /* fade the strip in/out at both edges */
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

/* while the photos download the strip is held back (class set from JS, so a
   no-JS page still shows it): no scrolling over half-painted images, then a
   quiet fade in once they have decoded */
.nd-strip.is-loading {
    opacity: 0;
}

.nd-strip.is-loading .nd-strip-track {
    animation-play-state: paused;
}

.nd-strip.is-ready {
    opacity: 1;
    transition: opacity 0.45s ease;
}

/* the track holds two identical copies (second cloned in JS); scrolling it
   exactly -50% loops seamlessly */
.nd-strip-track {
    display: flex;
    width: max-content;
    animation: nd-strip-scroll 48s linear infinite;
}

.nd-strip[data-dir="right"] .nd-strip-track {
    animation-direction: reverse;
}

.nd-strip:hover .nd-strip-track {
    animation-play-state: paused;
}

@keyframes nd-strip-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.nd-strip img,
.nd-strip .nd-photo-ph {
    flex: 0 0 auto;
    width: 220px;
    height: 165px;
    margin-right: 22px; /* uniform spacing keeps the -50% loop aligned */
    object-fit: cover;
    border-radius: 14px;
    background: #fff;
    padding: 8px 8px 26px; /* polaroid feel */
    box-shadow: 0 8px 20px rgba(64, 86, 101, 0.18);
    transform: rotate(-2deg);
    transition: transform 0.25s ease;
}

.nd-strip-track > *:nth-child(even) {
    transform: rotate(2deg);
}

.nd-strip-track > *:hover {
    transform: rotate(0deg) scale(1.05);
    position: relative;
    z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
    .nd-strip-track {
        animation: none;
    }
}

/* ============ BUDEŠ / POTŘEBUJEŠ ============ */
.nd-duo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.nd-duo-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 44px 50px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
    border-left: 14px solid #f8c94d;
}

.nd-duo-card.blue {
    border-left-color: #2aa9e0;
}

.nd-duo-card h2,
.nd-duo-card h3 {
    font-size: 1.6rem;
    font-weight: 900;
    color: #405665;
    margin: 0 0 20px;
}

.nd-duo-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 1.15rem;
    line-height: 1.7;
    color: #405665;
}

.nd-duo-card li {
    padding-left: 34px;
    position: relative;
    margin-bottom: 12px;
}

.nd-duo-card li::before {
    content: "✔";
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 900;
    color: #f8c94d;
}

.nd-duo-card.blue li::before {
    color: #2aa9e0;
}

/* ============ MAP (Kde hledáme moderátory) ============ */
.nd-map-wrap {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
}

#nd-map {
    height: 480px;
    width: 100%;
    background: #e9f1fa;
    z-index: 1; /* stay under the sticky header */
}

/* custom brand map pin (used by Leaflet divIcon) */
.nd-pin {
    width: 28px;
    height: 28px;
    background: #e22a25;
    border: 3px solid #ffffff;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: -1px 2px 6px rgba(0, 0, 0, 0.35);
}

.nd-pin::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ffffff;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* "back to overview" button over the map */
.nd-map-back {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 1100; /* above leaflet panes */
    background: #ffffff;
    border: 2px solid #2aa9e0;
    color: #405665;
    font-family: 'Museo500-Regular', Helvetica, Arial, sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 9px 18px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    transition: all 0.2s ease;
}

.nd-map-back:hover {
    background: #2aa9e0;
    color: #ffffff;
}

/* region hover tooltip */
.nd-region-tip {
    font-family: 'Museo500-Regular', Helvetica, Arial, sans-serif;
    font-weight: 800;
    color: #405665;
    border-radius: 10px;
    border: 2px solid #2aa9e0;
    padding: 6px 12px;
}

/* regions without openings are not clickable */
.nd-region-muted {
    cursor: grab;
}

/* --- country emphasis on hover ---
   raise the hovered country, grey out & fade the other one */
#nd-map .nd-country {
    transition: opacity 0.25s ease, filter 0.25s ease;
}

#nd-map .nd-outline {
    transition: opacity 0.25s ease, filter 0.25s ease;
}

#nd-map.nd-hover-cs .nd-c-sk,
#nd-map.nd-hover-cs .nd-outline-sk,
#nd-map.nd-hover-sk .nd-c-cs,
#nd-map.nd-hover-sk .nd-outline-cs {
    opacity: 0.3;
    filter: grayscale(1);
}

#nd-map.nd-hover-cs .nd-outline-cs,
#nd-map.nd-hover-sk .nd-outline-sk {
    filter: drop-shadow(0 6px 9px rgba(64, 86, 101, 0.4));
}

/* no browser focus box around a clicked region shape or the map itself */
#nd-map path.leaflet-interactive,
#nd-map path.leaflet-interactive:focus,
#nd-map:focus,
#nd-map .leaflet-container:focus {
    outline: none !important;
}

/* --- flat "silhouette" mode: no basemap, country shapes on brand blue --- */
#nd-map.nd-flat {
    background:
        radial-gradient(circle at 30% 20%, #eaf4fd 0%, #d7e9f8 60%, #cbe2f5 100%);
}

/* permanent city labels next to pins (flat mode has no basemap context) */
.nd-pin-label {
    background: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 4px 10px;
    font-family: 'Museo500-Regular', Helvetica, Arial, sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    color: #405665;
    box-shadow: 0 3px 10px rgba(64, 86, 101, 0.25);
    cursor: pointer; /* clicking the label selects the city too */
    transition: color 0.2s ease;
}

.nd-pin-label:hover {
    color: #2aa9e0;
}

.nd-pin-label::before {
    display: none; /* hide the tooltip arrow */
}

/* --- hovered pin comes forward ---
   towns close together overlap at country zoom and only the last-painted one
   is readable; hovering either the pin or its label lifts that city clear of
   its neighbours (see raisePin() in home.blade.php) */
.nd-pin-front .nd-pin {
    background: #2aa9e0;
    box-shadow: -1px 3px 12px rgba(0, 0, 0, 0.45);
}

.leaflet-tooltip.nd-pin-label.nd-pin-front {
    color: #2aa9e0;
    border: 2px solid #2aa9e0;
    /* the border would otherwise nudge the label off the pin it belongs to */
    padding: 2px 8px;
    box-shadow: 0 5px 16px rgba(64, 86, 101, 0.4);
}

/* map style toggle (design comparison: silhouette vs. basemap) */
.nd-map-toggle {
    position: absolute;
    bottom: 14px;
    left: 14px;
    z-index: 1100;
    display: flex;
    background: #ffffff;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.nd-map-toggle button {
    border: none;
    background: transparent;
    padding: 9px 18px;
    font-family: 'Museo500-Regular', Helvetica, Arial, sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    color: #405665;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nd-map-toggle button.active {
    background: #2aa9e0;
    color: #ffffff;
}

.leaflet-popup-content-wrapper {
    border-radius: 14px;
    font-family: 'Museo500-Regular', Helvetica, Arial, sans-serif;
    color: #405665;
}

.nd-popup strong {
    font-size: 1.1rem;
    display: block;
    margin-bottom: 8px;
}

.nd-popup-btn {
    display: inline-block;
    background: #f8c94d;
    color: #405665 !important;
    font-weight: 800;
    padding: 8px 16px;
    border-radius: 8px;
    box-shadow: 0 3px 0 #2aa9e0;
    cursor: pointer;
    text-decoration: none;
}

.nd-popup-btn:hover {
    background: #f6b939;
}

/* data scope switch (All / Czech / Slovak) — cities + map only */
.nd-map-scope {
    display: inline-flex;
    margin-top: 24px;
    background: #ffffff;
    border: 2px solid #cfe0ec;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(64, 86, 101, 0.1);
}

.nd-map-scope button {
    border: none;
    background: transparent;
    padding: 10px 26px;
    font-family: 'Museo500-Regular', Helvetica, Arial, sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    color: #405665;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nd-map-scope button:hover {
    color: #2aa9e0;
}

.nd-map-scope button.active {
    background: #2aa9e0;
    color: #ffffff;
}

/* region row — pick a kraj to narrow the city list under it */
.nd-kraj-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.nd-kraj {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 2px solid #cfe0ec;
    color: #405665;
    font-family: 'Museo500-Regular', Helvetica, Arial, sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nd-kraj:hover {
    border-color: #2aa9e0;
    color: #2aa9e0;
}

.nd-kraj.active {
    background: #2aa9e0;
    border-color: #2aa9e0;
    color: #ffffff;
}

/* how many cities the kraj holds */
.nd-kraj-count {
    background: #eef6fe;
    color: #405665;
    font-size: 0.8rem;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 999px;
}

.nd-kraj.active .nd-kraj-count {
    background: #f8c94d;
}

/* text search for the city chips */
.nd-city-filter {
    margin-top: 20px;
}

.nd-chip-filter {
    width: 100%;
    max-width: 420px;
    /* keep the 46px search-icon padding inside the 100% width instead of
       adding to it — without this the input overflows a narrow phone and
       drags the whole page sideways */
    box-sizing: border-box;
    font-family: 'Museo500-Regular', Helvetica, Arial, sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: #405665;
    padding: 12px 18px 12px 46px;
    border: 2px solid #cfe0ec;
    border-radius: 999px;
    background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23405665' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E") no-repeat 18px center;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nd-chip-filter::placeholder {
    color: #90a4b1;
    font-weight: 700;
}

.nd-chip-filter:focus {
    border-color: #2aa9e0;
    box-shadow: 0 0 0 3px rgba(42, 169, 224, 0.15);
}

.nd-city-empty {
    margin-top: 16px;
    color: #6b7f8d;
    font-weight: 700;
}

/* clickable city chips under the map (also the no-JS fallback) */
.nd-city-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 16px;
}

.nd-chip {
    background: #ffffff;
    border: 2px solid #2aa9e0;
    color: #405665;
    font-family: 'Museo500-Regular', Helvetica, Arial, sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    padding: 10px 22px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nd-chip:hover {
    background: #2aa9e0;
    color: #ffffff;
    transform: translateY(-2px);
}

.nd-chip::before {
    content: "📍 ";
}

/* ============ FORM + VIDEO ============ */
.nd-apply {
    background: #eef6fe;
    margin-top: 100px;
    padding: 90px 0;
}

.nd-apply-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 70px;
    align-items: start;
}

.nd-apply-side {
    position: sticky;
    top: 120px;
}

.nd-apply-side h3 {
    font-size: 1.6rem;
    font-weight: 900;
    color: #405665;
    margin-bottom: 18px;
}

.nd-apply-side p {
    font-size: 1.05rem;
    margin-bottom: 24px;
}

/* optional file field — lighter than the old yellow box */
.nd-file-field {
    margin-bottom: 20px;
}

.nd-file-field .file-btn {
    box-shadow: 0 3px 0 #2aa9e0;
}

.nd-file-hint {
    display: block;
    font-size: 0.85rem;
    color: #6b7f8d;
    margin-top: 8px;
}

/* ============ CONTACT ============ */
.nd-contact {
    padding-bottom: 100px;
}

.nd-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 460px));
    gap: 32px;
}

/* keep the card's padding + 10px accent border inside its grid track so a
   stretched full-width card can't grow past the viewport on mobile */
.nd-contact .contact-card {
    box-sizing: border-box;
    max-width: 100%;
}

/* contact phone/email read as plain text (not brand-blue links) */
.nd-contact .contact-info a {
    color: #405665;
    text-decoration: none;
    transition: color 0.2s ease;
    /* long emails must wrap rather than push the card (and the whole
       page) wider than a narrow phone viewport */
    overflow-wrap: anywhere;
}

.nd-contact .contact-info a:hover {
    color: #2aa9e0;
}

/* optional role line under the name (Strapi "Titul") */
.nd-contact .contact-titul {
    font-size: 0.95rem;
    color: #6b8091;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
    .nd-section {
        padding: 64px 20px 0;
    }

    .nd-hero {
        padding-top: 64px;
    }

    .nd-hero-photo {
        margin-bottom: -80px;
    }

    .nd-why {
        padding-top: 150px;
    }

    .nd-why-grid,
    .nd-duo,
    .nd-apply-grid {
        grid-template-columns: 1fr;
    }

    .nd-apply-grid {
        gap: 48px;
    }

    .nd-apply-side {
        position: static;
    }

    .nd-strip {
        padding: 50px 20px 10px;
    }

    .nd-strip img {
        width: 170px;
        height: 130px;
    }

    #nd-map {
        height: 380px;
    }
}

@media (max-width: 600px) {
    .nd-hero-photo figcaption {
        display: none;
    }

    .nd-hero-photo img,
    .nd-hero-photo .nd-photo-ph {
        aspect-ratio: 16 / 10;
    }

    /* single, full-width contact cards that fit the viewport instead of
       forcing a min-width that overflows and pushes the page sideways */
    .nd-contact-grid {
        grid-template-columns: 1fr;
    }

    .nd-contact .contact-card {
        padding: 24px 20px;
        gap: 18px;
    }

    .nd-contact .contact-card img {
        width: 70px;
        height: 70px;
    }

    /* a dozen kraj names wrap into a tall block on a phone — tighten them so
       the row stays a header for the city list rather than a screenful */
    .nd-kraj-chips {
        gap: 8px;
    }

    .nd-kraj {
        font-size: 0.85rem;
        padding: 7px 12px;
        gap: 6px;
    }

    .nd-kraj-count {
        font-size: 0.72rem;
        padding: 3px 6px;
    }
}

/* the region hover tooltip (name + city count) is meant for a mouse;
   on touch it opens on tap and lingers, so suppress it there */
@media (hover: none) {
    .leaflet-tooltip.nd-region-tip {
        display: none !important;
    }
}
