/*
Theme Name: Lightning Child Ecopark
Theme URI:
Description: 祖母・傾・大崩ユネスコエコパーク公式サイト用 Lightning 子テーマ
Author:
Version: 1.1
Template: lightning
*/

/* ==================================================
   1. GLOBAL HEADER
================================================== */

.site-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.90);
    box-shadow: none;
    transition:
        background 0.3s ease,
        box-shadow 0.3s ease;
}

.site-header.scrolled {
    position: fixed;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.site-header .site-header-logo img {
    max-height: 60px;
    width: auto;
}

.site-header .global-nav-list > li > a {
    color: #25382c;
    font-weight: 600;
    transition: color 0.2s ease;
}

.site-header .global-nav-list > li > a:hover {
    color: #22863a;
}


/* ==================================================
   2. TOP PAGE - FULL WIDTH
================================================== */

.home .site-body-container,
.home .main-section,
.home .main-section > .container,
.home .main-section .entry-body {
    width: 100%;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}


/* ==================================================
   3. TABLET BASE
   768px - 1024px
================================================== */

@media (min-width: 768px) and (max-width: 1024px) {

    .site-header {
        min-height: 76px;
        background: rgba(255, 255, 255, 0.96);
    }

    .site-header-container {
        min-height: 76px;
        padding-left: 24px;
        padding-right: 24px;
    }

    .site-header .site-header-logo img {
        max-height: 58px;
        width: auto;
    }

    .site-header .global-nav {
        display: none;
    }

    .home .entry-body {
        margin-top: 0;
        font-size: 16px;
        line-height: 1.8;
    }

    .home .wp-block-cover h1,
    .home .wp-block-cover h2 {
        font-size: clamp(28px, 4vw, 38px);
        line-height: 1.35;
        letter-spacing: 0.03em;
    }

    .home .wp-block-cover p {
        font-size: 17px;
        line-height: 1.7;
    }

    .home .wp-block-cover .wp-block-button__link {
        min-height: 52px;
        padding: 14px 26px;
        font-size: 16px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .home .entry-body > *:not(.alignfull) {
        padding-left: 24px;
        padding-right: 24px;
    }

    .home h2 {
        font-size: 28px;
        line-height: 1.4;
        margin-top: 40px;
        margin-bottom: 24px;
    }

    .home h3 {
        font-size: 21px;
        line-height: 1.4;
    }

    .home .wp-block-columns {
        gap: 24px;
    }

    .home .wp-block-column {
        min-width: 0;
    }

    .home .wp-block-column img {
        width: 100%;
        height: auto;
    }

    .home .wp-block-button__link {
        min-height: 48px;
        padding: 12px 22px;
        font-size: 16px;
    }

    .home .wp-block-columns.is-layout-flex {
        row-gap: 24px;
    }

    .home .season-grid,
    .home .season-cards {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }

    /* Access：タブレットでは2列を維持 */
    .home .access-section .wp-block-columns {
        display: flex !important;
        flex-direction: row !important;
        align-items: stretch;
        gap: 24px;
    }

    .home .access-section .wp-block-column {
        width: auto !important;
        margin-bottom: 0 !important;
        flex: 1 1 0;
    }

    .home .access-section iframe {
        width: 100% !important;
        min-height: 300px;
        height: 100%;
        border-radius: 8px;
    }

    .home .access-section p {
        font-size: 16px;
        line-height: 1.8;
    }
}


/* ==================================================
   4. TABLET / MOBILE HEADER FINAL
   現在の表示を保つため 991px 以下に限定
================================================== */

@media (max-width: 991.98px) {

    .site-header {
        position: relative;
        min-height: 70px;
        width: 100%;
        z-index: 1000;
        background: rgba(255, 255, 255, 0.97);
        box-shadow: none;
        transition:
            background 0.3s ease,
            box-shadow 0.3s ease;
    }

    .site-header.scrolled {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.97);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .site-header .site-header-container {
        width: 100%;
        max-width: 1280px;
        margin: 0 auto;
        min-height: 70px;
        padding-left: 18px;
        padding-right: 72px;
        display: flex;
        align-items: center;
    }

    .site-header .site-header-logo {
        flex-shrink: 0;
    }

    .site-header .site-header-logo img {
        width: auto;
        max-height: 52px;
    }

    .site-header .global-nav {
        display: none !important;
    }

    .vk-mobile-nav-menu-btn,
    #vk-mobile-nav-menu-btn {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: fixed !important;
        top: 44px !important;
        right: 18px !important;
        left: auto !important;
        width: 44px !important;
        height: 44px !important;
        border: 1px solid rgba(0, 0, 0, 0.15);
        border-radius: 8px;
        background-color: rgba(255, 255, 255, 0.97);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        z-index: 99999 !important;
    }

    /* 閉じている時のハンバーガー（三本線） */
    #vk-mobile-nav-menu-btn:not(.menu-open) {
        background-image:
            linear-gradient(#333, #333),
            linear-gradient(#333, #333),
            linear-gradient(#333, #333) !important;
        background-size:
            20px 2px,
            20px 2px,
            20px 2px !important;
        background-position:
            center calc(50% - 7px),
            center,
            center calc(50% + 7px) !important;
        background-repeat: no-repeat !important;
    }
}


/* ========================================
   5. ACCESS
======================================== */

/* タブレット共通：991px以下 */
@media (max-width: 991.98px) {

    .ecopark-access {
        display: flex;
        gap: 24px;
        align-items: flex-start !important;
        margin-top: 24px;
        margin-bottom: 8px !important;
    }

    .ecopark-access > .wp-block-column {
        display: flex;
        flex-direction: column;
    }

    .ecopark-access > .wp-block-column:first-child {
        flex-basis: 52% !important;
    }

    .ecopark-access > .wp-block-column:last-child {
        flex-basis: 48% !important;
        padding: 0;
        font-size: 15px;
        line-height: 1.7;
    }

    .ecopark-access iframe {
        display: block;
        width: 100% !important;
        min-height: 330px;
        border: 0;
    }

    .wp-block-column.access-info {
        background-color: #f7faf8 !important;
        border: 1px solid #d9e4df !important;
        border-radius: 12px !important;
        padding: 20px !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
    }

    .wp-block-column.access-info p {
        margin-top: 0 !important;
        margin-bottom: 16px !important;
        line-height: 1.8 !important;
    }

    .wp-block-column.access-info p:first-child {
        font-weight: 700 !important;
        font-size: 18px !important;
        margin-bottom: 20px !important;
    }

    .home .access-section {
        margin-bottom: 30px !important;
        padding-bottom: 20px !important;
        min-height: 0 !important;
    }

    .home .access-section.wp-block-columns {
        align-items: flex-start !important;
    }
}


/* スマホ：600px以下 */
@media (max-width: 600px) {

    .ecopark-access {
        display: block;
        margin-top: 18px;
        margin-bottom: 30px !important;
    }

    .ecopark-access > .wp-block-column {
        width: 100% !important;
        flex-basis: 100% !important;
    }

.ecopark-access > .wp-block-column:first-child {
    margin-bottom: 0 !important;
}

    .ecopark-access iframe {
        width: 100% !important;
        min-height: 300px;
    }

    .ecopark-access > .wp-block-column:last-child {
        padding: 0 5px;
        font-size: 16px;
        line-height: 1.8;
    }

    .wp-block-column.access-info {
        margin-top: 18px;
        padding: 18px !important;
        border-radius: 10px !important;
    }
}
/* ==================================================
   6. LATEST NEWS
   旧 Flex 版を削除し Grid 版へ統合
================================================== */

@media (max-width: 991.98px) {

    .home .ecopark-news {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
        margin-top: 14px !important;
        margin-bottom: 14px !important;
        padding: 0 !important;
    }

    .home .ecopark-news > li {
        list-style: none !important;
        width: 100%;
        max-width: 360px;
        margin: 0 !important;
        padding: 0 0 16px !important;
        box-sizing: border-box !important;
        border: 1px solid #d9e4df;
        border-radius: 12px;
        overflow: hidden;
        background: #fff;
        display: flex;
        flex-direction: column;
    }

    .home .ecopark-news .wp-block-latest-posts__featured-image {
        width: 100% !important;
        margin: 0 !important;
    }

    .home .ecopark-news .wp-block-latest-posts__featured-image img {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 200px !important;
        object-fit: cover !important;
    }

    .home .ecopark-news .wp-block-latest-posts__post-title,
    .home .ecopark-news > li > a {
        display: block;
        padding: 16px 16px 6px;
        font-size: 16px;
        font-weight: 700;
        line-height: 1.5;
        text-decoration: none;
    }

    .home .ecopark-news .wp-block-latest-posts__post-date {
        display: block;
        padding: 0 16px 16px;
        margin-top: 4px;
        font-size: 13px;
        color: #777;
    }

    .home .news-section .ecopark-news {
        max-width: 1200px;
        margin-top: 14px !important;
        margin-bottom: 14px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .home .news-section + .wp-block-buttons,
    .home .news-section .wp-block-buttons,
    .home .ecopark-news + .wp-block-buttons {
        margin-top: 8px !important;
        margin-bottom: 20px !important;
    }

    /* 投稿が1件だけの場合は中央配置 */
    .home .ecopark-news:has(> li:only-child) {
        grid-template-columns: minmax(0, 320px) !important;
        justify-content: center !important;
    }
}

@media (max-width: 600px) {

    .home .ecopark-news {
        grid-template-columns: 1fr !important;
    }

    .home .ecopark-news > li,
    .home .news-section .ecopark-news > li {
        max-width: 100%;
        width: 100% !important;
    }

    .home .ecopark-news .wp-block-latest-posts__featured-image img {
        height: 190px !important;
    }

    .home .ecopark-news:has(> li:only-child) {
        grid-template-columns: 1fr !important;
    }
}


/* ==================================================
   7. FOOTER / HOME BOTTOM
   現在のタブレット・スマホ表示を維持
================================================== */

@media (max-width: 991.98px) {

    .site-footer {
        margin-top: 0;
        background: #f5f8f6;
        border-top: 1px solid #d9e4df;
        font-size: 14px;
        line-height: 1.6;
    }

    .site-footer .container {
        max-width: 1200px;
        margin: 0 auto;
        padding-left: 24px;
        padding-right: 24px;
    }

    .site-footer .footer-nav {
        border-top: 2px solid #2f80c0;
        border-bottom: 1px solid #e1e5e3;
    }

    .site-footer .footer-nav ul {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0;
        margin: 0;
        padding: 0;
    }

    .site-footer .footer-nav li {
        list-style: none;
    }

    .site-footer .footer-nav a {
        display: block;
        padding: 12px 14px;
        font-size: 15px;
        text-decoration: none;
    }

    .site-footer-content {
        padding-top: 30px;
        padding-bottom: 30px;
    }

    .site-footer-copyright {
        text-align: center;
        padding: 12px 15px;
        font-size: 13px;
        border-top: 1px solid #d9e4df;
    }

    .site-footer .widget {
        margin-bottom: 14px !important;
    }

    .site-footer p {
        margin-bottom: 10px;
    }

    .home .site-body-bottom {
        margin: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 6px !important;
        min-height: 0 !important;
    }

    .home .site-body-bottom .container {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .home .site-body-bottom .widget {
        margin-top: 0 !important;
        margin-bottom: 6px !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .home .site-body-bottom .widget:first-child {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .home .site-body-bottom p:empty {
        display: none !important;
    }

    .home .site-body-bottom .wp-block-spacer {
        height: 20px !important;
    }

    .home .site-body-bottom .wp-block-separator {
        margin-top: 8px !important;
        margin-bottom: 12px !important;
    }

    .home .site-footer {
        margin-top: 0 !important;
    }
}

@media (max-width: 767px) {

    .site-footer .footer-nav ul {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .site-footer .footer-nav li {
        border-bottom: 1px solid #e1e5e3;
    }

    .site-footer .footer-nav a {
        padding: 14px 10px;
        text-align: center;
    }

    .site-footer-content {
        padding-top: 24px;
        padding-bottom: 24px;
    }
}


/* ==================================================
   8. SMARTPHONE FINAL
================================================== */

@media (max-width: 600px) {

    .site-header {
        min-height: 64px;
    }

    .site-header .site-header-container {
        min-height: 64px;
        padding-left: 14px;
        padding-right: 66px;
    }

    .site-header .site-header-logo img {
        max-height: 46px;
    }

    .vk-mobile-nav-menu-btn,
    #vk-mobile-nav-menu-btn {
        right: 12px !important;
        width: 42px !important;
        height: 42px !important;
    }

    .home .site-body h2 {
        padding-left: 16px;
        padding-right: 16px;
        box-sizing: border-box;
        font-size: 22px;
        line-height: 1.4;
    }

    .home .site-body p {
        line-height: 1.8;
    }

    .home .wp-block-buttons {
        margin-top: 16px;
        margin-bottom: 20px;
    }
}
/* ========================================
   TABLET SEASON IMAGE FIX
======================================== */

@media (min-width: 601px) and (max-width: 991px) {

    .home .season-grid img,
    .home .season-cards img {
        width: 100% !important;
        height: 210px !important;
        object-fit: cover !important;
        display: block;
    }

}
/* ========================================
   TABLET SEASON CARDS
   601px～991px：2列×2段
======================================== */

@media (min-width: 601px) and (max-width: 991px) {

    /* season-section 自身を2列グリッド化 */
    .home .wp-block-columns.season-section {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 20px !important;
    }

    .home .wp-block-columns.season-section > .wp-block-column {
        width: 100% !important;
        flex-basis: auto !important;
        margin: 0 !important;
    }

    /* 写真を横長に統一 */
    .home .wp-block-columns.season-section img {
        width: 100% !important;
        height: 190px !important;
        object-fit: cover !important;
        display: block !important;
    }
}
/* ========================================
   DESKTOP LATEST NEWS
   PC：最大3列／1件なら中央配置
======================================== */

@media (min-width: 992px) {

    .home .ecopark-news {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 24px;
        max-width: 1200px;
        margin: 24px auto !important;
        padding: 0 !important;
    }

    .home .ecopark-news > li {
        width: 100% !important;
        max-width: 320px;
        margin: 0 !important;
        list-style: none !important;
    }

    /* 投稿が1件だけなら中央 */
    .home .ecopark-news:has(> li:only-child) {
        grid-template-columns: minmax(0, 320px) !important;
        justify-content: center !important;
    }
}
/* ========================================
   CARD HOVER EFFECT
   体験プログラム：カード全体を浮かせる
======================================== */
.home .experience-section .wp-block-column {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .home .experience-section .wp-block-column:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
    }
}
/* 自然（環境）ページ：写真側の余白バランス調整 */
.page-id-173 .nature-feature {
    align-items: center !important;
}
/* 自然（環境）ページ：縦長写真の高さを調整 */
.page-id-173 .nature-feature-image img {
    width: 100% !important;
    height: 300px !important;
    object-fit: cover !important;
    object-position: center !important;
}
/* 自然（環境）ページ：北川湿原カード */
.page-id-173 .nature-wetland {
    align-items: flex-start !important;
}

.page-id-173 .nature-wetland > .wp-block-column {
    align-self: flex-start !important;
}
/* 自然（環境）ページ：北川湿原の写真 */
.page-id-173 .nature-wetland-image img {
    width: 100% !important;
    height: 480px !important;
    object-fit: cover !important;
    object-position: center !important;
}