/*
 Theme Name: My Awesome Frost Child Theme
 Template: frost
 Description: My custom child theme for Frost Theme.
 Version: 1.0.0
 Author: Your Name
 Text Domain: my-awesome-frost-child-theme
*/

/* --- ここからあなたのカスタムCSSを記述します --- */
/* メニューを上部に固定するCSS */
.site-header { 
    position: fixed !important;   /* 強制的に固定 */
    top: 0 !important;            /* 画面上端から0px */
    left: 0 !important;           /* 画面左端から0px */
    width: 100% !important;       /* 幅を100%に */
    z-index: 999999 !important;   /* 他の要素よりはるかに手前に表示 */
    background-color: #ffffff !important; /* 固定時の背景色 (現在のヘッダーの色に合わせる) */
}

/* 固定されたヘッダーの高さ分、その下のコンテンツをずらす */
/* ヘッダーの実際の高さに合わせて '80px' の値を調整してください */
body {
    padding-top: 80px; /* 例: ヘッダーの高さが80pxの場合 */
}

/* カバーブロックの画像にホバーでふんわり白くなるアニメーション */

/* 通常時の状態：アニメーションの準備 */
.wp-block-cover__image-background {
    transition: filter 0.5s ease, opacity 0.5s ease; /* 変化を滑らかにする */
    filter: brightness(100%) saturate(100%); /* 通常時の状態（変化なし） */
    opacity: 1; /* 通常時は不透明 */
}

/* マウスホバー時の状態：ふんわり白くする */
.wp-block-cover:hover .wp-block-cover__image-background {
    filter: brightness(120%) saturate(80%); /* 明るさを上げ、彩度を下げて白みを出す */
    opacity: 0.85; /* 少し透明にしてふんわり感を出す */
}

/* もしオーバーレイがある場合、同時にオーバーレイも調整してより効果的に */
/* このセレクタはテーマによって異なる場合があります */
.wp-block-cover .wp-block-cover__overlay {
    transition: background-color 0.5s ease, opacity 0.5s ease; /* オーバーレイのトランジション */
}

.wp-block-cover:hover .wp-block-cover__overlay {
    background-color: rgba(255, 255, 255, 0.2); /* 白いオーバーレイを少し重ねる */
    opacity: 1 !important; /* オーバーレイが既に存在する場合に透明度を調整 */
}

/*
 * カスタムHTMLセクションの構成CSS - 1枚写真の初期コードをベースに幅を修正
 */

/*
 * カスタムレイアウトセクションのCSS - 再構築版（写真URL正確反映）
 */

/* 全要素にborder-boxを適用 */
*, *::before, *::after {
    box-sizing: border-box !important;
}

/* メインセクションのラッパー */
.custom-layout-section {
    width: auto !important;
    max-width: 100% !important;
    margin-left: 5vw !important; /* 左右マージン */
    margin-right: 5vw !important;
    margin-top: 50px !important;
    margin-bottom: 50px !important;
    padding: 0 !important;
    overflow: hidden !important; /* はみ出し防止 */
}

/* セクションの内部コンテンツをFlexboxで横並びにする */
.section-inner-wrapper {
    display: flex !important;
    flex-wrap: wrap !important; /* スマホで折り返す */
    justify-content: space-between !important; /* 左右のブロックを両端に寄せる */
    align-items: stretch !important; /* 高さを揃える */
    width: 100% !important;
    min-height: 400px !important; /* セクション全体の最低高さを設定 */
}

/* 左右のコンテンツブロックの基本スタイル */
.left-content-block,
.right-content-block {
    flex: 1 1 48% !important; /* PCでは約半分（48%）の幅を取り、必要に応じて伸縮 */
    display: flex !important;
    flex-direction: column !important; /* 内部要素を縦に並べる */
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 左右ブロック間の余白 */
.left-content-block {
    padding-right: 10px !important;
}
.right-content-block {
    padding-left: 10px !important;
}

/* 背景画像を持つコンテナの基本スタイル (アスペクト比を保持) */
.background-image-container {
    position: relative !important;
    width: 100% !important;
    height: 0 !important; /* padding-bottomで高さを設定するため */
    padding-bottom: 60% !important; /* ★ここを調整: 画像の縦横比に合わせて高さを設定 (例: 16:9なら 56.25%, 4:3なら 75%) */
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    overflow: hidden !important;
    margin-bottom: 20px !important; /* 下の要素との間隔 */
}

/* 各写真のURL指定 */
.background-image-container.image-1 {
    background-image: url('https://doitsutsu.com/wp-content/uploads/2025/06/sanple-1.jpg') !important; /* ★写真1のURLをここに正確に反映しました★ */
}
.background-image-container.image-2 {
    background-image: url('https://doitsutsu.com/wp-content/uploads/2025/06/sanple-2.jpg') !important; /* ★写真2のURLをここに正確に反映しました★ */
}

/* 白抜きタイトルのスタイル (写真1の上に重ねる) */
.overlay-title {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important; /* 中央揃え */
    color: white !important;
    font-size: 2.5em !important;
    text-align: center !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5) !important;
    background-color: rgba(0, 0, 0, 0.4) !important; /* 読みやすくするための背景 */
    padding: 10px 20px !important;
    margin: 0 !important;
    width: 90% !important; /* タイトルが長くなっても収まるように */
    word-break: break-word !important; /* はみ出したら改行 */
}

/* テキストとボタンのグループ */
.text-button-group {
    display: flex !important;
    flex-direction: column !important; /* 縦並び */
    justify-content: flex-start !important; /* 上から順に配置 */
    flex-grow: 1 !important; /* 残りのスペースを埋める */
    padding-top: 0 !important;
}

.text-button-group p {
    color: #333 !important; /* テキストの色を調整 (必要に応じて) */
    font-size: 1.1em !important;
    line-height: 1.6 !important;
    margin-top: 0 !important;
    margin-bottom: 20px !important; /* ボタンとの間隔 */
    text-align: left !important; /* 必要に応じて調整 */
}

/* ボタンのスタイル */
.action-button {
    background-color: #0073aa !important;
    color: white !important;
    padding: 10px 20px !important;
    border: none !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    font-size: 1em !important;
    display: inline-block !important; /* コンテンツ幅に合わせる */
    text-decoration: none !important;
    transition: background-color 0.3s ease !important;
    align-self: flex-start !important; /* 左寄せ (必要に応じて center/flex-end に変更) */
}

.action-button:hover {
    background-color: #005177 !important;
}

/* --- スマホ表示時の調整 (縦並び) --- */
@media (max-width: 768px) {
    .section-inner-wrapper {
        flex-direction: column !important; /* 縦並び */
        min-height: auto !important; /* 最低高さを解除 */
    }

    .left-content-block,
    .right-content-block {
        flex: 1 1 100% !important; /* 全幅を取る */
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-bottom: 30px !important; /* 各ブロック間の縦方向の余白 */
    }
    
    .background-image-container {
        padding-bottom: 75% !important; /* スマホでは写真のアスペクト比を調整 (例: 4:3) */
        margin-bottom: 15px !important;
    }

    .overlay-title {
        font-size: 1.8em !important; /* スマホでのフォントサイズ調整 */
        padding: 8px 15px !important;
        width: 95% !important;
    }
    
    .text-button-group p {
        margin-bottom: 15px !important;
    }

    .action-button {
        align-self: center !important; /* スマホでボタンを中央寄せ */
    }
}

