/* Nollataan oletustyylit */
* {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

/* Runko-tyylit */
body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f7f7f7;
    margin: 0;
    padding-top: 80px;
    width: 100%;
    overflow-x: hidden;

}

/* Ylätunniste-tyylit */
header {
    background: #27476E;
    color: #fff;
    padding: 10px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background 0.3s;
    transition: height 0.5s ease, padding 0.5s ease, background 0.5s ease;

}

header .container {
    display: flex;
    align-items: center;
    padding: 0 20px;
    justify-content: space-between;
}

header .logo {
    margin-right: auto;
}

header .logo img {
    max-height: 75px;
    margin-left: 50px;
    transition: transform 0.5s ease, max-height 0.5s ease;
}

header .logo img:hover {
    transform: scale(1.1);
}

header nav {
    display: flex;
    justify-content: flex-end;
}

header nav ul {
    list-style: none;
    display: flex;
    margin: 0;
}

header nav ul li {
    margin-left: 20px;
}

header nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.5s, background 0.5s, font-size 0.5s ease; /* Added smooth font size transition */
    padding: 5px 10px;
    border-radius: 5px;
}

header nav ul li a:hover {
    color: #AFD3FA;
    background: rgba(175, 211, 250, 0.1);
}
/* Shrink the header on scroll */
header.shrink {
    height: 50px;
    padding: 5px 0;
}

/* Shrink the logo when header shrinks */
header.shrink .logo img {
    max-height: 40px;
}

/* Adjust nav links size if necessary */
header.shrink nav ul li a {
    padding: 3px 8px;
    font-size: 13px;
}
/* Hamburger-valikon tyylit */
header .hamburger-menu {
    display: none;
    cursor: pointer;
    z-index: 1100;
}

header .hamburger-menu .fa-bars {
    display: block;
    font-size: 24px;
    color: #fff;
}

header .hamburger-menu .fa-times {
    display: none;
    font-size: 24px;
    color: #fff;
}

header .hamburger-menu.open .fa-bars {
    display: none;
}

header .hamburger-menu.open .fa-times {
    display: block;
}
/* Hide the header or .container when the modal is open */
.hide-header {
    display: none !important;  /* Ensures the header or .container is hidden */
}

/* About-osio */
.about-section {
    color: #fff;
    text-align: center;
    width: 100%;
    margin: 0; /* Poistetaan marginaalit */
    padding: 0; /* Poistetaan tyhjät tilat */
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-background {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(39, 71, 110, 0.8), rgba(39, 71, 110, 0.8)), url('assets/your-background-image.jpg') no-repeat center center/cover;
}

.about-container {
    width: 100%;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}


.profile-picture img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

/* Hover-efekti kuvalle */
.profile-picture img:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3); /* Syvempi varjo hoverin aikana */
}


.profile-info h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.profile-info .job-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-style: italic;
    color: #ffb400;
}

.profile-info .about-description {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 800px;
    line-height: 1.6;
    color: #f7f7f7;
}

.social-links a {
    font-size: 2rem;
    margin: 0 10px;
    color: #fff; /* Change the icon color to white */
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #ffb400; /* Keep the hover effect */
}

/* Action buttons */
.action-buttons {
    margin-top: 30px; /* Add space between social links and buttons */
}

.action-buttons a {
    padding: 12px 30px;
    font-size: 1.2rem;
    text-transform: uppercase;
    margin: 10px;
    border-radius: 5px;
    transition: background 0.3s ease;
}
.btn-primary {
    background-color: #ffb400;
    color: #fff;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: #e69c00;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid #ffb400;
    color: #ffb400;
    text-decoration: none;
}

.btn-secondary:hover {
    background-color: #e69c00;
    color: #fff;
}
/* Hide the header when the modal is open */
.hide-header {
    display: none !important;  /* Hides the header completely */
}

/* Palvelut-osio */
.service-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
    justify-content: center; /* Keskittää ruudukon sisällön */
}

.service {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.service:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.service-icon-container {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #27476E;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    position: relative;
}

.service-icon {
    font-size: 36px;
    color: #fff;
}

.service h3 {
    font-size: 22px;
    color: #1c1c1c;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.service p {
    color: #7f8c8d;
    font-size: 16px;
    line-height: 1.6;
}

/* Learn More Button Styles */
.learn-more-btn {
    background: #ffb400;
    color: #fff;
    border: none;
    padding: 10px 20px;
    text-transform: uppercase;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
    margin-top: 10px;
}

.learn-more-btn:hover {
    background: #e69c00;
    transform: translateY(-2px);
}

/* Muut yleiset tyylit */
section {
    padding: 60px 20px;
    margin: 20px 0;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    max-width: 100%;
    margin: 20px auto;
    transition: transform 0.3s;
    scroll-margin-top: 100px;
}

section p {
    text-align: center;
    margin-top: 20px;
    color: #7f8c8d;
    font-size: 18px;
}

section:hover {
    transform: translateY(-5px);
}

section h2 {
    margin-bottom: 20px;
    font-size: 28px;
    color: #1c1c1c;
    text-align: center;
    position: relative;
}

section h2::after {
    content: '';
    width: 50px;
    height: 3px;
    background: #ffb400;
    display: block;
    margin: 10px auto;
}

/* Project section styling */
.projects-section {
    padding: 60px 20px;
    background-color: #f7f7f7;
}

.project-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-image {
    flex: 1;
    max-width: 500px;
}

.project-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s;
}

.project-image img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}


.project-details {
    flex: 1;
    max-width: 600px;
}

.project-details h3 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #333;
}

.project-details p {
    font-size: 18px;
    margin-bottom: 15px;
    color: #666;
    text-align: left;
}

.project-tech-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.project-tech-list li {
    background-color: #e9e9e9;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    color: #333;
}

.project-details .btn {
    background-color: #ffb400;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 16px;
    transition: background 0.3s ease;
}

.project-details .btn:hover {
    background-color: #e69c00;
}

/* Asiakaspalautteet */
.testimonial p {
    font-style: italic;
    background: #ecf0f1;
    padding: 10px;
    border-left: 5px solid #ffb400;
    border-radius: 4px;
}

/* Lomakkeen tyylit */
form {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

form label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #1c1c1c;
}

form input[type="text"], 
form input[type="email"], 
form input[type="tel"], /* Added phone number field styling */
form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    font-size: 16px;
    color: #34495e;
    transition: border-color 0.3s;
}

form input[type="text"]:focus, 
form input[type="email"]:focus, 
form input[type="tel"]:focus, /* Added focus effect for phone number */
form textarea:focus {
    border-color: #ffb400;
}

form button {
    background: #ffb400;
    color: #fff;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 16px;
    transition: background 0.3s;
}

form button:hover {
    background: #e69c00;
}
/* Contact container */
.contact-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: left; /* Align text to the left */
    width: 100%;
}
/* Styling for contact description */
.contact-container p[data-key="contact-description"] {
    font-size: 18px; /* Match the font size with other text */
    line-height: 1.6; /* Improve readability with a taller line height */
    color: #7f8c8d; /* Use a subtle gray color */
    margin-bottom: 20px; /* Add space below the description */
    text-align: left; /* Align the text to the left */
    max-width: 600px; /* Ensure it doesn't stretch too wide */
}

.contact-content {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Vertically centers the image with the form */
    max-width: 1200px;
    margin: 0 auto;
    gap: 40px; /* Adjust spacing between form and image */
    width: 100%;
}

.contact-content form {
    flex: 1;
    max-width: 600px; /* Ensure the form is wide enough */
}

.contact-content label, .contact-content input, .contact-content textarea, .contact-content button {
    width: 100%; /* Make form fields and button take full width */
}

.contact-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 600px; /* Ensure the image is wide enough */
    height: 100%; /* Make sure the image takes up the available height */
    perspective: 1000px; /* For 3D hover effect */
}

.contact-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s ease, box-shadow 0.5s ease; /* Smooth transition for hover effects */
}


/* Cool hover effect */
.contact-image img:hover {
    transform: scale(1.1) rotate(-5deg); /* Scale up and rotate slightly */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); /* Stronger shadow for a pop effect */
}

/* Alatunniste-tyylit */
footer {
    background: #1c1c1c;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    position: relative;
    bottom: 0;
    width: 100%;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

footer ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    display: flex;
    justify-content: center;
}

footer ul li {
    margin: 0 10px;
}

footer ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    transition: color 0.3s;
}

footer ul li a:hover {
    color: #ffb400;
}

/* Kielenvalitsin-tyylit */
.language-selector-container {
    position: fixed;
    bottom: 20px;
    right: 40px;
    background: #ffffff;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    padding: 5px;
    padding-right: 15px;
    z-index: 1000;
    width: 152px;
}

.select2-container--default .select2-selection--single {
    padding: 0px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    width: 140px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    margin-left: 60px;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #999;
}

.select2-dropdown {
    width: 140px !important;
}

.img-flag {
    width: 20px;
    height: 15px;
    margin-right: 8px;
    vertical-align: middle;
}

/* Tekstin valinnan korostus */
::selection {
    background: rgba(255, 180, 0, 0.5);
    color: #000;
}
/* Media Queries for Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
    .service-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Hide contact form image on tablet */
    .contact-image {
        display: none;
    }

    /* Move project image below project details */
    .project-container {
        flex-direction: column;
        text-align: center;
    }

    .project-image {
        order: 2;
        margin-top: 20px;
    }

    .project-details {
        order: 1;
    }

    .action-buttons {
        display: flex;
        flex-direction: row; /* Keep buttons in a row on tablets */
        justify-content: center; /* Center the buttons */
        gap: 10px; /* Space between buttons */
    }

    .btn-primary,
    .btn-secondary {
        width: 40%;  /* Slightly smaller width for better layout */
        padding: 10px;
        font-size: 0.9rem;  /* Reduce font size slightly */
        border-radius: 6px;
        text-align: center;
    }

    .btn-secondary {
        background-color: #ffb400;
        color: #fff;
    }

    .btn-secondary:hover {
        background-color: #e69c00;
    }

}

/* Media Queries for Mobile (max-width: 768px) */
@media (max-width: 768px) {
    header .hamburger-menu {
        display: block;
    }

    header nav ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        position: fixed;
        top: 85px;
        left: 0;
        width: 100%;
        background: #27476E;
        padding: 20px 0;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
        transform: translateY(-100%);
        opacity: 0;
        z-index: 1000;
    }

    header nav ul.open {
        transform: translateY(0);
        opacity: 1;
    }

    header nav ul li {
        margin: 10px 0;
        animation: fadeIn 0.5s ease-in-out;
    }

    /* Hide contact form image on mobile */
    .contact-image {
        display: none;
    }

    /* Move project image below project details on mobile */
    .project-container {
        flex-direction: column;
        text-align: center;
    }

    .project-image {
        order: 2;
        margin-top: 20px;
    }

    .project-details {
        order: 1;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    section {
        scroll-margin-top: 80px;
        padding: 40px 10px;
    }

    form {
        padding: 15px;
    }

    form input[type="text"], form input[type="email"], form textarea {
        padding: 8px;
        font-size: 14px;
    }

    form button {
        padding: 8px 15px;
        font-size: 14px;
    }

    footer ul li a {
        font-size: 16px;
    }

    .project-container {
        flex-direction: column;
        text-align: center;
    }

    .project-image, .project-details {
        max-width: 100%;
    }
    .action-buttons {
        display: flex;
        flex-direction: column; /* Stack buttons vertically on mobile */
        justify-content: center; /* Center buttons vertically */
        align-items: center; /* Center buttons horizontally */
        gap: 15px; /* Add space between buttons */
    }

    .btn-primary,
    .btn-secondary {
        width: 80%;  /* Adjust width for smaller screens */
        padding: 10px;
        font-size: 0.9rem;  /* Slightly smaller font size */
        border-radius: 6px;
        text-align: center;
    }

    .btn-secondary {
        background-color: #ffb400;
        color: #fff;
    }

    .btn-secondary:hover {
        background-color: #e69c00;
    }
}
