@charset "UTF-8";

@media (max-width: 768px) {
    html {
        width: 100%;
        overflow-x: hidden;
    }
}

body {
    margin: 0;
    padding: 0;
    padding-top: 80px;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    color: #333;
    background-color: #ffffff;
    background-size: 50px 50px;
}

@media (max-width: 768px) {
    body {
        width: 100%;
        padding-top: 60px; /* headerの高さ(60px)と完全に一致させる */
        overflow-x: hidden;
    }
}

/* loading animation ---------------------------------------- */

#loading-animation { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: #fff; display: flex; justify-content: center; align-items: center; z-index: 10000; transition: opacity 1.2s ease; }
.loading-logo { font-family: serif; font-size: 2rem; letter-spacing: 0.3em; color: #333; opacity: 0; animation: fadeInLogo 1.2s ease-out forwards; text-indent: 0.3em; }
@keyframes fadeInLogo { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.loaded { opacity: 0; pointer-events: none; }


/* header ---------------------------------------- */

header {
    background: #fff;
    border-bottom: 1px solid #eee;
    height: 80px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    header {
        height: 60px;
        border-bottom: none;
    }
}

.header-hide {
    transform: translateY(-170px);
}

.header-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    height: 100%;
    position: relative;
    padding-right: 40px; /* 少し余裕を持たせます */
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .header-container {
        padding-right: 15px;
        justify-content: space-between; /* ロゴとメニューを両端に */
    }
}

.logo {
    position: absolute;
    left: 0;
    top: 0; /* ヘッダーの上端に合わせる */
    z-index: 1001; /* コンテンツに重なるよう前面へ */
    transition: 
        opacity 2.0s ease-out 1.0s, 
        transform 2.0s ease-out 1.0s;
    opacity: 1;
    transform: translateY(0);
}

.logo img {
    height: 160px; /* ヘッダー(80px)を下へ突き抜けさせるサイズ */
    width: auto;
    display: block;
}

@media (max-width: 768px) {
    .logo {
        position: static; /* 突き出しを解除してヘッダー内に収める */
        opacity: 1 !important;
        transform: none !important;
    }
    .logo img {
        height: 60px; /* 60pxのヘッダーに収まるサイズ */
        padding-left: 10px;
    }
}

.header-hide .logo {
    opacity: 0;
    transform: translateY(-20px);
}

.main-nav {
    margin-right: 30px;
}

@media (max-width: 768px) {
    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100dvh;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        z-index: 1500;
        opacity: 0;
        visibility: hidden;
        transform: scale(1.05);
        transition: 
            opacity 0.5s ease, 
            visibility 0.5s, 
            transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
    }
}

@media (max-width: 768px) {
    .main-nav.active {
        opacity: 1;
        visibility: visible;
        transform: scale(1);
    }
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
}

@media (max-width: 768px) {
    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 50px;
    }
}

.main-nav a {
    text-decoration: none;
    color: #333;
    font-size: 0.9rem;
    font-weight: bold;
}

@media (max-width: 768px) {
    .main-nav a {
        font-size: 1.2rem;
        letter-spacing: 0.1em;
    }
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 15px; /* 電話番号とアイコンの間隔 */
}

.contact-info .tel-link {
    color: #666666;
    font-size: 1.5rem;
    text-decoration: none;
    font-weight: bold;
}

.tel-link {
    padding-right: 10px;
}

@media (max-width: 768px) {
    .contact-info .tel-link {
        display: none; /* スマホでは電話番号を隠す */
    }
    .contact-info {
        gap: 10px;
    }
}

.icon-email img {
    width: 32px; /* お問い合わせアイコンのサイズ */
    padding-right: 15px;
    height: auto;
    vertical-align: middle;
}

.menu-trigger {
    display: none;
}

@media (max-width: 768px) {
    .menu-trigger {
        display: block;
        width: 30px;
        height: 22px;
        position: relative;
        z-index: 2500;
        cursor: pointer;
    }
    .menu-trigger span {
        display: block;
        width: 100%;
        height: 2px;
        background: #333;
        position: absolute;
        transition: 0.3s;
    }
    .menu-trigger span:nth-child(1) { top: 0; }
    .menu-trigger span:nth-child(2) { top: 10px; }
    .menu-trigger span:nth-child(3) { bottom: 0; }
    
    .menu-trigger.active span:nth-child(1) { transform: translateY(10px) rotate(-45deg); }
    .menu-trigger.active span:nth-child(2) { opacity: 0; }
    .menu-trigger.active span:nth-child(3) { transform: translateY(-10px) rotate(45deg); }
}


/* hero ---------------------------------------- */

#hero {
    position: relative;
    width: 100%;
    height: 600px; /* 必要に応じて高さを調整してください */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.hero-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* アスペクト比を保ちつつトリミング */
    z-index: 0; /* 重なり順：最背面 */
}

.hero-content {
    position: absolute; /* 位置を自由に指定 */
    bottom: 40px;      /* 下から40pxの位置 */
    background: rgba(255, 255, 255, 0.85); /* 透明度を微調整 */
    padding: 25px 35px; /* 余白を少し削ってコンパクトに */
    text-align: left;
    max-width: 450px;   /* 幅を600pxから450pxへ縮小 */
    width: auto;        /* コンテンツに合わせて可変 */
    z-index: 10;
    opacity: 0; /* 最初は隠す */
    animation: fadeInContent 0.5s ease forwards;
    animation-delay: 5.0s; /* ローディング後、少し待って背景を表示 */
}

@media (max-width: 450px) {
    .hero-content {
        bottom: 25%;
    }
}

.hero-content h1 {
    font-size: 1.5rem;
    margin: 0;
    letter-spacing: 0.1em;  
    opacity: 0;
    animation: fadeInContent 0.5s ease forwards;
    animation-delay: 6.0s; /* 背景が出てからパッ */
}

.hero-content p {
    opacity: 0;
    animation: fadeInContent 0.5s ease forwards;
    animation-delay: 7.0s; /* さらに少し遅れてパッ */
}

@keyframes fadeInContent {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* greeting ---------------------------------------- */

#greeting {
    padding: 100px 0;
}

@media (max-width: 450px) {
    #greeting {
        padding: 10px 0;
    }
}

.greeting-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    padding: 0 40px;
    box-sizing: border-box;
}

@media (max-width: 450px) {
    .greeting-container {
        display: block; /* フレックスを解除して縦並びを確定 */
        padding: 60px 20px; /* 左右の余白を20pxに絞って本文の幅を確保 */
    }
}

.greeting-text {
    flex: 1;
}

.greeting-text .eng-title {
    font-size: 3rem;
    font-family: serif;
    margin-bottom: 0;
    color: #333;
    letter-spacing: 0.1em;
}

.greeting-text .jp-title {
    color: #d870ad; /* サンプルのピンク色 */
    font-weight: bold;
    margin-top: 5px;
    margin-bottom: 40px;
}

.greeting-body p {
    line-height: 2;
    font-size: 1rem;
    color: #333;
    text-align: justify;
}

.greeting-image {
    flex: 1;
}

.greeting-image img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 20px 20px 0 #fff; /* 画像背後の白枠効果 */
}

/* service ---------------------------------------- */

#service {
    padding: 100px 0;
}

@media (max-width: 450px) {
    #service {
        padding: 10px 0;
    }
}

.service-container {
    width: 100%;
    padding: 0 40px;
    box-sizing: border-box;
}

@media (max-width: 450px) {
    .service-container {
        padding: 60px 20px; /* 左右余白を20pxに */
    }
}

.service-header {
    margin-bottom: 60px;
}

.service-header .eng-title {
    font-size: 3rem;
    font-family: serif;
    color: #333;
    letter-spacing: 0.1em;
    /* inline-blockをやめて、幅を指定できるようにする */
    display: block; 
    width: 95%; /* 線を長くする */
    border-bottom: 2px solid #333; /* 線は常に表示 */
    padding-bottom: 10px;
    margin-bottom: 60px;
}

.service-header .eng-title span {
    display: inline-block;
    opacity: 0; /* 最初は文字だけ消しておく */
    transition: opacity 1.8s ease;
}

.service-header .eng-title.is-visible span {
    opacity: 1;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-bottom: 80px;
}

@media (max-width: 450px) {
    .service-item {
        display: block; /* 縦並びにする */
        margin-bottom: 60px; /* アイテム同士の間隔 */
        border-bottom: 1px solid #eee; /* 最後に薄い区切り線を入れると丁寧 */
        padding-bottom: 40px;
    }
    .service-item:last-child {
        border-bottom: none; /* 最後のアイテムは線なし */
    }
}

.service-image {
    flex: 0 0 35%; /* 画像の幅を広めに設定 */
}

.service-image img {
    width: 480px;
    height: auto;
    display: block;
}

@media (max-width: 450px) {
    .service-image {
        width: 100%;
        margin-bottom: 20px; /* テキストとの間隔 */
    }
    .service-image img {
        width: 100%;
        height: auto;
        border-radius: 5px;
    }
}

.service-text {
    flex: 1;
}

.service-text h3 {
    font-size: 1.8rem;
    line-height: 1.4;
    margin-bottom: 30px;
    color: #333;
    font-weight: normal;
}

.service-description {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 30px;
    text-align: justify;
}

.read-more {
    display: inline-block;
    background: #1a1a1a;
    color: #fff;
    text-decoration: none;
    padding: 15px 30px;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.read-more:hover {
    background: #7a7a7a;
}

/* banner ---------------------------------------- */

#full-banner {
    width: 600px;
    height: auto;
    margin: 0 auto;
    overflow: hidden;
    display: block;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

@media (max-width: 450px) {
    #full-banner {
        width: 100%;
        margin-bottom: 40px;
    }
}

#full-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 比率を保ちながら420pxの高さにフィットさせます */
    display: block;
}

#full-banner.is-visible {
    opacity: 1; /* 不透明にする */
    transform: translateY(0); /* 元の位置に戻す */
}

/* works ---------------------------------------- */

#works {
    padding: 100px 40px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 450px) {
    #works {
        padding: 10px 20px;
    }
}

.works-container {
    width: 100%;
}

.works-header {
    margin-bottom: 60px;
}

.works-header .eng-title {
    font-size: 3rem;
    font-family: serif;
    color: #333;
    letter-spacing: 0.1em;
    display: block; 
    width: 95%; /* 線を長くする */
    border-bottom: 2px solid #333; /* 線は常に表示 */
    padding-bottom: 10px;
    margin-bottom: 60px;
}

.works-header .eng-title span {
    display: inline-block;
    opacity: 0; /* 最初は文字だけ消しておく */
    transition: opacity 1.8s ease;
}

.works-header .eng-title.is-visible span {
    opacity: 1;
}

.works-grid {
    display: flex;
    justify-content: flex-start;
    gap: 30px;
    margin-bottom: 60px;
}

@media (max-width: 450px) {
    .works-grid {
        display: block; /* 縦並びに変更 */
    }
}

.works-item {
    flex: 0 0 calc((100% - 60px) / 3); /* 3列等分割 */
}

@media (max-width: 450px) {
    .works-item {
        width: 100%;
        margin-bottom: 40px; /* アイテム同士の間隔 */
    }
}

.works-image {
    position: relative; /* 子要素の基準にする */
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
}

.works-image img {
    position: absolute; /* 画像を重ねる */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.8s ease-in-out;
}

.works-hover .hover-img {
    opacity: 0; /* 最初はホバー用を消しておく */
}

.works-hover:hover .hover-img {
    opacity: 1; /* ホバーしたら出す */
}

.works-hover:hover .base-img {
    opacity: 0; /* ホバーしたら通常を消す */
}

/* --- 自動切替の設定（JSで制御） --- */
.works-auto img {
    opacity: 1;
}

.works-caption {
    font-size: 1.1rem;
    color: #333;
    margin: 0;
}

@media (max-width: 450px) {
    .works-caption {
        padding-top: 5px;
    }
}

.works-footer {
    width: 100%;
    text-align: center;
    margin-top: 40px;
}

/* about ---------------------------------------- */

#about {
    padding: 100px 40px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 450px) {
    #about {
        padding: 60px 20px;
    }
}

.about-container {
    width: 100%;
}

@media (max-width: 450px) {
    .about-container {
        padding: 0;
    }
}

.about-header {
    margin-bottom: 60px;
}

.about-header .eng-title {
    font-size: 3rem;
    font-family: serif;
    color: #333;
    letter-spacing: 0.1em;
    display: block; 
    width: 95%; 
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    margin-bottom: 60px;
}

.about-header .eng-title span {
    display: inline-block;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.about-header .eng-title.is-visible span {
    opacity: 1;
}

.about-content {
    display: flex;
    align-items: flex-start;
    gap: 60px;
}

@media (max-width: 450px) {
    .about-content {
        display: block; /* 縦並びに変更 */
    }
}

.about-image {
    flex: 0 0 45%;
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 450px) {
    .about-image {
        width: 100%;
        margin-bottom: 30px; /* 表との間隔 */
    }
    .about-image img {
        border-radius: 5px;
    }
}

.about-table {
    flex: 1;
}

.about-table table {
    width: 100%;
    border-collapse: collapse;
}

.about-table th,
.about-table td {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.about-table th {
    width: 150px;
    font-weight: bold;
    color: #333;
}

.about-table td {
    color: #666;
    line-height: 1.6;
}

@media (max-width: 450px) {
    .about-table {
        width: 100%;
    }
    .about-table th {
        width: 80px; /* 見出し幅を少し詰め、内容の幅を確保 */
        font-size: 0.9rem;
        vertical-align: top; /* 文字数が多い時に上揃えにする */
        padding: 12px 0;
    }
    .about-table td {
        font-size: 0.9rem;
        line-height: 1.6;
        padding: 12px 0 12px 10px; /* 見出しとの間に少し隙間 */
    }
}

/* ---------- AInaviNET PoP ---------- */

.chat-popup {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    display: none;
    z-index: 400;
    background: #ffffff; 
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 15px;
    border: 1px solid rgba(0, 0, 0, 0.15); 
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: modalOpen 0.4s ease;
}

#chat-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

#chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(56, 56, 56, 0.85);
    color: #fff;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar-container {
    display: flex;
    align-items: center;
}

.header-avatar {
    width: 35px;
    height: 35px;
    object-fit: contain;
    border-radius: 50%;
    background: #fff;
    padding: 2px;
}

.header-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.header-info .name {
    font-size: 13px;
    font-weight: bold;
    line-height: 1.2;
}

.header-info .status-tag {
    font-size: 10px;
    color: #4caf50;
    text-transform: uppercase;
    margin-top: 2px;
}

.chat-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    z-index: 500;
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 20px 0;
    display: block;
}

.bot-message {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
    padding: 0 15px;
    align-items: flex-end; 
    flex-shrink: 0;
}

.bot-avatar {
    margin-right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    flex-shrink: 0;
    margin-bottom: 2px;
}

.bot-message .bubble {
    background: #ffffff;
    color: #333;
    padding: 12px 15px;
    border-radius: 15px 15px 15px 3px;
    max-width: 80%;
    font-size: 14px;
    line-height: 1.6;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.chat-trigger {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 350;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

@media (max-width: 450px) {
    .chat-trigger {
       bottom: 15px;
       right: 15px;
       width: 60px;
       height: 60px;
    }
}

.chat-trigger img {
    width: 40px;
    height: auto;
}

@media (max-width: 450px) {
    .chat-popup {
        width: 90%;
        right: 5%;
        bottom: 80px;
        height: 60dvh;
        max-height: 60dvh;
    }
}

.chat-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #4caf50;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
    transition: opacity 0.2s;
}

.chat-btn:hover {
    opacity: 0.8;
}