:root {
    --primary-color: #e74c3c;
    --secondary-color: #c0392b;
    --accent-color: #3498db;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --dark-gray: #444;
    --white: #fff;
    --section-padding: 80px 0;
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Prompt', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 15px;
    display: inline-block;
}

.section-title h2:after {
    content: '';
    position: absolute;
    width: 70px;
    height: 3px;
    background: var(--primary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 15px 0;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.header.scrolled {
    padding: 10px 0;
    background-color: rgba(255, 255, 255, 0.98);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    transition: var(--transition);
}

.scrolled .logo img {
    height: 40px;
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0 15px;
}

.nav-link {
    display: block;
    padding: 5px 0;
    color: var(--text-color);
    font-weight: 600;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover:after,
.nav-link.active:after {
    width: 100%;
}

.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-color);
    transition: var(--transition);
}

.mobile-nav-toggle:hover {
    color: var(--primary-color);
}

.header-buttons {
    display: flex;
    align-items: center;
}

.header-button {
    margin-left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--light-gray);
    color: var(--dark-gray);
    transition: var(--transition);
}

.header-button:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Hero Section */
/* Hero Section แบบภาพเต็มความกว้างหน้าจอ */
.hero {
    padding-top: 80px;
    /* ระยะห่างจาก header */
    position: relative;
    margin-bottom: 30px;
}

.hero-image-fullwidth {
    width: 100%;
    position: relative;
    overflow: hidden;
    /*height: 60vh;*/
    /* ความสูง 60% ของความสูงหน้าจอ */
    min-height: 400px;
    /* ความสูงขั้นต่ำ */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.hero-image-fullwidth img {
    width: 100%;
    height: 100%;
    /*object-fit: cover;*/
    /* ทำให้ภาพ cover พื้นที่ทั้งหมดโดยไม่บิดเบี้ยว */
    display: block;
    transition: transform 0.5s ease;
}

.hero-image-fullwidth:hover img {
    transform: scale(1.02);
}

.hero-buttons-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

/* บนอุปกรณ์มือถือ */
@media (max-width: 768px) {
    .hero-image-fullwidth {
        height: 40vh;
        /* ความสูงน้อยลงบนมือถือ */
        min-height: 250px;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
        margin-bottom: 10px;
        text-align: center;
    }
}

/* บนจอขนาดใหญ่ */
@media (min-width: 1400px) {
    .hero-image-fullwidth {
        /*height: 70vh;*/
        /* ความสูงมากขึ้นบนจอขนาดใหญ่ */
    }
}

/* About Section */
.about {
    padding: var(--section-padding);
    background-color: var(--light-gray);
}

.about-content {
    display: flex;
    align-items: center;
}

.about-text {
    flex: 1;
    padding-right: 30px;
}

.about-image {
    flex: 1;
}

.about-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.about-features {
    margin-top: 30px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.feature-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    margin-right: 15px;
}

.feature-text h4 {
    margin-bottom: 5px;
}

/* Cars Section */
.cars {
    padding: var(--section-padding);
}

.car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.car-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.car-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.car-image {
    /*height: 200px;*/
    overflow: hidden;
}

.car-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.car-card:hover .car-image img {
    transform: scale(1.05);
}

.car-details {
    padding: 20px;
}

.car-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.car-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Services Section */
.services {
    padding: var(--section-padding);
    background-color: var(--light-gray);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.service-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-gray);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 1.8rem;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: var(--primary-color);
    color: var(--white);
}

.service-title {
    margin-bottom: 15px;
}

/* Testimonials Section */
.testimonials {
    padding: var(--section-padding);
}

.testimonial-slider {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.testimonial-item {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 20px;
    border: 3px solid var(--primary-color);
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-quote {
    font-style: italic;
    position: relative;
    padding: 0 20px;
    margin-bottom: 20px;
}

.testimonial-quote:before,
.testimonial-quote:after {
    content: '"';
    font-size: 2rem;
    color: var(--primary-color);
}

.testimonial-author {
    font-weight: 700;
    color: var(--primary-color);
}

/* Contact Section */
.contact {
    padding: var(--section-padding);
    background-color: var(--light-gray);
}

.contact-container {
    display: flex;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.contact-info {
    flex: 1;
    padding: 40px;
    background: var(--primary-color);
    color: var(--white);
}

.contact-info h3 {
    margin-bottom: 30px;
    color: var(--white);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.contact-icon {
    font-size: 1.5rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.contact-text {
    font-size: 1.1rem;
}

.social-links {
    display: flex;
    margin-top: 30px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    margin-right: 10px;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--white);
    color: var(--primary-color);
}

.contact-form {
    flex: 1;
    padding: 40px;
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
    outline: none;
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
.footer {
    background: var(--dark-gray);
    color: var(--white);
    padding: 60px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-column h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.5rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background: var(--primary-color);
}

.footer-about p {
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--white);
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.footer-links a i {
    margin-right: 10px;
    color: var(--primary-color);
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.footer-newsletter p {
    margin-bottom: 20px;
}

.newsletter-form {
    display: flex;
}

.newsletter-form input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.newsletter-form button {
    padding: 10px 15px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: var(--secondary-color);
}

.footer-bottom {
    background: var(--dark-gray);
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin: 0;
}

/* Fixed Contact Buttons */
.fixed-contact {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.contact-btn:hover {
    transform: scale(1.1);
    background: var(--secondary-color);
}

.contact-btn.line {
    background: #06C755;
}

.contact-btn.phone {
    background: #3498db;
}

.contact-btn.facebook {
    background: #3b5998;
}

.contact-btn.messenger {
    background: #0084ff;
}

/* Scroll To Top */
.scroll-top {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    box-shadow: var(--shadow);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.scroll-top.active {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

/* Google Translate Dropdown */
.google-translate-element {
    margin-left: 15px;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.show {
    opacity: 1;
    transform: translateY(0);
}

/* เพิ่ม CSS สำหรับส่วน Contact เพื่อให้สวยงามยิ่งขึ้น */

/* รูปแบบการ์ดติดต่อใหม่ */
.contact-full {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.contact-card {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    position: relative;
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--primary-color);
    transition: height 0.3s ease;
}

.contact-card:hover::before {
    height: 10px;
}

.contact-card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(231, 76, 60, 0.15);
    color: var(--primary-color);
    font-size: 30px;
    transition: all 0.3s ease;
}

.contact-card:hover .contact-card-icon {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.contact-card h3 {
    margin-bottom: 10px;
    font-size: 22px;
    color: var(--primary-color);
}

.contact-card p {
    color: var(--dark-gray);
    margin-bottom: 20px;
    min-height: 48px;
}

.contact-card-value {
    margin-top: 15px;
}

.btn-contact {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 30px;
    transition: all 0.3s ease;
    color: #fff;
    background-color: var(--primary-color);
    border: 2px solid var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.btn-contact:hover {
    background-color: transparent;
    color: var(--primary-color);
}

/* LINE ボタン */
.line-bg {
    background-color: rgba(0, 185, 0, 0.15);
    color: #00B900;
}

.contact-card:hover .line-bg {
    background-color: #00B900;
    color: white;
}

.line-btn {
    background-color: #00B900;
    border-color: #00B900;
}

.line-btn:hover {
    color: #00B900;
}

/* Facebook ボタン */
.facebook-bg {
    background-color: rgba(59, 89, 152, 0.15);
    color: #3b5998;
}

.contact-card:hover .facebook-bg {
    background-color: #3b5998;
    color: white;
}

.facebook-btn {
    background-color: #3b5998;
    border-color: #3b5998;
}

.facebook-btn:hover {
    color: #3b5998;
}

/* Location */
.location-bg {
    background-color: rgba(52, 152, 219, 0.15);
    color: #3498db;
}

.contact-card:hover .location-bg {
    background-color: #3498db;
    color: white;
}

.location-text {
    text-align: left;
}

.location-text p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: auto;
}

.location-text p i {
    margin-right: 10px;
}

/* Google Maps */
.map-container {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.map-container:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

/* Media Queries */
@media (max-width: 992px) {
    .contact-full {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .contact-full {
        grid-template-columns: 1fr;
    }
    
    .contact-card {
        max-width: 400px;
        margin: 0 auto;
    }
}

/* Responsive Styles */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        right: -300px;
        width: 280px;
        height: calc(100vh - 80px);
        background: var(--white);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        padding: 20px;
        z-index: 999;
        transition: var(--transition);
        overflow-y: auto;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
    }

    .nav-item {
        margin: 15px 0;
    }

    .mobile-nav-toggle {
        display: block;
    }

    .header-buttons {
        margin-right: 40px;
    }

    .about-content {
        flex-direction: column;
    }

    .about-text {
        padding-right: 0;
        margin-bottom: 30px;
    }

    .contact-container {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-buttons .btn {
        margin-bottom: 10px;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .car-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .header-buttons .header-button {
        /*display: none;*/
    }

    .header-buttons .header-button:first-child {
        display: flex;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .feature-item {
        flex-direction: column;
        text-align: center;
    }

    .feature-icon {
        margin: 0 auto 15px;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .fixed-contact {
        right: 10px;
        bottom: 10px;
    }

    .scroll-top {
        left: 10px;
        bottom: 10px;
    }
}