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

:root {
    --primary-color: #0ea5e9;
    --secondary-color: #0284c7;
    --accent-color: #f97316;
    --accent-hover: #ea580c;
    --text-dark: #e5e7eb;
    --text-light: #94a3b8;
    --bg-light: #111827;
    --bg-page: #0b0f14;
    --surface: #0f172a;
    --surface-2: #111828;
    --border: #1f2937;
    --white: #ffffff;
    --shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 18px 40px -10px rgba(0, 0, 0, 0.65);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans Thai', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-page);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #0b1220 0%, #111827 100%);
    z-index: 1000;
    box-shadow: var(--shadow);
    border-bottom: 1px solid var(--border);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--white);
}

.logo img {
    width: 65px;
    height: 65px;
    object-fit: contain;
}

.logo span {
    font-size: 36px;
    line-height: 1;
}

.nav {
    display: flex;
    gap: 16px;
}

.nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    font-size: 24px;
    transition: var(--transition);
    opacity: 0.9;
}

.nav a:hover {
    opacity: 1;
    color: var(--white);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 12px;
    cursor: pointer;
    color: var(--white);
}

.hero-slider {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.hero-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.82) 0%, rgba(15, 23, 42, 0.72) 55%, rgba(2, 6, 23, 0.88) 100%);
}

.hero-slide-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    padding: 0 24px;
}

.hero-slide-content .slide-tag {
    background: var(--accent-color);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-slide-content h1 {
    font-size: 44px;
    font-weight: 900;
    margin-bottom: 12px;
    text-shadow: 2px 4px 8px rgba(0,0,0,0.3);
    max-width: 900px;
}

.hero-slide-content h2 {
    font-size: 52px;
    font-weight: 900;
    margin-bottom: 16px;
    text-shadow: 2px 4px 8px rgba(0,0,0,0.3);
    max-width: 800px;
}

.hero-slide-content p {
    font-size: 20px;
    margin-bottom: 32px;
    opacity: 0.95;
    max-width: 600px;
}

.hero-slider-nav {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.hero-slider-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.hero-slider-dot.active {
    background: var(--accent-color);
    transform: scale(1.2);
}

.hero-slider-arrows {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 10;
}

.hero-slider-arrow {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slider-arrow:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: scale(1.1);
}

.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    font-size: 32px;
    animation: bounce 2s infinite;
    z-index: 10;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

.btn {
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.75);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
}

.btn-full {
    width: 100%;
}

section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 36px;
}

.section-title {
    font-size: 42px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-light);
}

.services {
    background: var(--bg-light);
}

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

.service-card {
    background: var(--surface);
    padding: 10px 12px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}

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

.service-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 4px;
    color: var(--white);
    font-size: 16px;
}

.service-card h3 {
    font-size: 24px;
    margin-bottom: 2px;
    color: var(--text-dark);
}

.service-title--3x {
    font-size: 72px;
    line-height: 1.05;
}

.service-card p {
    color: var(--text-light);
    font-size: 18px;
    line-height: 1.35;
}

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

.gallery-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 48px;
}

.filter-btn {
    padding: 12px 28px;
    border-radius: 50px;
    background: var(--surface);
    border: 2px solid var(--border);
    color: var(--text-dark);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Noto Sans Thai', sans-serif;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.gallery-wrapper {
    position: relative;
}

.gallery-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 48px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(17, 24, 39, 0.96) 100%);
    border-radius: 16px;
    border-left: 4px solid var(--accent-color);
    border: 1px solid var(--border);
}

.gallery-intro p {
    font-size: 17px;
    color: var(--text-dark);
    line-height: 1.7;
}

.gallery-intro strong {
    color: var(--accent-color);
}

.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.gallery-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item.hidden {
    display: none;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: var(--white);
    padding: 60px 24px 24px;
    transform: translateY(100%);
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h4 {
    font-size: 20px;
    margin-bottom: 4px;
}

.gallery-overlay p {
    opacity: 0.9;
    margin-bottom: 12px;
}

.gallery-overlay .btn {
    font-size: 13px;
    padding: 8px 16px;
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-info {
    margin-top: 24px;
    color: var(--white);
}

.lightbox-info h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

.lightbox-info p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 20px;
}

.lightbox-info .btn {
    background: var(--accent-color);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
    background: none;
    border: none;
    z-index: 10001;
}

.lightbox-close:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    color: var(--white);
    cursor: pointer;
    padding: 20px;
    transition: var(--transition);
    background: none;
    border: none;
}

.lightbox-nav:hover {
    color: var(--accent-color);
}

.lightbox-nav.prev {
    left: 20px;
}

.lightbox-nav.next {
    right: 20px;
}

.about {
    background: var(--bg-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 17px;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 32px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 12px;
}

.feature i {
    color: var(--primary-color);
    font-size: 20px;
}

.feature span {
    font-weight: 500;
}

.faq {
    background: var(--bg-page);
    padding-bottom: 20px;
}

.faq-list {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--surface-2);
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.faq-item summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--text-dark);
}

.faq-item p {
    margin-top: 10px;
    color: var(--text-light);
    font-size: 16px;
    line-height: 1.7;
}

.faq a {
    color: inherit;
}

.info-text a {
    color: inherit;
    text-decoration: none;
}

.info-text a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.contact-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.contact-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start;
}

@media (max-width: 968px) {
    .contact-panels {
        grid-template-columns: 1fr;
    }
}

.contact {
    padding-top: 20px;
}

.contact .section-header {
    margin-bottom: 22px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.info-item {
    display: flex;
    gap: 24px;
}

.info-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 24px;
    flex-shrink: 0;
}

.info-text h4 {
    font-size: 18px;
    margin-bottom: 4px;
}

.info-text p {
    color: var(--text-light);
}

.info-text address {
    color: var(--text-light);
    font-style: normal;
}

.map-embed {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: var(--border);
}

.map-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.map-embed--contact {
    height: 280px;
}

@media (min-width: 968px) {
    .map-embed--contact {
        height: 360px;
    }
}

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

.social-links a {
    width: 50px;
    height: 50px;
    background: var(--surface-2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 20px;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
}

.contact-form {
    background: var(--surface);
    padding: 6px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.contact-form h3 {
    font-size: 21px;
    margin-bottom: 4px;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 3px 4px;
    border: 2px solid var(--border);
    border-radius: 4px;
    font-size: 18px;
    font-family: 'Noto Sans Thai', sans-serif;
    transition: var(--transition);
    background: var(--surface-2);
    color: var(--text-dark);
}

.form-group textarea {
    height: 60px;
}

.form-group input[type="file"] {
    padding: 2px 4px;
    font-size: 12px;
}

.form-group input[type="file"]::file-selector-button {
    padding: 3px 8px;
    margin-right: 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-dark);
    font-size: 12px;
    cursor: pointer;
}

.form-group input[type="file"]::-webkit-file-upload-button {
    padding: 3px 8px;
    margin-right: 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-dark);
    font-size: 12px;
    cursor: pointer;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
}

.hp-field {
    display: none !important;
}

.upload-status-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 5px 0 3px;
}

.upload-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 8px;
    align-items: center;
}

.upload-label {
    font-size: 12px;
    color: var(--text-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-state {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light);
}

.upload-bar {
    grid-column: 1 / -1;
    height: 4px;
    background: var(--border);
    border-radius: 999px;
    overflow: hidden;
}

.upload-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 999px;
    transition: width 120ms ease;
}

.upload-item.is-sent .upload-state {
    color: #16a34a;
}

.upload-item.is-failed .upload-state {
    color: #dc2626;
}

.contact-status {
    font-size: 12px;
    font-weight: 600;
    margin: 3px 0 5px;
    color: var(--text-dark);
    min-height: 10px;
}

.anti-spam {
    border: 2px solid var(--border);
    border-radius: 5px;
    padding: 3px;
    background: var(--surface-2);
}

.anti-spam-label {
    display: block;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 3px;
    color: var(--text-dark);
}

.anti-spam-row {
    display: grid;
    grid-template-columns: 1fr 44px;
    gap: 3px;
    align-items: center;
    margin-bottom: 3px;
}

.anti-spam-question {
    font-size: 16px;
    color: var(--text-dark);
}

.anti-spam-row input[type="text"] {
    padding: 5px;
    border-radius: 6px;
    font-size: 18px;
}

.anti-spam-check {
    display: flex;
    gap: 4px;
    align-items: center;
    font-size: 16px;
    color: var(--text-dark);
}

.anti-spam-check input {
    width: 10px;
    height: 10px;
}

.contact-form .btn {
    padding: 7px 16px;
    border-radius: 24px;
    font-size: 18px;
    gap: 4px;
}

.stats-panel {
    margin-top: 10px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.contact-panels .stats-panel {
    margin-top: 0;
}

@media (min-width: 969px) {
    .contact-panels #statsPanel {
        zoom: 0.5;
    }

    .contact-panels #statsPanel .stats-top {
        zoom: 2;
    }
}

@supports not (zoom: 1) {
    @media (min-width: 969px) {
        .contact-panels #statsPanel {
            transform: scale(0.5);
            transform-origin: top left;
        }

        .contact-panels #statsPanel .stats-top {
            transform: scale(2);
            transform-origin: top left;
        }
    }
}

.stats-panel h3 {
    font-size: 16px;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
    gap: 6px;
    margin-bottom: 8px;
}

.stat {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 7px 8px;
}

.stat-label {
    font-size: 10px;
    color: var(--text-light);
    margin-bottom: 2px;
}

.stat-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
}

.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.bar-row {
    display: grid;
    grid-template-columns: 72px 1fr 28px;
    gap: 8px;
    align-items: center;
}

.bar-label {
    font-size: 11px;
    color: var(--text-light);
}

.bar-val {
    font-size: 11px;
    color: var(--text-light);
    text-align: right;
}

.bar-track {
    height: 8px;
    background: var(--border);
    border-radius: 999px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 999px;
    transition: width 200ms ease;
}

.bar-fill--danger {
    background: linear-gradient(135deg, #dc2626, #ef4444);
}

.bar-fill--info {
    background: linear-gradient(135deg, #2563eb, #60a5fa);
}

.bar-fill--success {
    background: linear-gradient(135deg, #06c755, #16a34a);
}

.stats-note {
    margin-top: 6px;
    font-size: 10px;
    color: var(--text-light);
    text-align: center;
}

.metrics-sync-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed rgba(148, 163, 184, 0.35);
}

.metrics-sync-status {
    font-size: 10px;
    color: var(--text-light);
    line-height: 1.2;
}

.metrics-sync-actions {
    display: flex;
    gap: 6px;
}

.stats-panel .btn {
    padding: 6px 12px;
    font-size: 11px;
}

.stats-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.stats-controls .btn {
    flex: 1;
    min-width: 74px;
    justify-content: center;
    padding: 6px 10px;
}

.stats-controls .btn.is-active {
    background: rgba(14, 165, 233, 0.16);
    border-color: rgba(14, 165, 233, 0.9);
}

.stats-graph {
    border: 1px solid var(--border);
    background: var(--surface-2);
    border-radius: 12px;
    padding: 10px;
}

.stats-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 11px;
    color: var(--text-light);
}

.stats-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.stats-legend-swatch {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.stats-graph svg {
    width: 100%;
    height: 180px;
    display: block;
}

.stats-xlabels {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 6px;
    margin-top: 8px;
    font-size: 10px;
    color: var(--text-light);
}

.stats-xlabels span {
    text-align: center;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.footer {
    background: #05080c;
    color: var(--white);
    padding: 40px 0;
    text-align: center;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-logo img {
    width: 61px;
    height: 61px;
    object-fit: contain;
}

.footer-logo i {
    font-size: 28px;
}

@media (max-width: 968px) {
    .nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--surface);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        box-shadow: var(--shadow-lg);
        transform: translateY(-150%);
        transition: var(--transition);
        border-bottom: 1px solid var(--border);
    }

    .nav.active {
        transform: translateY(0);
    }

    .menu-toggle {
        display: block;
    }

    .hero-title {
        font-size: 42px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .section-title {
        font-size: 32px;
    }

    .services-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.chatbot-toggle {
    width: 105px;
    height: 105px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 32px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-toggle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
    background: transparent;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.4);
}

.chatbot-window {
    position: absolute;
    bottom: 125px;
    right: 0;
    width: 380px;
    height: 650px;
    max-height: calc(100vh - 140px);
    background: var(--surface);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
}

.chatbot-window.active {
    display: flex;
    animation: slideUp 0.3s ease;
}

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

.chatbot-header {
    background: linear-gradient(135deg, #0b1220 0%, #111827 100%);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--white);
    border-bottom: 1px solid var(--border);
}

.chatbot-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
}

.chatbot-title img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: transparent;
    border-radius: 0;
    padding: 0;
}

.chatbot-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
}

.chatbot-close:hover {
    opacity: 0.8;
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chatbot-message {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.chatbot-message.bot {
    justify-content: flex-start;
}

.chatbot-message.user {
    justify-content: flex-end;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.chatbot-message.user .message-avatar {
    order: 2;
    background: linear-gradient(135deg, var(--accent-color), #d97706);
}

.chatbot-message.bot .message-avatar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
    background: transparent;
}

.message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 16px;
    line-height: 1.5;
}

.chatbot-message.bot .message-content {
    background: var(--bg-light);
    color: var(--text-dark);
    border-bottom-left-radius: 4px;
}

.chatbot-message.user .message-content {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border-bottom-right-radius: 4px;
}

.message-content p {
    margin: 0;
}

.message-content p + p {
    margin-top: 8px;
}

.chatbot-img-link {
    display: block;
    margin-top: 10px;
}

.chatbot-img {
    width: 100%;
    max-width: 240px;
    height: auto;
    max-height: 180px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--border);
}

.chatbot-img-open {
    display: inline-block;
    margin-top: 8px;
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: underline;
}

.chatbot-input {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-top: 1px solid var(--border);
}

.chatbot-input input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 25px;
    font-size: 15px;
    font-family: 'Noto Sans Thai', sans-serif;
    transition: var(--transition);
    background: var(--surface-2);
    color: var(--text-dark);
}

.chatbot-input input::placeholder {
    color: var(--text-light);
}

.chatbot-input input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.chatbot-input button {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
}

.chatbot-input button#chatbotMic.is-listening {
    background: linear-gradient(135deg, #dc2626, #ef4444);
}

.tts-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-dark);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.tts-btn:hover {
    background: rgba(255, 255, 255, 0.14);
}

.chatbot-message.bot .message-content {
    position: relative;
    padding-right: 44px;
}

.chatbot-input button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.chatbot-quick-replies {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 6px 8px;
    border-top: 1px solid var(--border);
}

.quick-reply-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 7px;
    background: var(--surface);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Noto Sans Thai', sans-serif;
    text-decoration: none;
    width: 100%;
}

.quick-reply-btn[data-text="ติดต่อเจ้าหน้าที่"] {
    grid-column: 1 / -1;
    border-color: #dc2626;
    color: #dc2626;
}

.quick-reply-btn[data-text="ติดต่อเจ้าหน้าที่"]:hover {
    background: #dc2626;
    color: var(--white);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.quick-reply-btn--messenger {
    border-color: #2563eb;
    color: #2563eb;
}

.quick-reply-btn--messenger:hover {
    background: #2563eb;
    color: var(--white);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.quick-reply-btn--line {
    border-color: #06c755;
    color: #06c755;
}

.quick-reply-btn--line:hover {
    background: #06c755;
    color: var(--white);
    box-shadow: 0 4px 12px rgba(6, 199, 85, 0.3);
}

.quick-reply-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.quick-reply-btn i {
    font-size: 14px;
}

.chatbot-actions {
    display: flex;
    gap: 6px;
    padding: 0 8px 6px;
}

.chatbot-messenger,
.chatbot-line {
    display: inline-block;
    width: calc(50% - 6px);
    padding: 0 3px 6px;
    box-sizing: border-box;
    vertical-align: top;
}

.messenger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px 8px;
    background: linear-gradient(135deg, #0084ff, #0099ff);
    border-radius: 6px;
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    transition: var(--transition);
    flex: 1;
    width: 100%;
}

.messenger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 132, 255, 0.4);
}

.messenger-btn i {
    font-size: 16px;
}

.line-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px 8px;
    background: linear-gradient(135deg, #06c755, #00b900);
    border-radius: 6px;
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    transition: var(--transition);
    flex: 1;
    width: 100%;
}

.line-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 199, 85, 0.4);
}

.line-btn i {
    font-size: 16px;
}

@media (max-width: 640px) {
    .chatbot-container {
        bottom: 20px;
        right: 20px;
    }

    .chatbot-toggle {
        width: 90px;
        height: 90px;
        font-size: 28px;
    }

    .chatbot-window {
        width: calc(100vw - 40px);
        right: -10px;
        bottom: 110px;
        height: calc(100vh - 140px);
    }
}
