﻿main {
    flex: 1;
    padding-top: 100px;
}

/* ================= HEADER ================= */
.page-header {
    padding: 50px 20px;
    text-align: center;

    /* 🔥 เพิ่ม Gradient */
    background: linear-gradient(
        to bottom,
        rgba(255, 87, 34, 0.18),
        rgba(0, 0, 0, 0)
    );
}

.page-header h1 {
    font-size: clamp(35px, 6vw, 50px);
    font-weight: 900;
    margin-bottom: 10px;
}

.page-header h1 span {
    color: var(--primary-color);
}

.page-header p {
    color: var(--text-muted);
    font-size: 16px;
}

/* ================= BODY BG ================= */
body {
    font-family: 'Kanit', sans-serif;
    /* 🔥 เพิ่ม Gradient ทั้งหน้า */
    background: linear-gradient(
        to bottom,
        #0a0a0a,
        #000000
    );
}

/* ================= CONTAINER ================= */
.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    align-items: center;

    /* 🔥 เพิ่ม glow */
    background: radial-gradient(
        circle at top,
        rgba(255, 87, 34, 0.08),
        transparent 70%
    );
    border-radius: 20px;
}

/* ================= INFO ================= */
.contact-info h2 {
    font-size: clamp(30px, 5vw, 40px);
    margin-bottom: 20px;
}

.contact-info p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 30px;
}

.info-box {
    display: block;
    align-items: flex-start;
    margin-bottom: 20px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 87, 34, 0.2);
    border-radius: 12px;
    padding: 18px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.info-box:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 87, 34, 0.45);
}

.info-icon {
    font-size: 22px;
    color: var(--primary-color);
    margin-right: 15px;
    min-width: 30px;
}

.info-text h4 {
    margin-bottom: 6px;
    font-size: 17px;
}

.info-text p {
    margin-bottom: 0;
    font-size: 15px;
}

/* ================= VIDEO ================= */
.contact-video {
    display: block;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    padding: 0;
    border-radius: 15px;
    border: 2px solid rgba(255, 87, 34, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    width: 100%;
    height: 450px;
}

.contact-video video,
.contact-video iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
}

/* ================= FORM ================= */
.contact-form {
    background: var(--card-bg);
    border: 1px solid rgba(255, 87, 34, 0.2);
    border-radius: 15px;
    padding: 35px;
}

.contact-form h3 {
    margin-bottom: 22px;
    font-size: 24px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 87, 34, 0.25);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 87, 34, 0.15);
}

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

.submit-btn {
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 14px 20px;
    background: var(--primary-color);
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.submit-btn:hover {
    background: #fff;
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* ================= MAP ================= */
.map-section {
    width: 100%;
    height: 380px;
    border-top: 1px solid rgba(255, 87, 34, 0.2);
}

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

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .contact-form {
        padding: 25px 20px;
    }
}

/* Skeleton Loading */
body.is-loading {
    overflow: hidden;
}

body.is-loading > *:not(.skeleton-loader) {
    visibility: hidden;
}

body.page-ready > *:not(.skeleton-loader) {
    visibility: visible;
}

.skeleton-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    background: #0f1417;
    transition: opacity 0.35s ease;
}

body.is-loading .skeleton-loader {
    opacity: 1;
    pointer-events: auto;
}

body.page-ready .skeleton-loader {
    opacity: 0;
}

.sk-topbar,
.sk-thumb,
.sk-line,
.sk-tags,
.sk-dot {
    position: relative;
    overflow: hidden;
    background: #1c2429;
    border-radius: 0;
}

.sk-shimmer::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.18) 50%, rgba(255,255,255,0) 100%);
    animation: skeleton-shimmer 1.25s infinite;
}

.sk-wrap,
.sk-canvas {
    width: min(1200px, 94vw);
    margin: 92px auto 0;
}

.sk-wrap {
    display: grid;
    gap: 20px;
}

.sk-topbar {
    height: 76px;
    border-radius: 0;
}

.sk-line {
    height: 14px;
    margin-bottom: 10px;
}

.sk-title {
    height: 42px;
    width: min(520px, 72%);
}

.sk-mid {
    width: 76%;
}

.sk-short {
    width: 58%;
}

.sk-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
}

.sk-panel {
    background: #151d21;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 16px;
}

.sk-product-head,
.sk-product-grid,
.sk-about-hero,
.sk-about-main,
.sk-about-values-head,
.sk-about-values-grid,
.sk-section,
.sk-hero,
.sk-grid,
.sk-split,
.sk-map {
    display: none;
}

/* Product skeleton: portfolio header + gallery cards */
body.skeleton-product .sk-product-head,
body.skeleton-product .sk-product-grid {
    display: grid;
}

body.skeleton-product .sk-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.sk-pcard {
    background: #151d21;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 12px;
}

.sk-pcard .sk-thumb {
    margin-bottom: 10px;
}

.sk-tags {
    height: 28px;
    width: 46%;
    border-radius: 999px;
    margin-top: 8px;
}

/* About skeleton: hero + split content + values cards */
body.skeleton-about .sk-about-hero,
body.skeleton-about .sk-about-main,
body.skeleton-about .sk-about-values-head,
body.skeleton-about .sk-about-values-grid {
    display: grid;
}

body.skeleton-about .sk-about-main {
    grid-template-columns: 1.15fr 1fr;
    gap: 16px;
}

.sk-portrait {
    aspect-ratio: 4 / 5;
}

body.skeleton-about .sk-about-values-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.sk-vcard {
    background: #151d21;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 14px;
}

.sk-dot {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    margin-bottom: 12px;
}

/* Keep existing fallback template (home/contact currently uses sk-section) */
body.skeleton-home .sk-hero,
body.skeleton-home .sk-grid,
body.skeleton-contact .sk-hero,
body.skeleton-contact .sk-split,
body.skeleton-contact .sk-map {
    display: grid;
}

body.skeleton-home .sk-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

body.skeleton-home .sk-card:nth-child(n+4) {
    display: none;
}

body.skeleton-contact .sk-split {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.sk-mapbox {
    aspect-ratio: 16 / 5;
}

@keyframes skeleton-shimmer {
    to { transform: translateX(100%); }
}

@media (max-width: 1024px) {
    body.skeleton-product .sk-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .sk-wrap,
    .sk-canvas {
        margin-top: 84px;
        gap: 14px;
    }

    .sk-title {
        height: 34px;
        width: 84%;
    }

    .sk-line {
        height: 12px;
    }

    body.skeleton-product .sk-product-grid,
    body.skeleton-about .sk-about-values-grid,
    body.skeleton-home .sk-grid {
        grid-template-columns: 1fr !important;
    }

    body.skeleton-about .sk-about-main,
    body.skeleton-contact .sk-split {
        grid-template-columns: 1fr !important;
    }

    .sk-pcard:nth-child(n+5) {
        display: none;
    }

    .sk-mapbox {
        aspect-ratio: 16 / 7;
    }
}




