
:root {
    --primary: #0f172a;
    --accent: #00d4ff;
    --bg: #ffffff;
    --card-bg: #ffffff;
    --text: #334155;
    --radius: 8px;
    --gradient: linear-gradient(135deg, #004a99 0%, #00d4ff 100%);
}

/* Teemat */
body.theme-forest { --primary: #064e3b; --accent: #10b981; --bg: #f0fdf4; --radius: 12px; --gradient: linear-gradient(135deg, #064e3b, #059669); }
body.theme-tech { --primary: #000000; --accent: #38bdf8; --bg: #0f172a; --card-bg: #1e293b; --text: #f1f5f9; --radius: 0px; --gradient: linear-gradient(135deg, #000, #38bdf8); }
body.theme-nordic { --primary: #2e3440; --accent: #88c0d0; --bg: #eceff4; --radius: 20px; --gradient: linear-gradient(135deg, #4c566a, #88c0d0); }
body.theme-berry { --primary: #4c0519; --accent: #be123c; --bg: #fff1f2; --radius: 15px; --gradient: linear-gradient(135deg, #881337, #fb7185); }
body.theme-royal { --primary: #1e1b4b; --accent: #fbbf24; --bg: #eef2ff; --radius: 8px; --gradient: linear-gradient(135deg, #312e81, #fbbf24); }

body { font-family: 'Inter', sans-serif; margin: 0; background: var(--bg); color: var(--text); transition: all 0.3s ease; line-height: 1.6; }
nav { display: flex; justify-content: space-between; align-items: center; padding: 1rem 8%; background: var(--card-bg); border-bottom: 1px solid rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 1000; }
.logo { font-weight: 800; font-size: 1.4rem; color: var(--primary); text-decoration: none; letter-spacing: -1px; }
.logo span { color: var(--accent); }
.nav-links a { text-decoration: none; color: var(--text); margin-left: 25px; font-weight: 600; font-size: 0.95rem; }
header { background: var(--primary); background-image: var(--gradient); color: white; padding: 80px 8%; text-align: center; }
header h1 { font-size: 3rem; font-weight: 800; margin-bottom: 20px; letter-spacing: -1px; }
header p { font-size: 1.25rem; opacity: 0.9; max-width: 700px; margin: 0 auto 30px; }
.container { padding: 60px 8%; max-width: 1200px; margin: 0 auto; }
.solutions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; }
.card, .solution-card { background: var(--card-bg); padding: 30px; border-radius: var(--radius); border: 1px solid rgba(0,0,0,0.08); transition: all 0.3s ease; position: relative;display: flex;
    flex-direction: column;
    justify-content: flex-start; }
.solution-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.solution-card.hide { display: none; }
/* PAKOTA PAINIKE ALAREUNAAN: */
.solution-card .btn {
    margin-top: auto;
    align-self: flex-start; /* Pitää painikkeen vasemmassa reunassa */
}




.tags-container { display: flex; gap: 6px; margin-bottom: 15px; flex-wrap: wrap; }
.tag { font-size: 0.65rem; padding: 4px 10px; border-radius: 4px; text-transform: uppercase; font-weight: 800; letter-spacing: 0.5px; border: 1px solid transparent; }
.tag-kunta { background: rgba(0, 212, 255, 0.1); color: var(--accent); border-color: var(--accent); }
.tag-julkinen { background: rgba(15, 23, 42, 0.1); color: var(--primary); border-color: var(--primary); }
.tag-yksityinen { background: rgba(15, 23, 42, 0.05); color: #64748b; border-color: #cbd5e1; }
.tag-military { background: #000; color: #fff; }
.tag-sub { background: #f1f5f9; color: #475569; }
.filter-container { margin-bottom: 40px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.filter-btn { padding: 10px 24px; border: 1px solid var(--accent); background: transparent; color: var(--text); border-radius: 30px; cursor: pointer; font-weight: 600; transition: 0.2s; }

/* Pienemmät alasuodatusnapit */
.btn-small {
    padding: 6px 14px; /* Vähemmän tyhjää tilaa tekstin ympärillä */
    font-size: 0.85rem; /* Hieman pienempi tekstikoko */
    border-radius: 20px; /* Pyöreämpi muoto erottamaan ne päävalikosta */
    opacity: 0.8; /* Hieman vaaleampi ulkoasu oletuksena */
}
.filter-btn.active, .filter-btn:hover { background: var(--accent); color: var(--primary); }


.btn-small:hover {
    opacity: 1;
    transform: translateY(-1px);
}




.btn { padding: 14px 28px; border-radius: var(--radius); text-decoration: none; font-weight: 700; display: inline-block; background: var(--accent); color: var(--primary); border: none; cursor: pointer; transition: 0.2s; }
.btn-outline { background: rgba(255,255,255,0.15); border: 1px solid white; color: white; }
.btn-outline:hover { background: white; color: var(--primary); }
.btn-login { padding: 8px 18px; font-size: 0.9rem; margin-left: 15px; }
.read-more { display: inline-block; margin-top: 20px; color: var(--accent); text-decoration: none; font-weight: 700; font-size: 0.9rem; }
.contact-section { display: none; margin-top: 60px; padding: 40px; background: var(--card-bg); border-radius: var(--radius); border: 2px solid var(--accent); }
.contact-form { display: flex; flex-direction: column; gap: 15px; max-width: 500px; margin-top: 25px; }
.contact-form input, .contact-form textarea { padding: 12px; border-radius: 6px; border: 1px solid #ddd; font-family: inherit; }
#theme-picker { position: fixed; bottom: 30px; right: 30px; background: white; border-radius: 50%; box-shadow: 0 10px 25px rgba(0,0,0,0.15); width: 50px; height: 50px; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: 2000; cursor: pointer; overflow: hidden; display: flex; flex-direction: column; align-items: center; padding: 5px; }
#theme-picker:hover { height: 320px; width: 60px; border-radius: 30px; }
.picker-icon-container { position: absolute; bottom: 0; width: 100%; height: 50px; display: flex; align-items: center; justify-content: center; pointer-events: none; font-size: 1.4rem; }
.theme-dot { width: 30px; height: 30px; border-radius: 50%; margin: 6px 0; flex-shrink: 0; opacity: 0; transform: scale(0); transition: 0.3s; border: 2px solid white; }
#theme-picker:hover .theme-dot { opacity: 1; transform: scale(1); }
.modal { display: none; position: fixed; z-index: 3000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); align-items: center; justify-content: center; cursor: zoom-out; }
#modalImg { max-width: 90%; max-height: 90%; border-radius: 10px; }
.close-modal { position: absolute; top: 30px; right: 40px; color: white; font-size: 50px; cursor: pointer; }
.feature-row { display: flex; flex-wrap: wrap; gap: 50px; align-items: center; margin: 40px 0; }
.feature-text { flex: 1; min-width: 300px; }
.feature-image { flex: 1.2; min-width: 300px; cursor: zoom-in; }
.feature-image img { width: 100%; border-radius: 15px; box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
footer { text-align: center; padding: 40px; opacity: 0.6; font-size: 0.85rem; border-top: 1px solid rgba(0,0,0,0.05); }

/* 1. Varmista, että modal on oletuksena piilotettu */
.modal {
    display: none; /* Tämä on tärkeä! JavaScript muuttaa tämän 'flex'-muotoon */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Tumma tausta popupin takana */
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

/* 2. Varmista, että modal-content on näkyvissä ja tyylitelty */
.modal-content {
    background-color: #101827; /* Tumma tausta */
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    border: 1px solid #38bdf8; /* Sininen reunus */
}
/* Modalin perusta */
.modal {
    display: none; /* Piilotettu oletuksena */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9); /* Musta läpinäkyvä tausta */
    cursor: pointer;
}

/* Modalin sisällä oleva kuva */
.modal img {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Keskitys */
    border: 3px dotted var(--primary); /* Teeman mukainen reunus */
}

/* Sulkemispainike (&times;) */
.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
}

