/* ── Thailand Formats ── */
/* Clean, lightweight CSS replacing Mini.css. No framework needed. */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #1a1a2e;
    background: #fafbfc;
}
a { color: #2d3a8c; text-decoration: none; }
a:hover { color: #1a1a2e; text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ── Typography ── */
h1, h2, h3, h4 { line-height: 1.3; margin: 1.5rem 0 0.75rem; color: #1a1a2e; font-weight: 700; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem 1.5rem; }
li { margin-bottom: 0.25rem; }
code { background: #eef0f4; padding: 0.15rem 0.4rem; border-radius: 3px; font-size: 0.88rem; }
sup { font-size: 0.75em; }
small { font-size: 0.85rem; color: #5a6270; }
strong { font-weight: 600; }

/* ── Layout ── */
.container { max-width: 960px; margin: 0 auto; padding: 0 1.25rem; }

/* ── Grid ── */
.row { display: flex; flex-wrap: wrap; margin: 0 -0.625rem; }
.row > [class*="col-"] { padding: 0 0.625rem; margin-bottom: 0.75rem; }
.col-sm-6 { flex: 0 0 50%; max-width: 50%; }
.col-md-2 { flex: 0 0 16.667%; max-width: 16.667%; }
.col-md-3 { flex: 0 0 25%; max-width: 25%; }
.col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; }
.col-md-10 { flex: 0 0 83.333%; max-width: 83.333%; }
.col-md-12 { flex: 0 0 100%; max-width: 100%; }

@media (max-width: 768px) {
    .col-md-2, .col-md-3, .col-md-4, .col-md-6, .col-md-10, .col-md-12 {
        flex: 0 0 100%; max-width: 100%;
    }
    .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
}
@media (max-width: 480px) {
    .col-sm-6 { flex: 0 0 100%; max-width: 100%; }
}

/* ── Header / Nav ── */
.site-header {
    background: #fff;
    border-bottom: 3px solid;
    border-image: linear-gradient(90deg, #ED1C24 0%, #ED1C24 20%, #fff 20%, #fff 35%, #241D4F 35%, #241D4F 65%, #fff 65%, #fff 80%, #ED1C24 80%) 1;
    padding: 1rem 0;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.site-brand img { width: 32px; height: 22px; }
.site-brand span { font-size: 1.35rem; font-weight: 700; color: #1a1a2e; }
.site-brand:hover { text-decoration: none; }
.site-tagline { font-size: 0.85rem; color: #5a6270; display: none; }
@media (min-width: 769px) { .site-tagline { display: block; } }
.lang-switch {
    font-size: 0.8rem; padding: 0.2rem 0.6rem; border: 1px solid #d0d5dd;
    border-radius: 4px; color: #5a6270; background: #fff;
    text-decoration: none; font-weight: 600;
}
.lang-switch:hover { background: #f0f2f5; text-decoration: none; color: #1a1a2e; }

/* ── Content ── */
#content { padding: 1.5rem 0 2rem; min-height: 50vh; }
#content > h1:first-child { margin-top: 0; }

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
th, td { padding: 0.6rem 0.75rem; text-align: left; border-bottom: 1px solid #e4e7ec; }
th { background: #f5f6f8; font-weight: 600; font-size: 0.9rem; color: #3a3f4b; }
td { font-size: 0.9rem; }
tbody tr:hover { background: #f9fafb; }
table.table-striped tbody tr:nth-child(even) { background: #f9fafb; }

/* ── Forms ── */
input, select, textarea, button {
    font-family: inherit; font-size: 0.95rem;
}
input[type="text"], input[type="number"], input[type="date"],
input[type="password"], input[type="email"], select, textarea,
.form-control {
    display: block; width: 100%; padding: 0.5rem 0.7rem;
    border: 1px solid #d0d5dd; border-radius: 6px;
    background: #fff; color: #1a1a2e; transition: border-color 0.15s;
}
input:focus, select:focus, textarea:focus,
.form-control:focus {
    outline: none; border-color: #2d3a8c; box-shadow: 0 0 0 3px rgba(45,58,140,0.08);
}
textarea { min-height: 80px; resize: vertical; }
label { display: block; font-weight: 600; margin-bottom: 0.3rem; font-size: 0.9rem; }
fieldset { border: 1px solid #e4e7ec; border-radius: 8px; padding: 1.25rem; margin: 0 0 1rem; }
legend { font-weight: 700; font-size: 1rem; padding: 0 0.5rem; }
.input-group.vertical label { margin-bottom: 0.25rem; }
.input-group.vertical input,
.input-group.vertical select { margin-bottom: 0.75rem; }

/* ── Buttons ── */
button, input[type="submit"], .btn {
    display: inline-block; padding: 0.5rem 1.2rem;
    border: none; border-radius: 6px; cursor: pointer;
    font-weight: 600; font-size: 0.9rem; text-decoration: none;
    transition: background 0.15s, transform 0.1s;
}
button:active, .btn:active { transform: scale(0.98); }
input[type="submit"], button.primary, .btn-primary, input[type="submit"].primary {
    background: #2d3a8c; color: #fff;
}
input[type="submit"]:hover, button.primary:hover, .btn-primary:hover { background: #1e2b6e; }
.btn-success, button.tertiary { background: #0d9f4f; color: #fff; }
.btn-success:hover, button.tertiary:hover { background: #0a7f3f; }
.btn-danger, button.inverse { background: #d93025; color: #fff; }
.btn-danger:hover, button.inverse:hover { background: #b3261e; }
.btn-secondary { background: #e4e7ec; color: #1a1a2e; }
.btn-secondary:hover { background: #d0d5dd; }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; }

/* ── Cards ── */
.card { background: #fff; border: 1px solid #e4e7ec; border-radius: 8px; padding: 1.25rem; margin-bottom: 1rem; }
.card .section { padding: 0.5rem 0; }
.card .section:first-child { padding-top: 0; }
.card h4 { margin-top: 0; font-size: 0.95rem; }
.card.success { border-left: 4px solid #0d9f4f; }
.card.error { border-left: 4px solid #d93025; }
.card.fluid { width: 100%; }

/* ── Footer ── */
.site-footer {
    background: #1a1a2e; color: #c0c4ce; padding: 2rem 0 1.5rem;
    font-size: 0.85rem; margin-top: 2rem;
}
.site-footer h4 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 0.6rem; }
.site-footer a { color: #9da3b0; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .copyright { border-top: 1px solid #2a2d40; margin-top: 1.5rem; padding-top: 1rem; text-align: center; color: #6c7080; }

/* ── FAQ Grid ── */
.faq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin: 1.5rem 0; }

/* ── Utility ── */
.text-muted { color: #5a6270; }
.text-small { font-size: 0.85rem; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.75rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.75rem; }
