@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&display=swap');



/* 質問スタイル */
.question {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.question h2 {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.instruction {
    font-size: 14px;
    color: #000000;
    margin-bottom: 15px;
    font-style: normal;
}

/* 入力フィールド */
.input-group {
    margin: 15px 0;
}

input[type="text"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

/* ラジオボタンとチェックボックス */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px 20px;
    width: 100%;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    padding-left: 28px;
    white-space: nowrap;
    position: relative;
    min-height: 24px;
    margin: 0;
}

.checkbox-group .other {
    grid-column: 1 / -1;
}

.checkbox-group .other-input {
    grid-column: 1 / -1;
    margin-left: 28px;
    padding-left: 0;
    margin-top: -5px;
    margin-bottom: 10px;
    padding-top: 5px;
    border-top: 1px solid #eee;
}

label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
    position: relative;
    min-height: 24px;
    padding-left: 28px;
}

label.other {
    width: 100%;
    margin-top: 10px;
    align-items: flex-start;
    color: #000000;
    font-weight: normal;
}

input[type="radio"],
input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    position: absolute;
    left: 0;
    margin: 0;
    top: 50%;
    transform: translateY(-50%);
}

.radio-with-input {
    margin-bottom: 10px;
}

.additional-input {
    margin: 10px 0 10px 28px;
}

.additional-input:not(.stacked) {
    display: flex;
    align-items: center;
    gap: 10px;
}

.additional-input.stacked {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 10px;
}

.other-input {
    margin: 5px 0 15px 28px;
    width: 100%;
    background-color: transparent;
    padding: 5px 0;
}

.other-input input {
    width: 100%;
    max-width: 400px;
}

.additional-input input,
.other-input input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* 送信ボタン */
.form-footer {
    text-align: center;
    margin: 40px 0 20px;
}

.submit-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #2980b9;
}

/* フッター */
footer {
    margin-top: 40px;
    padding-top: 20px;
    color: #000000;
    font-size: 14px;
    line-height: 1.6;
}

/* アンケートトップ */
.questionnaire-top {
    margin-top: 120px;
} 

/* レスポンシブデザイン */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .checkbox-group {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px 10px;
    }
    
    .checkbox-group label {
        white-space: normal;
        padding-left: 24px;
        min-height: 22px;
        word-break: break-word;
    }
    
    .question {
        padding: 12px;
        margin-bottom: 20px;
    }
    
    h1 {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .question h2 {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .instruction {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    .radio-group {
        gap: 8px;
    }
    
    .other-input {
        margin: 5px 0 10px 0 !important;
        width: 100% !important;
        padding: 0 !important;
        grid-column: 1 / -1 !important;
    }
    
    .other-input input {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        margin: 0 !important;
    }
    
    .checkbox-group .other {
        grid-column: 1 / -1 !important;
        margin-bottom: 5px !important;
    }
    
    .checkbox-group {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px 10px !important;
        width: 100% !important;
    }
    
    footer {
        font-size: 13px;
        margin-top: 30px;
        padding-top: 15px;
    }
    
    .form-footer {
        margin: 30px 0 15px;
    }
    
    .submit-btn {
        width: 100%;
        padding: 12px;
    }
    /* アンケートトップ */
.questionnaire-top {
    margin-top: 120px;
} 

}

/* 条件付き質問のアニメーション */
.conditional {
    transition: all 0.3s ease-in-out;
    overflow: hidden;
}
