/*
Theme Name: 2nd.school - ${currentSettings.name}
Theme URI: https://new.2nd.school/
Description: 2nd.school公式。不登校の出席認定・心のカウンセリング・IT教育の情報を優しく整理した保護者第一設計のWordPressテーマです。
Author: 2nd.school Web Renewal Team
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: ${currentSettings.slug}
*/

/* -------------------------------------------------------------------------
 * Custom styles and Dynamic Tailwind Bundle for ${currentSettings.name}
 * ------------------------------------------------------------------------- */

html {
    scroll-behavior: smooth;
}

body {
    background-color: ${currentSettings.bgColor};
    color: ${currentSettings.textColor === 'text-stone-800' ? '#292524' : '#334155'};
    font-family: ${currentSettings.fontFamily};
    transition: background-color 0.3s ease, color 0.3s ease, font-family 0.3s ease;
    margin: 0;
    padding: 0;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

@keyframes kenburns {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}

.ken-burns-active {
    animation: kenburns 6000ms ease-out infinite alternate;
}

/* Custom Contact Form 7 support */
.wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}
.wpcf7-text, .wpcf7-textarea, .wpcf7-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background-color: #ffffff;
    transition: all 0.2s ease;
}
.wpcf7-text:focus, .wpcf7-textarea:focus {
    outline: none;
    border-color: #4c62a6;
    box-shadow: 0 0 0 3px rgba(76, 98, 166, 0.15);
}
.wpcf7-submit {
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
}

/* Dynamic color configuration bound to custom properties */
:root {
  --brand-primary: ${currentSettings.accentColor};
  --brand-bg: ${currentSettings.bgColor};
  --brand-border: ${currentSettings.borderColor};
  --brand-text: ${currentSettings.textColor === 'text-stone-800' ? '#292524' : '#334155'};
  --border-radius-custom: ${currentSettings.borderRadius};
  --border-radius-btn-custom: ${currentSettings.borderRadiusBtn};
}

.bg-brand, .bg-brandPrimary { background-color: var(--brand-primary) !important; }
.text-brand, .text-brandPrimary { color: var(--brand-primary) !important; }
.bg-warmBg, .bg-brandBg { background-color: var(--brand-bg) !important; }
.text-brandText { color: var(--brand-text) !important; }
.border-warmBorder, .border-brandBorder { border-color: var(--brand-border) !important; }

/* -------------------------------------------------------------------------
 * WordPress Staging Robust Design Reproducer (Tailwind Fallback Rules)
 * Guaranteed rounded-corners, borders, margins, fonts, and professional shadows
 * ------------------------------------------------------------------------- */
.theme-container-card, article.theme-container-card {
    background-color: #ffffff !important;
    border-radius: var(--border-radius-custom, 24px) !important;
    border: 2px solid rgba(234, 228, 211, 0.45) !important;
    border-color: var(--brand-border) !important;
    box-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02) !important;
    padding: 0px !important;
    overflow: hidden !important;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 100% !important;
}

.theme-container-card:hover, article.theme-container-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 15px 30px -4px rgba(0, 0, 0, 0.08), 0 6px 10px -2px rgba(0, 0, 0, 0.04) !important;
    border-color: var(--brand-primary) !important;
}

/* Card inner layout adjustments to prevent title/text overcrowding */
.theme-container-card > div:first-child > div.px-6.pb-6 {
    padding: 1.5rem !important; /* Force appropriate inner spacing */
}

/* Card layout wrapper and thumbnail fallbacks */
.theme-container-card .aspect-\[16\/10\] {
    aspect-ratio: 1.6 / 1 !important;
    width: 100% !important;
    height: auto !important;
    position: relative !important;
    overflow: hidden !important;
    background-color: #f1f5f9 !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15) !important;
}

/* Dynamic Tab Switchers aesthetic backup */
#blog-category-tabs button {
    border-radius: var(--border-radius-btn-custom, 9999px) !important;
    padding: 0.55rem 1.35rem !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
    transition: all 250ms ease-in-out !important;
    border-width: 1px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#blog-category-tabs button.active-tab {
    background-color: var(--brand-primary) !important;
    color: #ffffff !important;
    border-color: var(--brand-primary) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}

/* Utilities */
img {
    max-width: 100%;
    height: auto;
}
svg {
    max-width: 100%;
    max-height: 100%;
    display: inline-block;
    vertical-align: middle;
}
svg.w-3\.5 { width: 14px !important; height: 14px !important; }
svg.w-3 { width: 12px !important; height: 12px !important; }
svg.w-4 { width: 16px !important; height: 16px !important; }
svg.w-5 { width: 20px !important; height: 20px !important; }
svg.w-6 { width: 24px !important; height: 24px !important; }
svg.w-8 { width: 32px !important; height: 32px !important; }
svg.w-10 { width: 40px !important; height: 40px !important; }
.h-8 { height: 32px !important; }
.w-8 { width: 32px !important; }
.w-10 { width: 40px !important; }
.h-10 { height: 40px !important; }



/* ==========================================
 * 問い合わせフォーム：寄り添いフクロウ演出
 * ========================================== */

/* フォームを包むコンテナのはみ出し制限を強制解除（フクロウを外側に見せるため） */
.cf7-form-wrapper,
.wpcf7,
.wpcf7-form {
    overflow: visible !important;
}

/* フォーム全体のPCレイアウト調整（右側にフクロウが収まるスペースを確保） */
@media (min-width: 1200px) {
    .cf7-form-wrapper {
        max-width: 600px;
        margin: 0 auto;
    }
    .cf7-field {
        position: relative !important;
        margin-bottom: 28px;
    }
}

/* 通常時（スマホ・タブレット環境では画面幅の都合上、一旦非表示にして横スクロール発生を防ぐ） */
.form-char {
    display: none;
}

/* PC環境（画面幅1200px以上）でフクロウを右側にデプロイ */
@media (min-width: 1200px) {
    .form-char {
        display: block !important;
        position: absolute !important;
        right: -130px; /* フォームの白い枠線の外側右方に配置 */
        bottom: 0px;
        width: 110px;  /* 300pxの画像を綺麗に縮小表示 */
        height: 110px;
        background-image: url('https://2nd.school/wp/test/wp-content/uploads/2026/06/image21-300.webp') !important; /* 通常時フクロウ */
        background-size: contain !important;
        background-repeat: no-repeat !important;
        opacity: 0; /* 未フォーカス時は透明 */
        transform: translateY(10px); /* 少し下から浮き上がらせるアニメーション効果 */
        transition: opacity 0.3s ease, transform 0.3s ease !important;
        pointer-events: none; /* マウスイベントを透過させてフォーム操作を邪魔しない */
        z-index: 99;
    }

    /* 核心：その項目に入力フォーカス（クリック・タップ）が当たった時 */
    .cf7-field:focus-within .form-char {
        opacity: 1 !important; /* くっきり表示 */
        transform: translateY(0) !important; /* 定位置へ */
        background-image: url('https://2nd.school/wp/test/wp-content/uploads/2026/06/image22-300.webp') !important; /* 指差しフクロウへ瞬時に切り替え */
    }
}

/* ==========================================
 * 問い合わせフォーム：全体のおしゃれなデザイン調整
 * ========================================== */

/* フォーム全体の枠組み（優しく包み込む角丸ボックス） */
.cf7-form-wrapper {
    background-color: #faf9f5 !important; /* ぬくもりのある超淡いベージュ */
    padding: 40px 30px !important;
    border-radius: 24px !important;
    border: 2px solid #eae4d3 !important;
}

/* 各入力ブロックの縦余白 */
.cf7-field {
    margin-bottom: 30px !important;
}

/* 項目見出し（お母様を緊張させないフォントと配色） */
.cf7-field label {
    display: block !important;
    font-weight: 700 !important;
    color: #334155 !important;
    font-size: 16px !important;
    margin-bottom: 8px !important;
}

/* 「必須」「任意」のバッジ装飾 */
.cf7-field label .required {
    background-color: #e11d48 !important; /* 優しい赤（トゲのないローズ色） */
    color: #ffffff !important;
    font-size: 11px !important;
    padding: 2px 8px !important;
    border-radius: 99px !important;
    margin-left: 6px !important;
    font-weight: normal !important;
}
.cf7-field label .optional {
    background-color: #64748b !important; /* 落ち着いたグレー */
    color: #ffffff !important;
    font-size: 11px !important;
    padding: 2px 8px !important;
    border-radius: 99px !important;
    margin-left: 6px !important;
    font-weight: normal !important;
}

/* 補足説明テキスト */
.cf7-field .field-desc {
    font-size: 13px !important;
    color: #64748b !important;
    line-height: 1.6 !important;
    margin-bottom: 10px !important;
}

/* 入力欄（テキストボックス・エリア）の装飾：角丸と優しい枠線 */
.cf7-field input[type="text"],
.cf7-field input[type="email"],
.cf7-field input[type="tel"],
.cf7-field textarea {
    width: 100% !important;
    padding: 14px 16px !important;
    border: 2px solid #cbd5e1 !important;
    border-radius: 12px !important; /* 優しい角丸 */
    background-color: #ffffff !important;
    font-size: 15px !important;
    color: #334155 !important;
    transition: all 0.3s ease !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02) !important;
}

/* 入力欄にカーソルが当たった時（フクロウ出現と同期して枠線が優しい青に光る） */
.cf7-field input:focus,
.cf7-field textarea:focus {
    border-color: #4c62a6 !important; /* スクールのテーマカラー */
    background-color: #f8fafc !important;
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(76, 98, 166, 0.1) !important;
}

/* チェックボックス（選択肢）を押しやすく整列 */
.cf7-field .wpcf7-checkbox .wpcf7-list-item {
    display: inline-block !important;
    margin-right: 16px !important;
    margin-bottom: 8px !important;
    font-size: 15px !important;
    color: #334155 !important;
    cursor: pointer !important;
}

/* エラーメッセージ（CF7の赤文字をトゲのないデザインと配置に） */
.wpcf7-not-valid-tip {
    color: #e11d48 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    margin-top: 8px !important;
    display: block !important;
}

/* ==========================================
 * ★ 送信ボタンの大幅装飾（安心感を与えるぽっこりボタン）
 * ========================================== */
.cf7-submit {
    text-align: center !important;
    margin-top: 40px !important;
}

.cf7-submit input[type="submit"] {
    background: linear-gradient(135deg, #5c75bc 0%, #4c62a6 100%) !important; /* 信頼感と安心感のある優しいブルーグラデーション */
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    padding: 18px 48px !important;
    border-radius: 99px !important; /* 完全に丸い、押しやすいボタン */
    border: none !important;
    box-shadow: 0 4px 14px rgba(76, 98, 166, 0.3) !important; /* ぽっこり浮き出る立体感 */
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
    width: auto !important;
    min-width: 280px !important;
}

/* ボタンにマウスが乗った時、またはタップした時 */
.cf7-submit input[type="submit"]:hover {
    transform: translateY(-2px) !important; /* わずかに浮き上がる */
    box-shadow: 0 6px 20px rgba(76, 98, 166, 0.4) !important;
    opacity: 0.95 !important;
}
.cf7-submit input[type="submit"]:active {
    transform: translateY(1px) !important; /* 押した感覚をフィードバック */
}

/* 「※必須」のバッジを、お母様を驚かせない優しいパステルピンクに変更 */
.cf7-field label .required {
    background-color: #fce7f3 !important; /* 非常に淡い、安心感のあるパステルピンク */
    color: #be185d !important;            /* 視認性を確保した、濃く落ち着いたローズ色の文字 */
    border: 1px solid #fbcfe8 !important; /* 馴染みをよくする薄い境界線 */
    font-size: 11px !important;
    padding: 2px 8px !important;
    border-radius: 99px !important;
    margin-left: 6px !important;
    font-weight: 700 !important; /* 文字を少し太くして読みやすく */
}



/* ==========================================
 * style.css追記用：スマホ固定ナビ＆上に戻るボタン（詳細度最高版）
 * ========================================== */

@media (max-width: 1199px) {
    /* 1. 全体を包むコンテナの強制上書き */
    html body .footer_fixed {
        position: fixed !important;
        display: flex !important;
        width: 100% !important;
        bottom: 0 !important;
        left: 0 !important;
        z-index: 99999 !important; /* 最前面に固定 */
        background-color: transparent !important;
        padding: 0 4px 8px 4px !important;
        box-sizing: border-box !important;
    }

    /* 2. 電話で相談ボタン（完全不透明・優しい青グラデーション） */
    html body .footer_fixed .footer_tel {
        width: 44% !important;
        margin: 6px !important;
        background: linear-gradient(135deg, #6b82ca 0%, #4c62a6 100%) !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        text-align: center !important;
        padding: 16px 0 !important;
        border: none !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 12px rgba(76, 98, 166, 0.3) !important;
    }
    html body .footer_fixed .footer_tel a {
        color: #ffffff !important;
        display: block !important;
        width: 100% !important;
    }

    /* 3. お問い合わせボタン（完全不透明・清潔感のある白背景＋青枠） */
    html body .footer_fixed .footer_contact {
        width: 44% !important;
        margin: 6px !important;
        background: #ffffff !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        text-align: center !important;
        padding: 14px 0 !important;
        border: 2px solid #4c62a6 !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
    }
    html body .footer_fixed .footer_contact a {
        color: #4c62a6 !important;
        display: block !important;
        width: 100% !important;
    }

    /* 4. LINEボタンの強制調整 */
    html body .footer_fixed .footer_line {
        width: 12% !important;
        margin: 6px !important;
        background: transparent !important;
        padding: 0 !important;
        border: none !important;
    }
    html body .footer_fixed .footer_line img {
        width: 100% !important;
        height: auto !important;
        vertical-align: middle !important;
    }

    /* 5. 重なっている「上に戻るボタン」を上に強制避難 */
    html body .scroll-to-top,
    html body #page-top,
    html body .page-top-btn,
    html body .page-top,
    html body [class*="pagetop"],
    html body [class*="return-top"] {
        bottom: 95px !important;
        right: 16px !important;
        z-index: 9999 !important;
    }
}

/* PC環境（1200px以上）では固定バーを完全非表示 */
@media (min-width: 1200px) {
    html body .footer_fixed {
        display: none !important;
    }
}