/* ===== YHTEISET TYYLIT ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Header ja navigaatio - yhteiset */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #333;
    border-bottom: 3px solid white;
    z-index: 1000;
    display: flex;
}

.logo-container {
    border-right: 3px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.logo {
    filter: brightness(2);
}

nav {
    flex: 1;
}

.nav-links {
    height: 100%;
    display: flex;
    list-style: none;
}

.nav-links li {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 3px solid white;
}

.nav-links li:last-child {
    border-right: none;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Hamburger menu - yhteiset */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 5px;
}

/* Hero-osio - yhteiset */
.hero-section {
    position: relative;
    width: 100vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    transition: background-image 1s ease-in-out;
}

.hero-logo {
    filter: brightness(1.8);
    margin-bottom: 25px;
}

.hero-section h1 {
    color: white;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.8);
    margin-bottom: 25px;
}

#hero-slogan-spot {
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.9);
    background: rgba(0, 0, 0, 0.55);
    padding: 12px 25px;
    border-radius: 8px;
    min-height: 1.8em;
    display: inline-block;
    transition: opacity 0.4s ease-in-out;
}

/* Pääsisältö - yhteiset */
main {
    padding-top: 0;
}

.content-section {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.content-section:nth-of-type(even) {
    background: #fff;
}

.content-section h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    color: #333;
}

/* Palvelut - yhteiset */
.services-grid {
    display: grid;
    gap: 2rem;
    margin: 0 auto;
}

.service-item {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.service-item h3 {
    margin-bottom: 1rem;
    color: #444;
}

.service-item p {
    color: #666;
    line-height: 1.7;
    flex-grow: 1;
}

.services-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin: 1.5rem 0 1rem;
    transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
    opacity: 1;
    transform: translateY(0);
}

.services-image.fade-out {
    opacity: 0;
    transform: translateY(30px);
}

.services-image.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.services-image:hover {
    transform: scale(1.05);
}

/* Tietoa meistä - yhteiset */
.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
    padding: 2rem 0;
}

.about-image {
    border-radius: 8px;
    margin-bottom: 2rem;
}

.about-text {
    text-align: left;
}

.company-details {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.company-details p {
    margin-bottom: 0.7rem;
    color: #505050;
    line-height: 1.5;
}

.about-text h3 {
    margin-bottom: 1.5rem;
    color: #333;
}

.about-text > p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: #444;
}

/* Yhteydenotto - yhteiset */
#yhteydenotto {
    width: 100%;
    padding: 0;
}

#yhteydenotto form {
    width: 100%;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    text-align: left;
}

#yhteydenotto label {
    display: block;
    margin-bottom: 0.6rem;
    color: #333;
    font-weight: bold;
}

#yhteydenotto input[type="text"],
#yhteydenotto input[type="email"],
#yhteydenotto input[type="tel"],
#yhteydenotto textarea {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

#yhteydenotto input:focus,
#yhteydenotto textarea:focus {
    border-color: #555;
    box-shadow: 0 0 5px rgba(85, 85, 85, 0.2);
}

#yhteydenotto textarea {
    resize: vertical;
    min-height: 120px;
}

#yhteydenotto button {
    background: #333;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

#yhteydenotto button:hover {
    background: #555;
}

/* Footer - yhteiset */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    position: relative;
    width: 100%;
}

.cookie-notice {
    background: #f5f5f5;
    color: #333;
    padding: 1rem;
    text-align: center;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 1000;
}

.cookie-notice button {
    background: #333;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 1rem;
}

.cookie-notice button:hover {
    background: #555;
}

#sticky-contact-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: white;
    color: #333;
    padding: 12px 20px;
    text-decoration: none;
    border: 1px solid #b0b0b0;
    border-radius: 5px;
    z-index: 1001;
    font-weight: bold;
    box-shadow: 0 3px 7px rgba(0,0,0,0.25);
    transition: all 0.2s ease-in-out;
}

#sticky-contact-btn:hover {
    background: #333;
    color: white;
    border-color: #333;
    transform: translateY(-2px);
}

/* ===== TIETOKONEVERSIO (min-width: 769px) ===== */
@media (min-width: 769px) {
    header {
        height: 120px;
    }

    .logo-container {
        width: 20%;
        height: 100%;
    }

    .logo {
        max-height: 90px;
    }

    .nav-links {
        display: flex;
    }

    .nav-links a {
        font-size: 1.4em;
    }

    .hero-section {
        height: 100vh;
        margin-top: 120px;
        scroll-margin-top: 120px;
        padding: 20px;
    }

    .hero-logo {
        max-height: 300px;
    }

    .hero-section h1 {
        font-size: 2.8em;
    }

    #hero-slogan-spot {
        font-size: 1.6em;
    }

    .content-section {
        padding: 4rem 2rem;
        background: #f9f9f9;
        min-height: 500px;
        scroll-margin-top: 120px;
    }

    .content-section h2 {
        font-size: 2.5em;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        max-width: 1200px;
    }

    .service-item h3 {
        font-size: 1.8em;
    }

    .about-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        max-width: 1200px;
    }

    .about-image {
        flex: 0 0 40%;
        max-width: 420px;
        margin-right: 3.5rem;
        margin-bottom: 0;
    }

    .about-text {
        flex: 1;
        max-width: 800px;
    }

    .about-text h3 {
        font-size: 1.8em;
    }

    .company-details p {
        font-size: 0.95em;
    }

    #yhteydenotto form {
        max-width: 1200px;
        padding: 3rem;
    }

    #yhteydenotto input[type="text"],
    #yhteydenotto input[type="email"],
    #yhteydenotto input[type="tel"],
    #yhteydenotto textarea {
        padding: 15px;
        font-size: 1.1em;
    }

    #yhteydenotto button {
        padding: 14px 22px;
        font-size: 1.1rem;
    }
}

/* ===== MOBIILIVERSIO (max-width: 768px) ===== */
@media (max-width: 768px) {
    /* Header ja navigaatio */
    header {
        height: 70px;
        border-bottom: none;
        width: 100vw;
        left: 0;
        right: 0;
    }

    .logo-container {
        width: auto;
        border-right: none;
        padding-left: 15px;
        justify-content: flex-start;
    }

    .logo {
        max-height: 50px;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100vw;
        height: calc(100vh - 70px);
        background: rgba(51, 51, 51, 0.98);
        flex-direction: column;
        transition: 0.3s ease;
        padding: 0;
        justify-content: flex-start;
        z-index: 1000;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        width: 100%;
        height: auto;
        padding: 0;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        font-size: 1.25em !important;
        padding: 6px 0 !important;
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
        margin: 0 !important;
        min-height: 36px !important;
    }

    /* Hero-osio */
    .hero-section {
        margin-top: 70px;
        height: calc(100vh - 70px);
        scroll-margin-top: 70px;
        padding: 0;
        width: 100vw;
        left: 0;
        right: 0;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 60px;
        overflow-x: hidden;
    }

    .hero-logo {
        width: 100vw;
        height: auto;
        max-width: none;
        object-fit: cover;
        object-position: left center;
        display: block;
        margin: 0 0 20px 0;
        background: none;
        filter: brightness(1.8);
    }

    .hero-section h1 {
        font-size: 1.8em;
        margin-bottom: 15px;
        padding: 0 10px;
        transform: translateY(-30px);
    }

    #hero-slogan-spot {
        font-size: 1.1em;
        padding: 10px 15px;
        width: 90%;
        max-width: 400px;
        min-height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        margin: 0 auto;
        margin-top: 20px;
    }

    /* Pääsisältö */
    .content-section {
        padding: 2rem 0;
        scroll-margin-top: 70px;
        min-height: auto;
        width: 100vw;
        left: 0;
        right: 0;
    }

    .content-section h2 {
        font-size: 1.8em;
        margin-bottom: 1.5rem;
        padding: 0 10px;
    }

    /* Palvelut */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0;
        width: 100%;
        margin: 0;
    }

    .service-item {
        padding: 1.5rem;
        margin: 0;
        border-radius: 0;
    }

    .service-item h3 {
        font-size: 1.4em;
        margin-bottom: 0.8rem;
    }

    .service-item p {
        font-size: 0.95em;
        line-height: 1.5;
    }

    .services-image {
        height: 200px;
        margin: 1rem 0;
        border-radius: 0;
        width: 100%;
    }

    /* Tietoa meistä */
    .about-content {
        padding: 0;
        width: 100%;
        margin: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .about-image {
        width: 80%;
        max-width: 250px;
        margin: 0.8rem auto;
        border-radius: 8px;
        object-fit: cover;
        object-position: center;
    }

    .about-text {
        max-width: 100%;
        padding: 0 1rem;
        text-align: center;
    }
    
    .about-text .company-details {
        margin: 0.8rem 0;
        padding: 0.8rem 0;
        border-top: 1px solid #e0e0e0;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .company-details p {
        font-size: 0.9em;
        margin-bottom: 0.4rem;
        line-height: 1.3;
    }

    .about-text h3 {
        font-size: 1.4em;
        margin-bottom: 0.8rem;
    }

    .about-text > p {
        font-size: 0.95em;
        margin-bottom: 0.8rem;
        line-height: 1.4;
    }

    /* Yhteydenotto */
    #yhteydenotto {
        padding: 0;
        width: 100vw;
        left: 0;
        right: 0;
        padding-bottom: 80px;
    }

    #yhteydenotto form {
        max-width: 100%;
        padding: 1rem;
        margin: 0;
        border-radius: 0;
    }
    
    #yhteydenotto .form-group {
        margin-bottom: 0.8rem;
    }
    
    #yhteydenotto label {
        font-size: 0.95em;
        margin-bottom: 0.2rem;
    }
    
    #yhteydenotto input[type="text"],
    #yhteydenotto input[type="email"],
    #yhteydenotto input[type="tel"],
    #yhteydenotto textarea {
        padding: 8px;
        font-size: 16px;
        margin-bottom: 0.3rem;
        border-radius: 6px;
    }
    
    #yhteydenotto button {
        padding: 10px 20px;
        font-size: 1rem;
        margin-top: 0.3rem;
        border-radius: 6px;
        position: relative;
    }

    /* Footer ja muut */
    footer {
        padding: 1.5rem 0;
        width: 100vw;
        left: 0;
        right: 0;
    }

    .cookie-notice {
        padding: 1rem;
        font-size: 0.9em;
        width: 100vw;
        left: 0;
        right: 0;
    }

    .cookie-notice button {
        padding: 8px 15px;
        font-size: 0.9em;
        margin-top: 0.5rem;
    }

    #sticky-contact-btn {
        padding: 12px 18px;
        font-size: 0.9em;
        bottom: 20px;
        right: 20px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }
}