/*
 * style.css - 株式会社what's up の基本スタイルシート
 *
 * 全体的なトーン：
 * - 手書き風、親しみやすい、温かみのあるデザイン。
 * - メインカラー：#6a402d (茶色系)
 * - アクセントカラー：#f1b74a (黄色系)
 * - 背景色：#f7f3e8 (クリーム色)
 * - フォント：M PLUS Rounded 1c (丸ゴシック)
 */

/* --- 基本設定 --- */
body {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    background-color: #f7f3e8; /* 全体の背景色（クリーム色）を統一 */
    color: #3a3a3a;
    margin: 0;
    line-height: 1.6;
    scroll-behavior: smooth; /* スムーズスクロール */
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}

a:hover {
    opacity: 0.7; /* ホバー時の透過度 */
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom; /* 画像下の余白防止 */
}

/* --- コンテナ設定 --- */
.header-container,
.content-container,
.footer-container {
    max-width: 1000px; /* メインコンテンツの最大幅 */
    margin: 0 auto;
    padding: 0 20px;
}

/* --- 1: ヘッダー (共通) --- */
.site-header {
    padding: 15px 0;
    background-color: #f7f3e8;
    border-bottom: 2px solid #f1b74a; /* アクセントカラーの線を追加 */
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding-top: 25px; /* 右上のテキスト分の余白を確保 */
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none; /* logo aタグに適用 */
}

.logo-char {
    height: 50px; /* サイズを統一 */
    margin-right: 10px;
}

/* kaisyamei.png が会社名テキストの画像と仮定 */
.logo-text { 
    height: 35px; /* サイズを統一 */
    margin-right: 50px;
}

.global-nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 25px;
    font-weight: 700;
    font-size: 1rem;
}

.global-nav a {
    color: #3a3a3a;
    position: relative;
}
.global-nav a:hover {
    color: #6a402d; /* メインカラーに */
    opacity: 1;
}

.header-sub-copy {
    position: absolute;
    top: 5px; /* 上部に配置 */
    right: 20px;
    font-size: 0.75rem;
    color: #777;
    background-color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

/* ▼▼▼ [変更] ハンバーガーメニュー (デフォルトは非表示) ▼▼▼ */
.hamburger-toggle {
    display: none;
}
.hamburger-button {
    display: none; /* PCでは非表示 */
}
/* ▲▲▲ [変更] ハンバーガーメニュー ▲▲▲ */


/* --- 共通セクションタイトル --- */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #6a402d; /* メインカラー */
    margin-bottom: 60px;
    margin-top: 80px;
    position: relative;
    display: inline-block;
    text-align: center; /* タイトル自体を中央寄せに */
}

.section-title::after {
    content: '';
    display: block;
    width: 60%; /* タイトルに合わせた下線 */
    min-width: 100px;
    height: 5px;
    background-color: #f1b74a; /* アクセントカラー */
    margin: 10px auto 0;
    border-radius: 3px;
}

/* --- 共通のボタン・リンクスタイル --- */
.button-link {
    display: inline-block;
    padding: 12px 30px;
    background-color: #f1b74a;
    color: #fff;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: background-color 0.3s ease;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}
.button-link:hover {
    background-color: #e0a73a;
    opacity: 1;
}

/* --- メインビジュアル (Hero) - index.html用 --- */
.hero {
    background-color: #f7f3e8;
    padding: 30px 0;
    overflow: hidden;
    text-align: center;
}

.hero-image-wrapper {
    /* ▼▼▼ [変更] max-width を 960px * 1.5 = 1440px に変更 ▼▼▼ */
    max-width: 1440px; 
    /* ▲▲▲ [変更] ▲▲▲ */
    margin: 0 auto;
    position: relative;
}

.hero-image-wrapper img {
    width: 100%;
    height: auto;
}

/* ++++++ [新規追加] GIFオープニングアニメーション用のスタイル ++++++ */
.gif-overlay {
    /* デフォルトはPC用なので非表示にする（スマホのメディアクエリで上書き） */
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f7f3e8; /* ページの背景色と同じ */
    z-index: 9999; /* 他の要素より最前面に */
    opacity: 1; /* 初期状態は不透明 */
    
    /* フェードアウトと縮小のアニメーション */
    transition: opacity 1s ease-out, transform 1s ease-out; 
    /* 縮小の基準点を中央に設定 */
    transform-origin: center center; 
    /* 初期状態は拡大・縮小なし */
    transform: scale(1);
}

.gif-overlay img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover; /* 画像全体を表示 */
}

/* フェードアウト時に適用されるクラス */
.gif-overlay.fade-out {
    opacity: 0;
    /* main-visual.png のサイズに合わせて縮小 */
    /* scale(0.5) は仮の値です。表示を確認しながら調整してください。 */
    transform: scale(0.5); 
}
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */

/* --- サービス概要 (index.html用) --- */
.services-section {
    padding: 60px 20px;
    text-align: center;
    background-color: #fff;
    box-shadow: 0 -5px 10px rgba(0,0,0,0.03);
}

.service-grid {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    max-width: 800px;
    margin: 0 auto 50px;
}

.service-item {
    flex-basis: 25%;
    text-align: center;
}

.service-item img {
    height: 80px;
    margin-bottom: 15px;
}

.service-item h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #6a402d;
    margin: 0 0 10px 0;
}

.service-item p {
    font-size: 0.9rem;
    color: #555;
}

/* --- 4: フッター (共通) --- */
.site-footer {
    padding: 40px 0;
    background-color: #e0d9cd;
    border-top: 1px solid #f1b74a;
    font-size: 0.85rem;
    color: #6a402d;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left p {
    font-weight: 700;
    margin: 0 0 5px 0;
}

.footer-kuroko {
    height: 35px;
    margin-right: 15px;
}

.footer-center {
    text-align: center;
}

.footer-center p {
    margin: 5px 0;
}

.footer-right {
    text-align: right;
}

.copyright {
    margin: 0;
    font-weight: 700;
}

.sns-links {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 5px;
}

.sns-links img {
    height: 28px;
    opacity: 0.9;
}


/* ======================================= */
/* --- スマートフォン・モバイル対応 --- */
/* ======================================= */
@media (max-width: 768px) {
    
    /* ++++++ [新規追加] GIFオープニングアニメーション (スマホでのみ表示) ++++++ */
    .gif-overlay {
        display: block; /* スマホでは表示 */
    }
    /* +++++++++++++++++++++++++++++++++++++++++++++++++++ */

    /* コンテナ */
    .header-container,
    .content-container,
    .footer-container {
        padding: 0 15px; /* パディングを狭く */
    }

    /* ▼▼▼ [変更] ヘッダー (ハンバーガー対応) ▼▼▼ */
    .header-container {
        flex-direction: row; /* 横並び */
        flex-wrap: wrap; /* 折り返し許可 */
        align-items: center;
        padding-top: 10px;
        justify-content: space-between; /* ロゴとボタンを両端に */
    }
    
    .logo {
        margin-bottom: 0; 
    }

    .logo-text { 
        height: 35px;
        margin-right: 0;
    }

    /* ハンバーガーボタンのスタイル */
    .hamburger-button {
        display: flex; /* 表示する */
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        cursor: pointer;
        padding: 0;
        border: none;
        background: transparent;
        z-index: 100; /* メニューより手前に */
    }

    .hamburger-button span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: #6a402d; /* メインカラー */
        border-radius: 2px;
        transition: all 0.3s;
    }

    /* ナビゲーション（メニュー本体） */
    .global-nav {
        display: none; /* 初期状態は非表示 */
        width: 100%;
        text-align: center;
        order: 3; /* ロゴ、ボタンの次 */
        background-color: #fff; /* 背景色 */
        margin-top: 10px; /* 上部とのマージン */
        box-shadow: 0 5px 10px rgba(0,0,0,0.05);
    }
    
    .global-nav ul {
        flex-direction: column; /* 縦並び */
        gap: 0; /* 隙間をリセット */
        padding: 0; /* パディングリセット */
        border-top: none; 
        border-bottom: none; 
    }
    
    .global-nav li {
        border-bottom: 1px solid #f0e6d6; /* 仕切り線 */
    }
    .global-nav li:last-child {
        border-bottom: none;
    }

    .global-nav a {
        display: block; /* タップ領域を広げる */
        padding: 15px 10px; /* パディング */
    }

    /* チェックボックスがオンの時の動作 */
    .hamburger-toggle:checked ~ .global-nav {
        display: block; /* メニューを表示 */
    }
    
    /* ボタンのアニメーション (X印) */
    .hamburger-toggle:checked + .hamburger-button span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .hamburger-toggle:checked + .hamburger-button span:nth-child(2) {
        opacity: 0;
    }
    .hamburger-toggle:checked + .hamburger-button span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }


    .header-sub-copy {
        position: static;
        margin-bottom: 10px;
        order: 2; /* ロゴの次に配置 */
        width: 100%;
    }

    /* ▼▼▼ [ここから修正・追加] サービスグリッドのSP対応 (2x2) ▼▼▼ */
    .service-grid {
        flex-wrap: wrap; /* 折り返しを許可 */
        justify-content: center; /* アイテムを中央寄せ */
        gap: 30px 20px; /* 上下30px, 左右20px */
    }

    .service-item {
        /* 2列表示 (左右のgap 20px の半分 10px を 50% から引く) */
        flex-basis: calc(50% - 10px);
        min-width: 130px; /* 幅が狭くなりすぎないように */
    }

    .service-item img {
         height: 60px; /* スマホでは少し小さく調整 */
    }
    /* ▲▲▲ [ここまで修正・追加] ▲▲▲ */

}