/*
Theme Name: THE BURG
Theme URI: https://the-burg.jp/
Description: THE BURG - 幻豚アグーを使用したハンバーグ専門店。
Version: 1.0.0
Author: THE BURG Team
Tested up to: 6.4
Requires at least: 5.0
Requires PHP: 7.4
Text Domain: the-burg
*/

:root {
    /* Color Palette - Exactly from reference image */
    --color-primary: #B25A38;
    /* Burnt Orange / Terracotta Bar */
    --color-secondary: #8E4A2F;
    /* Deep Terracotta */
    --color-dark: #160b08;
    /* Deep Maroon/Brown to match pig image bg */
    --color-light: #F4F1E9;
    /* Ivory Story BG */
    --color-white: #FFFFFF;
    --color-text-main: #FFFFFF;
    --color-text-dark: #1A0D08;

    /* Typography */
    --font-heading: 'Noto Serif JP', serif;
    --font-body: 'Noto Sans JP', sans-serif;

    /* Layout constants */
    --container-width: 1100px;
    --section-padding: 80px;
}

/* --- Reference Image Reconstruction Styles --- */

/* Hero */
.repro-hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
    background: #000;
}

.repro-hero-media {
    width: 100%;
    height: 100%;
}

.repro-hero-media img,
.repro-hero-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.9;
}

.repro-hero-media video {
    background: #000;
}

/* 動画が再生されている場合、裏にあるフォールバック用画像は通常非表示 */
.hero-img-fallback {
    display: none;
}

.hero-img-obj {
    object-position: center 65%;
    /* 料理画像を強調するための維持 */
    transform: scale(1.2);
}

.repro-hero-overlay {
    position: absolute;
    bottom: 80px;
    width: 100%;
    text-align: center;
    z-index: 10;
}

.repro-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 8vw, 5rem);
    color: #fff;
    letter-spacing: 0.3em;
    font-weight: 900;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* ==========================================
 * About Section
 * ========================================== */
.site-about-section {
    padding: 64px 0;
    background-color: var(--color-light);
    /* 既存アイボリー背景 */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* ほんの少し境界線 */
}

.about-container {
    max-width: 1050px;
    /* 1000〜1100px程度の指定 */
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    /* PC用 2カラム構成 */
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.about-content {
    flex: 1;
    max-width: 550px;
}

.about-title {
    font-size: 2rem;
    font-family: var(--font-heading);
    color: var(--color-wine-red);
    margin-bottom: 24px;
    letter-spacing: 0.05em;
    text-align: left;
}

.about-text p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-text-dark);
    margin-bottom: 30px;
    word-break: auto-phrase;
    /* 自然な折り返し */
    text-align: left;
}

.about-image {
    flex: 1;
    max-width: 350px;
    /* 写真が無いので空スペースになる（必要ならimgを追加するだけでOK） */
}

/* Orange/Terracotta Bars */
.repro-bar-orange {
    background-color: var(--color-primary);
    padding: 50px 0;
}

.repro-gallery-flex {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 0 20px;
}

.repro-gallery-flex .item {
    flex: 1;
    max-width: 320px;
    aspect-ratio: 4/3;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.repro-gallery-flex .item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.repro-gallery-flex .item:hover img {
    transform: scale(1.1);
}

/* Mood Gallery (Black) */
.repro-gallery-black {
    background-color: #000;
    padding: 60px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.repro-mood-flex {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 0 10px;
}

.repro-mood-flex .item {
    flex: 1;
    max-width: 240px;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.repro-mood-flex .item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mono img {
    filter: grayscale(1) contrast(1.2);
}

/* Philosophy (Dark) */
.repro-philosophy {
    background-color: var(--color-dark);
    padding: 120px 0;
    color: #fff;
}

.repro-phil-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
    position: relative;
    margin-bottom: 120px;
}

.repro-phil-upper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    width: 100%;
    max-width: 1200px;
}

.phil-image {
    width: 100%;
    max-width: 500px;
    /* 参考画像に近いサイズ感に調整 */
    /* margin-left: -10%; */
    /* 左に寄せる - Removed for natural alignment */
    z-index: 1;
}

.phil-image img {
    width: 100%;
    border-radius: 2px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    /* Fade out the edges to hide the rectangular boundary */
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 0) 80%);
    mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 0) 80%);
    object-fit: contain;
}

.phil-text {
    /* position: relative; */
    /* Removed for natural alignment */
    /* z-index: 5; */
    /* Removed for natural alignment */
    /* margin-left: -80px; */
    /* 重なりを適度に調整 - Removed for natural alignment */
    text-align: left;
}

.repro-phil-lower {
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.artistic-v-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    position: relative;
    display: inline-block;
    /* 縦書きの基本 */
    color: var(--color-primary);
    line-height: 1.2;
    text-align: left;
    margin: 0;
    padding: 0;
}

.artistic-v-text .line-1,
.artistic-v-text .line-2 {
    font-weight: 900;
    letter-spacing: 0.15em;
    font-family: var(--font-heading);
    /* ブロック要素として縦方向に並ばせるのではなく、vertical-rlにおいて行=列となるように振る舞わせる */
}

.artistic-v-text .line-1 {
    font-size: 1em;
    margin-right: 0.8em;
    /* 幻の豚とアグーの間の列間距離 */
}

.artistic-v-text .line-2 {
    /* インラインで margin-top を適用して下にずらす */
    display: inline-block;
}

.repro-phil-content .lead {
    font-size: 1rem;
    line-height: 2.2;
    opacity: 0.85;
    max-width: 600px;
    margin: 30px auto 0;
    writing-mode: horizontal-tb;
    letter-spacing: 0.05em;
}

@media (max-width: 992px) {
    .repro-phil-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .repro-phil-upper {
        flex-direction: column;
        gap: 30px;
    }

    .phil-image {
        margin-left: 0;
        margin-bottom: 40px;
        max-width: 100%;
    }

    .phil-text {
        margin-left: 0;
        text-align: center;
    }

    .artistic-v-text {
        writing-mode: horizontal-tb;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0;
        text-align: center;
        width: 100%;
    }

    .artistic-v-text .line-1,
    .artistic-v-text .line-2 {
        font-size: 2.5rem !important;
        margin-right: 0;
    }

    .artistic-v-text .line-2 {
        margin-top: 0 !important;
        /* スマホ横書き時はずらしをリセット */
    }
}

.repro-awards-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 100px;
}

.award-box {
    filter: sepia(100%) saturate(200%) brightness(1.2) hue-rotate(-10deg);
    opacity: 0.8;
    transition: 0.3s;
}

.award-box:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Video */
.repro-video-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.video-placeholder {
    position: relative;
    cursor: pointer;
    border-radius: 2px;
    overflow: hidden;
}

.video-placeholder img {
    width: 100%;
    transition: 0.5s;
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: rgba(178, 90, 56, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-btn::after {
    content: '';
    border-style: solid;
    border-width: 20px 0 20px 30px;
    border-color: transparent transparent transparent #fff;
    margin-left: 10px;
}

/* Menu Highlights (Dark) */
.repro-menu-section {
    background-color: var(--color-dark);
    padding: 100px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.repro-menu-flex {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 2列から3列へ変更 */
    gap: 40px;
}

.menu-item {
    color: #fff;
    display: block;
    text-decoration: none;
    background: #1C120F; /* メニュー(2枚目)ページと同じカード背景色 */
    border-radius: 12px; /* メニューページと同じ角丸 */
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.menu-item:hover {
    opacity: 0.95;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.front-menu-image-wrapper {
    width: 100%;
    position: relative;
    padding-bottom: 75%; /* スマホ横型（4:3）比率を古いブラウザでも確実・強制的に固定 */
    background: #000;
}

.unified-menu-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.menu-desc {
    padding: 20px; /* カード内のテキスト余白を追加 */
}

.menu-desc h3 {
    font-size: 1.3rem; /* 1.4 -> 1.3へ微調整 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.15); /* 赤い太線をやめ、メニュー画面と同じ繊細な薄いラインへ変更 */
    padding-bottom: 15px;
    margin-bottom: 15px;
}

/* News (White) */
.repro-news-white {
    background-color: #fff;
    padding: 100px 0;
    color: #1A0D08;
}

.section-title-line {
    position: relative;
    text-align: center;
    margin-bottom: 60px;
}

.section-title-line::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #eee;
    z-index: 1;
}

.section-title-line span {
    position: relative;
    background: #fff;
    padding: 0 40px;
    font-weight: 900;
    letter-spacing: 0.4em;
    z-index: 2;
    font-size: 1.2rem;
}

/* 鉤括弧削除済み */

.news-list {
    list-style: none;
    padding: 0;
}

.news-list li {
    border-bottom: 1px solid #f1f1f1;
    transition: 0.3s;
}

.news-list li:hover {
    padding-left: 10px;
}

.news-list .news-link {
    display: flex;
    align-items: center;
    padding: 30px 0;
    text-decoration: none;
    color: inherit;
    width: 100%;
    cursor: pointer;
}

.news-list .news-link:hover {
    color: var(--color-primary);
}

.news-list .no-news {
    padding: 30px 0;
    text-align: center;
    color: #666;
}

.news-list .date {
    font-weight: 700;
    width: 180px;
    font-family: var(--font-heading);
}

.news-list .title {
    flex: 1;
}

.news-list .arrow {
    margin-left: 20px;
    font-weight: 900;
}

/* Ivory Story Section */
/* Access (Formerly Story) Section */
.repro-ivory-story {
    background-color: var(--color-light);
    padding: 100px 0;
    border-top: 10px solid var(--color-primary);
}

.access-full-layout {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.access-full-layout .section-title-line {
    margin-bottom: 50px;
}

.access-full-layout .section-title-line span {
    color: var(--color-primary);
    font-weight: 800;
    background-color: var(--color-light);
}

.story-map-full {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
    background-color: #eaeaea;
}

.story-map-full iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
}

.access-info-minimal {
    margin-top: 30px;
}

.access-info-minimal .address {
    font-family: "Noto Serif JP", serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1A0D08;
    margin-bottom: 15px;
    letter-spacing: 0.05em;
}

.access-info-minimal .guide {
    font-size: 1.1rem;
    color: #666;
    letter-spacing: 0.1em;
}

@media (max-width: 768px) {
    .repro-ivory-story {
        padding-top: 60px !important;
    }
    .access-full-layout .section-title-line {
        margin-bottom: 30px !important;
    }
    
    .story-map-full {
        padding-bottom: 75%;
        aspect-ratio: auto;
    }

    .access-info-minimal .address {
        font-size: 1.2rem;
    }
}

/* Contact/Access Block */
.repro-contact-cta {
    width: 100%;
    position: relative;
    background-color: var(--color-light);
    padding-bottom: 120px;
}

.cta-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.cta-bg-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}



/* Buttons */
.btn-repro-outline {
    display: inline-block;
    padding: 20px 60px;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    font-weight: 900;
    letter-spacing: 0.2em;
    transition: 0.3s;
}

.btn-repro-outline:hover {
    background: var(--color-primary);
    color: #fff;
}

.btn-repro-solid {
    display: inline-block;
    padding: 22px 80px;
    background-color: var(--color-primary);
    color: #fff;
    font-weight: 900;
    letter-spacing: 0.3em;
    transition: 0.3s;
    box-shadow: 0 10px 20px rgba(178, 90, 56, 0.3);
}

.btn-repro-solid:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(178, 90, 56, 0.4);
}

/* Instagram Follow Button Override */
.btn-instagram-follow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #8B1B1C !important;
    color: #fff !important;
    padding: 16px 50px !important;
    text-decoration: none;
    font-weight: 800;
    font-size: 18px !important;
    letter-spacing: 0.15em !important;
    border-radius: 50px !important;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 20px rgba(139, 27, 28, 0.3) !important;
}

.btn-instagram-follow:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 15px 30px rgba(139, 27, 28, 0.4) !important;
    background-color: #A32425 !important;
}

/* Hide Default Instagram Plugin Follow Button */
#sb_instagram .sbi_follow_btn,
.sbi_follow_btn {
    display: none !important;
}

/* Google Map Link Button */
.map-action-wrap {
    text-align: center;
    margin-top: 30px;
}

.btn-google-map {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-primary);
    color: #fff;
    padding: 16px 50px;
    text-decoration: none;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.15em;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 20px rgba(178, 90, 56, 0.3);
}

.btn-google-map:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(178, 90, 56, 0.4);
    background-color: #9c4c30;
    /* slightly darker primary */
    color: #fff;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Menu Link Section */
.repro-menu-link {
    padding: 80px 0;
    background-color: var(--color-bg);
    /* 背景となじませる */
}

.repro-menu-link .serif-title {
    color: var(--color-primary);
    font-size: 1.8rem;
    margin-bottom: 30px;
    letter-spacing: 0.1em;
}

.repro-menu-link .btn-main {
    /* 既存の黒背景・白抜きボタン等、テーマの標準的なボタンスタイルを引用・調整 */
    display: inline-block;
    padding: 15px 40px;
    background-color: var(--color-primary);
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    letter-spacing: 0.1em;
    border-radius: 4px;
    /* Slightly rounded */
    transition: 0.3s opacity;
}

.repro-menu-link .btn-main:hover {
    opacity: 0.8;
}

/* Responsive adjustments */
@media (max-width: 992px) {

    .repro-hero {
        height: 70vh;
        /* Reduced from 100vh */
    }

    .repro-hero-title {
        font-size: 3.5rem;
        /* Better fit for mobile */
        letter-spacing: 0.2em;
    }

    .repro-hero-overlay {
        bottom: 60px;
    }

    .site-about-section {
        padding: 120px 0;
        /* ゆとりを持たせるため大幅に増加 */
    }

    .about-text-mobile {
        color: var(--color-text-dark);
        text-align: center !important;
        font-weight: 700;
        line-height: 2.0;
        font-size: clamp(12px, 3.4vw, 14px);
        letter-spacing: 0.05em;
        font-family: "Noto Serif JP", serif;
    }

    .about-text-mobile span {
        display: block;
        /* 確実な改行の保証 */
        width: 100%;
    }

    .about-content {
        text-align: center;
        /* 行長が短い場合のセンタリング補助 */
    }

    .repro-phil-content,
    .story-layout {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .repro-menu-flex {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .menu-desc h3 {
        font-size: 1.1rem;
        padding-bottom: 10px;
        margin-bottom: 10px;
    }

    .menu-desc p {
        font-size: 0.85rem;
    }

    .v-text {
        writing-mode: horizontal-tb;
        margin-bottom: 20px;
        display: block;
        text-align: center;
        width: 100%;
        font-size: 2.2rem !important;
        /* Force smaller size for vertical-turned-horizontal text */
    }

    .story-text h2,
    .phil-title-main {
        font-size: 2.2rem !important;
        margin-bottom: 20px;
    }

    .repro-phil-content .lead,
    .story-text p {
        margin: 0 auto;
        font-size: 1rem;
    }

    /* Mobile Reservation Image Area */
    .repro-contact-cta {
        padding-bottom: 60px;
    }
}

@media (max-width: 600px) {
    .repro-hero-title {
        font-size: 2.8rem;
    }

    /* 追加: ギャラリー部分の謎の余白（オレンジ帯の肥大化）を解消する */
    .repro-bar-orange {
        padding: 30px 0;
        /* 元の60pxから縮小 */
    }

    .gallery-swiper {
        padding: 0 10px !important;
        /* 両端のボタンの余白を詰める */
    }

    .gallery-swiper .item {
        max-width: 100%;
        /* スマホでははみ出さないように */
    }

    .gallery-swiper .swiper-button-next,
    .gallery-swiper .swiper-button-prev {
        display: flex;
        /* 非表示にせず復活させる */
    }

    .repro-gallery-flex,
    .repro-mood-flex {
        flex-wrap: wrap;
        gap: 10px;
    }

    .repro-gallery-flex .item,
    .repro-mood-flex .item {
        flex: none;
        width: calc(50% - 5px);
    }

    .repro-menu-flex {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        /* スマホでは限界まで隙間を詰める */
    }

    .menu-desc h3 {
        font-size: 0.95rem;
        /* スマホ向けに小さく */
        margin-bottom: 5px;
        padding-bottom: 5px;
    }

    .menu-desc p {
        font-size: 0.75rem;
    }

    .sub-images {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-title-line span {
        font-size: 0.9rem;
        padding: 0 15px;
        letter-spacing: 0.15em;
        white-space: nowrap;
        background-color: var(--color-light);
    }

    .news-list .date {
        width: 100px;
        font-size: 0.8rem;
    }

    .btn-repro-outline,
    .btn-repro-solid {
        padding: 15px 30px;
        font-size: 0.9rem;
        width: 100%;
        text-align: center;
    }
}

/* === モバイルレスポンシブ最適化 (768px以下) === */
@media (max-width: 768px) {

    /* (1) コンテナの左右16px余白確保 / 横スクロール禁止 */
    body,
    html {
        overflow-x: hidden !important;
        width: 100%;
    }

    .container {
        padding: 0 16px !important;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* (2) 全て1カラム（縦積み）に変更・画面はみ出しゼロ */
    .repro-phil-content,
    .repro-phil-upper,
    .story-layout,
    .repro-menu-flex,
    .repro-gallery-flex,
    .repro-mood-flex,
    .sub-images,
    .access-full-layout,
    .reason-cards {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        grid-template-columns: 1fr !important;
        gap: 24px;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* (3) 画像・要素は width:100% / max-width:100% / height:auto */
    main img,
    main video,
    iframe,
    .phil-image,
    .phil-image img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        object-fit: cover;
    }

    /* ギャラリー内の画像はcoverをやめて見切れを防ぐ場合もあるが、まずは100%適用 */
    .gallery-swiper .item img {
        object-fit: cover !important;
    }

    /* (4) モバイル用フォントサイズ・行間適正化 */
    /* 見出し：24〜28px目安 */
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    .serif-title,
    .repro-hero-title,
    .phil-title-main,
    .section-title-line span,
    .artistic-v-text {
        font-size: clamp(24px, 6vw, 28px) !important;
        line-height: 1.4 !important;
        writing-mode: horizontal-tb !important;
        /* 横書きに統一 */
        transform: none !important;
        margin-top: 0 !important;
    }

    /* 本文：14〜16px目安、行間：1.5前後 */
    body,
    p,
    .lead,
    .menu-desc p,
    .address,
    .guide,
    li,
    .hero-subcopy {
        font-size: clamp(14px, 4vw, 16px) !important;
        line-height: 1.5 !important;
    }

    /* (5) 変な改行を防止 (テキスト内の <br> を隠して自然折り返し) */
    p br,
    .lead br,
    .hero-subcopy br,
    h1 br,
    h2 br,
    h3 br {
        display: none !important;
    }

    /* (6) カルーセル(スライドショー)最適化 */
    .gallery-swiper {
        overflow: hidden !important;
        width: 100% !important;
        padding: 0 !important;
    }

    .gallery-swiper .swiper-slide,
    .gallery-swiper .item,
    .gallery-swiper .item img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }

    /* 非表示要素の復帰確認（意図せず消えているテキストなどがあればブロックに） */
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-dark);
    color: var(--color-light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utilities */
.text-primary {
    color: var(--color-primary);
}

.bg-primary {
    background-color: var(--color-primary);
}

.text-center {
    text-align: center;
}

/* Desktop Hide */
@media (min-width: 768px) {
    .mobile-only {
        display: none !important;
    }
}

/* Mobile Hide */
@media (max-width: 767px) {
    .desktop-only {
        display: none !important;
    }
}

/* ==========================================
 * モバイル・タブレット用 自動レスポンシブ最適化レイヤー (767px以下)
 * ==========================================
 * PCレイアウト用の絶対配置・マイナスマージンなどを無効化（1カラム化）し、
 * clamp() や vw を使って画面幅に合わせて美しく縮小・整列させます。
 */
@media (max-width: 767px) {

    /* 1. 横揺れ（はみ出し）の完全防止とレンダリング最適化 */
    body,
    html {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* 画面外の要素の描画をスキップして爆速化する魔法のCSS（モダンブラウザ対応） */
    section {
        content-visibility: auto;
        contain-intrinsic-size: 500px;
        /* 大まかな高さを指定してスクロールバーのガタツキを防ぐ */
    }

    /* 2. 基本的なテキスト要素の自動縮小 */
    p,
    .lead,
    .menu-desc p,
    .address,
    .guide,
    li,
    .hero-subcopy {
        font-size: clamp(13px, 3.5vw, 16px) !important;
        line-height: 1.6 !important;
    }

    /* 3. 余白設定の自動最適化（コンテナ左右 / セクション上下） */
    .container,
    .philosophy-container,
    .menu-container,
    .story-container,
    .contact-container,
    .repro-phil-content,
    .repro-bar-orange,
    .repro-story-inner {
        padding-left: clamp(16px, 4vw, 30px) !important;
        padding-right: clamp(16px, 4vw, 30px) !important;
    }

    section {
        padding-top: clamp(40px, 8vw, 80px) !important;
        padding-bottom: clamp(40px, 8vw, 80px) !important;
    }

    .repro-hero {
        padding: 0 !important;
        /* ヒーロー画像領域は除く */
    }

    /* 4. 1カラム化の強制 と 位置ズレ（マイナスマージン/絶対配置）の解除 */
    .repro-phil-upper,
    .repro-story-content,
    .menu-highlights {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
    }

    /* 4.2 Aboutセクション モバイル最適化 */
    .site-about-section {
        padding: clamp(40px, 8vw, 48px) 0 !important;
    }

    .about-container {
        flex-direction: column !important;
        padding: 0 16px !important;
        text-align: center;
    }

    .about-content {
        max-width: 100% !important;
    }

    .about-title {
        font-size: clamp(24px, 6vw, 28px) !important;
        margin-bottom: 20px !important;
        text-align: center;
    }

    .about-text p {
        font-size: clamp(13px, 3.5vw, 15px) !important;
        line-height: 1.8 !important;
        text-align: center !important;
        margin-bottom: 0 !important;
        /* ボタン削除に伴い下余白を消去（上下中央配置の実現） */
    }

    .about-image {
        display: none !important;
        /* スマホでは右カラム画像枠は消去（1カラム重視） */
    }

    /* 4.5. ニュース＆トピックスのモバイル最適化（スマート化） */
    .repro-news-white {
        padding: clamp(40px, 8vw, 60px) 0 !important;
        /* セクション全体の上下余白を縮小 */
    }

    .repro-news-white .section-title-line {
        margin-bottom: 30px !important;
        /* タイトル下の余白を縮小 */
    }

    .repro-news-white .section-title-line span {
        font-size: clamp(1.1rem, 4.5vw, 1.2rem) !important;
        /* タイトルの文字サイズ調整 */
        letter-spacing: 0.15em !important;
        /* 字間を詰めてスマートに */
        padding: 0 15px !important;
        /* 線の左右の余白を縮小 */
    }

    .news-list li {
        padding: 15px 0 !important;
        /* リスト内（上下）の余白を半減して引き締める */
        align-items: flex-start !important;
        /* 日付・タイトルを上揃えに（文字量違いのズレ防止） */
    }

    .news-list .date {
        width: 90px !important;
        /* 日付の幅を縮小し、タイトル領域を広げる */
        font-size: clamp(12px, 3.2vw, 14px) !important;
        margin-bottom: 0 !important;
    }

    .news-list .title {
        font-size: clamp(13px, 3.5vw, 15px) !important;
        line-height: 1.5 !important;
    }

    .news-list .arrow {
        margin-left: 10px !important;
        /* 矢印の余白を詰める */
        font-size: 14px !important;
    }

    img,
    video {
        max-width: 100% !important;
        height: auto !important;
    }

    /* PCの複雑な配置（position, 負のマージン）をリセットして自然な中央配置に戻す */
    .phil-image,
    .phil-text,
    .story-image-wrap,
    .story-text-wrap {
        position: static !important;
        margin: 0 auto !important;
        /* 中央寄せ */
        transform: none !important;
        width: 100% !important;
    }

    .phil-image,
    .story-image-wrap {
        margin-bottom: clamp(20px, 5vw, 40px) !important;
        /* 画像とテキストの間に自然な隙間を */
    }

    /* 5. ボタンサイズの自動可変 */
    .btn-outline,
    .btn-solid,
    a.button {
        padding: clamp(12px, 3vw, 15px) clamp(20px, 5vw, 40px) !important;
        display: inline-block !important;
    }
}