/* Yleiset tyylit */
body {
    font-family: 'Open Sans', Arial, sans-serif;
    margin: 0;
    padding: 0;
    text-align: center;
    background: #f4f4f9 url('/taustakuva.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
}

/* Header */
.header {
    background: rgba(51, 51, 51, 0.9);
    color: white;
    padding: 15px;
    font-size: 24px;
    font-weight: bold;
    position: relative;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header .site-title a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.header .site-title a:hover {
    color: #ddd;
}

.menu {
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    font-size: 30px;
    background: none;
    border: none;
    color: white;
    transition: color 0.3s, transform 0.3s;
}

.menu:hover {
    color: #bbb;
    transform: scale(1.1);
}

/* Menu Container */
.menu-container {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 300px;
    background: white;
    box-shadow: -3px 0 15px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.5s ease;
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
}

.menu-container.show {
    transform: translateX(0);
}

.close-menu {
    font-size: 18px;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    margin: 0;
    float: right;
}

.close-menu:hover {
    color: #333;
}

.menu-container button {
    display: block;
    width: 100%;
    padding: 12px 15px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 16px;
    font-family: 'Open Sans', Arial, sans-serif;
    border-radius: 4px;
    transition: background 0.3s, color 0.3s, transform 0.3s;
    margin-top: 10px;
}

.menu-container button a {
    color: inherit;
    text-decoration: none; /* Poistaa alleviivauksen linkeistä */
}

.menu-container button:hover {
    background: #f0f0f0;
    color: #333;
    transform: translateX(5px);
}

.submenu {
    position: relative;
    margin-top: 10px;
}

.submenu-items {
    display: none;
    margin-left: 15px;
    padding-left: 10px;
    border-left: 2px solid #ddd;
}

.submenu-items.show {
    display: block;
}

.submenu button {
    font-weight: 600;
    color: #444;
}

.submenu button:after {
    content: " ▾";
    font-size: 12px;
}

/* Container */
.container {
    max-width: 900px;
    margin: 60px auto;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
}

/* Otsikot */
h1 {
    margin-top: 0;
    color: #333;
    font-size: 28px;
    font-weight: 700;
}

h3 {
    margin-top: 0;
    color: #333;
    font-size: 24px;
    font-weight: 700;
}

h4 {
    color: #007bff;
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 700;
}

/* Lomake-elementit */
label {
    display: block;
    margin-top: 15px;
    font-weight: 600;
    color: #333;
    text-align: left;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

input:focus, select:focus, textarea:focus {
    border-color: #007bff;
    outline: none;
}

textarea {
    resize: vertical;
}

.result {
    margin-top: 20px;
    padding: 15px;
    background-color: #e9ecef;
    border-radius: 4px;
    font-size: 18px;
    text-align: left;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Etusivun painikkeet */
.etusivu-actions {
    margin-top: 20px;
    text-align: left;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.etusivu-actions button {
    display: block;
    padding: 12px 20px;
    margin: 0;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #ffffff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-decoration: none; /* Poistaa alleviivauksen painikkeista */
}

.etusivu-actions button a {
    color: #333;
    text-decoration: none; /* Poistaa alleviivauksen linkeistä */
}

.etusivu-actions button:hover {
    background: #007bff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

.etusivu-actions button:hover a {
    color: white;
}

/* Split Container */
.split-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
    text-align: left;
}

.instructions {
    flex: 1;
    min-width: 240px;
    background-color: #f8f8f8;
    border-radius: 6px;
    padding: 15px;
    font-size: 0.95em;
    color: #333;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.form-area {
    flex: 2;
    min-width: 280px;
    text-align: center;
}

/* Blog Carousel */
.blog-carousel {
    position: relative;
    margin: 20px auto;
    width: 90%;
    max-width: 1000px;
    overflow: hidden;
}

.slides-container {
    overflow: hidden;
    width: 100%;
}

.blog-carousel .slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.blog-carousel .slide {
    flex: 0 0 60%;
    max-width: 60%;
    box-sizing: border-box;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    margin: 0 5px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.blog-carousel .slide.active {
    opacity: 1;
}

.blog-carousel .slide img {
    width: 100%;
    height: 200px;
    border-radius: 6px;
    margin-bottom: 15px;
    object-fit: cover;
}

.blog-carousel .slide h4 a {
    color: #007bff;
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none; /* Poistaa alleviivauksen linkeistä */
}

.blog-carousel .slide h4 a:hover {
    text-decoration: underline; /* Lisää alleviivauksen hover-tilassa */
}

.blog-carousel .slide p {
    line-height: 1.5;
    font-size: 0.9em;
    color: #666;
    margin: 0;
}

.carousel-dots {
    margin-top: 15px;
    text-align: center;
}

.carousel-dots span {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #999;
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.carousel-dots span.active {
    background: #007bff;
}

/* Calculator Section ja Blog Window */
.calculator-section, .blog-window {
    margin: 20px 0;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.calculator-section:hover, .blog-window:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.calculator-section h4, .blog-window h4 {
    color: #007bff;
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 700;
}

.calculator-section button, .blog-window button {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px;
    border: 1px solid #007bff;
    border-radius: 4px;
    background: #007bff;
    cursor: pointer;
    font-size: 16px;
    color: white;
    transition: background 0.3s, transform 0.3s;
    text-decoration: none; /* Poistaa alleviivauksen painikkeista */
}

.calculator-section button a, .blog-window button a {
    color: white;
    text-decoration: none; /* Poistaa alleviivauksen linkeistä */
}

.calculator-section button:hover, .blog-window button:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.blog-window img {
    max-width: 100%;
    height: 200px;
    border-radius: 6px;
    margin-bottom: 15px;
    object-fit: cover;
}

/* Media Queries */
@media (max-width: 600px) {
    .split-container {
        flex-direction: column;
    }
    .blog-carousel .slide {
        flex: 0 0 90%;
        max-width: 90%;
    }
}