/* ตั้งค่าพื้นฐาน */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Kanit', Arial, sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&display=swap');

body {
    background-color: #f5f9f5;
    background-image: linear-gradient(135deg, #f5f9f5 0%, #eefbf3 100%);
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    position: relative;
    padding: 2rem 1rem;
    z-index: 1;
}

.content-row {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    max-width: 1200px;
    position: relative;
    z-index: 2;
    padding: 20px;
    backdrop-filter: blur(10px);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.5s ease;
}

/* ส่วนของคลื่นด้านล่าง */
.wave-bottom {
    position: fixed; 
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23FFFFFF" fill-opacity="1" d="M0,96L80,106.7C160,117,320,139,480,133.3C640,128,800,96,960,90.7C1120,85,1280,107,1360,117.3L1440,128L1440,320L1360,320C1280,320,1120,320,960,320C800,320,640,320,480,320C320,320,160,320,80,320L0,320Z"></path></svg>');
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 0;
    pointer-events: none;
}

/* วงกลมที่ขยายในพื้นหลัง */
.circles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.circle {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    opacity: 0;
    z-index: 0;
}

.circle1 {
    width: 600px;
    height: 600px;
    background-color: rgba(79, 209, 139, 0.08);
    bottom: 5%;
    right: 25%;
    animation: pulse 15s infinite;
}

.circle2 {
    width: 500px;
    height: 500px;
    background-color: rgba(58, 183, 118, 0.06);
    bottom: 10%;
    right: 20%;
    animation: pulse 10s infinite 2s;
}

.circle3 {
    width: 400px;
    height: 400px;
    background-color: rgba(46, 122, 106, 0.04);
    bottom: 15%;
    right: 15%;
    animation: pulse 7s infinite 1s;
}

.circle4 {
    width: 300px;
    height: 300px;
    background-color: rgba(79, 209, 139, 0.05);
    top: 10%;
    left: 15%;
    animation: pulse 12s infinite 1.5s;
}

.circle5 {
    width: 250px;
    height: 250px;
    background-color: rgba(46, 122, 106, 0.04);
    top: 20%;
    left: 30%;
    animation: pulse 9s infinite 0.5s;
}

@keyframes pulse {
    0% {
        transform: scale(0);
        opacity: 0.6;
    }
    70% {
        opacity: 0.2;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* ส่วนหลักของหน้า dealers */
.dealers-section {
    flex: 1;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
}

.dealers-page-title {
    color: #2e7a6a;
    font-size: 3rem;
    margin-bottom: 3rem;
    text-align: center;
    font-weight: 700;
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.5);
    position: relative;
    display: inline-block;
    width: 100%;
}

.dealers-page-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 4px;
    background: linear-gradient(90deg, #4fd18b, #2e7a6a);
    border-radius: 2px;
}

/* ส่วนข้อมูลโอกาสทางธุรกิจ */
.opportunity-section {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 3rem;
    box-shadow: 0 12px 30px rgba(46, 122, 106, 0.1);
    position: relative;
    overflow: hidden;
}

.opportunity-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4fd18b, #2e7a6a);
}

.opportunity-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    justify-content: center;
}

.opportunity-header i {
    font-size: 2rem;
    color: #4fd18b;
    margin-right: 1rem;
}

.opportunity-header h2 {
    color: #2e7a6a;
    font-size: 2rem;
    font-weight: 600;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.benefit-card {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(79, 209, 139, 0.2);
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(79, 209, 139, 0.2);
    border-color: #4fd18b;
}

.benefit-card i {
    font-size: 2.5rem;
    color: #4fd18b;
    margin-bottom: 1rem;
    display: block;
}

.benefit-card h3 {
    color: #2e7a6a;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.benefit-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ส่วนแบบฟอร์ม */
.form-section {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 3rem;
    box-shadow: 0 12px 30px rgba(46, 122, 106, 0.1);
    position: relative;
    overflow: hidden;
}

.form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2e7a6a, #4fd18b);
}

.form-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    justify-content: center;
}

.form-header i {
    font-size: 2rem;
    color: #2e7a6a;
    margin-right: 1rem;
}

.form-header h2 {
    color: #2e7a6a;
    font-size: 1.8rem;
    font-weight: 600;
}

.dealer-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    color: #2e7a6a;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.form-group label i {
    margin-right: 0.5rem;
    color: #4fd18b;
    width: 16px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e1e1;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Kanit', Arial, sans-serif;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.9);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4fd18b;
    box-shadow: 0 0 0 3px rgba(79, 209, 139, 0.1);
    background-color: #fff;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Checkbox สไตล์ */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding-left: 2rem;
    color: #333;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.checkbox-label:hover input ~ .checkmark {
    border-color: #4fd18b;
}

.checkbox-label input:checked ~ .checkmark {
    background-color: #4fd18b;
    border-color: #4fd18b;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-label input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-label .checkmark:after {
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label.agreement {     
    grid-column: 1 / -1;     
    justify-self: center;     
    max-width: 1800px; /* เพิ่มจาก 600px */     
    text-align: center;     
    padding: 2rem;     
    background-color: rgba(79, 209, 139, 0.05);     
    border-radius: 10px;     
    border: 1px solid rgba(79, 209, 139, 0.2); 
}

.terms-link,
.privacy-link {
    color: #2e7a6a;
    text-decoration: none;
    font-weight: 500;
    margin: 0 0.2rem;
    transition: color 0.3s ease;
}

.terms-link:hover,
.privacy-link:hover {
    color: #4fd18b;
    text-decoration: underline;
}

/* ปุ่มในฟอร์ม */
.form-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.submit-btn,
.reset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border: none;
    border-radius: 30px;
    font-family: 'Kanit', Arial, sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 160px;
    position: relative;
    overflow: hidden;
}

.submit-btn {
    background: linear-gradient(135deg, #4fd18b 0%, #3ab371 50%, #2e7a6a 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(79, 209, 139, 0.4);
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 35px rgba(79, 209, 139, 0.5);
    background: linear-gradient(135deg, #5dd899 0%, #4bc47f 50%, #3a8874 100%);
}

.reset-btn {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    color: #666;
    border: 2px solid rgba(102, 102, 102, 0.3);
    box-shadow: 0 8px 25px rgba(102, 102, 102, 0.2);
}

.reset-btn:hover {
    transform: translateY(-4px) scale(1.02);
    background: #666;
    color: white;
    border-color: #666;
    box-shadow: 0 15px 35px rgba(102, 102, 102, 0.4);
}

.submit-btn i,
.reset-btn i {
    margin-right: 8px;
    font-size: 1.1rem;
}

.submit-btn:active,
.reset-btn:active {
    transform: translateY(-2px) scale(0.98);
}

/* ส่วนข้อมูลติดต่อ */
.contact-info-section {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 12px 30px rgba(46, 122, 106, 0.1);
    position: relative;
    overflow: hidden;
}

.contact-info-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4fd18b, #2e7a6a);
}

.contact-info-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.contact-info-header i {
    font-size: 1.8rem;
    color: #4fd18b;
    margin-right: 1rem;
}

.contact-info-header h2 {
    color: #2e7a6a;
    font-size: 1.6rem;
    font-weight: 600;
}

.contact-info-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.contact-method {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(79, 209, 139, 0.2);
}

.contact-method:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(79, 209, 139, 0.15);
    border-color: #4fd18b;
}

.contact-method i {
    font-size: 1.5rem;
    color: #4fd18b;
    margin-right: 1rem;
    width: 30px;
    text-align: center;
}

.contact-method div h4 {
    color: #2e7a6a;
    font-size: 1rem;
    margin: 0 0 0.2rem 0;
    font-weight: 600;
}

.contact-method div p {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

.contact-method a {
    color: #2e7a6a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-method a:hover {
    color: #4fd18b;
}

/* ปุ่มกลับ */
.back-buttons-wrapper {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn-back-contact,
.btn-back-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-family: 'Kanit', Arial, sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 14px 28px;
    border-radius: 30px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 220px;
    height: 52px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.btn-back-contact {
    background: linear-gradient(135deg, #4fd18b 0%, #3ab371 50%, #2e7a6a 100%);
    color: white;
    border: none;
    box-shadow: 0 8px 25px rgba(79, 209, 139, 0.4);
}

.btn-back-contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.btn-back-contact:hover::before {
    left: 100%;
}

.btn-back-contact:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 35px rgba(79, 209, 139, 0.5);
    background: linear-gradient(135deg, #5dd899 0%, #4bc47f 50%, #3a8874 100%);
}

.btn-back-home {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    color: #2e7a6a;
    border: 2px solid rgba(46, 122, 106, 0.3);
    box-shadow: 0 8px 25px rgba(46, 122, 106, 0.2);
}

.btn-back-home:hover {
    transform: translateY(-4px) scale(1.02);
    background: linear-gradient(135deg, #2e7a6a 0%, #3ab371 100%);
    color: white;
    border-color: #2e7a6a;
    box-shadow: 0 15px 35px rgba(46, 122, 106, 0.4);
}

.btn-back-contact i,
.btn-back-home i {
    margin-right: 8px;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.btn-back-contact:hover i,
.btn-back-home:hover i {
    transform: translateX(-3px);
}

.btn-back-contact:active,
.btn-back-home:active {
    transform: translateY(-2px) scale(0.98);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(245,249,245,0.95) 100%);
    backdrop-filter: blur(20px);
    margin: 10% auto;
    padding: 0;
    border: none;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(46, 122, 106, 0.3);
    overflow: hidden;
    animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, #4fd18b 0%, #2e7a6a 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.modal-header i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.modal-header h3 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
}

.modal-body {
    padding: 2rem;
    text-align: center;
}

.modal-body p {
    color: #333;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

.modal-footer {
    padding: 1rem 2rem 2rem;
    text-align: center;
}

.modal-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, #2e7a6a 0%, #4fd18b 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-family: 'Kanit', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.modal-close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(46, 122, 106, 0.3);
}

.modal-close-btn i {
    margin-right: 8px;
}

/* ปรับขนาดสำหรับหน้าจอขนาดใหญ่ */
@media (min-width: 1024px) {
    .dealers-page-title {
        font-size: 3.5rem;
    }
    
    .opportunity-header h2 {
        font-size: 2.2rem;
    }
    
    .form-header h2 {
        font-size: 2rem;
    }
    
    .wave-bottom {
        height: 200px;
    }
}

/* ปรับสำหรับหน้าจอมือถือ */
@media (max-width: 768px) {
    .container {
        padding: 1rem 0.5rem;
    }
    
    .content-row {
        padding: 15px;
    }
    
    .dealers-page-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .opportunity-section,
    .form-section,
    .contact-info-section {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .opportunity-header h2 {
        font-size: 1.5rem;
    }
    
    .form-header h2 {
        font-size: 1.4rem;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .form-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .submit-btn,
    .reset-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .contact-info-content {
        grid-template-columns: 1fr;
    }
    
    .back-buttons-wrapper {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-back-contact,
    .btn-back-home {
        width: 100%;
        max-width: 300px;
        font-size: 1rem;
        padding: 12px 24px;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .modal-header {
        padding: 1.5rem;
    }
    
    .modal-header i {
        font-size: 2.5rem;
    }
    
    .modal-header h3 {
        font-size: 1.3rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .dealers-page-title {
        font-size: 1.8rem;
    }
    
    .opportunity-header,
    .form-header,
    .contact-info-header {
        flex-direction: column;
        text-align: center;
    }
    
    .opportunity-header i,
    .form-header i,
    .contact-info-header i {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .benefit-card {
        padding: 1rem;
    }
    
    .contact-method {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-method i {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}
