/*
Theme Name: media
Author: Your Name
Description: media
Version: 1.0
Text Domain: media
*/

html { 
    font-size: 62.5%;
    font-family: " 游ゴシック体","Yu Gothic",YuGothic,"Hiragino Kaku Gothic Pro"," メイリオ",Meiryo,"ＭＳ Ｐゴシック","MS Gothic",sans-serif;
}

body { 
    font-size: 1.4rem;
    background-color: #F5E9D4;

    &.is-fixed {
        overflow: hidden;
    }
}

.header {
    background-color: #DAB787;

    .header__logo {
        background-color: #002b04;
    }

    .header__logo-inner {
        max-width: 1060px;
        margin: 0 auto;
        padding: 5px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .header__logo {
        color: #fff;
    }

    .header__catch-inner {
        max-width: 1060px;
        margin: 0 auto;
        padding: 10px 0;
    }

    .header__catch {
        color: #4C3422;
        font-weight: bold;
    }

    .header__menu-inner {
        max-width: 1060px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 24px;
        padding: 5px 0;
    }
}

.floating-header {
    position: fixed;
    top: -100px;
    left: 0;
    z-index: 9999;
    background-color: #fff;
    width: 100%;
    transition: .5s;

    &.is-show {
        top: 0;
    }

    .floating-header__menu-inner {
        max-width: 1060px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 24px;
        padding: 10px;
    }
}

.hamburger {
    display: none;
    width: 40px;
    height: 32px;
    position: relative;

    .hamburger__bar {
        display: block;
        width: 100%;
        height: 4px;
        position: absolute;
        left: 0;
        background: #fff;
    }
    
    .hamburger__bar {
        top: 0;
    
        &:nth-child(2) {
            top: 50%;
            transform: translateY(-50%);
        }
    
        &:nth-child(3) {
            top: 100%;
            transform: translateY(-100%);
        }
    }

    &.is-open {
        .hamburger__bar {
            top: 50%;
            transform: translateY(-50%) rotate(-315deg);

            &:nth-child(2) {
                opacity: 0;
            }
        
            &:nth-child(3) {
                top: 50%;
                transform: translateY(-50%) rotate(315deg);
            }
        }
    }
}

.mask {
    display: none;
    transition: all .5s;

    &.is-open {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #000;
        opacity: .8;
        z-index: 9999;
        cursor: pointer;
    }
}

.global-nav {
    .global-nav__list {
        display: flex;
    }

    .global-nav__item {
        display: flex;
        align-items: center;

        &:not(:last-of-type) {
            &::after {
                content: '/';
                font-size: 1rem;
            }
        }

        &:first-of-type {
            padding-left: 0;

            .global-nav__link {
                padding-left: 0;
            }
        }
    }
    
    .global-nav__link {
        display: flex;
        font-size: 1.6rem;
        padding: 5px 10px;
        color: #4C3422;
        font-weight: bold;

        &:hover {
            opacity: .6;
        }
    }
}

.searchform {
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
    border: 1px solid #4C3422;
    border-radius: 3px;

    .searchform__input {
        height: 28px;
        padding: 5px 15px;
        border: none;
        box-sizing: border-box;
        font-size: 1rem;
        outline: none;

        &::placeholder{
            color: #4c342294;
        }
    }
    
    .searchform__button {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 50px;
        height: 28px;
        border: none;
        background-color: transparent;
        cursor: pointer;
        
        &::after {
            width: 20px;
            height: 20px;
            background-image: url("./images/icon-search.svg");
            background-repeat: no-repeat;
            background-size: contain;
            content: '';
        }
    }
}

.wrapper {
    margin-top: 40px;

    .wrapper__inner {
        max-width: 1060px;
        margin: 0 auto;
        display: grid;
        grid-template-columns: minmax(0, 700px) minmax(0, 330px);
        gap: 30px;
    }
}

.entries {
    margin-top: 64px;
}

.card-list {
    display: flex;
    flex-wrap: wrap;
    gap: 30px 20px;

    .card-list__item {
        width: calc(50% - 10px);
    }

    .card-list__title {
        -webkit-line-clamp: 3;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 1.6rem;
        font-weight: bold;
        height: 72px;
        color: #4C3422;
    }

    .card-list__link {
        display: block;

        &:hover {
            opacity: .6;
        }
    }

    .card-list__image {
        width: 350px;
        height: 200px;
        object-fit: cover;
    }

    .card-list__date {
        font-size: 1.2rem;
        color: #4c342294;
        font-weight: bold;
        text-align: right;
    }
}

.more-button {
    display: flex;
    color: #fff;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 0;
    font-size: 1.6rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 24px;
    border: 2px solid #4C3422;
    color: #4C3422;
    transition: .2s;
    position: relative;
    gap: 8px;

    .more-button__arrow {
        vertical-align: middle;
        color: #333;
        line-height: 1;
        position: relative;
        width: 0.8em;
        height: 0.8em;
        border: 0.075em solid #4C3422;
        background: #4C3422;
        border-radius: 50%;
        box-sizing: content-box;

        &::before {
            content: '';
            color: #fff;
            width: 0;
            height: 0;
            border-left: 3px solid transparent;
            border-right: 3px solid transparent;
            border-top: 3px solid #Ffff;
            transform: translate(-50%, -50%);
            position: absolute;
            top: 50%;
            left: 50%;
            margin: auto;
        }
    }

    &:hover {
        background-color: #4C3422;
        color: #F5E9D4;

        .more-button__arrow {
            border: 0.075em solid #F5E9D4;
            background: #F5E9D4;
    
            &::before {
                border-top: 3px solid #4C3422;
            }
        }
    }
}

.news {
    .news__title {
        font-size: 1.6rem;
        font-weight: bold;
        color: #4C3422;
        display: flex;
        gap: 10px;
        align-items: center;

        &::before {
            content: '';
            background-color: #4C3422;
            width: 8px;
            height: 8px;
            border-radius: 50%;
        }
    }

    .news__list {
        margin-top: 16px;
    }

    .news__link {
        display: flex;
        gap: 10px;
    }

    .news__article-title {
        font-size: 1.3rem;
        font-weight: bold;
        color: #4C3422;
    }

    .news__image {
        width: 130px;
        object-fit: cover;
    }
}

.side-banner {
    margin-top: 24px;
}

.ranking {
    margin-top: 24px;

    .ranking__link {
        display: flex;
        gap: 20px;
    }

    .ranking__title {
        font-size: 1.6rem;
        font-weight: bold;
        color: #4C3422;
        display: flex;
        gap: 10px;
        align-items: center;

        &::before {
            content: '';
            background-color: #4C3422;
            width: 8px;
            height: 8px;
            border-radius: 50%;
        }
    }

    .ranking__article-title {
        font-size: 1.3rem;
        font-weight: bold;
        color: #4C3422;
    }

    .ranking__item {
        margin-top: 18px;
    }

    .ranking__article-link {
        display: flex;
        gap: 8px;
    }

    .ranking__article-image-wrapper {
        width: 60%;
        max-width: 140px;
        flex-shrink: 0;
    }

    .ranking__article-image {
        width: 140px;
        height: 100px;
        object-fit: cover;
    }
}

.footer {
    background-color: #002b04;
    margin-top: 80px;

    .footer__inner {
        max-width: 1060px;
        margin: 0 auto;
        padding: 40px 0;
    }

    .footer__logo {
        text-align: center;
    }

    .footer-nav__list {
        display: flex;
        gap: 16px;
        justify-content: center;
        margin-top: 36px;
        color: #fff;
    }

    .copyright {
        text-align: center;
        margin-top: 24px;
        font-size: 1rem;
        color: #fff;
    }
}

.slick-slider {
    .slick-arrow {
        z-index: 2;
    }

    .slick-prev {
        left: 10px;
    }

    .slick-next {
        right: 10px;
    }
}

@media (width < 992px) {
    .header {
        .header__logo-inner {
            padding: 5px 10px;
        }
        .header__catch-inner {
            padding: 10px;
        }

        .header__menu-inner {
            padding: 10px;
        }
    }

    .hamburger {
        display: none;
    }

    .global-nav {
        .global-nav__link {
            font-size: 1.6vw;
        }
    }

    .wrapper {   
        .wrapper__inner {
            padding: 0 10px;
            grid-template-columns: minmax(0, 700px) minmax(0, 240px);
        }
    }
}

@media (width < 768px) {
    .header {
        position: sticky;
        top: 0;
        z-index: 10000;

        .header__logo-inner {
            padding: 5px 10px;
        }

        .header__menu-inner {
            flex-direction: column-reverse;
            padding: 20px 10px;
        }

        .header__menu-wrapper {
            display: block;
            position: fixed;
            top: 97px;
            right: -300px;
            bottom: 0;
            width: 300px;
            background: #ffffff;
            overflow-x: hidden;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            transition: all .5s;
            z-index: 3;
            opacity: 0;

            &.is-open {
                right: 0;
                opacity: 1;
            }
        }
    }

    .global-nav {
        width: 100%;

        .global-nav__list {
            flex-direction: column;
        }

        .global-nav__item {
            width: 100%;
            border-bottom: 1px solid #4C3422;

            &::after {
                display: none;
            }

            &:first-of-type {
                .global-nav__link {
                    padding-left: 10px;
                }
            }
        }

        .global-nav__link {
            font-size: 1.4rem;
            display: block;
            width: 100%;
            padding: 15px 10px;
        }
    }

    .searchform {
        width: 100%;

        .searchform__input {
            height: 40px;
        }
    }

    .floating-header  {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .wrapper {   
        .wrapper__inner {
            padding: 10px;
            grid-template-columns: 100%;
        }
    }

    .news {
        .news__list {
            display: flex;
            gap: 10px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .news__item {
            width: calc(100% / 5 - 10px * 4 / 5);
        }

        .news__link {
            dusplay: flex;
            flex-direction: column;
        }

        .news__image-wrapper {
            width: 100%;
        }

        .ranking__article-image {
            width: 100%;
            height: 80px;
            object-fit: cover;
        }
    }

    .side-banner {
        max-width: 600px;
        width: 100%;
        margin: 24px auto 0;
        text-align: center;
    }

    .ranking {
        .ranking__list {
            display: flex;
            gap: 10px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .ranking__item {
            width: calc(100% / 5 - 10px * 4 / 5);
        }

        .ranking__article-link {
            dusplay: flex;
            flex-direction: column;
        }

        .ranking__article-image-wrapper {
            width: 100%;
        }

        .ranking__article-image {
            width: 100%;
            height: 80px;
            object-fit: cover;
        }
    }
}

@media (width < 576px) {

    .news {
        .news__item {
            width: calc(100% / 3 - 10px * 2 / 3);
        }
    }

    .ranking {
        .ranking__item {
            width: calc(100% / 3 - 10px * 2 / 3);
        }
    }

    .footer {
        .footer-nav__list {
            flex-wrap: wrap;
        }
    }
}