/* ============================================
   お問い合わせページ専用CSS（新デザイン）
   左右2カラムレイアウト + メールアニメーション対応
   ============================================ */

/* リセット */
.contact-page * {
    box-sizing: border-box;
}

/* ============================================
   Hero Section
   ============================================ */
.contact-hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 120px 20px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 48%, rgba(0,0,0,0.02) 50%, transparent 52%);
    background-size: 40px 40px;
    pointer-events: none;
}

.contact-hero__inner {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.contact-hero__label {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 3px;
    color: rgba(0, 0, 0, 0.6);
    margin-bottom: 15px;
    text-transform: uppercase;
}

.contact-hero__title {
    font-size: 48px;
    font-weight: 700;
    color: #000;
    margin-bottom: 20px;
    line-height: 1.2;
}

.contact-hero__subtitle {
    font-size: 18px;
    color: rgba(0, 0, 0, 0.8);
    line-height: 1.6;
}

/* ============================================
   Contact Form Section
   ============================================ */
.contact-form-section {
    padding: 80px 20px;
    background: #fff;
}

.contact-form-container {
    max-width: 900px;
    margin: 0 auto;
}

/* ============================================
   Contact Form 7 スタイリング（2カラムレイアウト）
   ============================================ */
.contact-form-wrapper {
    background: #fff;
    padding: 50px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 80px;
}

/* CF7 Notice */
.cf7-notice {
    background: #fff3cd;
    border: 2px dashed #ffc107;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
}

.cf7-notice p {
    margin: 0;
    font-size: 16px;
    color: #856404;
    font-weight: 500;
}

/* フォーム要素の基本スタイル */
.contact-form-wrapper .wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* フォーム行（左右2カラム） */
.contact-form-wrapper .wpcf7-form > p,
.contact-form-wrapper .wpcf7-form > div {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 30px;
    align-items: start;
    margin: 0;
}

/* ラベル（左側） */
.contact-form-wrapper label {
    padding-top: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 0;
}

/* 必須バッジ（緑） */
.contact-form-wrapper .badge-required,
.contact-form-wrapper label .required {
    display: inline-block;
    background: #4CAF50;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 3px;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 任意バッジ（グレー） */
.contact-form-wrapper .badge-optional,
.contact-form-wrapper label .optional {
    display: inline-block;
    background: #9e9e9e;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 3px;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* テキスト入力・テキストエリア */
.contact-form-wrapper input[type="text"],
.contact-form-wrapper input[type="email"],
.contact-form-wrapper input[type="tel"],
.contact-form-wrapper textarea {
    width: 100%;
    padding: 12px 15px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #333;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.contact-form-wrapper input[type="text"]:focus,
.contact-form-wrapper input[type="email"]:focus,
.contact-form-wrapper input[type="tel"]:focus,
.contact-form-wrapper textarea:focus {
    outline: none;
    border-color: #000;
}

.contact-form-wrapper textarea {
    min-height: 150px;
    resize: vertical;
}

/* チェックボックスグループ */
.contact-form-wrapper .wpcf7-checkbox,
.contact-form-wrapper .wpcf7-radio {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-form-wrapper .wpcf7-list-item {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-form-wrapper input[type="checkbox"],
.contact-form-wrapper input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
}

.contact-form-wrapper .wpcf7-list-item-label {
    font-size: 15px;
    color: #333;
    cursor: pointer;
    font-weight: normal;
}

/* 送信ボタン */
.contact-form-wrapper input[type="submit"],
.contact-form-wrapper button[type="submit"] {
    grid-column: 1 / -1;
    justify-self: center;
    width: 100%;
    max-width: 400px;
    padding: 18px 50px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: #000;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.contact-form-wrapper input[type="submit"]:hover,
.contact-form-wrapper button[type="submit"]:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* CF7 バリデーションメッセージ */
.contact-form-wrapper .wpcf7-not-valid-tip {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 5px;
    display: block;
    grid-column: 2 / -1;
}

.contact-form-wrapper .wpcf7-response-output {
    grid-column: 1 / -1;
    margin: 20px 0 0;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
}

.contact-form-wrapper .wpcf7-mail-sent-ok {
    background: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
}

.contact-form-wrapper .wpcf7-validation-errors,
.contact-form-wrapper .wpcf7-mail-sent-ng {
    background: #f8d7da;
    border: 2px solid #e74c3c;
    color: #721c24;
}

/* スピナー（送信中） */
.contact-form-wrapper .wpcf7-spinner {
    margin-left: 15px;
}

/* ============================================
   メールアニメーション
   ============================================ */
.mail-animation-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    pointer-events: none;
}

.mail-icon {
    width: 120px;
    height: 120px;
    animation: flyAway 3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.mail-icon svg {
    width: 100%;
    height: 100%;
    fill: white;
    stroke: #000;
    stroke-width: 2;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.2));
}

@keyframes flyAway {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0.3) rotate(0deg);
    }
    15% {
        opacity: 1;
        transform: translate(0, 0) scale(1.1) rotate(0deg);
    }
    25% {
        opacity: 1;
        transform: translate(-20px, -50px) scale(1.15) rotate(-5deg);
    }
    35% {
        opacity: 1;
        transform: translate(-45px, -110px) scale(1.1) rotate(-10deg);
    }
    45% {
        opacity: 1;
        transform: translate(-75px, -180px) scale(1) rotate(-15deg);
    }
    55% {
        opacity: 0.95;
        transform: translate(-110px, -260px) scale(0.9) rotate(-20deg);
    }
    65% {
        opacity: 0.85;
        transform: translate(-150px, -350px) scale(0.8) rotate(-25deg);
    }
    75% {
        opacity: 0.7;
        transform: translate(-195px, -450px) scale(0.65) rotate(-30deg);
    }
    85% {
        opacity: 0.5;
        transform: translate(-245px, -560px) scale(0.5) rotate(-35deg);
    }
    95% {
        opacity: 0.2;
        transform: translate(-300px, -680px) scale(0.35) rotate(-40deg);
    }
    100% {
        opacity: 0;
        transform: translate(-350px, -800px) scale(0.2) rotate(-45deg);
    }
}

/* オーバーレイ */
.success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeInOut 3s ease-in-out forwards;
}

.success-message {
    background: #fff;
    padding: 40px 60px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.5s ease-out forwards;
}

.success-message h3 {
    font-size: 24px;
    font-weight: 700;
    color: #4CAF50;
    margin-bottom: 15px;
}

.success-message p {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes slideUp {
    0% {
        transform: translateY(50px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============================================
   Contact Information
   ============================================ */
.contact-info {
    text-align: center;
    padding-top: 60px;
    border-top: 2px solid #eee;
}

.contact-info__title {
    font-size: 28px;
    font-weight: 700;
    color: #000;
    margin-bottom: 40px;
}

.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.contact-info-item {
    padding: 30px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.contact-info-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-info-item__icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.contact-info-item:hover .contact-info-item__icon {
    background: #fff;
    border: 2px solid #000;
}

.contact-info-item__icon svg {
    width: 28px;
    height: 28px;
    stroke: #fff;
    transition: stroke 0.3s ease;
}

.contact-info-item:hover .contact-info-item__icon svg {
    stroke: #000;
}

.contact-info-item h4 {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    margin-bottom: 15px;
}

.contact-info-item__value {
    font-size: 20px;
    font-weight: 700;
    color: #000;
    margin-bottom: 10px;
}

.contact-info-item__note {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.6);
}

.contact-info-item__note a {
    color: #000;
    text-decoration: underline;
    transition: opacity 0.3s ease;
}

.contact-info-item__note a:hover {
    opacity: 0.7;
}

/* ============================================
   レスポンシブデザイン
   ============================================ */

/* タブレット */
@media (max-width: 1024px) {
    .contact-hero {
        padding: 100px 30px 60px;
    }

    .contact-hero__title {
        font-size: 40px;
    }

    .contact-form-wrapper {
        padding: 40px 30px;
    }

    .contact-form-wrapper .wpcf7-form > p,
    .contact-form-wrapper .wpcf7-form > div {
        grid-template-columns: 150px 1fr;
        gap: 20px;
    }

    .contact-info-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* スマートフォン */
@media (max-width: 768px) {
    .contact-hero {
        padding: 80px 20px 50px;
    }

    .contact-hero__title {
        font-size: 32px;
    }

    .contact-hero__subtitle {
        font-size: 16px;
    }

    .contact-form-section {
        padding: 60px 20px;
    }

    .contact-form-wrapper {
        padding: 30px 20px;
    }

    /* モバイルでは1カラムに */
    .contact-form-wrapper .wpcf7-form > p,
    .contact-form-wrapper .wpcf7-form > div {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .contact-form-wrapper label {
        padding-top: 0;
    }

    .contact-form-wrapper input[type="submit"],
    .contact-form-wrapper button[type="submit"] {
        width: 100%;
        max-width: none;
    }

    .contact-info {
        padding-top: 40px;
    }

    .contact-info__title {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .contact-info-grid {
        gap: 20px;
    }
}
