@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #1abc9c;
    --light-color: #ecf0f1;
    --dark-color: #2f3640;
    --text-color: #333;
    --light-gray: #f4f4f4;
    --border-color: #ddd;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.06);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Sans Thai', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: #fff;
}

/* General Styling */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff !important;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}
.hero_btn{
    display: inline-block;
    background-color: #4CAF50;
    color: #fff !important;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
}
.hero_btn:hover{
    background-color: #45a049;
    transform: translateY(-2px);
}
.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 10px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.section-title p {
    font-size: 1.1rem;
    color: #777;
    margin-top: 15px;
}

/* Header */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed; /* เปลี่ยนจาก sticky เป็น fixed */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: box-shadow 0.3s ease;
}

header.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo span {
    color: var(--accent-color);
}

#main-nav ul {
    display: flex;
    list-style: none;
}

#main-nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 15px;
    position: relative;
    transition: color 0.3s ease;
}

#main-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

#main-nav ul li a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.8rem;
    background: none;
    border: none;
    cursor: pointer;
}

.hero {
        background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../image/S__7069739_0.jpg');
        background-size: cover;
        background-position: center;
        color: white;
        text-align: center;
        padding: 146px 20px;
    }

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    /* color: var(--dark-color); */
}

.hero p {
    font-size: 1.2rem;
    /* color: #666; */
    margin-bottom: 30px;
}

/* Services Section */
.services {
    background-color: #fff;
}

/* .services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.service-img {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.service-content {
    padding: 25px;
}

.service-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.service-content p {
    color: #555;
} */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px;
}

.service-card {
    background: rgba(255, 255, 255, 0.15); /* โปร่งใส */
    border-radius: 7px; /* โค้งมน */
    overflow: hidden;
    backdrop-filter: blur(12px); /* เบลอด้านหลัง */
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.service-img {
    height: 304px;
    background-size: cover;
    background-position: center;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.service-content {
    padding: 20px;
}

.service-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #222;
    font-weight: 600;
}

.service-content p {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.6;
}

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

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

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 20px;
    color: #555;
}

.about-img {
    flex: 1;
    text-align: center;
}

.about-img img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Process Section */
.process {
    background-color: #fff;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    text-align: center;
}

.step {
    position: relative;
    padding: 40px 20px;
    background: var(--light-gray);
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.step:hover {
    transform: translateY(-5px);
}

.step h3 {
    font-size: 1.4rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

/* Portfolio Section */
.portfolio {
    background-color: var(--light-gray);
}

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

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 3px;
    box-shadow: var(--box-shadow);
}

.portfolio-item img {
    display: block;
    width: 100%;
    height: 335px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    text-align: center;
    padding: 20px;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.portfolio-overlay p {
    font-style: italic;
}

/* Testimonials Section */
.testimonials {
    background-color: #fff;
}

.testimonials-slider {
    position: relative;
    overflow: hidden;
    text-align: center;
}

.testimonial {
    display: none;
    max-width: 700px;
    margin: 0 auto;
    animation: fadein 0.8s ease-in-out;
}

.testimonial.active {
    display: block;
}

.testimonial-text {
    font-size: 1.2rem;
    font-style: italic;
    color: #555;
    margin-bottom: 20px;
}

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

.testimonial-controls {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.testimonial-controls button {
    background: var(--light-gray);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.testimonial-controls button:hover {
    background: var(--primary-color);
    color: #fff;
}

@keyframes fadein {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.contact-container {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.contact-info, .contact-form {
    flex: 1;
    min-width: 300px;
}

.contact-info h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.contact-details p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
}

.contact-details i {
    font-size: 1.2rem;
    color: var(--accent-color);
}

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

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #fff;
    font-family: 'IBM Plex Sans Thai', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(44, 62, 80, 0.2);
}

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

.contact-form .btn {
    width: 100%;
    text-align: center;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: #fff;
    padding: 50px 0 20px;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    text-align: left;
    gap: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 20px;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.footer-section p {
    color: #ccc;
    margin-bottom: 10px;
}

.footer-section a {
    display: block;
    color: #ccc;
    text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #fff;
}

.social-links a {
    display: inline-block;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #444;
    text-align: center;
    line-height: 35px;
    margin-right: 10px;
    transition: background 0.3s ease;
}

.social-links a:hover {
    background: var(--accent-color);
}

.copyright p {
    color: #aaa;
    font-size: 0.9rem;
}
.add_line{
    background: #00c300;
    width: 98%;
    height: 60px;
    position: fixed;
    z-index: 9;
    bottom: 0;
    align-items: center;
    display: flex;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 26px;
    text-decoration: none;
}
.layout_addline{
    display: flex;
    justify-content: center;
}
.p_addline{
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: unset;
    font-weight: bold;
}
/* Media Queries for Mobile */
@media (max-width: 768px) {
    .contact-info, .contact-form{
        min-width: 100% !important;
    }
    header {
        border-bottom: none;
    }

    .header-container {
        flex-wrap: wrap;
        padding: 14px 17px;
    }

    .logo {
        margin-right: auto;
    }

    #main-nav {
        display: none;
        width: 100%;
        background: var(--light-color);
        padding: 20px 0px;
        border-top: 1px solid var(--border-color);
        animation: slideDown 0.4s ease-out;
    }

    #main-nav.active {
        display: block;
    }

    #main-nav ul {
        flex-direction: column;
        align-items: center;
        text-align: start;
    }

    #main-nav ul li {
        margin: 10px 0;
        width: 100%;
    }

    .mobile-menu-btn {
        display: block;
    }
    
    .hero {
        padding: 96px 20px 30px;
    }

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

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

    .about-content {
        flex-direction: column;
        text-align: center;
    }

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

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

    .footer-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .footer-section {
        min-width: auto;
    }

    .footer-section a {
        display: inline-block;
        margin: 0 5px;
    }
}

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