@charset "utf-8";

/* ==================================================
   Variables & Reset (Overwrites/Additions)
   ================================================== */
:root {
    --primary-color: #00388d;
    --primary-hover: #002a6b;
    --bg-light: #f5f8ff;
    --text-color: #333333;
    --text-muted: #666666;
    --font-mincho: 'Zen Old Mincho', serif;
    --font-gothic: 'IBM Plex Sans JP', sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ==================================================
   Section 1 (FV Area for Contact)
   ================================================== */
.contact-fv {
    position: relative;
    padding: 220px 0 100px;
    background-color: #ffffff; /* 背景を白に統一 */
    overflow: hidden;
    z-index: 10; /* フッターアニメーションが被るのを防ぐ */
}

.contact-header {
    text-align: center;
}

.contact-en-title {
    font-size: 14px;
    letter-spacing: 0.2em;
    margin-bottom: 15px;
    font-family: var(--font-gothic);
    color: var(--primary-color);
}

.contact-jp-title {
    font-size: 32px;
    font-family: var(--font-mincho);
    letter-spacing: 0.1em;
    color: #111111; /* 黒に変更 */
    font-weight: 700;
}

/* ==================================================
   Section 2 (Form Styles)
   ================================================== */
.contact-form-section {
    padding: 40px 0 150px;
    background-color: #ffffff;
}

/* PCサイズのみ、フッターアニメーションが上に重なるのを防ぐために手前へ */
@media (min-width: 769px) {
    .contact-form-section {
        position: relative;
        z-index: 10;
    }
}

/* タブレットサイズのみ、フッターアニメーションが上に重なるのを防ぐ */
@media (min-width: 451px) and (max-width: 768px) {
    .contact-form-section {
        position: relative;
        z-index: 10;
    }
}

.form-inner {
    max-width: 800px;
    margin: 0 auto;
}

.form-intro {
    text-align: center;
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 60px;
    line-height: 1.8;
}

#custom-contact-form {
    background: #ffffff;
    padding: 60px 50px;
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0, 56, 141, 0.04), 0 5px 15px rgba(0, 0, 0, 0.01);
    border: 1px solid rgba(0, 56, 141, 0.05);
}

.form-group {
    margin-bottom: 35px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #222222;
    margin-bottom: 12px;
}

/* 必須マーク */
.form-group.required .form-label::after {
    content: "必須";
    display: inline-block;
    background-color: #e74c3c;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    margin-left: 10px;
    vertical-align: middle;
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    font-size: 15px;
    color: var(--text-color);
    background-color: #fafdff;
    border: 1px solid rgba(0, 56, 141, 0.15);
    border-radius: 8px;
    transition: var(--transition-smooth);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 56, 141, 0.08);
}

.form-control::placeholder {
    color: #bbbbbb;
}

.form-control.textarea {
    resize: vertical;
    line-height: 1.6;
}

/* ==================================================
   Radio buttons & Checkboxes
   ================================================== */
.radio-group, .checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 20px;
    margin-top: 10px;
}

.radio-label, .checkbox-label {
    display: inline-flex;
    align-items: flex-start;
    font-size: 14px;
    color: var(--text-color);
    cursor: pointer;
    user-select: none;
    line-height: 1.5;
    transition: var(--transition-smooth);
}

.radio-label input, .checkbox-label input {
    margin-top: 4px;
    margin-right: 10px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.radio-label span, .checkbox-label span {
    display: inline-block;
    transition: var(--transition-smooth);
}

.radio-label:hover span, .checkbox-label:hover span {
    color: var(--primary-color);
}

/* ==================================================
   Submit Button
   ================================================== */
.form-submit-wrap {
    text-align: center;
    margin-top: 60px;
}

.form-submit-btn {
    display: inline-block;
    padding: 18px 80px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-color) 0%, #002255 100%);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 56, 141, 0.12);
    transition: var(--transition-smooth);
}

.form-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 56, 141, 0.22);
}

/* ==================================================
   Thanks Page Specific
   ================================================== */
.thanks-inner {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.thanks-heading {
    font-family: var(--font-mincho);
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.thanks-message {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 2;
    margin-bottom: 50px;
}

.thanks-btn-wrap {
    margin-top: 30px;
}

.thanks-back-btn {
    display: inline-block;
    padding: 15px 50px;
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 30px;
    background-color: transparent;
    transition: var(--transition-smooth);
    text-decoration: none; /* 下線を消す */
}

.thanks-back-btn:hover {
    color: #ffffff;
    background-color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(0, 56, 141, 0.15);
}

/* Footer Contact Link Styles */
.contact-link {
    color: inherit;
    text-decoration: none;
    pointer-events: none; /* デフォルト(PC/TB)はクリック不可 */
    cursor: default;
}

/* ==================================================
   Responsive Design for Form
   ================================================== */
@media (max-width: 768px) {
    .header { padding: 0 20px 0 35px; height: 70px; background-color: #FFFFFF; position: fixed; width: 100%; top: 0; left: 0; }
    .contact-fv {
        padding: 160px 0 60px;
    }
    .contact-title {
        font-size: 32px;
    }
    #custom-contact-form {
        padding: 40px 24px;
    }
    .radio-group, .checkbox-group {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .form-submit-btn {
        width: 100%;
        padding: 16px 0;
    }
    .thanks-heading {
        font-size: 22px;
    }
    
    /* タブレットサイズでもアニメーションを無効化（最初から表示） */
    .fade-in-target, .fade-in-blur, .fade-in-right, .fade-in-left {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        visibility: visible !important;
    }
}

/* ==================================================
   Footer Padding Override (No sticky banner)
   ================================================== */
@media (max-width: 768px) {
    .footer {
        padding-bottom: 80px !important;
    }
}

@media (max-width: 450px) {
    .header { padding: 0 15px 0 25px !important; height: 70px !important; }
    
    /* スマホサイズのみ、ご相談・お問い合わせの文字間を詰め、サイズを28pxに */
    .contact-jp-title {
        letter-spacing: 0;
        font-size: 28px;
    }
    
    /* スマホサイズのみ、Contactの下の余白を半分に (元15px) */
    .contact-en-title {
        margin-bottom: 8px;
    }
    
    /* スマホサイズのみ、タイトルと小さい文字の間の余白を半分に */
    .contact-fv {
        padding-bottom: 30px; /* タブレット以下では60pxだったので半分に */
    }
    .contact-form-section {
        position: relative;
        z-index: 10;
        padding-top: 20px; /* PC/タブレットでは40pxだったので半分に */
    }
    
    /* スマホサイズのみ、form-introの改行をなくす */
    .sp-hide {
        display: none;
    }
    
    /* スマホサイズのみ、フッターアニメーションが上に重なるのを防ぐ */
    .contact-form-section {
        position: relative;
        z-index: 10;
    }
    
    /* スマホサイズのみ、電話番号やメールアドレスをクリック可能にする */
    .contact-link {
        pointer-events: auto !important;
    }
    
    /* Safari等でのフェードイン初期発火遅延対策：スマホサイズではフェードイン待機状態を解除して最初から表示させる */
    .fade-in-target, .fade-in-blur, .fade-in-right, .fade-in-left {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        visibility: visible !important;
    }
}
