/*
Theme Name: ひふみ旅館 宴会予約テーマ
Description: 京都駅前のひふみ旅館の宴会予約専用WordPressテーマ。和の心を大切にした上品なデザインで、法事・歓送迎会・慶事・忘年会等の特別な日を格式ある和の空間でお迎えします。
Author: ひふみ旅館
Version: 3.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hifumi-ryokan
Domain Path: /languages

This theme supports: custom-header, custom-background, custom-menu, post-thumbnails, automatic-feed-links, html5
*/

/* ==============================================
   WordPressテーマ用追加CSS
   ============================================== */

/* 基本的なCSSは /css/style.css から継承 */
@import url('../css/style.css');

/* ==============================================
   WordPress固有のクラス
   ============================================== */

/* WordPress管理バー対応 */
.admin-bar header {
    top: 32px !important;
}

@media screen and (max-width: 782px) {
    .admin-bar header {
        top: 46px !important;
    }
}

/* Contact Form 7 統合スタイル */
.wp-block-contact-form-7-contact-form-selector {
    width: 100%;
}

.wpcf7-form {
    background: none !important;
    border: none !important;
    padding: 0 !important;
}

.wpcf7-form p {
    margin-bottom: 1rem;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="date"],
.wpcf7-form select,
.wpcf7-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    font-family: 'Noto Sans JP', sans-serif;
    border-color: rgba(218, 165, 32, 0.3);
}

.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form input[type="tel"]:focus,
.wpcf7-form input[type="date"]:focus,
.wpcf7-form select:focus,
.wpcf7-form textarea:focus {
    outline: none;
    border-color: #DAA520;
    box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.1);
}

.wpcf7-form input[type="submit"] {
    width: 100%;
    background: linear-gradient(135deg, #DC143C 0%, #8B0000 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.3);
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1rem;
}

.wpcf7-form input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 20, 60, 0.4);
}

.wpcf7-response-output {
    border: none !important;
    padding: 1rem !important;
    border-radius: 0.5rem !important;
    margin: 1rem 0 !important;
    font-family: 'Noto Sans JP', sans-serif;
    display: flex;
    align-items: center;
}

.wpcf7-mail-sent-ok {
    background: rgba(34, 139, 34, 0.1) !important;
    border: 2px solid #228B22 !important;
    color: #228B22 !important;
}

.wpcf7-mail-sent-ok:before {
    content: "\f058";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 8px;
}

.wpcf7-validation-errors,
.wpcf7-mail-sent-ng {
    background: rgba(220, 20, 60, 0.1) !important;
    border: 2px solid #DC143C !important;
    color: #DC143C !important;
}

.wpcf7-validation-errors:before,
.wpcf7-mail-sent-ng:before {
    content: "\f06a";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 8px;
}

.wpcf7-not-valid-tip {
    color: #DC143C !important;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.wpcf7-form-control.wpcf7-not-valid {
    border-color: #DC143C !important;
    background-color: rgba(220, 20, 60, 0.05) !important;
}

.wpcf7-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.wpcf7-form .required {
    color: #DC143C;
}

/* WordPressコンテンツクラス */
.wp-block-group {
    margin-bottom: 2rem;
}

.wp-block-columns {
    display: flex;
    gap: 2rem;
}

.wp-block-column {
    flex: 1;
}

/* WordPress画像クラス */
.wp-caption {
    max-width: 100%;
    margin-bottom: 1.5rem;
}

.wp-caption img {
    width: 100%;
    height: auto;
}

.wp-caption-text {
    font-size: 0.875rem;
    color: #666;
    text-align: center;
    margin-top: 0.5rem;
}

/* WordPress埋め込みコンテンツ */
.wp-block-embed {
    margin-bottom: 2rem;
}

.wp-block-embed iframe {
    width: 100%;
    border-radius: 8px;
}

/* ==============================================
   Contact Form 7 カスタマイズ
   ============================================== */

/* CF7 基本フォーム */
.wpcf7-form {
    background: linear-gradient(135deg, #FFF8DC 0%, #f8f4e6 100%);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(139, 69, 19, 0.15);
}

/* CF7 フォームフィールド */
.wpcf7-form p {
    margin-bottom: 1.5rem;
}

.wpcf7-form label {
    display: block;
    font-weight: 600;
    color: #8B4513;
    margin-bottom: 0.5rem;
    font-family: 'Noto Sans JP', sans-serif;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="date"],
.wpcf7-form select,
.wpcf7-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Noto Sans JP', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: white;
}

.wpcf7-form input:focus,
.wpcf7-form select:focus,
.wpcf7-form textarea:focus {
    outline: none;
    border-color: #DAA520;
    box-shadow: 0 0 0 4px rgba(218, 165, 32, 0.2);
}

/* CF7 ラジオボタン・チェックボックス */
.wpcf7-form .wpcf7-radio,
.wpcf7-form .wpcf7-checkbox {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.wpcf7-form .wpcf7-list-item {
    margin: 0;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 12px;
    background: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    flex: 1;
    min-width: 200px;
}

.wpcf7-form .wpcf7-list-item:hover {
    border-color: #DAA520;
}

.wpcf7-form input[type="radio"]:checked + .wpcf7-list-item-label,
.wpcf7-form input[type="checkbox"]:checked + .wpcf7-list-item-label {
    color: #8B4513;
    font-weight: 600;
}

/* CF7 送信ボタン */
.wpcf7-form .wpcf7-submit {
    background: linear-gradient(135deg, #DC143C 0%, #b30f2f 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Noto Sans JP', sans-serif;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(139, 69, 19, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem auto 0;
    min-width: 200px;
}

.wpcf7-form .wpcf7-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(139, 69, 19, 0.2);
}

.wpcf7-form .wpcf7-submit::before {
    content: '✉';
    margin-right: 0.5rem;
    font-size: 1.2em;
}

/* CF7 バリデーションメッセージ */
.wpcf7-form .wpcf7-not-valid-tip {
    color: #DC143C;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
}

.wpcf7-form .wpcf7-not-valid {
    border-color: #DC143C !important;
}

.wpcf7-form .wpcf7-validation-errors {
    background: #ffeaea;
    border: 1px solid #DC143C;
    color: #DC143C;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* CF7 成功・エラーメッセージ */
.wpcf7-mail-sent-ok {
    background: #e8f5e8;
    border: 1px solid #28a745;
    color: #28a745;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.wpcf7-mail-sent-ng {
    background: #ffeaea;
    border: 1px solid #DC143C;
    color: #DC143C;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* CF7 スピナー */
.wpcf7-form .ajax-loader {
    display: none;
}

.wpcf7-form.submitting .wpcf7-submit {
    opacity: 0.7;
    cursor: not-allowed;
}

.wpcf7-form.submitting .wpcf7-submit::before {
    content: '⏳';
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==============================================
   WordPress ウィジェット
   ============================================== */

.widget {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(139, 69, 19, 0.1);
    margin-bottom: 2rem;
}

.widget-title {
    color: #8B4513;
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #DAA520;
    font-family: 'Noto Serif JP', serif;
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.widget li:last-child {
    border-bottom: none;
}

.widget a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.widget a:hover {
    color: #DC143C;
}

/* ==============================================
   WordPress ナビゲーション
   ============================================== */

.wp-nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.wp-nav-menu li {
    margin-right: 2rem;
}

.wp-nav-menu a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

.wp-nav-menu a:hover {
    color: #DC143C;
}

.wp-nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background: linear-gradient(135deg, #8B4513 0%, #DC143C 100%);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.wp-nav-menu a:hover::after,
.wp-nav-menu .current-menu-item a::after {
    width: 100%;
}

/* ==============================================
   WordPress 投稿・固定ページ
   ============================================== */

.wp-post {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(139, 69, 19, 0.1);
    margin-bottom: 2rem;
}

.wp-post-title {
    color: #8B4513;
    font-weight: 600;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-family: 'Noto Serif JP', serif;
}

.wp-post-meta {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.wp-post-content {
    line-height: 1.8;
}

.wp-post-content h2 {
    color: #8B4513;
    font-weight: 600;
    margin: 2rem 0 1rem;
    font-family: 'Noto Serif JP', serif;
}

.wp-post-content h3 {
    color: #8B4513;
    font-weight: 500;
    margin: 1.5rem 0 0.75rem;
}

.wp-post-content p {
    margin-bottom: 1.5rem;
}

.wp-post-content ul,
.wp-post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.wp-post-content blockquote {
    background: #FFF8DC;
    border-left: 4px solid #DAA520;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

/* ==============================================
   WordPress コメント
   ============================================== */

.wp-comments {
    margin-top: 3rem;
}

.wp-comments-title {
    color: #8B4513;
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-family: 'Noto Serif JP', serif;
}

.wp-comment {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.wp-comment-author {
    font-weight: 600;
    color: #8B4513;
    margin-bottom: 0.5rem;
}

.wp-comment-meta {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.wp-comment-content {
    line-height: 1.7;
}

/* ==============================================
   WordPress ページネーション
   ============================================== */

.wp-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 3rem 0;
    gap: 0.5rem;
}

.wp-pagination a,
.wp-pagination span {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-decoration: none;
    color: #666;
    transition: all 0.3s ease;
}

.wp-pagination a:hover {
    background: #8B4513;
    color: white;
    border-color: #8B4513;
}

.wp-pagination .current {
    background: #DC143C;
    color: white;
    border-color: #DC143C;
}

/* ==============================================
   WordPress サイドバー
   ============================================== */

.wp-sidebar {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(139, 69, 19, 0.1);
}

/* ==============================================
   WordPress フッター
   ============================================== */

.wp-footer-menu {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.wp-footer-menu a {
    color: #FFF8DC;
    text-decoration: none;
    transition: color 0.3s ease;
}

.wp-footer-menu a:hover {
    color: #DAA520;
}

/* ==============================================
   カスタムフィールド対応
   ============================================== */

.wp-custom-fields {
    background: #FFF8DC;
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid #DAA520;
    margin: 2rem 0;
}

.wp-custom-field {
    margin-bottom: 1rem;
}

.wp-custom-field:last-child {
    margin-bottom: 0;
}

.wp-custom-field-label {
    font-weight: 600;
    color: #8B4513;
    margin-bottom: 0.25rem;
    display: block;
}

.wp-custom-field-value {
    color: #333;
}

/* ==============================================
   レスポンシブ対応
   ============================================== */

@media (max-width: 768px) {
    .wpcf7-form {
        padding: 1.5rem;
    }
    
    .wpcf7-form .wpcf7-radio,
    .wpcf7-form .wpcf7-checkbox {
        flex-direction: column;
    }
    
    .wpcf7-form .wpcf7-list-item {
        min-width: auto;
    }
    
    .wp-nav-menu {
        flex-direction: column;
    }
    
    .wp-nav-menu li {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .wp-pagination {
        flex-wrap: wrap;
    }
    
    .wp-footer-menu {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .wp-post,
    .wp-sidebar,
    .wpcf7-form {
        padding: 1rem;
    }
    
    .wp-post-title {
        font-size: 1.5rem;
    }
    
    .widget {
        padding: 1rem;
    }
}

/* ==============================================
   アクセシビリティ対応
   ============================================== */

/* スクリーンリーダー用 */
.screen-reader-text {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    word-wrap: normal !important;
    border: 0;
    padding: 0;
    margin: 0;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* ==============================================
   WordPress管理画面での表示調整
   ============================================== */

.wp-admin .wpcf7-form {
    max-width: 100%;
}

.wp-admin .wpcf7-form input,
.wp-admin .wpcf7-form select,
.wp-admin .wpcf7-form textarea {
    max-width: 100%;
}

/* ==============================================
   印刷対応
   ============================================== */

@media print {
    .wp-nav-menu,
    .wp-sidebar,
    .wpcf7-form .wpcf7-submit,
    .wp-comments-form {
        display: none;
    }
    
    .wp-post {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* ==============================================
   最終調整
   ============================================== */

/* WordPressのデフォルトスタイルとの調和 */
.wp-block-button__link {
    background: linear-gradient(135deg, #DC143C 0%, #b30f2f 100%);
    border-radius: 50px;
    padding: 12px 24px;
}

.wp-block-quote {
    border-left: 4px solid #DAA520;
    padding-left: 1rem;
    background: #FFF8DC;
    padding: 1rem 1rem 1rem 2rem;
    border-radius: 0 8px 8px 0;
}

/* Contact Form 7 との統合 */
.wpcf7 .screen-reader-response {
    position: absolute;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    height: 1px;
    width: 1px;
    margin: 0;
    padding: 0;
    border: 0;
}

/* ==============================================
   エンドオブファイル
   ============================================== */