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

a {
    text-decoration: none;
}

/* Painikkeet */
.btn,
button {
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: white;
    padding: 10px 22px;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.25s;
}

    .btn:hover,
    button:hover {
        transform: translateY(-2px);
    }

/* Osiot */
section {
    padding: clamp(60px, 8vw, 90px) 0;
}

.section-title {
    text-align: center;
    margin-bottom: 45px;
}

    .section-title h2 {
        font-size: clamp(2rem, 4vw, 2.5rem);
        margin-bottom: 12px;
    }

    .section-title p {
        color: #64748b;
    }

h2 {
    text-align: center;
    margin-top:10px;
    margin-bottom:10px;
    text-align:center;
}


.card {
    min-width: 0;
    background: white;
    padding: 20px;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    transition: all 0.25s ease;
    text-align: center;
    overflow: hidden;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;

}

    .card:hover {
        transform: translateY(-4px);
    }

    .card h3 {
        font-size: 1.15rem;
        font-weight: 700;
        color: #0f172a;
        min-height: 50px;
        margin-bottom: 8px;
    }
    .card p {
        color: #64748b;
        font-size: 0.95rem;
        margin-bottom: 12px;
        text-align: center;
        width: 100%;
    }
    .card img {
        width: 100%;
        height: 140px;
        object-fit: contain;
        padding: 10px;
        margin-bottom: 10px;
    }

/* Plus / miinus */
.stepper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

    .stepper button {
        width: 38px;
        height: 38px;
        font-weight: bold;
    }

    .stepper span {
        min-width: 24px;
        text-align: center;
        font-weight: 700;
    }
    .stepper p {
    font-size: 0.9rem;
    color: #000;
    margin:10px;
}

/* Laskurin piilotetut inputit */
input[type="number"] {
    display: none;
}

.price-box {
    background: #2563eb;
    color: white;
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.order-btn {
    width: 100%;
}
/* Lomake */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

    form input,
    form textarea{
        width: 100%;
        padding: 14px;
        border: 1px solid #dbe3ef;
        border-radius: 14px;
        font-size: 16px;
        background: #f8fafc;
    }

    form select {
        width: 30%;
        padding: 14px;
        border: 1px solid #dbe3ef;
        border-radius: 14px;
        font-size: 16px;
        background: #f8fafc;
    }

        form input:focus,
        form textarea:focus,
        form select:focus {
            outline: none;
            border-color: #0ea5e9;
            background: white;
        }

    form textarea {
        min-height: 100px;
        resize: vertical;
    }

/* Popup */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.6);
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.modal-content {
    position: relative;
    background: white;
    width: min(95%, 620px);
    max-height: 90vh;
    overflow-y: auto;
    padding: 34px;
    border-radius: 28px;
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 18px;
    background: #f1f5f9;
    color: #0f172a;
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 50%;
}

    .close-btn:hover {
        background: #e2e8f0;
        transform: none;
    }

/* About */
.about {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 50px;
    align-items: center;
}

    .about img {
        width: 100%;
        border-radius: 28px;
        object-fit: cover;
    }

.about-text h2 {
    font-size: 2.4rem;
    margin-bottom: 24px;
    text-align:center;
}

.about-text p {
    color: #475569;
    margin-bottom: 18px;
    text-align: center;
}

/* Footer */
footer {
    padding: 40px 0;
    text-align: center;
    color: #64748b;
    align-content: center;
    align-items: center;
    text-align: center;
    background-color:#0f172a;
}

#palvelut {
    padding: 70px 0;
    background: linear-gradient(180deg, #f4f8fb, #eef6ff)
}

    #palvelut .card {
        min-height: 170px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    #palvelut .section-title {
        margin-bottom: 35px;
    }

/* ===== RESPONSIVE FIX ===== */
html,
body {
    width: 100%;
    overflow-x: hidden;
    font-family: Arial, sans-serif;
    background: linear-gradient( 180deg, #f8fbff 0%, #eef5ff 100% );
    color: #0f172a;
}

.container,
.calculator {
    width: min(100% - 2rem, 1400px);
    margin-inline: auto;
}

    .container h3 {
        max-width: 1000px;
        margin: 0 auto 30px auto;
        text-align: center;
        line-height: 1.5;
    }


/* Header */
header {
    height: auto;
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid #e5e7eb;
    z-index: 1000;
}

nav {
    min-height: 80px;
    display: flex;
    height: 80px;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
}

.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

    .nav-links a {
        color: #334155;
        font-weight: 600;
    }


img {
    max-width: 100%;
    height: auto;
}

.logo img {
    height: clamp(55px, 7vw, 85px);
    width: auto;
}


.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 280px;
    padding-top: 120px;
    padding-bottom: 40px;
}

.hero_title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    text-align: center;
    margin-bottom: 10px;
    width: 100%;
    margin: 0 auto;
    padding:0;
    align-content: center;
    align-items: center;
}

.hero_subtitle {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    text-align: center;
    width: 100%;
    margin: 0 auto;
    padding:0;
    align-content: center;
    align-items: center;
}
.hero button {
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: white;
    padding: 10px 22px;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.25s;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.3rem);
}



#laskuri {
    padding-top: 30px;
}

    #laskuri .container h3 {
        max-width: 1440px;
        margin: 0 auto 24px auto;
        text-align: center;
        line-height: 1.4;
    }

.info-boxes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    flex-direction: column;
    width: 100%;
    gap: 15px;
    margin-top: 20px;
}

.info-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    border: 1px solid #e2e8f0;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

    .info-card h3 {
        margin-bottom: 10px;
        color: #2563eb;
        font-size: 1rem;
    }

    .info-card p {
        font-size: 0.9rem;
        color: #475569;
        line-height: 1.4;
    }

.price-box {
    width: 100%;
    margin: 0 0 16px 0;
}

.price {
    text-align: center;
    width: 100%;
    margin-bottom: 12px;
}


/* Palvelut */
.services {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .calculator-layout {
        grid-template-columns: 1fr;
        width: min(100% - 24px, 900px);
    }

    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar {
        width: 100%;
        position: static;
    }
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

/* Puhelin */
@media (max-width: 768px) {
    html,
    body {
        width: 100%;
        overflow-x: hidden;
    }

    .container,
    .calculator-layout,
    .grid,
    .card,
    .sidebar,
    .price-box,
    .order-btn {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .calculator-layout {
        grid-template-columns: 1fr;
        padding: 0 10px;
        margin: 0 auto;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .info-boxes {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }
}

@media (max-width: 520px) {
    html,
    body {
        width: 100%;
        overflow-x: hidden;
    }

    .container,
    .calculator-layout,
    .grid,
    .card
    .sidebar,
    .price-box,
    .order-btn {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .calculator-layout {
        padding-inline: 12px;
        margin-inline: auto;
    }

    .grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .card {
        padding: 16px;
    }

    .stepper {
        max-width: 100%;
        justify-content: center;
        flex-wrap: nowrap;
    }
}

section .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.services,
.info-boxes {
    margin-left: auto;
    margin-right: auto;
}
.calculator-section {
    width: 100%;
}

.calculator-layout {
    width: min(100% - 32px, 1400px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 24px;
    align-items: start;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
}

.sidebar {
    width: 260px;
    position: sticky;
    top: 100px;
}