/* Reset และ Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Kanit', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    font-size: 16px;
    text-transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #333;
}

.btn-outline {
    background: transparent;
    color: #ff6b35;
    border: 2px solid #ff6b35;
}

.btn-outline:hover {
    background: #ff6b35;
    color: white;
}

.btn-full {
    width: 100%;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 107, 53, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.navbar {
    padding: 18px 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
}

.nav-brand {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
    color: #ff6b35;
}

.nav-brand i {
    margin-right: 10px;
    font-size: 28px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 16px;
    border-radius: 8px;
    margin: 0 4px;
}

.nav-link:hover {
    color: #ff6b35;
    background: rgba(255, 107, 53, 0.08);
    transform: translateY(-1px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #ff6b35;
    transition: width 0.3s ease;
    border-radius: 1px;
}

.nav-link:hover::after {
    width: 60%;
}

.btn-appointment {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white !important;
    padding: 12px 24px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    margin: 0 8px;
}

.btn-appointment:hover {
    background: linear-gradient(135deg, #f7931e, #ff6b35) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

.btn-appointment::after {
    display: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-toggle:hover {
    background: rgba(255, 107, 53, 0.1);
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #444;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
    background: #ff6b35;
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
    background: #ff6b35;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    color: white;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.8), rgba(247, 147, 30, 0.8)),
                url('https://images.unsplash.com/photo-1619642751034-765dfdf7c58e?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -1;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 30px;
    color: #fff;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 30px;
    line-height: 1.8;
}

.hero-highlight {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    margin: 30px 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-highlight i {
    font-size: 24px;
    margin-right: 15px;
    color: #ffd700;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.section-header h2 i {
    color: #ff6b35;
    margin-right: 15px;
}

.section-header p {
    font-size: 1.2rem;
    color: #666;
}

/* Services Section */
.services {
    padding: 100px 0;
    background: #f8f9fa;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border-color: #ff6b35;
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
}

.service-icon i {
    font-size: 32px;
    color: white;
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.service-card ul {
    list-style: none;
    text-align: left;
}

.service-card li {
    padding: 8px 0;
    position: relative;
    padding-left: 25px;
    color: #666;
}

.service-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #ff6b35;
    font-weight: bold;
}

/* Car Brands Section */
.car-brands {
    padding: 100px 0;
    background: white;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.brand-group {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 15px;
}

.brand-group h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.brand-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.brand {
    background: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 500;
    color: #333;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.brand:hover {
    border-color: #ff6b35;
    color: #ff6b35;
    transform: translateY(-2px);
}

/* Gallery Section */
.gallery {
    padding: 100px 0;
    background: #f8f9fa;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255, 107, 53, 0.8), rgba(247, 147, 30, 0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-actions {
    text-align: center;
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.contact-item i {
    font-size: 24px;
    color: #ff6b35;
    margin-right: 20px;
    margin-top: 5px;
    width: 30px;
}

.contact-item h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.contact-item p {
    color: #666;
    line-height: 1.6;
}

.contact-item a {
    color: #ff6b35;
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

.contact-map {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Appointment Section */
.appointment {
    padding: 100px 0;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
}

.appointment .section-header h2,
.appointment .section-header p {
    color: white;
}

.appointment-form-container {
    max-width: 600px;
    margin: 0 auto;
}

.appointment-form {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    font-family: 'Kanit', sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff6b35;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-brand {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
    color: #ff6b35;
}

.footer-brand i {
    margin-right: 10px;
    font-size: 28px;
}

.footer-quote p {
    font-size: 1.2rem;
    font-style: italic;
    text-align: center;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: #ff6b35;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: #f7931e;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #555;
    color: #ccc;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.loading-spinner i {
    font-size: 48px;
    margin-bottom: 20px;
    color: #ff6b35;
}

.loading-spinner p {
    font-size: 18px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

.modal-header {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    padding: 30px;
    text-align: center;
}

.modal-header i {
    font-size: 48px;
    margin-bottom: 15px;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-body {
    padding: 30px;
    text-align: center;
    color: #333;
}

.modal-footer {
    padding: 0 30px 30px;
    text-align: center;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar .container {
        padding: 0 20px;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 30px 20px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
        border-radius: 0 0 20px 20px;
        border-top: 2px solid rgba(255, 107, 53, 0.1);
    }

    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        width: 100%;
        text-align: center;
        padding: 15px 20px;
        margin: 5px 0;
        border-radius: 12px;
        font-size: 16px;
        color: #444;
    }
    
    .nav-link:hover {
        background: rgba(255, 107, 53, 0.1);
        color: #ff6b35;
    }
    
    .btn-appointment {
        margin-top: 15px;
        padding: 15px 30px;
        font-size: 16px;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.4rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 300px;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .brands-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .appointment-form {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-highlight {
        flex-direction: column;
        text-align: center;
    }

    .hero-highlight i {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .service-card {
        padding: 30px 20px;
    }

    .appointment-form {
        padding: 20px 15px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .header {
        background: rgba(51, 51, 51, 0.95);
    }

    .nav-link {
        color: white;
    }

    .nav-menu {
        background: #333;
    }
}
