/*
 Theme Name: Kadence Child
 Theme URI: https://www.kadencewp.com/
 Description: Kadence Themeの子テーマ
 Author: ケンユー空調設備
 Template: kadence
 Version: 1.0.0
*/

/* =================================================================
   1. ローダー設定 (ページ読み込みアニメーション)
================================================================= */
#custom-loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#custom-loader-wrapper.loaded {
    opacity: 0;
    visibility: hidden;
}

.custom-loader {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =================================================================
   2. ヘッダー・メニュー関連 (マーキー・SPメニュー・電話ボタン)
================================================================= */
/* ヘッダーレイアウト調整 */
.site-top-header-inner-wrap.site-header-row.site-header-row-has-sides.site-header-row-no-center {
    grid-template-columns: 1fr !important;
}
.site-header-top-section-right.site-header-section.site-header-section-right {
    display: none;
}
.site-header-top-section-left.site-header-section.site-header-section-left,
.site-header-top-section-left.site-header-section.site-header-section-left .site-header-item.site-header-focus-item {
    width: 100%;
    display: block;
}

/* ニュース・マーキー(流れる文字) */
.site-header-row-container-inner {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}
.site-header-row-container-inner p {
    display: inline-block;
    padding-left: 100%;
    animation: marquee-animation 15s linear infinite;
}
@keyframes marquee-animation {
    from { transform: translateX(0%); }
    to { transform: translateX(-100%); }
}

/* スマホメニュー(ドロワー) */
#mobile-drawer.popup-drawer .drawer-inner { background-color: #efefef; }
#mobile-drawer .drawer-toggle .toggle-close-bar { background-color: #000000; }
#mobile-drawer .mobile-navigation ul li.menu-item-has-children .drawer-nav-drop-wrap,
#mobile-drawer .mobile-navigation ul li:not(.menu-item-has-children) a {
     border-bottom: 1px solid rgba(0,0,0,0.1);
}
#mobile-drawer .mobile-navigation ul li > a,
#mobile-drawer .mobile-navigation ul li.menu-item-has-children > .drawer-nav-drop-wrap { color: #000000; }
#mobile-drawer .mobile-navigation ul li.current-menu-item > a,
#mobile-drawer .mobile-navigation ul li.current-menu-item.menu-item-has-children > .drawer-nav-drop-wrap { color: #104083; }

/* トップページ以外の特定ヘッダー非表示 */
body:not(.home) .site-top-header-wrap.site-header-row-container.site-header-focus-item.site-header-row-layout-fullwidth {
    display: none;
}

/* 電話ボタン(telLink) */
.telLink a {
    background-color: #f39c12 !important;
    color: #ffffff !important;
    padding: 10px 20px !important;
    border-radius: 50px !important;
    font-weight: bold;
    display: flex !important;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}
.telLink a:hover {
    background-color: #e67e22 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}
/* Kadence標準の下線を消去 */
.header-navigation[class*="header-navigation-style-underline"] .header-menu-container.primary-menu-container > ul > li.telLink > a::after {
    content: none !important;
    display: none !important;
}
.header-navigation[class*="header-navigation-style-underline"] .header-menu-container.primary-menu-container > ul > li.telLink > a {
    background-image: none !important;
}

@media (min-width: 1025px) {
    .telLink {
        display: flex;
        align-items: center;
        margin-left: 15px;
    }
}

/* =================================================================
   3. 投稿・アーカイブ・背景画像関連
================================================================= */
/* ヒーロー背景画像設定 */
#inner-wrap .entry-hero-container-inner {
    background-image: var(--featured-image-url, none);
    background-size: cover; 
    background-position: center center; 
    background-repeat: no-repeat; 
}
#inner-wrap .entry-hero-container-inner .entry-hero-content {
    background-color: rgba(0, 0, 0, 0.4); 
    padding: 20px;
    color: #ffffff; 
}

/* アーカイブカテゴリーをテキストのみに（クリック不可） */
.entry-taxonomies .category-links a {
    pointer-events: none !important;
    cursor: default !important;
    text-decoration: none !important;
}

/* =================================================================
   4. お問い合わせフォーム (入力画面 & 確認画面)
================================================================= */

/* --- ボタンの共通スタイル (入力・確認の両方) --- */
.form1 input[type="submit"],
.confirmArea .wpcf7-submit,
.confirmArea .wpcf7-previous {
    display: inline-block;
    box-sizing: border-box;
    width: 100%;           /* 基本は全幅 */
    max-width: 300px;      /* PCでの最大サイズ */
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-align: center;
    appearance: none;
    -webkit-appearance: none;
}

/* ボタン色 (送信:青, 戻る:グレー) */
.form1 input[type="submit"],
.confirmArea .wpcf7-submit {
    background-color: #3182ce;
    color: #ffffff;
}
.form1 input[type="submit"]:hover,
.confirmArea .wpcf7-submit:hover {
    background-color: #2b6cb0;
}
.confirmArea .wpcf7-previous {
    background-color: #ccc;
    color: #333;
}
.confirmArea .wpcf7-previous:hover {
    background-color: #bbb;
}

/* スピナー (ぐるぐる) の共通設定：ボタン配置に干渉させない */
.form1 .wpcf7-spinner,
.confirmArea .wpcf7-spinner {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
}

/* --- 入力画面 (form1) 個別 --- */
.form1 .kb-form .kadence-blocks-form-field {
    flex-direction: column;
    align-items: normal;
    margin-bottom: 15px;
}
.form1 p { margin-bottom: 20px; }
.form1 label { display: block; font-weight: bold; margin-bottom: 5px; font-size: 0.95em; }
.form1 label .required { color: #dc3232; }
.form1 input[type="text"], .form1 input[type="email"], .form1 input[type="tel"], .form1 input[type="url"], .form1 select, .form1 textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #f9f9f9;
    font-size: 16px;
    box-sizing: border-box;
}

/* --- 確認画面 (confirmArea) 個別 --- */
.confirmArea {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}
.confirmArea .kadence-blocks-form-field {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid #ddd;
    align-items: center;
    line-height: 1.6;
}
.confirmArea .kadence-blocks-form-field label {
    flex: 0 0 30%;
    font-weight: bold;
    color: #333;
    padding-right: 20px;
    margin-bottom: 0;
}
.confirmArea .kadence-blocks-form-field:not(.kb-submit-field) {
    color: #555;
}
.confirmArea .required { display: none; }
.confirmArea .kb-submit-field {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 20px;
    border-bottom: none;
    padding: 40px 0;
}

/* =================================================================
   5. スマホ表示用 (レスポンシブ)
================================================================= */
@media (max-width: 600px) {
    /* 確認画面の項目を縦並びに */
    .confirmArea .kadence-blocks-form-field {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 0;
    }
    .confirmArea .kadence-blocks-form-field label {
        width: 100%;
        margin-bottom: 5px;
    }

    /* ボタンを縦並び & 100%幅に */
    .confirmArea .kb-submit-field {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    .form1 input[type="submit"],
    .confirmArea .wpcf7-submit,
    .confirmArea .wpcf7-previous {
        max-width: 100%;
    }
}


/* =================================================================
   6. スマホ表示用 (テーブル)
================================================================= */
/* モバイルでテーブルを横スクロールさせる設定 */
@media (max-width: 767px) {
    .scroll-table::before {
        content: "↔ 左右にスクロールできます";
        display: block;
        font-size: 12px;
        color: #666;
        text-align: right;
        margin-bottom: 5px;
    }
    .scroll-table {
        display: block;
        width: 100%;
        overflow-x: auto; /* 横スクロールを許可 */
        -webkit-overflow-scrolling: touch; /* スムーズなスクロール */
		border: 1px solid #eee;
    }

    .scroll-table table {
 		min-width: 800px; /* ここでPC表示に近い最小幅を固定する */
        display: table !important;
    }
}

