/* Hachiko District Custom Styles */
@charset "UTF-8";

/* Box sizing */
*, *:before, *:after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

.svg-color-black {
    filter: brightness(0.2);
}
.svg-color-white {
    filter: invert(1);
}

:root {
    --primary-blue: #363b6c;
    --secondary-blue: #555ca5;
    --accent-red: #BD0026;
    --font-color: #333;
    --background-color-light-gray: #f5f5f5;
    --font-family-sans: "Inter","Noto Sans JP",hiragino-kaku-gothic-pron,"Hiragino Sans","Hiragino Kaku Gothic ProN","Yu Gothic",yugothic,meiryo,sans-serif;
    --font-family-serif: "Hiragino Mincho Pro","notoSerifJp","Noto Serif JP","游明朝","Yu Mincho",yumincho,serif;
}

body {
    min-height: 100vh;
    min-height: -webkit-fill-available;
    font-family: var(--font-family-serif);
    color: var(--font-color);
}

.is-en {
    font-family: var(--font-family-sans);
}

.is-jp {
    font-family: var(--font-family-serif);
}

p {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: clamp(0.85rem, 1rem + 0.25vw, 1.3rem);
    letter-spacing: 0.04rem;
    color: #111;
    font-weight: 400;
    text-rendering: optimizeLegibility;
    line-height: 1.5;
    margin-bottom: 30px !important;
}

ul {
    padding-left: 30px !important;
    margin-bottom: 30px !important;
}

li {
    color: #111;
    font-size: clamp(0.85rem, 1rem + 0.2vw, 1.3rem);
    letter-spacing: 0.04rem;
    list-style: disc;
}

/* PC画面での行間調整 */
@media only screen and (min-width: 913px) {
    p {
        line-height: 2rem;
    }
}

header {
    scroll-margin-top: 0 !important;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    & nav {
        position: relative;
    }
}

section {
    scroll-margin-top: 100px;
}

section#contact {
    scroll-margin-top: 80px !important;
}

section h2 {
    display: inline-block;
}

select {
    height: 45px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: #ffffff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="5" viewBox="0 0 10 5"><path d="M0 0h10L5 5z" fill="%23000"/></svg>') no-repeat right 10px center;;
}

.section-header {
    margin-bottom: 60px;
    & p {
        margin: 0 !important;
    }
}

@media (min-width: 1025px) {
    .section-header {
        margin-bottom: 120px;
    }
}

/* Service section specific styles */
.mb-0 {
    margin-bottom: 0 !important;
}

.content-wrapper {
    cursor: pointer !important;
}

.content-text-wrapper {
    max-width: calc(1536px / 2); /* containerの最大幅1536pxの半分 */
}

/* レスポンシブ対応 */
@media (max-width: 640px) {
}

@media (min-width: 641px) and (max-width: 768px) {
    .content-text-wrapper {
        max-width: calc(640px / 2);
    }
}

@media (min-width: 1025px) and (max-width: 1280px) {
    .content-text-wrapper {
        max-width: calc(1024px / 2);
    }
}

@media (min-width: 1281px) and (max-width: 1536px) {
    .content-text-wrapper {
        max-width: calc(1280px / 2);
    }
}

footer {
    background-color: var(--primary-blue);
    & p {
        margin: 0 !important;
        color: #fff;
    }
    & a {
        color: #fff !important;
    }
}

/* 1280px以上でのみ表示 */
@media (min-width: 1280px) {
    .rotated-text {
        position: absolute;
        left: -60px;
        transform: rotate(-90deg);
        transform-origin: 0 0;
        font-size: 0.875rem;
        z-index: 10;
        white-space: nowrap;
    }
}

/* 1280px以下では非表示 */
@media (max-width: 1287px) {
    .rotated-text {
        display: none;
    }
}

.hero-section {
    background-color: var(--primary-blue);
}

#services .content-text-wrapper p {
    margin-bottom: 0 !important;
}

/* iOS Safari のビデオ再生ボタン（コントロール）オーバーレイを非表示 */
video::-webkit-media-controls {
    display: none !important;
}
video::-webkit-media-controls-enclosure {
    display: none !important;
}
/* iOS16+ のオーバーレイ再生ボタン */
video::-webkit-media-controls-overlay-play-button {
    display: none !important;
}
/* 再生ボタン自体のオーバーレイ（ポスター上の中央プレイ） */
video::-webkit-media-controls-start-playback-button {
    display: none !important;
    -webkit-appearance: none;
}

.rotated-text::before {
    content: "";
    display: inline-block;
    width: 56px;
    height: 1px;
    background-color: var(--font-color);
    margin-right: 8px;
    vertical-align: middle;
}

/* Parent container for rotated text */
#specialization .container:first-child {
    &:first-child {
        position: relative;
    }
}

/* Contact section links */
#contact a {
    text-decoration: underline !important;
}

#form-section {
    font-size: clamp(0.85rem, 1rem + 0.25vw, 1.3rem);
}

/* Submit button styling with higher specificity */
#submit-button {
    background-color: var(--primary-blue);
    width: 240px;
    padding-top: 10px;
    padding-bottom: 10px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1.4rem;
    color: #fff;

    &:hover {
        background-color: var(--secondary-blue);
    }
}

/* class="px-8 py-3 text-white rounded-lg transition duration-300 hover:opacity-90" */

/* ヘッダータイトル縦表示スタイル */
.title-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;

    & span {
        display: block;
        line-height: 1.2;
    }
}

.is-jp .title-link {
    & span:first-child {
        font-size: 1.5rem;
        font-weight: bold;
        margin-bottom: 0.25rem;
    }

    & span:last-child {
        font-size: 0.875rem;
        opacity: 0.8;
    }
}

.is-en .title-link {
    & span:first-child {
        font-size: 1.5rem;
        font-weight: bold;
        margin-bottom: 0.25rem;
    }
}

/* Font Color */
.text-blue {
    color: var(--primary-blue);
}
.text-secondary-blue {
    color: var(--secondary-blue);
}
.text-red {
    color: var(--accent-red);
}

/* Introduction section overlay layout */
#introduction-wrapper {
    position: relative;
}

#introduction-content {
    /* position: absolute; */
    top: 100px;
    left: 0;
    right: 0;
    z-index: 2;
}

@media (min-width: 769px) {
    #introduction-title {
        top: 17%;
    }
}

/* Achievement items overlay layout */
#achievements {
    position: relative;
    & .achievement-item {
        position: relative;
    }

    & img {
        display: block;
    }

    & .achievement-text {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: white;
        width: 100%;
        z-index: 2;
        text-align: center;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 10px;
        /* background-color: rgba(88, 136, 198); */
        height: 240px;
    }

    & .achievement-text p {
        color: white !important;
        margin-bottom: 10px !important;
    }
}



.specialization-category-title {
    padding-bottom: 20px;
    margin-bottom: 20px !important;
    border-bottom: 1px solid #ccc;
}

@media (min-width: 769px) {
    .specialization-category-title {
        padding-bottom: 30px;
        margin-bottom: 30px !important;
    }
}

.case-studies-client-number {
    background-color: #000;
    color: #fff;
    display: inline;
    margin-bottom: 10px;

    & span {
        background-color: var(--primary-blue);
    }
}

/* Testimonials Carousel Container */
.testimonials-carousel-container {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.testimonials-content-wrapper {
    display: flex;
    gap: 1rem;
    align-items: stretch;
    transition: transform 0.5s ease;
    flex-wrap: nowrap;
    /* iOS Safari での横スワイプを有効化 */
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

.testimonials-content-wrapper {
    & div {
        width: calc(33.333% - 0.75rem);
        flex: 0 0 calc(33.333% - 0.75rem);
        border: 1px solid #9ca3af;
        padding: 40px 20px 10px 20px;
        min-width: calc(33.333% - 0.75rem);
    }
}

/* Carousel Navigation Buttons */
.testimonials-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-blue);
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.testimonials-carousel-nav {
    &:hover {
        background: var(--primary-blue);
        color: white;
        transform: translateY(-50%) scale(1.1);
    }
}

.testimonials-carousel-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.testimonials-prev {
    left: -25px;
}

.testimonials-next {
    right: -25px;
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
    .testimonials-content-wrapper div {
        width: calc(50% - 0.5rem);
        flex: 0 0 calc(50% - 0.5rem);
        min-width: calc(50% - 0.5rem);
    }
}

@media (max-width: 768px) {
    .testimonials-content-wrapper div {
        width: calc(100% - 0.5rem);
        flex: 0 0 100%;
        min-width: calc(100% - 0.5rem);
        padding: 30px 10px 10px 10px;
    }

    .testimonials-carousel-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .testimonials-prev {
        left: -20px;
    }

    .testimonials-next {
        right: -20px;
    }
}

.value-content-wrapper div {
    background-color: var(--primary-blue);
    padding: 20px;
    width: calc(33.333% - 0.75rem);
    flex: 0 0 calc(33.333% - 0.75rem);
    padding-top: 40px;
    padding-bottom: 40px;
}

/* 2段目の2つの要素を1段目と同じ幅で中央に配置 */
.value-content-wrapper {
    justify-content: center;

    & div p {
        color: #fff;
    }

    & div p:first-child {
        text-align: center;
    }

    & div:nth-child(4),
    & div:nth-child(5) {
        width: calc(33.333% - 0.75rem);
        flex: 0 0 calc(33.333% - 0.75rem);
    }
}


/* スマホ対応 - Valueブロックを100%幅で表示 */
@media (max-width: 768px) {
    .value-content-wrapper div {
        width: 100% !important;
        flex: 0 0 100% !important;
    }

    .value-content-wrapper div:nth-child(4),
    .value-content-wrapper div:nth-child(5) {
        width: 100% !important;
        flex: 0 0 100% !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .value-content-wrapper div, .value-content-wrapper div:nth-child(4),
    .value-content-wrapper div:nth-child(5) {
        width: calc(50% - 0.75rem);
        flex: 0 0 calc(50% - 0.75rem);
    }
}

#contact {
    background-color: var(--background-color-light-gray) !important;
}

#vision {
   border-top: 1px solid rgb(156 163 175);
   padding-top: 40px;
   margin-top: 20px;
}

@media (min-width: 769px) {
    #vision {
        border-top: none;
        border-left: 1px solid rgb(156 163 175);
        padding-left: 40px;
        margin-left: 40px;
        padding-top: 0;
        margin-top: 0;
    }
}

#contact-content-wrapper {
    width: 60%;
    margin: 0 auto;
}

/* スマホ対応 */
@media (max-width: 768px) {
    #contact-content-wrapper {
        width: 100%;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    width: min(90vw, 640px);
    max-height: 85vh;
    margin: 16px;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: flex-end;
    padding: 20px 20px 0 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.modal-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 0 40px 40px 40px;
}

.modal-body p:not([class*="text-"]) {
    font-size: clamp(0.85rem, 1rem + 0.25vw, 1.3rem);
    line-height: 1.6;
    margin-bottom: 20px !important;
}

.modal-body p:last-child:not([class*="text-"]) {
    margin-bottom: 0 !important;
}

/* TailwindCSSのtext-*クラスが適用されたpタグには基本的なスタイルのみ適用 */
.modal-body p[class*="text-"] {
    margin-bottom: 20px !important;
    margin-bottom: 0 !important;
}

.modal-body p[class*="text-"]:last-child {
    margin-bottom: 0 !important;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .modal-content {
        width: 90vw;
        max-width: 90vw;
        max-height: 80vh;
    }

    .modal-body {
        padding: 0 20px 30px 20px;
    }

    .modal-header {
        padding: 15px 15px 0 15px;
    }
}

/* YouTube Modal Styles */
.youtube-modal-content {
    width: 90%;
    max-width: 800px;
    max-height: 90%;
    margin: 0;
    padding: 0;
}

@media (min-width: 1281px) {
    .youtube-modal-content {
        max-width: 1200px;
    }
}

.youtube-modal-body {
    margin: 0;
    padding: 0;
}

.youtube-video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 アスペクト比 */
    margin: 0;
    background-color: #000;
}

.youtube-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

/* YouTube Modal レスポンシブ対応 */
@media (max-width: 768px) {
    .youtube-modal-content {
        width: 100%;
        max-height: 100%;
        margin: 0;
        padding: 0;
    }

    .youtube-modal-body {
        margin: 0;
        padding: 0;
    }
}

/* Mobile Menu Styles */
#mobile-menu-button {
    cursor: pointer;
    z-index: 60;
}

/* ハンバーガーメニューのアニメーション */
#mobile-menu-button.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

#mobile-menu-button.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

#mobile-menu-button.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* スマホメニューのスタイル */
#mobile-menu {
    top: 120px;
    transform: translateY(0px);
    transition: transform 0.4s ease, opacity 0.4s ease, top 0.4s ease;
    opacity: 0;
    z-index: 50;
}

#mobile-menu.show {
    top: 73px;
    transform: translateY(0);
    opacity: 1;
}

.mobile-menu-link {
    font-family: var(--font-family-serif);
    font-size: 1.1rem;
    color: var(--font-color);
    text-decoration: none;
    display: block;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s ease;
}

#mobile-menu.show .mobile-menu-link {
    opacity: 1;
    transform: translateY(0);
}

/* 各メニューリンクに遅延を追加 */
#mobile-menu.show .mobile-menu-link:nth-child(1) {
    transition-delay: 0.3s;
}

#mobile-menu.show .mobile-menu-link:nth-child(2) {
    transition-delay: 0.35s;
}

#mobile-menu.show .mobile-menu-link:nth-child(3) {
    transition-delay: 0.4s;
}

#mobile-menu.show .mobile-menu-link:nth-child(4) {
    transition-delay: 0.45s;
}

#mobile-menu.show .mobile-menu-link:nth-child(5) {
    transition-delay: 0.5s;
}

#mobile-menu.show .mobile-menu-link:nth-child(6) {
    transition-delay: 0.55s;
}

#mobile-menu.show .mobile-menu-link:nth-child(7) {
    transition-delay: 0.6s;
}

.mobile-menu-link {
    &:hover {
        color: var(--primary-blue);
    }
}

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    height: 100%;
    background-color: var(--primary-blue);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loading-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-inner {
    text-align: center;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 24px;
}

.loading-title {
    color: #fff;
    letter-spacing: 0.12em;
    font-weight: 600;
    font-size: clamp(1.25rem, 1rem + 2vw, 2rem);
}

.loading-gauge {
    position: relative;
    width: 240px;
    height: 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    overflow: hidden;
}

.loading-gauge::before {
    content: "";
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.95) 50%, rgba(255,255,255,0) 100%);
    animation: gauge-sweep 1.2s ease-in-out infinite;
}

@keyframes gauge-sweep {
    0% { left: -40%; }
    50% { left: 60%; }
    100% { left: 140%; }
}

/* Testimonials Dots */
#testimonials-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#testimonials-dots .dot {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid #9ca3af;
    background-color: transparent;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

#testimonials-dots .dot:hover {
    transform: scale(1.05);
}

#testimonials-dots .dot.text-red {
    background-color: var(--accent-red);
    border-color: var(--accent-red);
}

#testimonials-dots .dot:focus-visible {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}
