/*
 * Hà Tiên Website Standard 2026 — v1.0 — 21/07/2026
 * Nguồn chuẩn cấp 0 cho giao diện public của theme mạng.
 * File này được nạp sau style.css và modules.css để hiệu chỉnh có kiểm soát,
 * không phá cấu trúc block/template hiện có.
 */

:root {
    --ht-font: "Be Vietnam Pro", Inter, Arial, sans-serif;
    --ht-dark: #071116;
    --ht-navy: #0b2a4a;
    --ht-ink: #172026;
    --ht-muted: #4b5b63;
    --ht-bronze: #c4975c;
    --ht-gold: #d7ad72;
    --ht-gold-hover: #e3bf8c;
    --ht-surface: #f4f6f7;
    --ht-white: #ffffff;
    --ht-border-standard: #d5dde1;

    /* Tương thích với biến theme cũ. */
    --ht-background: var(--ht-dark);
    --ht-background-secondary: var(--ht-surface);
    --ht-background-soft: var(--ht-white);
    --ht-card: var(--ht-white);
    --ht-card-hover: var(--ht-surface);
    --ht-text: var(--ht-ink);
    --ht-text-secondary: var(--ht-muted);
    --ht-text-muted: var(--ht-muted);
    --ht-border: var(--ht-border-standard);
    --ht-border-light: var(--ht-border-standard);
    --ht-radius-sm: 8px;
    --ht-radius-md: 8px;
    --ht-radius-lg: 10px;
    --ht-content: 1200px;
    --ht-reading: 800px;
    --ht-form: 960px;
    --ht-gutter: 32px;
    --ht-section-space: 96px;
}

html {
    font-size: 100%;
}

body {
    background: var(--ht-white);
    color: var(--ht-ink);
    font-family: var(--ht-font);
    font-size: 18px;
    font-weight: 400;
    line-height: 1.67;
}

body,
button,
input,
select,
textarea {
    font-family: var(--ht-font);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--ht-ink);
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(40px, 4vw, 48px);
    line-height: 1.2;
}

h2 {
    font-size: clamp(32px, 3vw, 36px);
    line-height: 1.25;
}

h3 {
    font-size: clamp(24px, 2.4vw, 28px);
    line-height: 1.29;
}

h4 {
    font-size: 22px;
    line-height: 1.36;
}

p,
li,
dd,
dt,
td,
th {
    overflow-wrap: anywhere;
}

p {
    margin-bottom: 20px;
}

a {
    color: var(--ht-navy);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

a:hover,
a:focus-visible {
    color: #123f6d;
}

:focus-visible {
    outline: 3px solid var(--ht-gold);
    outline-offset: 3px;
}

.ht-container,
.wp-site-blocks > .alignwide,
.wp-site-blocks .alignwide {
    width: min(calc(100% - (2 * var(--ht-gutter))), var(--ht-content));
    max-width: var(--ht-content);
    margin-inline: auto;
}

.ht-reading,
.ht-entry-content > :where(p, ul, ol, blockquote):not(.alignwide):not(.alignfull) {
    max-width: var(--ht-reading);
}

/* Header: nền tối có kiểm soát, không kéo nền tối xuống toàn bộ trang. */
.ht-site-header {
    min-height: 84px;
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(7, 17, 22, 0.96);
}

.ht-header-inner {
    min-height: 84px;
}

.ht-site-header,
.ht-site-header h1,
.ht-site-header h2,
.ht-site-header h3,
.ht-site-header h4,
.ht-site-header p {
    color: var(--ht-white);
}

.ht-site-header a,
.ht-site-header .wp-block-navigation-item__content {
    color: var(--ht-white);
}

.ht-site-header .wp-block-navigation-item__content {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    font-size: 16px;
    font-weight: 500;
}

.ht-site-header .wp-block-navigation-item__content:hover,
.ht-site-header .wp-block-navigation-item__content:focus-visible,
.ht-site-header .current-menu-item > .wp-block-navigation-item__content {
    color: var(--ht-gold);
}

.ht-brand-title,
.ht-site-header .wp-block-site-title {
    font-weight: 600;
}

.ht-brand-tagline,
.ht-site-header .wp-block-site-tagline {
    color: #d5dde1;
    font-size: 14px;
    line-height: 1.4;
}

/* Hero giữ nền tối để tạo điểm nhấn, nhưng giới hạn cỡ chữ theo chuẩn. */
.ht-hero {
    min-height: auto;
    padding-block: clamp(72px, 8vw, 104px);
    color: var(--ht-white);
}

.ht-hero h1,
.ht-hero h2,
.ht-hero h3,
.ht-hero h4,
.ht-hero p,
.ht-hero li {
    color: var(--ht-white);
}

.ht-hero h1 {
    max-width: 900px;
    font-size: clamp(40px, 4vw, 48px);
    font-weight: 700;
    line-height: 1.2;
}

.ht-hero-lead {
    max-width: 760px;
    color: #e4e9eb !important;
    font-size: 20px;
    line-height: 1.6;
}

.ht-hero-panel,
.ht-ai-panel {
    color: var(--ht-white);
}

.ht-hero-panel h2,
.ht-hero-panel h3,
.ht-hero-panel p,
.ht-hero-panel span,
.ht-ai-panel h2,
.ht-ai-panel h3,
.ht-ai-panel p {
    color: var(--ht-white);
}

.ht-hero-route span {
    color: #d5dde1;
    font-size: 16px;
    line-height: 1.55;
}

/* Nhịp section theo thang 8 px của chuẩn. */
.ht-section {
    padding-block: clamp(64px, 7vw, 96px);
    background: var(--ht-white);
    color: var(--ht-ink);
}

.ht-section--compact {
    padding-block: clamp(48px, 5vw, 64px);
}

.ht-section--secondary {
    background: var(--ht-surface);
}

.ht-section--soft {
    background: var(--ht-white);
}

.ht-section--bordered {
    border-color: var(--ht-border-standard);
}

.ht-section-heading {
    max-width: 820px;
    margin-bottom: 40px;
}

.ht-section-heading h2 {
    margin-bottom: 20px;
    font-size: clamp(32px, 3vw, 36px);
    font-weight: 700;
    line-height: 1.25;
}

.ht-section-heading p,
.ht-muted {
    color: var(--ht-muted);
    font-size: 18px;
    line-height: 1.67;
}

.ht-eyebrow {
    color: var(--ht-bronze);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.ht-label {
    min-height: 30px;
    border-color: var(--ht-border-standard);
    color: var(--ht-muted);
    font-size: 14px;
}

/* Card và bảng dùng nền sáng, viền thật, không làm chữ nhạt. */
.ht-card,
.ht-industry-card,
.ht-product-card,
.ht-document-card,
.ht-project-card,
.ht-question-list,
.ht-process-step,
.ht-portal-login,
.ht-portal-dashboard,
.ht-portal-grid article {
    border-color: var(--ht-border-standard) !important;
    border-radius: 8px !important;
    background: var(--ht-white) !important;
    color: var(--ht-ink) !important;
}

.ht-card h2,
.ht-card h3,
.ht-industry-card h2,
.ht-industry-card h3,
.ht-product-card h2,
.ht-product-card h3,
.ht-document-card h2,
.ht-document-card h3,
.ht-project-card h2,
.ht-project-card h3,
.ht-question-list h2,
.ht-question-list h3,
.ht-process-step h2,
.ht-process-step h3,
.ht-portal-login h2,
.ht-portal-login h3,
.ht-portal-dashboard h2,
.ht-portal-dashboard h3 {
    color: var(--ht-ink) !important;
}

.ht-card p,
.ht-industry-card p,
.ht-product-card p,
.ht-document-card p,
.ht-project-card p,
.ht-question-list p,
.ht-process-step p,
.ht-portal-login p,
.ht-portal-dashboard p {
    color: var(--ht-muted) !important;
}

.ht-data-table th,
.ht-data-table td {
    padding: 16px;
    border-color: var(--ht-border-standard);
    color: var(--ht-ink);
}

.ht-data-table th {
    background: var(--ht-surface);
    font-weight: 600;
}

/* Nút theo cấu trúc rõ ràng, vùng bấm đủ lớn. */
.ht-button .wp-block-button__link,
.wp-element-button,
button,
input[type="submit"] {
    min-height: 52px;
    padding: 14px 24px;
    border: 1px solid var(--ht-navy);
    border-radius: 8px;
    background: var(--ht-navy);
    color: var(--ht-white);
    font-size: 17px;
    font-weight: 600;
    line-height: 24px;
}

.ht-button .wp-block-button__link:hover,
.ht-button .wp-block-button__link:focus-visible,
.wp-element-button:hover,
.wp-element-button:focus-visible,
button:hover,
button:focus-visible,
input[type="submit"]:hover,
input[type="submit"]:focus-visible {
    border-color: #123f6d;
    background: #123f6d;
    color: var(--ht-white);
}

.ht-button--outline .wp-block-button__link {
    border-color: var(--ht-navy);
    background: var(--ht-white);
    color: var(--ht-navy);
}

.ht-button--outline .wp-block-button__link:hover,
.ht-button--outline .wp-block-button__link:focus-visible {
    background: var(--ht-navy);
    color: var(--ht-white);
}

.ht-hero .ht-button .wp-block-button__link,
.ht-site-footer .ht-button .wp-block-button__link,
.ht-ai-panel .ht-button .wp-block-button__link {
    border-color: var(--ht-gold);
    background: var(--ht-gold);
    color: var(--ht-dark);
}

.ht-button--small .wp-block-button__link {
    min-height: 44px;
    padding: 10px 16px;
    font-size: 16px;
}

/* Form: label luôn rõ, input tối thiểu 52 px, lỗi không chỉ dựa vào màu. */
label,
legend {
    color: var(--ht-ink);
    font-weight: 600;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
select,
textarea,
.ht-form-grid input,
.ht-form-grid select,
.ht-form-grid textarea {
    width: 100%;
    min-height: 52px;
    padding: 13px 14px;
    border: 1px solid var(--ht-border-standard);
    border-radius: 8px;
    background: var(--ht-white);
    color: var(--ht-ink);
    font: inherit;
}

textarea,
.ht-form-grid textarea {
    min-height: 128px;
}

input::placeholder,
textarea::placeholder {
    color: #6b787e;
    opacity: 1;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    border-color: var(--ht-navy);
    outline: 3px solid rgba(215, 173, 114, 0.72);
    outline-offset: 2px;
}

/* Footer là vùng tối thứ hai, giới hạn ở cuối trang. */
.ht-site-footer {
    border-color: rgba(255, 255, 255, 0.16);
    background: var(--ht-dark);
    color: var(--ht-white);
}

.ht-site-footer h2,
.ht-site-footer h3,
.ht-site-footer h4,
.ht-site-footer p,
.ht-site-footer li {
    color: var(--ht-white);
}

.ht-site-footer a {
    color: var(--ht-gold);
}

.ht-site-footer a:hover,
.ht-site-footer a:focus-visible {
    color: var(--ht-gold-hover);
}

.ht-footer-note {
    color: #d5dde1 !important;
}

@media (max-width: 1023px) {
    :root {
        --ht-gutter: 24px;
        --ht-section-space: 72px;
    }

    .ht-header-inner {
        min-height: 72px;
    }
}

@media (max-width: 767px) {
    :root {
        --ht-gutter: 20px;
        --ht-section-space: 56px;
    }

    body {
        font-size: 17px;
        line-height: 1.65;
    }

    h1,
    .ht-hero h1 {
        font-size: 34px;
        line-height: 1.235;
    }

    h2,
    .ht-section-heading h2 {
        font-size: 28px;
        line-height: 1.286;
    }

    h3 {
        font-size: 23px;
        line-height: 1.35;
    }

    .ht-hero {
        padding-block: 64px;
    }

    .ht-hero-lead {
        font-size: 19px;
        line-height: 1.58;
    }

    .ht-section {
        padding-block: 56px;
    }

    .ht-section-heading {
        margin-bottom: 32px;
    }

    .ht-form-grid,
    .ht-portal-grid {
        grid-template-columns: 1fr;
    }

    .ht-form-wrap .wp-element-button,
    .ht-form-wrap button,
    .ht-form-wrap input[type="submit"] {
        width: 100%;
    }

    .ht-data-table {
        display: block;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
