/* Global Research Form Styles - With Header Integration */
/* เพิ่ม namespace และ specificity เพื่อป้องกันความขัดแย้งกับ style.css */
/* ปรับปรุงให้เข้ากับ header/menu ของเว็บไซต์หลัก */

/* Reset เฉพาะสำหรับ form page */
.research-form-page * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.research-form-page {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    /* เพิ่ม padding-top เพื่อให้เนื้อหาไม่ทับกับ fixed header */
    padding-top: 100px;
}

.research-form-page .main-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 80% 20%;
    gap: 30px;
    min-height: calc(100vh - 120px); /* ปรับให้เหมาะกับ header */
}

.research-form-page .form-section {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.research-form-page .form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.research-form-page .sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.research-form-page .sidebar-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.research-form-page .sidebar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.research-form-page .form-header {
    text-align: center;
    margin-bottom: 40px;
}

.research-form-page .form-header h1 {
    color: #333;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.research-form-page .form-header p {
    color: #666;
    font-size: 1.1rem;
    font-weight: 400;
}

.research-form-page .form-group {
    margin-bottom: 25px;
}

.research-form-page .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.research-form-page .required {
    color: #e74c3c;
    margin-left: 3px;
}

.research-form-page .form-control {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fafbfc;
}

.research-form-page .form-control:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.research-form-page .form-control:hover {
    border-color: #667eea;
    background-color: white;
}

.research-form-page select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.research-form-page .btn-submit {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 30px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 20px;
}

.research-form-page .btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.research-form-page .btn-submit:active {
    transform: translateY(-1px);
}

.research-form-page .info-section {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border-left: 5px solid #667eea;
}

.research-form-page .info-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 600;
}

.research-form-page .info-section p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* Sidebar Styles */
.research-form-page .sidebar h3 {
    color: #333;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.research-form-page .category-list {
    list-style: none;
    padding: 0;
}

.research-form-page .category-item {
    padding: 12px 15px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
    cursor: pointer;
}

.research-form-page .category-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.research-form-page .category-item h4 {
    color: #333;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.research-form-page .category-item p {
    color: #666;
    font-size: 0.8rem;
    line-height: 1.4;
}

.research-form-page .price-tag {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 5px;
}

.research-form-page .order-steps {
    list-style: none;
    padding: 0;
}

.research-form-page .order-step {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.research-form-page .order-step:last-child {
    border-bottom: none;
}

.research-form-page .step-number {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.research-form-page .step-text {
    color: #333;
    font-size: 0.9rem;
    line-height: 1.4;
}

.research-form-page .contact-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.research-form-page .contact-info h4 {
    margin-bottom: 15px;
    font-size: 1rem;
}

.research-form-page .contact-info p {
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.research-form-page .contact-info a {
    color: white;
    text-decoration: none;
    font-weight: 600;
}

.research-form-page .contact-info a:hover {
    text-decoration: underline;
}

.research-form-page .loading {
    display: none;
    text-align: center;
    margin-top: 20px;
}

.research-form-page .spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: research-form-spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes research-form-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .research-form-page .main-container {
        grid-template-columns: 75% 25%;
    }
}

@media (max-width: 768px) {
    .research-form-page {
        padding-top: 120px; /* เพิ่ม padding สำหรับ mobile menu */
    }
    
    .research-form-page .main-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .research-form-page .form-section {
        padding: 30px 20px;
    }

    .research-form-page .form-header h1 {
        font-size: 2rem;
    }

    .research-form-page .sidebar {
        order: -1;
    }

    .research-form-page .sidebar-card {
        padding: 20px;
    }
}

/* Override styles that might conflict with main site header */
.research-form-page .header {
    /* ให้ header ของเว็บไซต์หลักมี priority สูงสุด */
    z-index: 1001 !important;
}

/* ป้องกันการทับซ้อนของ styles กับ main site */
.research-form-page .nav-link {
    /* ไม่ให้ styles ของ form page ไปกระทบ navigation */
    color: inherit !important;
    text-decoration: inherit !important;
}

/* เพิ่ม smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* ปรับปรุง focus states สำหรับ accessibility */
.research-form-page .form-control:focus,
.research-form-page .btn-submit:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}
