/*
========================================
   MALLITOIMISTO X - MOBIILIOPTIMOINTI
   Tämä tiedosto sisältää kaikki tyylit,
   jotka aktivoituvat alle 768px leveillä näytöillä.
========================================
*/

@media (max-width: 768px) {

    /* ======== YLEISET SÄÄDÖT ======== */
    body {
        font-size: 16px;
    }

    .gallery-section, .contact-section, .model-profile {
        padding: 1.4rem 1rem;
    }


    /* ======== HEADER JA NAVIGAATIO ======== */
    /* ======== HEADER JA NAVIGAATIO ======== */
nav {
    position: relative;
    margin-left: -20px;
    margin-right: -13px;
    /* Poistettu aiemmat negatiiviset marginaalit, jotka voivat aiheuttaa ongelmia */
}

/* Estää taustan skrollaamisen, kun valikko on auki */
body.menu-open {
    overflow: hidden;
}

.logo img {
    height: 30px;
    width: auto;
    display: block;
}


.desktop-nav {
    display: none !important;
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 2000; /* Pidetään nappi aina päällimmäisenä */
    position: relative;
}

.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: #ececec;
    border-radius: 10px;
    transition: all 0.3s ease-in-out; /* Animaation pehmeys */
    
}

/* Koko ruudun valikko */
.mobile-nav-overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0f0f0f;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
    z-index: 1800;
}

/* NÄYTETÄÄN VALIKKO, KUN BODY-ELEMENTILLÄ ON "menu-open"-LUOKKA */
.menu-open .mobile-nav-overlay {
    opacity: 1;
    pointer-events: all;
}

/* SIIRRETÄÄN NAPPI OIKEAAN YLÄKULMAAN, KUN VALIKKO ON AUKI */
.menu-open .menu-toggle {
    position: fixed;
    top: 1.5rem;
    right: 2rem;
    margin-right: -13px;
}

/* MUUTETAAN BURGERI RASTIKSI, KUN VALIKKO ON AUKI */
.menu-open .menu-toggle .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-open .menu-toggle .bar:nth-child(2) {
    opacity: 0;
}

.menu-open .menu-toggle .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-nav-overlay ul {
    list-style: none;
    padding: 0;
    text-align: center;
    padding-top: 25px;
}

.mobile-nav-overlay li {
    margin-bottom: 1.5rem;
}

.mobile-nav-overlay a {
    font-size: 1.8rem;
    color: #ececec;
    font-weight: bold;
}

    /* ======== HERO-OSIO (ETUSIVU) ======== */
    .hero {
        height: 70vh;
    }

    .hero h1 {
        font-size: 1.8rem;
        padding-top: 320px;
        margin-bottom: -10px;
    }

    .hero p {
        font-size: 1.15rem;
    }

    .hero-content {
        padding: 1.2rem 1rem;
        text-align: left;
    }

    /* ======== MALLIGALLERIA (ETUSIVU) ======== */
    .gallery-section h2 {
        font-size: 2rem;
        text-align: left;
        margin-bottom: 2rem;
    }

    .contact-info h3, .contact-form h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;

}

.contact-section {
    background-color: #0a0a0a;
    padding: 4.4rem 2rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
    font-size: 1.2rem; !important
}

    .gallery-subtitle {
    text-align: left;
    margin-top: -1.5rem; /* Nostaa tekstiä lähemmäs pääotsikkoa */
    margin-bottom: 2rem;
    max-width: 500px;
    color: #aaa; /* Himmennetään väriä hieman */
    font-style: italic;
    margin-left: auto;
    margin-right: auto;
    font-size: 1rem;
}


    .model-gallery {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }


    /* ======== KOKO NÄYTÖN GALLERIA (GALLERIA.HTML) ======== */
    .fullscreen-gallery {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 4px;
        padding: 4px;
    }
    
    .gallery-item {
        height: 470px;
    }
    

    /* ======== YKSITTÄISEN MALLIN SIVU ======== */
    .model-profile {
        flex-direction: column;
        gap: 2rem;
        margin-bottom: -10px;
    }

   /* Piilotetaan tietokoneen kuva mobiilissa */
.profile-image {
    display: none;
}

/* Tuodaan mobiilikuva näkyviin mobiilissa */
.profile-image2 {
    display: block;
    width: 100%;
    margin-top: -60px;
}

    /* Carousel-tyylit mobiilille */
    .image-carousel {
        width: 100%;
        margin-bottom: 2rem;
    }

    .carousel-container {
        height: 400px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .carousel-container::-webkit-scrollbar {
        display: none;
    }

    .carousel-container img {
        height: 400px;
    }

    .carousel-prev, .carousel-next {
        padding: 0.8rem;
        font-size: 1.2rem;
    }

    .carousel-prev {
        left: 5px;
    }

    .carousel-next {
        right: 5px;
    }

    .carousel-prev-mobile, .carousel-next-mobile {
        display: none;
    }

    .carousel-dots {
        bottom: 8px;
        gap: 6px;
    }

    .dot {
        width: 8px;
        height: 8px;
    }

    .profile-details h1 {
        font-size: 2.5rem;
        text-align: left;
        margin-top: -40px;
        padding-bottom: 20px;
    }

    .personal-details h1 {
        font-size: 2.5rem;
        text-align: left;
        margin-top: -20px;
        padding-bottom: 10px;
    }

    .profile-details .description {
        font-size: 1.1rem;
        text-align: center;
    }

    .details-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 0.5rem;
    }

    .back-button {
        display: block;
        text-align: center;
    }
    

    /* ======== YHTEYDENOTTO-OSIO ======== */
    .contact-container {
        flex-direction: column;
        margin-left: -15px;
    }

    .contact-info h3, .contact-form h3 {
        text-align: left;
    }

    /* TIETOA MEISTÄ -SIVUN MOBIILI--*/
.about-image {
    display: none; /* Tämä piilottaa kuvan mobiilissa */
    }

    .instagram-btn {
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
    border-radius: 4px;
    max-width: 160px;
}

.about-section {
    display: flex;
    gap: 3rem;
    max-width: 1300px;
    margin: 0rem auto;
    padding: 1.2rem;
    align-items: center;
    margin-top: 40px;
}

.about-text h1 {
    font-size: 2.4rem;
    margin-bottom: -0.9rem;
    padding-bottom: 1rem;
    display: inline-block;
}

form input, form textarea {
    width: 96%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #444;
    background-color: #0a0a0a;
    color: #ececec;
    border-radius: 4px;
}

form button {
    width: 104%;
    border: none;
    cursor: pointer;
}

}
