/* Hero + top section — Japanese brand only, wood bg scoped to hero */

/* Body: no wooden repeat — content area stays clean */
body {
    background: #fff !important;
}

.top-section {
    position: relative;
    z-index: 1000;
    overflow: visible;
    margin-bottom: 0;
}

/* Wooden background ONLY on hero header */
#header.site-hero {
    background: url(../img/header_bg.jpg) repeat-x center top;
    background-color: #2a4a5e;
}

/* Dark overlay for readability */
#header.site-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.18) 0%,
        rgba(0, 0, 0, 0.32) 55%,
        rgba(20, 32, 51, 0.45) 100%
    );
    z-index: 1;
    pointer-events: none;
}

/* Hard cut at hero bottom — no wood bleed into nav */
#header.site-hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: #142033;
    z-index: 3;
    pointer-events: none;
}

#header.site-hero,
#header {
    position: relative;
    margin: 0;
    padding: 0;
    z-index: 2;
}

#header .header {
    position: relative;
    height: auto !important;
    min-height: 150px;
    padding: 46px 12px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Top-right utility links + CTA */
#header .header_menu {
    position: absolute;
    top: 10px;
    right: 8px;
    left: auto;
    text-align: right;
    padding: 0;
    z-index: 6;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0 4px;
    max-width: 96%;
}

#header .header_menu a:not(.hero-cta) {
    color: rgba(255, 255, 255, 0.95);
    font-size: 12px;
    letter-spacing: 0.04em;
    padding: 4px 0 4px 10px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

#header .header_menu a:not(.hero-cta):hover {
    color: #8fd4f0;
}

#header .header_menu .hero-cta {
    margin-left: 6px;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.2;
    color: #fff !important;
    text-decoration: none !important;
    white-space: nowrap;
    background: linear-gradient(135deg, #d4af37 0%, #b8922e 100%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
    font-family: 'Kosugi Maru', 'Hiragino Kaku Gothic ProN', sans-serif;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.hero-cta:hover {
    color: #fff !important;
    background: linear-gradient(135deg, #e8c547 0%, #c9a030 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.4);
}

/* Center stack: brand + SNS (title first, icons below) */
.hero-center {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
}

.hero-center .hero-brand,
.hero-center .header_tit.hero-brand {
    order: 1;
    flex: 0 0 auto;
}

.hero-center .hero-social {
    order: 2;
    flex: 0 0 auto;
}

/* Centered Japanese brand */
#header .header_tit.hero-brand,
.header .header_tit.hero-brand {
    margin: 0 !important;
    padding: 0;
    width: auto;
    text-align: center;
    position: relative;
    float: none !important;
}

.hero-brand {
    position: relative;
    z-index: 4;
    font-family: 'Kosugi Maru', 'Hiragino Kaku Gothic ProN', sans-serif;
}

.hero-brand__link {
    display: inline-block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.hero-brand__link:hover,
.hero-brand__link:focus {
    text-decoration: none;
    color: inherit;
    outline: none;
    background: none !important;
    box-shadow: none !important;
}

#header .header_tit.hero-brand a,
.header .header_tit.hero-brand a {
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

#header .header_tit.hero-brand a:hover,
.header .header_tit.hero-brand a:hover {
    box-shadow: none !important;
}

.hero-brand__ja,
#header .header_tit.hero-brand h1.hero-brand__ja,
.header .header_tit.hero-brand h1.hero-brand__ja {
    display: inline-block;
    margin: 0;
    padding: 12px 32px;
    font-size: clamp(26px, 3.2vw, 36px) !important;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.08em;
    color: #fff !important;
    background: linear-gradient(
        135deg,
        rgba(49, 146, 191, 0.92) 0%,
        rgba(30, 108, 150, 0.92) 100%
    ) !important;
    border-radius: 999px !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.32) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: box-shadow 0.25s ease !important;
}

#header .header_tit.hero-brand h1.hero-brand__ja:hover,
.header .header_tit.hero-brand h1.hero-brand__ja:hover,
.hero-brand__link:hover .hero-brand__ja,
.hero-brand__link:focus .hero-brand__ja {
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.38) !important;
    background: linear-gradient(
        135deg,
        rgba(49, 146, 191, 0.92) 0%,
        rgba(30, 108, 150, 0.92) 100%
    ) !important;
}

/* SNS — centered below title */
.hero-social {
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    order: 2;
}

.hero-social__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    background: rgba(20, 32, 51, 0.72);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
    transition:
        color 0.25s ease,
        background 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.hero-social__link:hover {
    color: #fff;
    background: #3192bf;
    border-color: #d4af37;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(49, 146, 191, 0.4);
}

.hero-social__link .fa {
    font-size: 18px;
    line-height: 1;
}

.hero-social__icon {
    width: 18px;
    height: 18px;
    display: block;
}

/* Legacy blocks — hidden if any remain in old markup */
.hero-brand__en,
.hero-brand__url {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

#header .header_icon {
    display: none !important;
}

/* ---- Solid navy navigation ---- */
.top-section #mega-nav {
    position: relative;
    z-index: 1000;
    margin-top: 0;
    background: #142033 !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 8px 24px rgba(10, 18, 30, 0.22);
    border-bottom: 2px solid rgba(212, 175, 55, 0.2);
    border-top: none;
    overflow: visible !important;
}

.top-section #mega-nav .mega-nav {
    background: #142033 !important;
}

.top-section::after {
    display: none;
}

@media (min-width: 769px) {
    .top-section #mega-nav .mega-nav {
        background: #142033 !important;
    }

    .mega-nav-toggle-wrap {
        display: none !important;
    }

    #title {
        display: none !important;
    }
}

.mega-nav-toggle-wrap {
    display: none;
}

@media (max-width: 768px) {
    #header .header {
        min-height: 140px;
        padding: 56px 10px 16px;
    }

    #header .header_menu {
        top: 6px;
        right: 6px;
        left: 6px;
        max-width: none;
        justify-content: flex-end;
        gap: 2px 2px;
    }

    #header .header_menu a:not(.hero-cta) {
        font-size: 11px;
        padding: 3px 0 3px 8px;
    }

    #header .header_menu .hero-cta {
        margin-left: 4px;
        padding: 6px 11px;
        font-size: 10px;
    }

    .hero-center {
        width: 100%;
    }

    .hero-social {
        margin-top: 10px;
        gap: 5px;
        flex-wrap: wrap;
    }

    .hero-social__link {
        width: 42px;
        height: 42px;
    }

    .hero-brand__ja {
        font-size: 20px !important;
        padding: 9px 20px;
    }

    #header .header_tit {
        display: block !important;
    }

    .mega-nav-toggle-wrap {
        display: flex;
        justify-content: flex-end;
        padding: 8px 12px 6px;
        background: #142033;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .mega-nav-toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 44px;
        height: 44px;
        padding: 10px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.06);
        cursor: pointer;
    }

    .mega-nav-toggle__bar {
        display: block;
        width: 100%;
        height: 2px;
        background: #fff;
        border-radius: 2px;
    }

    #title {
        display: none !important;
    }

    #mega-nav .mega-nav {
        display: none !important;
    }

    #mega-nav .mega-nav.is-open {
        display: block !important;
    }
}

@media (max-width: 1024px) {
    body {
        background: #fff !important;
    }
}
