/* ========== SHARED CSS — บ้านกายภาพ ชลบุรี ========== */

:root {
    --white: #FFFFFF;
    --off-white: #F7FAFB;
    --light-blue: #E8F4F8;
    --blue: #0077B6;
    --dark-blue: #005A8C;
    --green: #2A9D8F;
    --dark-green: #1E7A6E;
    --light-green: #E6F5F2;
    --text-dark: #1A2332;
    --text-mid: #4A5568;
    --text-light: #718096;
    --border: #E2E8F0;
    --shadow: 0 4px 24px rgba(0, 119, 182, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 119, 182, 0.12);
    --radius: 16px;
    --radius-sm: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Sarabun', sans-serif;
    color: var(--text-dark);
    background: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ========== NAV ========== */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    transition: box-shadow 0.3s;
}
.nav.scrolled { box-shadow: var(--shadow); }

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-family: 'Mitr', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--blue);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.nav-brand span { color: var(--green); }
.nav-brand-logo {
    height: 36px;
    width: auto;
    border-radius: 4px;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    font-family: 'Sarabun', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-mid);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 50px;
    transition: all 0.3s;
    white-space: nowrap;
}
.nav-link:hover {
    color: var(--blue);
    background: var(--light-blue);
}

.nav-cta {
    background: var(--green);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    white-space: nowrap;
}
.nav-cta:hover {
    background: var(--dark-green);
    transform: translateY(-1px);
}

/* ========== FOOTER ========== */
.footer {
    background: var(--off-white);
    padding: 40px 24px 24px;
    border-top: 1px solid var(--border);
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}
.footer-inner h4 {
    font-family: 'Mitr', sans-serif;
    font-size: 1rem;
    color: var(--text-mid);
    margin-bottom: 16px;
    font-weight: 500;
}
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.trust-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--white);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.85rem;
    color: var(--text-mid);
}
.trust-badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.footer-copyright {
    font-size: 0.85rem;
    color: var(--text-light);
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* ========== BLOG SHARED ========== */

/* Breadcrumb */
.breadcrumb {
    padding: 100px 24px 0;
    max-width: 900px;
    margin: 0 auto;
}
.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    font-size: 0.9rem;
    color: var(--text-light);
}
.breadcrumb-list a {
    color: var(--blue);
    text-decoration: none;
}
.breadcrumb-list a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--border); }

/* Blog Cards Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.blog-card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--blue);
}

.blog-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--light-blue), var(--light-green));
}

.blog-card-body {
    padding: 20px 24px;
}

.blog-card-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.blog-tag {
    background: var(--light-blue);
    color: var(--blue);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 50px;
}

.blog-card-title {
    font-family: 'Mitr', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 8px;
}

.blog-card-desc {
    font-size: 0.9rem;
    color: var(--text-mid);
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-date {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Article Page */
.article-header {
    padding: 24px 24px 0;
    max-width: 900px;
    margin: 0 auto;
}
.article-header h1 {
    font-family: 'Mitr', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 12px;
}
.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.article-meta .author {
    display: flex;
    align-items: center;
    gap: 8px;
}
.article-meta .author img {
    width: 32px; height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.article-body {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px 40px;
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-dark);
}
.article-body h2 {
    font-family: 'Mitr', sans-serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 40px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--light-blue);
}
.article-body h3 {
    font-family: 'Mitr', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--blue);
    margin: 28px 0 12px;
}
.article-body p {
    margin-bottom: 16px;
}
.article-body ul, .article-body ol {
    margin: 12px 0 16px 24px;
}
.article-body li {
    margin-bottom: 6px;
}
.article-body blockquote {
    border-left: 4px solid var(--blue);
    background: var(--light-blue);
    padding: 16px 24px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 20px 0;
    font-style: italic;
    color: var(--text-mid);
}
.article-body img {
    max-width: 100%;
    border-radius: var(--radius-sm);
    margin: 20px 0;
}
.article-body strong {
    color: var(--text-dark);
}
.article-body a {
    color: var(--blue);
    text-decoration: underline;
}

/* Article CTA Box */
.article-cta {
    max-width: 900px;
    margin: 0 auto 40px;
    padding: 0 24px;
}
.cta-box {
    background: linear-gradient(135deg, var(--light-blue), var(--light-green));
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    border: 1px solid var(--border);
}
.cta-box h3 {
    font-family: 'Mitr', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}
.cta-box p {
    color: var(--text-mid);
    margin-bottom: 20px;
    font-size: 1rem;
}
.cta-box .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--green);
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s;
}
.cta-box .btn-primary:hover {
    background: var(--dark-green);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 157, 143, 0.3);
}

/* Related Articles */
.related-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px;
    border-top: 1px solid var(--border);
}
.related-section h2 {
    font-family: 'Mitr', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 24px;
    text-align: center;
}

/* ========== ARTICLE RICH ELEMENTS ========== */

/* TL;DR Box */
.article-body .tldr-box {
    background: linear-gradient(135deg, #EBF5FB 0%, #F0F9FF 100%);
    border-left: 4px solid var(--blue);
    padding: 20px 24px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 32px;
}
.article-body .tldr-box h3 {
    font-size: 1rem;
    color: var(--text-dark);
    margin: 0 0 8px;
}
.article-body .tldr-box p {
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 0;
}

/* Table of Contents */
.article-body .toc-box {
    background: var(--off-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    margin-bottom: 32px;
}
.article-body .toc-box h3 {
    font-size: 1rem;
    color: var(--text-dark);
    margin: 0 0 12px;
}
.article-body .toc-box ol {
    padding-left: 20px;
    margin: 0;
}
.article-body .toc-box li {
    margin-bottom: 6px;
    font-size: 0.95rem;
}
.article-body .toc-box a {
    color: var(--blue);
    text-decoration: none;
}
.article-body .toc-box a:hover { text-decoration: underline; }

/* Stats Grid */
.article-body .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin: 20px 0 24px;
}
.article-body .stat-card {
    background: var(--off-white);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    border: 1px solid var(--border);
}
.article-body .stat-number {
    font-family: 'Mitr', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--blue);
    display: block;
    line-height: 1.3;
}
.article-body .stat-label {
    font-size: 0.82rem;
    color: var(--text-light);
    display: block;
}

/* Article Figures */
.article-body .article-figure {
    margin: 24px 0;
    text-align: center;
}
.article-body .article-figure img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    margin: 0;
}
.article-body .article-figure figcaption {
    font-size: 0.82rem;
    color: var(--text-light);
    margin-top: 8px;
    font-style: italic;
}

/* Highlight Boxes */
.article-body .highlight-box {
    background: linear-gradient(135deg, #FFF9E6 0%, #FFFDF5 100%);
    border-left: 4px solid #F59E0B;
    padding: 16px 20px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 24px 0;
}
.article-body .highlight-box strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-dark);
}
.article-body .highlight-box.danger {
    background: linear-gradient(135deg, #FFF5F5 0%, #FFFAFA 100%);
    border-left-color: #EF4444;
}
.article-body .highlight-box.info {
    background: linear-gradient(135deg, #EBF5FB 0%, #F0F9FF 100%);
    border-left-color: var(--blue);
}
.article-body .highlight-box.warning {
    background: linear-gradient(135deg, #FFF9E6 0%, #FFFDF5 100%);
    border-left-color: #F59E0B;
}

/* Comparison Table */
.article-body .comparison-table-wrapper {
    overflow-x: auto;
    margin: 24px 0;
}
.article-body .comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.article-body .comparison-table thead {
    background: var(--blue);
    color: white;
}
.article-body .comparison-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
}
.article-body .comparison-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
}
.article-body .comparison-table tbody tr:nth-child(even) {
    background: var(--off-white);
}
.article-body .comparison-table tbody tr:hover {
    background: var(--light-blue);
}

/* FAQ */
.article-body .faq-list {
    margin: 20px 0;
}
.article-body .faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    overflow: hidden;
}
.article-body .faq-question {
    padding: 14px 20px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.article-body .faq-question::-webkit-details-marker { display: none; }
.article-body .faq-question::after {
    content: '+';
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--blue);
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-left: 12px;
}
.article-body details[open] .faq-question::after {
    content: '−';
}
.article-body .faq-answer {
    padding: 0 20px 14px;
    color: var(--text-mid);
    font-size: 0.95rem;
}
.article-body .faq-answer p {
    margin-bottom: 8px;
}
.article-body .faq-answer p:last-child {
    margin-bottom: 0;
}

/* ========== CONTACT SECTION (shared) ========== */
.cta-hub {
    padding: 80px 24px;
    background: linear-gradient(170deg, var(--white) 0%, var(--light-blue) 100%);
}
.cta-hub-inner {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}
.cta-hub h2 {
    font-family: 'Mitr', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}
.cta-hub .cta-subtitle {
    color: var(--text-mid);
    margin-bottom: 32px;
    font-size: 1.05rem;
}
.cta-primary-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}
.cta-big {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 36px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s;
}
.cta-big.line { background: #06C755; color: white; }
.cta-big.line:hover { background: #05A847; transform: translateY(-3px); box-shadow: 0 8px 24px rgba(6, 199, 85, 0.3); }
.cta-big.phone { background: var(--blue); color: white; }
.cta-big.phone:hover { background: var(--dark-blue); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0, 119, 182, 0.3); }
.cta-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}
.cta-divider::before,
.cta-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.cta-divider span { color: var(--text-light); font-size: 0.9rem; }
.social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}
.social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    background: var(--white);
    color: var(--text-mid);
    border: 1px solid var(--border);
    transition: all 0.3s;
}
.social-link:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.social-link.yt:hover { border-color: #FF0000; color: #FF0000; }
.social-link.tt:hover { border-color: #000000; color: #000000; }
.social-link.ig:hover { border-color: #E1306C; color: #E1306C; }
.social-link.fb:hover { border-color: #1877F2; color: #1877F2; }

/* ========== VIDEO GRID ========== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.video-card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}
.video-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--blue);
}

.video-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    cursor: pointer;
    overflow: hidden;
}
.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s;
}
.video-card:hover .video-thumb img {
    transform: scale(1.04);
}
.video-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,0.45));
    pointer-events: none;
}
.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    background: rgba(0, 0, 0, 0.75);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 1;
}
.video-thumb:hover .video-play-btn {
    background: #FF0000;
    transform: translate(-50%, -50%) scale(1.05);
}
.video-play-btn::before {
    content: "";
    border-style: solid;
    border-width: 11px 0 11px 18px;
    border-color: transparent transparent transparent #fff;
    margin-left: 4px;
}
.video-thumb iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-card-body {
    padding: 18px 22px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.video-card-title {
    font-family: 'Mitr', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 8px;
}
.video-card-desc {
    font-size: 0.9rem;
    color: var(--text-mid);
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.video-card-date {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    .video-grid {
        grid-template-columns: 1fr;
    }
    .article-header h1 {
        font-size: 1.7rem;
    }
    .nav { padding: 8px 0; }
    .nav-inner { padding: 0 14px; gap: 8px; }
    .nav-brand { font-size: 0.95rem; gap: 6px; }
    .nav-brand-logo { height: 28px; }
    .nav-links { gap: 4px; }
    .nav-link {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
    .nav-cta {
        font-size: 0.85rem;
        padding: 7px 14px;
    }
    .cta-hub h2 { font-size: 1.6rem; }
    .cta-big { width: 100%; justify-content: center; padding: 16px 32px; }
    .social-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .social-link { justify-content: center; }
}

@media (max-width: 480px) {
    .nav-brand { font-size: 0.85rem; }
    .nav-brand-logo { height: 24px; }
    .nav-link {
        font-size: 0.8rem;
        padding: 5px 8px;
    }
    .nav-cta {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

@media (max-width: 380px) {
    .nav-brand span { display: none; }
}
