/* --- Perustyylit --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #111827;
    background-color: #f3f4f6;
    margin: 0;
}

/* Linkit */
a {
    color: #f97316;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* --- Hero section --- */
.hero {
    position: relative;
    width: 100%;
    height: 430px;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 98%;
    filter: brightness(99%);
}

.hero-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    max-width: 600px;
    padding: 1rem;
}

.hero-overlay h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-shadow:
        0 2px 4px rgba(0,0,0,0.7),
        0 0 10px rgba(0,0,0,0.5);
}

.hero-overlay p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-shadow:
        0 2px 4px rgba(0,0,0,0.7),
        0 0 10px rgba(0,0,0,0.5);
}

/* CTA-nappi */
.cta-button {
    background: linear-gradient(90deg, #ff9500, #ff7b00); /* kirkkaampi oranssi */
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    border: 2px solid #fff; /* valkoinen kehys lisää kontrastia */
    box-shadow: 
        0 6px 18px rgba(0,0,0,0.70),   /* tumma syvä varjo */
        0 0 14px rgba(255, 149, 0, 0.55); /* hehku */
    transition: transform 0.2s, box-shadow 0.2s;
    text-shadow: none !important; /* poistetaan varjo napin tekstistä */
}

.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 
        0 6px 16px rgba(0,0,0,0.55),   /* vahvempi tumma varjo hoverilla */
        0 0 18px rgba(255, 149, 0, 0.8); /* kirkkaampi hehku */
}

/* --- Slider --- */
.header-area {
    max-width: 650px;
    margin: 2.8rem auto 2.5rem auto;
    text-align: center;
}

.header-area h1 {
    font-size: clamp(2.15rem, 5vw, 2.7rem);
    font-weight: 700;
    letter-spacing: -1px;
    margin: 0 0 2.2rem 0;
    color: #15573e;
}

.range-outer {
    margin: 0 auto 2.4rem auto;
    max-width: 480px;
    text-align: center;
    position: relative;
}

.slider-wrapper {
    position: relative;
    width: 70%;
    max-width: 400px;
    margin: 0 auto;
}

#radiusInput {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #f97316;
    outline: none;
    cursor: pointer;
}

#radiusInput::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #f97316;
    cursor: pointer;
}

#radiusInput::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #f97316;
    cursor: pointer;
}

.fake-thumb-bubble {
    position: absolute;
    top: 50%;
    transform: translate(-45%, -55%);
    min-width: 72px;
    height: 54px;
    padding: 0 1.2em;
    background: #f97316;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 700;
    border-radius: 27px;
    box-shadow: 0 2px 13px rgba(249, 115, 22, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    z-index: 5;
    transition: left 0.18s;
    cursor: pointer;
    user-select: none;
}

.slider-info {
    margin-top: 1.2em;
    font-size: 1.13rem;
    font-weight: 500;
    color: #185a37;
    letter-spacing: -0.01em;
}

/* --- How it works --- */
.how-it-works {
    text-align: center;
    padding: 3rem 1rem;
    background: #f9fafb;
}

.how-it-works h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.step {
    background: #fff;
    padding: 1.5rem;
    border-radius: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.step:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.step h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.step p {
    font-size: 0.95rem;
    color: #374151;
}

.step-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

/* --- Company list & cards --- */
.main-content {
    max-width: 980px;
    margin: 0 auto;
}

.helper {
    background: #f7fdfb;
    border: 1px solid #d9f0e7;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-size: 1.03rem;
    color: #15573e;
    max-width: 850px;
    margin: 0 auto 1.1rem auto;
    text-align: center;
}

.warning {
    display: flex;
    align-items: center;
    background: #fff7ee;
    color: #b85c16;
    border-radius: 12px;
    padding: 1.05em 1.2em;
    font-size: 1.08rem;
    margin: 0 0 1.5rem 0;
    box-shadow: 0 1px 6px 0 #f7b55e11;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 500;
}

.warning strong {
    color: #a8450b;
    margin-right: 15px;
    font-weight: 700;
}

.company-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.66rem;
    margin-bottom: 2.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30rem;
}

.company-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.1rem;
    margin-bottom: 1.1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 1.05rem;
    font-weight: 500;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.16s, background 0.14s;
    position: relative;
}

.company-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.company-card.selected {
    border-color: #24b47e;
    background: #e7f7ef;
    box-shadow: 0 2px 11px 0 #24b47e1a;
}

.company-card .check {
    display: none;
    position: absolute;
    top: 1px;
    right: 1px;
    width: 28px;
    height: 28px;
    background: #24b47e;
    color: #fff;
    border-radius: 50%;
    font-size: 1.19rem;
    line-height: 28px;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 1px 4px 0 #24b47e2a;
}

.company-card.selected .check {
    display: block;
}

.company-link {
    display: inline-block;
    background-color: #f97316;
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.2s ease-in-out;
}

.company-link:hover {
    background-color: #ea580c;
}

.company-list {
    padding: 3rem 1rem;
    background: #fff;
    text-align: center;
    position: relative;
}

.company-list h2 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
}

/* --- CTA sticky --- */
.cta {
    display: block;
    margin: 0.5rem auto 2.5rem auto;
    padding: 1rem 2.1rem;
    background: linear-gradient(90deg, #ff9b52, #f27a1c);
    color: white;
    font-size: 1.15rem;
    font-weight: 700;
    border-radius: 999px;
    text-align: center;
    text-decoration: none;
    max-width: 420px;
    transition: transform 0.2s ease;
}

.cta:hover {
    transform: scale(1.05);
}

a.cta {
    opacity: .64;
    pointer-events: auto;
}

a.cta.active {
    opacity: 1;
    pointer-events: auto;
}

a.cta:not(.active) {
    cursor: not-allowed;
}

a.cta.sticky {
    position: static !important;
    margin-top: 1.2rem;
    transform: none !important;
}

body[data-sticky-ready="1"] a.cta.sticky {
    position: fixed !important;
    left: 50%;
    transform: translateX(-50%) !important;
    right: auto;
    bottom: calc(max(16px, env(safe-area-inset-bottom)) + 20px);
    margin: 0 !important;
    width: calc(100% - 40px);
    max-width: 420px;
    z-index: 10000;
    box-shadow: 0 6px 24px rgba(0,0,0,.18);
}

/* --- Highlight slider effect --- */
.highlight-slider {
    box-shadow: 0 0 10px 3px #f97316;
    border-radius: 8px;
    transition: box-shadow 0.5s ease;
}

/* --- Footer --- */
.site-footer {
    text-align: center;
    padding: 1rem;
    background: #f9fafb;
    font-size: 0.9rem;
    color: #555;
}

/* --- Responsiivisuus --- */
@media (max-width: 720px) {
    .header-area {
        max-width: 99vw;
    }

    .slider-wrapper {
        max-width: 99vw;
        padding: 0 12px;
    }

    .range-outer {
        max-width: 99vw;
    }

    .main-content, .company-grid, .warning {
        max-width: 99vw;
    }
}

@media (max-width: 440px) {
    .fake-thumb-bubble {
        font-size: 1.01rem;
        min-width: 48px;
        height: 36px;
        border-radius: 18px;
        padding: 0 0.7em;
    }

    .slider-wrapper, .range-outer, .main-content, .company-grid, .warning {
        max-width: 100vw;
    }
}

.hero-overlay {
    max-width: 700px;
}

/* Hero overlay – mobiilissa teksti saa levitä leveämmälle */
@media (max-width: 700px) {
    .hero-overlay {
        max-width: 97%; /* kasvatetaan käytettävissä olevaa leveyttä */
        padding: 0 0.4rem; /* jätetään vähän sivumarginaalia */
    }

    .hero-overlay p {
        font-size: 1rem; /* pidetään luettavuus hyvä */
        line-height: 1.4;
    }

    .hero-overlay h1 {
        font-size: 1.7rem;
        margin-bottom: 0.3rem;
    }
}

.city-header {
    text-align: center; /* keskitetään sisältö */
    margin: 2rem auto 1.2rem;
    max-width: 800px;
}

.city-left {
    text-align: left; /* jos haluat linkin vasemmalle */
}

.city-center h2 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 600;
    text-align: center; /* varmistetaan keskitys */
}

/* --- FAQ (UKK) --- */
.faq {
    background: #fff;
    padding: 2rem 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    max-width: 800px;
    margin: 20rem auto 2rem auto; /* sijoitetaan 20rem yrityslistan jälkeen */
}

.faq h2 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.faq-item {
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
}

.faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    font-size: 1.05rem;
    font-weight: 600;
    color: #111827;
    cursor: pointer;
    padding: 0.5rem 0;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.5;
}

.faq-question.active {
    color: #f97316;
}






.hero-overlay .cta-button {
    display: inline-block;      /* jotta margin-top toimii varmasti */
    margin-top: 2.6rem;         /* säädä esim. 1.5–2rem */
}

