:root{
    --primary:#0F4C81;
    --primary-dark:#0A365B;
    --accent:#F28C28; /* Oranssia käytetään nyt VAIN tehosteena painikkeissa */
    --light:#ffffff;  /* Pääväriksi puhdas valkoinen */
    --bg-light:#f7f9fc; /* Kevyt taustaväri osioille erottuvuutta varten */
    --text:#333;
}

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

html{
    scroll-behavior:smooth;
}

body{
    font-family:Arial, Helvetica, sans-serif;
    line-height:1.6;
    color:var(--text);
    background-color: var(--light);
}

.container{
    width:min(1200px,90%);
    margin:auto;
}

/* HEADER & NAVIGOINTI - Korjattu keskitys ja asettelu */
header {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.98); /* Pohja valkoinen logon ja linkkien kohdalla */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
    z-index: 1000;
    transition: all 0.25s ease;
}

header.shrink {
    box-shadow: 0 6px 18px rgba(0,0,0,.1);
    opacity: 0.98;
}

/* Koko yläpalkkia ohjaava container */
header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0; /* Otetaan pehmusteet pois reunoilta, jotta sininen palkki ylettyy reunoihin */
    width: 100%;
    max-width: 100%;
}

/* Ylempi tummansininen palkki (leves täyteen mittaan) */
.nav-title {
    width: 100%;
    text-align: center;
    font-size: 2.2rem;
    font-weight: bold;
    color: #ffffff;
    background-color: var(--primary-dark);
    padding: 10px 0;
    line-height: 1.2;
    transition: all 0.25s ease;
}

header.shrink .nav-title {
    font-size: 1.8rem;
    padding: 5px 0;
}

/* Alempi valkoinen rivi – PALAUTETTU ALKUPERÄINEN KESKITYS JA LEVEYS */
.nav-row {
    width: min(1200px, 90%); /* Sama leveyssääntö kuin muussa sivustossa */
    margin: 10px auto 5px auto; /* Keskittää rivin ja antaa ilmaa ympärille */
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    transition: all 0.25s ease;
}

header.shrink .nav-row {
    margin: 5px auto;
}

.logo img {
    height: auto;
    max-height: 160px;
    width: auto;
    display: block;
    transition: max-height 0.25s ease;
}

header.shrink .logo img {
    max-height: 80px;
}

nav ul {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    list-style: none;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.05rem;
    transition: color 0.2s ease;
}

nav a:hover {
    color: var(--accent);
}

.social-icon img {
    height: 28px;
    width: auto;
    display: block;
}

/* RESPONSIVISET KORJAUKSET MOBIILILLE */
@media (max-width: 900px) {
    .nav-title {
        font-size: 1.8rem;
    }
    
    header.shrink .nav-title {
        font-size: 1.6rem;
    }

    .nav-row {
        flex-direction: column;
        gap: 15px;
        margin: 10px auto;
    }

    .logo img {
        max-height: 90px;
    }

    header.shrink .logo img {
        max-height: 70px;
    }

    nav ul {
        justify-content: center;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .nav-title {
        font-size: 1.5rem;
    }
    
    nav ul {
        gap: 10px;
    }
    
    nav a {
        font-size: 0.95rem;
    }
}

/* HERO-OSIO */
.hero{
    min-height: 80vh;
    background:
        linear-gradient(rgba(15,76,129,.78),rgba(10,54,91,.7)),
        url("jplenio-pear-4056741.jpg") center/cover no-repeat;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:left;
    color:white;
    padding: 60px 0;
}

.hero-content{
    max-width:800px;
}

.hero h1{
    font-size:2.8rem;
    line-height: 1.2;
    margin-bottom:20px;
}

.hero h3{
    font-size:1.4rem;
    line-height: 1.3;
    margin-bottom:20px;
    color: #f1f1f1;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 25px;
}

/* PAINIKKEET - Oranssi tehosteena */
.btn{
    display:inline-block;
    background:var(--accent);
    color:white;
    text-decoration:none;
    padding:15px 30px;
    border-radius:6px;
    font-weight:bold;
    text-align: center;
    transition: background 0.2s ease, transform 0.1s ease;
    box-shadow: 0 4px 10px rgba(242, 140, 40, 0.3);
}

.btn:hover {
    background: #e07b16;
}

/* SEKTIOT */
section{
    padding:70px 0;
}

.contact{
    background:var(--primary);
    color:white;
}

.contact h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    line-height: 1.3;
}

.contact-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:40px;
    align-items: start;
}

.contact-flex-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.contact-text-side {
    flex: 1;
}

.contact-text-side p {
    margin-bottom: 8px;
}

.contact-image {
    display: block;
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: 6px;
}

.billing-info {
    margin-top: 25px;
    background: rgba(255,255,255,0.05);
    padding: 20px;
    border-radius: 6px;
    font-size: 0.95rem;
}

/* SOMELINKIT YHTEYSTIEDOISSA */
.instagram {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.instagram a:link, 
.instagram a:visited {
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
}

.instagram a:hover {
    color: var(--accent);
}

.instagram img{
    width:32px;
    height: auto;
    display: block; 
}

/* LOMAKE */
form{
    display:flex;
    flex-direction:column;
    gap:15px;
    background: rgba(0, 0, 0, 0.1);
    padding: 25px;
    border-radius: 8px;
}

input,
textarea{
    padding:14px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius:6px;
    font-size: 1rem;
    width: 100%;
    background-color: white;
    color: #333;
}

textarea{
    min-height:160px;
    resize: vertical;
}

button[type="submit"]{
    background:var(--accent); /* Lomakkeen nappi oranssilla tehosteella */
    color:white;
    border:none;
    padding:16px;
    border-radius:6px;
    cursor:pointer;
    font-weight:bold;
    font-size: 1.05rem;
    transition: background 0.2s ease;
    box-shadow: 0 4px 10px rgba(242, 140, 40, 0.2);
}

button[type="submit"]:hover {
    background: #e07b16;
}

.h-captcha {
    margin: 5px auto;
    max-width: 100%;
    overflow-x: auto;
}

footer{
    background:var(--primary-dark);
    color:white;
    text-align:center;
    padding:30px 15px;
    font-size: 0.95rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* EVÄSTEBANNERI - Yhdistetty sinivalkoiseen teemaan */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 30px);
    max-width: 500px;
    background-color: #ffffff;
    color: #333333;
    box-shadow: 0px 8px 30px rgba(15, 76, 129, 0.15);
    border-radius: 8px;
    padding: 20px;
    z-index: 9999;
    box-sizing: border-box;
    transition: all 0.3s ease-in-out;
    border: 1px solid rgba(15, 76, 129, 0.1);
}

.cookie-banner.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 20px);
}

.cookie-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: var(--primary);
}

.cookie-content p {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 20px;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.cookie-buttons .btn {
    padding: 10px 16px;
    font-size: 0.85rem;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: none;
}

.btn-accept { background-color: var(--primary); color: white; border: none; }
.btn-accept:hover { background-color: var(--primary-dark); }
.btn-reject { background-color: #f1f1f1; color: #333; border: none; }
.btn-reject:hover { background-color: #e2e2e2; }

.cookie-reopen {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 45px;
    height: 45px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 4px 10px rgba(15, 76, 129, 0.3);
    z-index: 9998;
    transition: all 0.3s ease;
}

.cookie-reopen:hover {
    background-color: var(--primary-dark);
}

.cookie-reopen.hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
}

/* RESPONSIVISUUS */
@media (max-width: 900px) {
    header .container {
        padding: 15px 0;
    }
    
    .nav-title {
        font-size: 1.8rem;
    }
    
    header.shrink .nav-title {
        font-size: 1.6rem;
    }

    .nav-row {
        flex-direction: column;
        gap: 15px;
    }

    .logo img {
        max-height: 90px;
    }

    header.shrink .logo img {
        max-height: 70px;
    }

    nav ul {
        justify-content: center;
        gap: 15px;
    }

    .hero {
        padding: 40px 0;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero h3 {
        font-size: 1.2rem;
    }

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

    .contact-flex-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }
    
    .contact-image {
        max-width: 160px;
    }
    
    .billing-info {
        text-align: left;
    }
    
    .instagram {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .nav-title {
        font-size: 1.5rem;
    }
    
    nav ul {
        gap: 10px;
    }
    
    nav a {
        font-size: 0.95rem;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    section {
        padding: 50px 0;
    }
    
    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-buttons .btn {
        width: 100%;
    }
}


/* ESTETÄÄN MOBIILILAITTEIDEN AUTOMAATTISET SINISET LINKIT NUMEROISSA */
a[href^="tel"] {
    color: inherit !important;
    text-decoration: none !important;
    font-size: inherit !important;
    font-family: inherit !important;
    font-weight: inherit !important;
}

/* Kohdistetaan erityisesti yhteystieto- ja laskutussivun tekstilinkit */
.contact-text-side a,
.billing-info a {
    color: inherit;
    text-decoration: none;
}

/* Säilytetään kuitenkin sähköpostilinkeille tai varsinaisille linkeille hover-efekti tarvittaessa */
.contact-text-side a:hover,
.billing-info a:hover {
    color: var(--accent);
}
