@charset "utf-8";

/* Common */
img {
    max-width: 100%;
    height: auto;
}

.pc-only {
    display: block;

    @media (max-width: 768px) {
        display: none;
    }
}

.sp-only {
    display: none;

    @media (max-width: 768px) {
        display: block;
    }
}

.caution {
    color: #cf2e2e;
}

/* Archives */
.archive-photocontest {
    >.gallery {
        >.contents {
            &:nth-child(1) {
                background: #f9fafb;
                padding: 48px 0;
                text-align: center;

                @media (max-width: 768px) {
                    padding: 24px 0;
                }

                h2 {
                    color: #023f86;
                    font-size: 30px;
                    font-weight: 700;
                    line-height: 1.1;
                    margin-bottom: 16px;

                    @media (max-width: 768px) {
                        font-size: 20px;
                        margin-bottom: 12px;
                        line-height: 1.4;
                    }
                }

                p {
                    font-size: 16px;

                    @media (max-width: 768px) {
                        font-size: 12px;
                    }
                }

                a {
                    font-size: 24px;
                    color: #023f86;
                    font-weight: 700;
                    text-decoration: underline;
                    text-underline-offset: .25em;
                    font-style: italic;
                    transition: .3s all ease-out;

                    @media (max-width: 768px) {
                        font-size: 16px;
                    }

                    &:hover {
                        opacity: .6;
                    }
                }
            }

            &:nth-child(2) {
                background: #fff;
                padding: 64px 0;

                @media (max-width: 768px) {
                    padding: 32px 0;
                }

                >.inner {
                    padding-right: 40px;
                    padding-left: 40px;
                    margin: 0 auto;
                    max-width: 1200px;

                    @media (max-width: 830px) {
                        padding-right: 20px;
                        padding-left: 20px;
                    }

                    @media (max-width: 500px) {
                        padding-right: 8px;
                        padding-left: 8px;
                    }

                    >ul {
                        column-count: 4;
                        column-gap: 10px;

                        @media (max-width: 768px) {
                            column-count: 3;
                        }

                        @media (max-width: 500px) {
                            column-count: 2;
                            column-gap: 8px;
                        }

                        >li {
                            break-inside: avoid;
                            margin-bottom: 10px;
                            margin-top: 0;
                            display: inline-block;
                            width: 100%;

                            @media (max-width: 500px) {
                                margin-bottom: 0;
                            }

                            >a {
                                display: block;
                                position: relative;
                                transition: .3s all ease-out;
                                overflow: hidden;

                                >img {
                                    width: 100%;
                                    height: auto;
                                    display: block;
                                    transition: .3s all ease-out;
                                }

                                >.desc-wrap {
                                    opacity: 0;
                                    position: absolute;
                                    width: 100%;
                                    height: 100%;
                                    top: 0;
                                    left: 0;
                                    background-color: rgba(0, 0, 0, 0.1);
                                    background-image: linear-gradient(to top, oklab(0 0 0 / 0.7) 0%, rgba(0, 0, 0, 0) 100%);
                                    --tw-gradient-to: transparent;
                                    --tw-gradient-from: color-mix(in oklab, #000 70%, transparent);
                                    --tw-gradient-position: to top in oklab;
                                    z-index: 1;

                                    >.desc {
                                        position: absolute;
                                        bottom: 0;
                                        display: flex;
                                        flex-direction: column;
                                        gap: 8px;
                                        z-index: 2;
                                        padding: 16px;

                                        @media (max-width: 768px) {
                                            gap: 6px;
                                            padding: 8px;
                                        }

                                        >span {
                                            color: #fff;
                                            line-height: 1.1;

                                            &.category {
                                                font-size: 14px;

                                                @media (max-width: 768px) {
                                                    font-size: 12px;
                                                }
                                            }

                                            &.title {
                                                font-size: 18px;
                                                font-weight: 700;

                                                @media (max-width: 768px) {
                                                    font-size: 14px;
                                                }
                                            }
                                        }
                                    }
                                }

                                &:hover,
                                &.is-active {
                                    opacity: 1;

                                    >img {
                                        scale: 1.1;
                                        transition: .3s all ease-out;
                                    }

                                    >.desc-wrap {
                                        opacity: 1;
                                        transition: .3s all ease-out;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }

    >.jpn-map {
        >.contents {
            background: #f9f9f9;

            h2 {
                color: #023f86;
                font-size: 30px;
                font-weight: 700;
                text-align: center;
                line-height: 1.1;
                margin-bottom: 48px;

                @media (max-width: 768px) {
                    font-size: 20px;
                    margin-bottom: 32px;
                }
            }

            .wrap {
                padding: 48px;
                background: #eff6ff;
                border-radius: 16px;
                box-shadow: 0 0 #0000, 0 0 #0000, 0 0 #0000, 0 0 #0000, 0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a;

                @media (max-width: 768px) {
                    padding: 8px;
                }

                >svg {
                    >g {
                        cursor: pointer;
                        transition: .3s all ease-out;

                        &:hover {
                            filter: brightness(1.2);

                            >rect {
                                opacity: 1;
                                filter: none;
                            }
                        }

                        >path {
                            stroke: #fff;
                            stroke-width: 6px;
                        }

                        >rect {
                            fill: #fff;
                            opacity: .9;
                            filter: drop-shadow(1px 3px 5px #33333370);
                            rx: 50%;
                            ry: 50%;
                            transition: .3s all ease-out;
                        }

                        >text {
                            font-weight: 700;
                            fill: #333;

                            >tspan {
                                &.area {
                                    font-size: 24px;
                                }

                                &.count {
                                    font-size: 14px;
                                }
                            }
                        }

                        &.kyushu_okinawa {
                            >path {
                                fill: #E74C3C;
                            }

                            >rect {
                                width: 120px;
                                height: 100px;
                            }
                        }

                        &.chugoku {
                            >path {
                                fill: #F39C12;
                            }

                            >rect {
                                width: 120px;
                                height: 80px;
                            }
                        }

                        &.shikoku {
                            >path {
                                fill: #9B7653;
                            }

                            >rect {
                                width: 125px;
                                height: 70px;
                            }
                        }

                        &.kinki {
                            >path {
                                fill: #D4D120;
                            }

                            >rect {
                                width: 130px;
                                height: 80px;
                            }
                        }

                        &.hokuriku {
                            >path {
                                fill: #4FA965;
                            }

                            >rect {
                                width: 125px;
                                height: 77.5px;
                            }
                        }

                        &.chubu {
                            >path {
                                fill: #8DC63F;
                            }

                            >rect {
                                width: 125px;
                                height: 80px;
                            }
                        }

                        &.kanto {
                            >path {
                                fill: #2DABB8;
                            }

                            >rect {
                                width: 130px;
                                height: 80px;
                            }
                        }

                        &.hokkaido_tohoku {
                            >path {
                                fill: #6B7FBE;
                            }

                            >rect {
                                width: 150px;
                                height: 130px;
                            }
                        }

                    }
                }
            }
        }
    }
}

/* =============================================
   スマホ用 固定フッターナビ (Sticky Nav)
   ============================================= */
.sticky-photo-nav {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, .96);
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, .08);
    z-index: 99;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    box-sizing: border-box;
    transition: all .3s ease-out;

    &.is-visible {
        bottom: -1px;
        transition: all .6s ease-in-out;
    }

    @media (min-width: 769px) {
        display: none !important;
    }

    .sticky-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        max-width: 1000px;
        margin: 0 auto;
        gap: 16px;
    }

    .sticky-title {
        font-size: 14px;
        font-weight: 700;
        color: #333;
        margin: 0;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .sticky-btn {
        flex-shrink: 0;
        display: inline-block;
        background: #023f86;
        color: #fff;
        font-size: 13px;
        font-weight: 700;
        padding: 10px 24px;
        border-radius: 4px;
        text-decoration: none;
        transition: opacity 0.3s;

        &:hover,
        &:active {
            opacity: 0.8;
        }
    }
}

/* Category */
.category-photocontest {
    .layout-column {
        >.contents {
            overflow: hidden;

            >.inner {
                max-width: 1200px;

                >.heading-grp {
                    margin-bottom: 1em;
                    display: flex;
                    justify-content: space-between;
                    align-items: baseline;

                    @media (max-width: 768px) {
                        flex-direction: column;
                        gap: 20px;
                    }

                    >h2 {
                        margin: 0;
                    }

                    >a {
                        position: relative;
                        background: #fff;
                        height: 36px;
                        line-height: 36px;
                        border-radius: 6px;
                        width: 180px;
                        text-align: center;
                        border: 1px solid #155dbf;
                        color: #155dbf;
                        background-color: rgba(21, 93, 191, .05);
                        transition: .3s all ease-out;
                        padding: 0 28px 0 15px;
                        font-size: 1.6rem;
                        font-weight: 300;

                        @media (max-width: 768px) {
                            width: 160px;
                            font-size: 1.4rem;
                            margin-left: auto;
                        }

                        &:after {
                            content: "";
                            width: 7px;
                            height: 7px;
                            position: absolute;
                            right: 12px;
                            top: calc(50% + 1px);
                            background: transparent;
                            border-right: solid 2px #155dbf;
                            border-bottom: solid 2px #155dbf;
                            transform: translateY(-50%) rotate(-45deg);
                        }

                        &:hover {
                            opacity: .6;
                        }
                    }
                }

                >.tbl-wrap {
                    margin-bottom: 40px;
                    width: 100%;
                    position: relative;

                    @media (max-width: 1100px) {
                        overflow-x: scroll;
                        overflow-y: hidden;
                        -webkit-overflow-scrolling: touch;
                        margin-bottom: 10px;
                    }

                    >table {
                        width: 100%;
                        border-collapse: collapse;

                        @media (max-width: 1100px) {
                            min-width: 1000px;
                            width: auto;
                        }

                        th,
                        td {
                            border: 1px solid #ccc;
                            padding: 6px 12px;
                            vertical-align: top;
                            text-align: left;
                        }

                        th {
                            background-color: #f5f7fa;
                            font-weight: 700;
                            width: 140px;
                            white-space: nowrap;
                        }

                        td {
                            a {
                                color: #155dbf;
                                text-decoration: underline;
                            }

                            &.multi-line-cell {
                                white-space: pre-line;
                            }
                        }
                    }
                }

                >.scroll-text {
                    font-size: 85%;
                    color: #696666;

                    @media (min-width: 1101px) {
                        display: none;
                    }
                }

                >.pagination {
                    text-align: center;
                    margin-top: 30px;

                    >a,
                    >span {
                        margin: 0 5px;
                        padding: 6px 12px;
                        border: 1px solid #ccc;
                        color: #333;
                        text-decoration: none;
                    }

                    >span {
                        &.current {
                            background-color: #023f86;
                            color: #fff;
                            border-color: #023f86;
                        }
                    }
                }
            }
        }
    }
}

/* Single */
.single-photocontest {
    a {
        transition: .3s all ease-out;
    }

    ul,
    li {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .photocontest-wrap {
        max-width: 1440px;
        margin: auto;
        padding: 40px 10px 80px;

        @media (max-width: 768px) {
            padding: 20px 10px 40px;
        }

        .history-back {
            &.top {
                margin-bottom: 30px;
                text-align: right;
                padding: 0 20px;

                @media (max-width: 768px) {
                    padding: 0;
                }

                >a {
                    @media (max-width: 768px) {
                        font-size: 1.2rem;
                    }

                    &:last-child {
                        margin-left: 8px;

                        @media (max-width: 768px) {
                            margin-left: 4px;
                        }
                    }
                }
            }

            &.bottom {
                margin-top: 60px;
                text-align: center;
                display: flex;
                flex-direction: column;
                align-items: center;
                gap: 16px;

                >a {
                    width: 220px;
                    line-height: 40px;
                    padding: 0 28px 0 15px;

                    @media (max-width: 768px) {
                        width: 160px;
                        font-size: 1.4rem;
                    }
                }
            }
        }

        .layout-two-column {
            display: flex;

            @media (max-width: 768px) {
                flex-direction: column;
            }

            >.left-panel {
                flex: 1 1 65%;
                overflow-y: auto;
                max-height: 80vh;
                padding: 40px 40px 60px;
                background: #fff;

                @media (max-width: 1100px) {
                    flex: 1 1 55%;
                    padding: 20px 20px 40px;
                }

                @media (max-width: 768px) {
                    max-height: none;
                    padding: 10px 10px 24px;
                }

                >table {
                    width: 100%;
                    border-collapse: collapse;

                    tr {

                        >th,
                        >td {
                            border: 1px solid #ccc;
                            padding: 8px;
                            text-align: left;
                            vertical-align: top;

                            @media (max-width: 768px) {
                                font-size: 12px;
                            }
                        }

                        >th {
                            background: #f5f5f5;
                            width: 15%;
                            text-align: center;
                        }

                        &.award {
                            >td {
                                font-weight: 700;
                            }
                        }

                        &.title {
                            >td {
                                font-size: 120%;
                                font-weight: 700;
                            }
                        }
                    }
                }

                .mainvisual-list {
                    margin-top: 40px;
                    display: flex;
                    flex-direction: column;
                    gap: 24px;

                    @media (max-width: 768px) {
                        gap: 16px;
                    }

                    .topvisual-item {
                        position: relative;

                        .img-normal {
                            width: auto;
                            height: 720px;
                            transition: opacity .3s ease;
                            @media (max-width: 768px) {
                                height: 380px;
                            }
                        }

                        .img-hover {
                            position: absolute;
                            top: 0;
                            left: 50%;
                            width: auto;
                            height: 720px;
                            object-fit: cover;
                            opacity: 0;
                            transition: opacity .3s ease;
                            transform: translateX(-50%);
                            @media (max-width: 768px) {
                                height: 380px;
                            }
                        }

                        &.has-hover {
                            cursor: pointer;
                            
                            &:hover {
                                .img-normal {
                                    @media (min-width: 769px) {
                                        opacity: 0;
                                    }
                                }

                                .img-hover {
                                    @media (min-width: 769px) {
                                        opacity: 1;
                                    }
                                }
                            }
                            &.is-toggled {
                                .img-normal {
                                    @media (max-width: 768px) {
                                        opacity: 0 !important;
                                    }
                                }

                                .img-hover {
                                    @media (max-width: 768px) {
                                        opacity: 1 !important;
                                    }
                                }
                            }
                        }

                        .sp-tap-guide {
                            display: none;
                            text-align: right;
                            background: #fff;

                            @media (max-width: 768px) {
                                display: block;
                            }

                            .js-toggle-hover-btn {
                                display: inline-block;
                                background: none;
                                border: none;
                                margin: 12px 8px;
                                background: #023f86;
                                color: #fff;
                                font-size: 13px;
                                font-weight: 700;
                                padding: 10px 24px;
                                border-radius: 4px;
                                text-decoration: none;
                                cursor: pointer;
                            }
                        }
                    }

                    >li {
                        background: #000;

                        @media (max-width: 768px) {
                            margin-top: 24px;
                        }

                        >img {
                            width: auto;
                            height: 720px;
                            object-fit: contain;
                            display: block;
                            margin: 0 auto;
                            
                            
                            
                            
                            
                            
                            
                            
                            
                            
                            
                            
                            
                            
                            
                            
                            
                            
                            

                            @media (max-width: 768px) {
                                height: 380px;
                            }
                        }
                    }
                }

                .info {
                    margin-top: 40px;
                    background: #eff6ff;
                    padding: 20px 20px 20px 40px;
                    border-left: 5px solid #023f86;

                    @media (max-width: 768px) {
                        margin-top: 24px;
                    }

                    >h3 {
                        color: #023f86;
                        font-weight: 700;
                        margin-bottom: 10px;
                        position: relative;
                        font-size: 110%;

                        &:before {
                            content: 'i';
                            color: #fff;
                            background: #023f86;
                            position: absolute;
                            top: .2em;
                            left: -2.0em;
                            width: 24px;
                            height: 24px;
                            display: flex;
                            align-items: center;
                            justify-content: center;
                            border-radius: 50%;
                        }
                    }

                    >p {
                        >.caution {
                            color: #cf2e2e;
                            font-weight: 700;
                        }

                        >a {
                            text-decoration: underline;
                            position: relative;

                            &::before,
                            &::after {
                                content: "";
                                position: absolute;
                                height: 10px;
                                width: 14px;
                                border: solid 1px #155dbf;
                                top: 50%;
                                transform: translateY(-50%);
                                background: transparent;
                                z-index: 1;
                            }

                            &::before {
                                right: -22px;
                            }

                            &::after {
                                border-top: none;
                                border-left: none;
                                top: calc(50% + 2px);
                                right: -24px;
                            }
                        }
                    }
                }
            }

            .right-panel {
                flex: 1 1 23%;
                overflow-y: auto;
                max-height: 80vh;
                padding: 0 20px;

                @media (max-width: 1100px) {
                    flex: 1 1 33%;
                    padding: 0 10px;
                }

                @media (max-width: 768px) {
                    max-height: none;
                    border-left: none;
                    padding: 0;
                    margin-top: 24px;
                }

                .article-wrap {
                    display: flex;
                    flex-direction: column;
                    gap: 24px;
                    padding-bottom: 5px;

                    @media (max-width: 768px) {
                        gap: 12px;
                    }

                    >.bridge-data {
                        background: #fff;
                        border-radius: 8px;
                        padding: 16px;
                        box-shadow: 0 0 #0000, 0 0 #0000, 0 0 #0000, 0 0 #0000, 0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a;

                        .headings {
                            position: relative;

                            @media (max-width: 768px) {
                                cursor: pointer;
                                user-select: none;
                            }

                            &::before,
                            &::after {
                                @media (max-width: 768px) {
                                    content: '';
                                    position: absolute;
                                    top: 8px;
                                    right: 8px;
                                    width: 12px;
                                    height: 2px;
                                    background: #023f86;
                                    transition: all .3s ease-out;
                                }
                            }

                            &::before {
                                @media (max-width: 768px) {}
                            }

                            &::after {
                                @media (max-width: 768px) {
                                    transform: rotate(90deg);
                                }
                            }

                            >h3 {
                                border-bottom: solid 1px #ccc;
                                padding-bottom: 8px;
                                margin-bottom: 8px;

                                @media (max-width: 768px) {
                                    display: inline-block;
                                    border-bottom: none;
                                    padding-bottom: 0;
                                    margin-bottom: 0;
                                }

                                >span {
                                    display: block;
                                    line-height: 1.4;

                                    &:nth-child(1) {
                                        font-size: 80%;
                                        color: #8f8f8f;

                                        @media (max-width: 768px) {
                                            font-size: 70%;
                                        }
                                    }

                                    &:nth-child(2) {
                                        font-size: 110%;
                                        color: #023f86;
                                        font-weight: 700;

                                        @media (max-width: 768px) {
                                            font-size: 105%;
                                        }
                                    }
                                }
                            }

                            >p {
                                font-size: 80%;
                                color: #8f8f8f;

                                @media (max-width: 768px) {
                                    display: inline-block;
                                }

                                &::before {
                                    @media (max-width: 768px) {
                                        content: "（";
                                    }
                                }

                                &::after {
                                    @media (max-width: 768px) {
                                        content: "）";
                                    }
                                }
                            }
                        }

                        .b-data {
                            @media (max-width: 768px) {
                                overflow: hidden;
                                max-height: 0;
                                opacity: 0;
                                transition: max-height .3s ease, opacity .3s ease;
                            }

                            >.top {
                                padding-top: 24px;
                                display: flex;
                                flex-wrap: wrap;
                                gap: 12px;

                                >dl {
                                    width: calc(50% - 6px);

                                    @media (max-width: 1100px) {
                                        width: 100%;
                                    }

                                    @media (max-width: 768px) {
                                        width: calc(50% - 6px);
                                    }

                                    >dt,
                                    >dd {
                                        font-size: 14px;
                                        padding: 8px 4px;
                                        line-height: 1.4;

                                        @media (max-width: 768px) {
                                            font-size: 12px;
                                            padding: 6px 4px;
                                        }
                                    }

                                    >dt {
                                        font-size: 65%;
                                        color: #8f8f8f;
                                        background: #f5f5f5;
                                    }

                                    >dd {
                                        font-weight: 700;
                                    }

                                    &.structural_form {
                                        width: 100%;
                                    }
                                }
                            }

                            >.bridge-map {
                                margin-top: 16px;
                                padding-top: 16px;
                                border-top: 1px solid #ccc;

                                @media (max-width: 768px) {
                                    margin-top: 10px;
                                    padding-top: 10px;
                                }
                            }
                        }

                        &.active {
                            .headings {
                                &::before {
                                    @media (max-width: 768px) {
                                        opacity: 0;
                                    }
                                }

                                &::after {
                                    @media (max-width: 768px) {
                                        transform: rotate(180deg);
                                    }
                                }
                            }

                            .b-data {
                                @media (max-width: 768px) {
                                    max-height: 1000px;
                                    opacity: 1;
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}