* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Rajdhani", sans-serif;
    color: #000;
    background: #ebebeb;
}

footer {
    position: relative;
}

.container {
    width: 80%;
    margin: 0 auto;
}


.menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin: 20px 0 30px;
    padding: 14px 18px;
    border-radius: 8px;
}

.menu_left,
.menu_right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu_link {
    display: inline-block;
    text-decoration: none;
    color: #111;
    font-weight: 600;
    font-size: 18px;
    letter-spacing: 0.3px;
    padding: 6px 0;
    position: relative;
    transition: opacity 0.2s ease;
}

.menu_link:hover {
    opacity: 0.75;
}

.menu_link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: #111;
    transition: width 0.2s ease;
}

.menu_link:hover::after,
.menu_link:focus-visible::after {
    width: 100%;
}

.menu_link:focus-visible {
    outline: 2px solid #111;
    outline-offset: 4px;
    border-radius: 2px;
}

@media (max-width: 700px) {
    .menu {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 14px;
    }

    .menu_left,
    .menu_right {
        width: 100%;
    }

    .menu_left {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 14px;
    }

    .menu_right {
        justify-content: flex-start;
        padding-top: 8px;
        border-top: 1px solid #e7d9c8;
    }

    .menu_link {
        font-size: 17px;
    }
}

@media (max-width: 480px) {
    .menu_left,
    .menu_right {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .menu_link {
        width: 100%;
        padding: 10px 12px;
        background: #fff;
        border: 1px solid #eadfce;
        border-radius: 6px;
    }

    .menu_link::after {
        display: none;
    }
}

.wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    grid-auto-rows: 200px;
    grid-auto-flow: dense;
    grid-gap: 15px;
    width: 100%;
    margin: 40px 0;
}

.console_cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
}

.default_cover {
    width: 50%;
    margin-left: 25%;
    margin-top: 25%;
}

.default_single_box {
    position: relative;
    xxborder-radius: 3px;
    xxbackground: #FFF;
    xxbox-shadow: 0px 0px 5px 2px rgb(185 185 185 / 15%);
    xxtransition: transform 1.15s ease, box-shadow 0.15s ease;
    height: 200px;
}

.console_text {
    position: absolute;
    bottom: 8px;
    background: rgb(0 0 0 / 90%);
    color: #fff;
    font-size: 15px;
    padding: 5px 10px;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

.manufacturer {
    font-size: 14px;
    color: #FFF;
}

.name {
    font-weight: 600;
    color: #FFF;
}

.console_link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.single_box {
    position: relative;
    border-radius: 3px;
    background: #FFF;
    box-shadow: 0px 0px 5px 2px rgb(185 185 185 / 15%);
    transition: transform 1.15s ease, box-shadow 0.15s ease;
    height: 200px;
}

.console_link:hover .single_box {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}


.console_page {
    margin: 40px 0 60px;
}

.console_hero {
    display: grid;
    grid-template-columns: minmax(280px, 500px) 1fr;
    gap: 30px;
    align-items: start;
    margin-bottom: 35px;
}

.console_main_image {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0px 0px 5px 2px rgb(185 185 185 / 15%);
}

.console_detail_cover {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.console_no_image {
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eee;
    color: #666;
    font-size: 22px;
}

.console_summary {
    padding: 10px 0;
}

.console_kicker {
    font-size: 18px;
    color: #6b5b4d;
    margin-bottom: 6px;
}

.console_title {
    margin: 0 0 20px;
    font-size: 42px;
    line-height: 1;
}

.console_meta_row {
    margin-bottom: 10px;
    font-size: 20px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.console_content {
    display: grid;
}

.console_section {
    background: #fff;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0px 0px 5px 2px rgb(185 185 185 / 15%);
    margin-bottom: 20px;
}

.console_section h2 {
    margin: 0 0 12px;
    font-size: 28px;
}

.console_text_block {
    font-size: 20px;
    line-height: 1.5;
    color: #222;
}

.console_gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.gallery_item {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0px 0px 5px 2px rgb(185 185 185 / 15%);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery_item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

.gallery_image {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.gallery_item {
    padding: 0;
    border: 0;
    background: #fff;
    cursor: pointer;
    display: block;
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0px 0px 5px 2px rgb(185 185 185 / 15%);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery_item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

.gallery_item:focus {
    outline: 2px solid #000;
    outline-offset: 3px;
}

.image_modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

.image_modal.is_open {
    display: block;
}

.image_modal_backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
}

.image_modal_inner {
    position: relative;
    z-index: 2;
    width: min(92vw, 1200px);
    height: min(90vh, 900px);
    margin: 5vh auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.image_modal_img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    background: #111;
}

.image_modal_close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.14);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.image_modal_close:hover {
    background: rgba(255,255,255,0.24);
    transform: scale(1.05);
}

body.modal_open {
    overflow: hidden;
}

.nav_center {
    display:flex;
    justify-content: center;
    align-items:center;
    margin-bottom:20px;
    font-size:18px;
}

.nav_center a {
    text-decoration:none;
    color:#000;
    background:#fff;
    padding:8px 14px;
    border-radius:4px;
    box-shadow:0px 0px 5px 2px rgb(185 185 185 / 15%);
    transition:all .15s ease;
}

.nav_center a:hover {
    transform:translateY(-2px);
    box-shadow:0 6px 12px rgba(0,0,0,0.15);
}

.console_navigation {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:20px;
    font-size:18px;
}

.console_navigation a {
    text-decoration:none;
    color:#000;
    background:#fff;
    padding:8px 14px;
    border-radius:4px;
    box-shadow:0px 0px 5px 2px rgb(185 185 185 / 15%);
    transition:all .15s ease;
}

.console_navigation a:hover {
    transform:translateY(-2px);
    box-shadow:0 6px 12px rgba(0,0,0,0.15);
}

.nav_left {
    text-align:left;
}

.nav_right {
    text-align:right;
}

.console_navigation a {
    text-decoration:none;
    color:#000;
    background:#fff;
    padding:8px 16px;
    border-radius:4px;
    box-shadow:0px 0px 5px 2px rgb(185 185 185 / 15%);
    transition:all .15s ease;
}

.console_navigation a:hover {
    transform:translateY(-2px);
    box-shadow:0 6px 12px rgba(0,0,0,0.15);
}

.site-footer {
    margin-top: 40px;
}

/* Etusivu nappi hieman erilaiseksi */

.nav_home {
    font-weight:600;
    background:#000;
}

@media (max-width: 768px) {
    .container {
        width: 90%;
    }

    .console_hero {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .console_title {
        font-size: 32px;
    }

    .console_meta_row {
        font-size: 18px;
    }

    .console_text_block {
        font-size: 18px;
    }

    .gallery_image {
        height: 180px;
    }

    .default_cover {
        width: 50%;
        margin-left: 25%;
        margin-top: 0%;
    }

}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1; /* pushes footer down */
}
