/*
Theme Name: Xét Nghiệm Việt
Description: Theme tiếng Việt cho trung tâm xét nghiệm y khoa, có danh mục dịch vụ, tin tức và thông tin liên hệ.
Version: 1.0.0
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: xet-nghiem-viet
*/
:root { --navy: #10283c; --teal: #006b63; --mint: #9ef1d3; --ink: #142c40; --muted: #466175; --line: #d5e3e9; --paper: #f6fafb; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 system-ui, sans-serif; }
img { max-width: 100%; height: auto; }
a { color: var(--teal); }
:focus-visible { outline: 3px solid #bd6416; outline-offset: 4px; }
h1, h2, h3 { line-height: 1.18; }
h1 { font-size: clamp(2rem, 5vw, 3.75rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.45rem, 3vw, 2.1rem); letter-spacing: -.025em; }
.wrap { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: absolute; top: 0; left: 12px; z-index: 5; transform: translateY(-120%); background: white; padding: 10px; }
.skip-link:focus { transform: none; }
.site-header { background: white; border-bottom: 1px solid var(--line); }
.header-inner { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { color: var(--navy); display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 1.16rem; font-weight: 800; min-width: 0; overflow-wrap: anywhere; }
.brand-icon { display: grid; place-items: center; flex: 0 0 40px; height: 40px; background: var(--teal); color: white; border-radius: 11px; font-size: 1.8rem; line-height: 1; }
.custom-logo { display: block; width: auto; max-width: min(215px, 48vw); max-height: 58px; object-fit: contain; }
nav ul { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; margin: 0; padding: 0; }
nav a { display: block; color: var(--navy); text-decoration: none; padding: 8px; font-weight: 700; }
nav a:hover, nav a[aria-current="page"] { color: var(--teal); text-decoration: underline; text-underline-offset: 5px; }
.mobile-menu { display: none; }
.button { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; border-radius: 8px; padding: 10px 16px; background: var(--teal); color: white; font-weight: 750; text-decoration: none; }
.button:hover { background: #00544e; }
.hero { position: relative; isolation: isolate; background: var(--navy); color: white; min-height: clamp(355px, 43vw, 570px); display: grid; align-items: center; }
.hero::after, .hero-image { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-image { object-fit: cover; object-position: center; z-index: -2; }
.hero::after { content: ""; z-index: -1; background: linear-gradient(90deg, #081e30f5 0%, #081e30c7 44%, #081e3010 100%); }
.hero-inner { padding-block: 44px; }
.hero h1 { max-width: 600px; margin: 0 0 16px; }
.hero p { max-width: 460px; margin: 0 0 24px; color: #e3f4fa; font-size: clamp(1rem, 1.7vw, 1.16rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .button { background: var(--mint); color: #0b3a3a; }
.hero .button:hover { background: white; }
.hero .button-light { color: white; border: 1px solid #c7e4ec; background: #10283caa; }
.hero .button-light:hover { color: var(--navy); }
.home-section { padding-top: 42px; scroll-margin-top: 20px; }
.home-section:last-child { padding-bottom: 48px; }
.section-heading { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-bottom: 20px; }
.section-heading h2, .contact-box h2 { margin: 0; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card, .empty, .contact-box { background: white; border: 1px solid var(--line); border-radius: 14px; }
.card { overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.card-image { display: block; position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #d5e3e9; }
.card-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 18px; overflow-wrap: anywhere; }
.card h3 { font-size: 1.14rem; margin: 0; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--teal); }
.card p { color: var(--muted); margin: 0; }
.card .text-link { margin-top: auto; padding-top: 6px; }
.text-link { font-weight: 750; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.empty { margin: 0; padding: 18px; color: var(--muted); }
.contact-box { background: #e8f7f3; padding: clamp(20px, 5vw, 36px); }
.contact-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin: 16px 0; }
.contact-info dt { font-weight: 750; }
.contact-info dd { margin: 0; overflow-wrap: anywhere; }
.contact-box .button { margin-top: 12px; }
.site-footer { background: var(--navy); color: #fff; }
.footer-inner { padding-block: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer a { color: #b9f5e0; }
.archive, .article-page { min-height: 60vh; padding-block: 32px 55px; }
.article-page { max-width: 900px; }
.archive h1, .article-page h1 { margin-top: 0; }
.article-cover { display: block; width: 100%; max-height: 540px; object-fit: cover; border-radius: 14px; }
.prose { margin-top: 24px; overflow-wrap: anywhere; }
.prose figure { max-width: 100%; }
.navigation.pagination { margin-top: 24px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
@media (max-width: 960px), (max-width: 1400px) and (pointer: coarse) {
    .header-inner { position: relative; min-height: 64px; }
    .desktop-menu, .header-action { display: none; }
    .mobile-menu { display: block; }
    .mobile-menu summary { display: block; cursor: pointer; padding: 9px 12px; color: var(--navy); font-weight: 750; border: 1px solid var(--line); border-radius: 8px; white-space: nowrap; }
    .mobile-menu summary::-webkit-details-marker { display: none; }
    .mobile-menu nav { position: absolute; z-index: 3; top: calc(100% - 4px); right: 0; width: min(320px, 100%); padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 10px 28px #10283c22; }
    .mobile-menu nav ul { display: block; }
    .mobile-menu nav a { padding: 12px; }
    .mobile-results { border-top: 1px solid var(--line); }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .wrap { width: calc(100% - 30px); }
    .hero-image { object-position: 61% center; }
    .hero::after { background: #081e30a8; }
    .card-grid, .contact-info { grid-template-columns: minmax(0, 1fr); }
    .home-section { padding-top: 30px; }
}
