/* KBC 赤テーマ（TOP・中ページ共通）— body に page-kbc-red があるときのみ読み込み */

body.page-kbc-red {
    --kbc-red: #e60012;
    --kbc-text: #333333;
}

@keyframes kbc-hero-blink-bar {
    0%, 100% { opacity: 0; }
    50% { opacity: 0.22; }
}

@media (prefers-reduced-motion: reduce) {
    .kbc-hero__topbar-flicker { animation: none !important; }
}

body.page-kbc-red.paper-texture {
    background: #ffffff !important;
}

body.page-kbc-red nav.fixed {
    background: rgba(255, 255, 255, 0.94) !important;
    border-bottom-color: rgba(0, 0, 0, 0.06) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04) !important;
}

body.page-kbc-red nav .text-forest,
body.page-kbc-red footer .text-forest {
    color: #222 !important;
}

body.page-kbc-red nav .text-primary,
body.page-kbc-red footer a.text-primary {
    color: var(--kbc-red, #e60012) !important;
}

/* Tailwind の hover:text-primary / group-hover:text-primary は緑のまま生成されるためテーマ色で上書き（モバイルパネルは nav 外のため header 単位） */
body.page-kbc-red header a.hover\:text-primary:hover {
    color: var(--kbc-red, #e60012) !important;
}

body.page-kbc-red header a.group:hover .group-hover\:text-primary {
    color: var(--kbc-red, #e60012) !important;
}

body.page-kbc-red nav a.bg-primary,
body.page-kbc-red nav a.bg-primary.text-white {
    background-color: var(--kbc-red, #e60012) !important;
    color: #fff !important;
    border-color: transparent !important;
}

body.page-kbc-red nav a.border-primary {
    border-color: var(--kbc-red, #e60012) !important;
    color: var(--kbc-red, #e60012) !important;
}

body.page-kbc-red #mobile-nav-toggle {
    background: var(--kbc-red, #e60012) !important;
    border-radius: 9999px !important;
    padding: 0.65rem !important;
}

body.page-kbc-red #mobile-nav-toggle span.block {
    background: #ffffff !important;
}

body.page-kbc-red #mobile-nav-toggle .text-on-surface-variant {
    color: rgba(255, 255, 255, 0.92) !important;
}

/* デスクトップ：現在地ナビを赤で強調 */
body.page-kbc-red nav.fixed ul li a.text-forest {
    color: var(--kbc-red, #e60012) !important;
}

body.page-kbc-red .footer-wave {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 52' preserveAspectRatio='none'%3E%3Cpath fill='%23f5f5f5' d='M0 30 Q280 10 600 28 T1200 24 V52H0z'/%3E%3C/svg%3E") !important;
}

body.page-kbc-red footer.border-outline-variant\/50 {
    border-color: rgba(0, 0, 0, 0.06) !important;
}

body.page-kbc-red footer.bg-surface-soft\/80 {
    background: #fafafa !important;
}

body.page-kbc-red .footer-sns-link {
    border-color: rgba(230, 0, 18, 0.35) !important;
    color: var(--kbc-red, #e60012) !important;
}

body.page-kbc-red .footer-sns-link:hover {
    border-color: var(--kbc-red, #e60012) !important;
    background: var(--kbc-red, #e60012) !important;
    color: #fff !important;
}

body.page-kbc-red footer .bg-primary {
    background-color: var(--kbc-red, #e60012) !important;
}

body.page-kbc-red footer .bg-accent,
body.page-kbc-red footer .bg-lime {
    background-color: var(--kbc-red, #e60012) !important;
}

/* TOP と内ページヒーロー共通の帯・装飾 */
.kbc-hero__topbar {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 10px;
    background: var(--kbc-red);
    z-index: 4;
    pointer-events: none;
}

.kbc-hero__topbar-flicker {
    display: block;
    width: 100%;
    height: 100%;
    background: #fff;
    opacity: 0;
    animation: kbc-hero-blink-bar 3s ease-in-out infinite;
}

.kbc-hero__corner {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    background: var(--kbc-red);
}

.kbc-hero__corner--tl {
    left: 0;
    top: 10px;
    width: min(42vw, 220px);
    height: min(42vw, 220px);
    clip-path: polygon(0 0, 100% 0, 0 100%);
}

.kbc-hero__corner--br {
    right: 0;
    bottom: clamp(72px, 12vw, 120px);
    width: min(48vw, 260px);
    height: min(48vw, 260px);
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

/* 見出し左ライン（TOPコピーと内ページタイトルで共通） */
.kbc-hero__eyebrow {
    margin: 0 0 0.75rem;
    font-family: Montserrat, sans-serif;
    font-weight: 800;
    font-size: clamp(0.65rem, 1.8vw, 0.8rem);
    letter-spacing: 0.28em;
    color: var(--kbc-red);
    line-height: 1.2;
}

.kbc-hero__copy {
    position: relative;
    z-index: 2;
    padding: 1rem 0 1rem 1.15rem;
    border-left: 8px solid var(--kbc-red);
    background: #fff;
}

@media (min-width: 1024px) {
    .kbc-hero__copy {
        padding: 1.25rem 1.5rem 1.25rem 1.5rem;
        border-left-width: 10px;
    }
}

/* 中ページヒーロー */
.kbc-inner-hero {
    position: relative;
    background: #fff;
    overflow: hidden;
    isolation: isolate;
}

.kbc-inner-hero__img-wrap {
    position: relative;
    width: 100%;
    height: 30vh;
    min-height: 180px;
    max-height: 420px;
    overflow: hidden;
}

@media (min-width: 768px) {
    .kbc-inner-hero__img-wrap {
        height: 34vh;
        max-height: 440px;
    }
}

.kbc-inner-hero__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.05);
}

.kbc-inner-hero__title-area {
    position: relative;
    z-index: 2;
    background: #fff;
}

.kbc-inner-hero__h1 {
    margin: 0;
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 800;
    font-size: clamp(1.65rem, 4.5vw, 2.85rem);
    line-height: 1.28;
    letter-spacing: -0.03em;
    color: var(--kbc-text);
    word-break: keep-all;
}

/* 画像エリア右下の三角（セクション全体の --br とは別） */
.kbc-inner-hero__corner-br.kbc-hero__corner {
    top: auto;
    left: auto;
    right: 0;
    bottom: 0;
    width: min(36vw, 180px);
    height: min(36vw, 180px);
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    z-index: 1;
}
