/* モーダルフォームスタイル */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border-radius: 16px 16px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.close {
    color: white;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.close:hover,
.close:focus {
    opacity: 0.7;
}

.modal-body {
    padding: 2rem;
}

.modal-description {
    text-align: center;
    margin-bottom: 2rem;
    color: #6b7280;
    font-size: 1rem;
    line-height: 1.6;
}

/* Form-mailerフォーム用スタイル */
.form-container {
    width: 100%;
    margin-top: 1rem;
}

.formmailer-embed {
    background: transparent !important;
}

.formmailer-embed table {
    width: 100% !important;
    border: none !important;
    background: transparent !important;
}

.formmailer-embed td {
    padding: 0.5rem 0 !important;
    border: none !important;
    background: transparent !important;
}

.formmailer-embed input[type="text"],
.formmailer-embed input[type="email"],
.formmailer-embed input[type="tel"],
.formmailer-embed textarea,
.formmailer-embed select {
    width: 100% !important;
    padding: 0.875rem !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    font-family: inherit !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
    box-sizing: border-box !important;
    background: white !important;
}

.formmailer-embed input[type="text"]:focus,
.formmailer-embed input[type="email"]:focus,
.formmailer-embed input[type="tel"]:focus,
.formmailer-embed textarea:focus,
.formmailer-embed select:focus {
    outline: none !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}

.formmailer-embed input[type="submit"] {
    width: 100% !important;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: white !important;
    border: none !important;
    padding: 1rem 2rem !important;
    border-radius: 8px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    margin-top: 1rem !important;
}

.formmailer-embed input[type="submit"]:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3) !important;
}

.formmailer-embed th {
    color: #1f2937 !important;
    font-weight: 600 !important;
    text-align: left !important;
    padding: 0.5rem 0 !important;
    border: none !important;
    background: transparent !important;
}

/* エラーメッセージのスタイル */
.formmailer-embed .error {
    color: #dc2626 !important;
    font-size: 0.875rem !important;
    margin-top: 0.5rem !important;
}

/* ボタンサイズ統一 */
.btn-primary, .btn-secondary, .btn-outline {
    min-width: 180px;
    text-align: center;
    white-space: nowrap;
}

/* ヒーローセクションのボタン調整 */
.hero-cta .btn-primary,
.hero-cta .btn-secondary, 
.hero-cta .btn-outline {
    min-width: 200px;
}

/* CTAセクションのボタン調整 */
.cta-option .btn-primary,
.cta-option .btn-secondary,
.cta-option .btn-outline {
    min-width: 200px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .close {
        font-size: 24px;
    }
    
    .formmailer-embed table,
    .formmailer-embed tbody,
    .formmailer-embed tr,
    .formmailer-embed td,
    .formmailer-embed th {
        display: block !important;
        width: 100% !important;
    }
    
    .formmailer-embed th {
        margin-bottom: 0.25rem !important;
    }
    
    .formmailer-embed td {
        margin-bottom: 1rem !important;
    }
    
    /* モバイルでのボタンサイズ調整 */
    .btn-primary, .btn-secondary, .btn-outline {
        width: 100%;
        min-width: auto;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }
}