/*
Theme Name: UKM Hand & Microsurgery
Theme URI: https://ukmhand.my
Author: UKM Hand & Microsurgery Unit
Description: Navy and gold theme for the UKM Hand & Microsurgery Unit, Hospital Canselor Tuanku Muhriz. All pages are built from standard WordPress blocks so text and photos can be edited in the normal page editor.
Version: 1.1.0
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ukmhand
*/

/* Site chrome only (header, footer, page banners, news lists).
   Styles for page content blocks live in assets/css/content.css,
   which is also loaded inside the editor. */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 999; width: auto; height: auto; clip: auto; background: #fff; color: #0B2545; padding: 12px 18px; font-weight: 700; }
:focus-visible { outline: 2px solid #C9A54C; outline-offset: 3px; }

/* ---------- Top bar ---------- */
.ukm-topbar { background: #071A33; color: #B9C8DA; font-size: 0.8rem; letter-spacing: 0.02em; }
.ukm-topbar__in { max-width: 1280px; margin: 0 auto; padding: 8px 24px; display: flex; gap: 8px 24px; justify-content: space-between; flex-wrap: wrap; }
.ukm-topbar a { color: #fff; text-decoration: none; }
.ukm-topbar a:hover { color: #EBD38E; }
.ukm-topbar__contact { display: flex; gap: 6px 22px; flex-wrap: wrap; }
.ukm-topbar__contact span { color: #C9A54C; font-weight: 700; margin-right: 6px; font-family: Montserrat, sans-serif; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; }

/* ---------- Header ---------- */
.ukm-header { background: #fff; border-bottom: 1px solid #DDE3EC; position: sticky; top: 0; z-index: 50; }
.admin-bar .ukm-header { top: 32px; }
.ukm-header__in { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.ukm-brand { display: flex; justify-content: center; padding: 18px 0 10px; transition: padding .2s; }
.ukm-brand a { display: block; line-height: 0; }
.ukm-brand img { height: 78px; width: auto; max-width: 100%; transition: height .2s; }
.ukm-header.is-stuck .ukm-brand { padding: 8px 0 2px; }
.ukm-header.is-stuck .ukm-brand img { height: 46px; }

.ukm-nav ul { list-style: none; margin: 0; padding: 0; }
.ukm-nav > ul, .ukm-nav > div > ul { display: flex; justify-content: center; flex-wrap: wrap; gap: 0 4px; }
.ukm-nav a { display: block; padding: 14px 13px 15px; color: #0B2545; text-decoration: none; font-family: Montserrat, sans-serif; font-weight: 700; font-size: 0.74rem; letter-spacing: 0.13em; text-transform: uppercase; position: relative; }
.ukm-nav a::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 8px; height: 2px; background: #C9A54C; transform: scaleX(0); transform-origin: left; transition: transform .2s; }
.ukm-nav a:hover::after, .ukm-nav .current-menu-item > a::after, .ukm-nav .current_page_item > a::after, .ukm-nav .current_page_parent > a::after { transform: scaleX(1); }
.ukm-nav li { position: relative; }
.ukm-nav ul ul { display: none; position: absolute; top: 100%; left: 0; min-width: 220px; background: #fff; border: 1px solid #DDE3EC; border-top: 2px solid #C9A54C; box-shadow: 0 14px 30px rgba(11,37,69,.12); z-index: 60; }
.ukm-nav li:hover > ul, .ukm-nav li:focus-within > ul { display: block; }
.ukm-nav ul ul a { padding: 12px 16px; }
.ukm-nav ul ul a::after { display: none; }

.ukm-burger { display: none; align-items: center; gap: 10px; background: none; border: 1px solid #DDE3EC; border-radius: 2px; padding: 10px 14px; margin: 0 auto 12px; color: #0B2545; font-family: Montserrat, sans-serif; font-weight: 700; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; }
.ukm-burger i { display: block; width: 18px; height: 2px; background: #0B2545; box-shadow: 0 -6px 0 #0B2545, 0 6px 0 #0B2545; }

@media (max-width: 900px) {
	.admin-bar .ukm-header { top: 0; }
	.ukm-header { position: static; }
	.ukm-brand img { height: 56px; }
	.ukm-burger { display: flex; }
	.ukm-nav { display: none; padding-bottom: 12px; }
	.ukm-nav.is-open { display: block; }
	.ukm-nav > ul, .ukm-nav > div > ul { display: block; border-top: 1px solid #DDE3EC; }
	.ukm-nav a { padding: 14px 4px; border-bottom: 1px solid #EEF1F6; }
	.ukm-nav a::after { display: none; }
	.ukm-nav ul ul { display: block; position: static; border: 0; box-shadow: none; padding-left: 16px; }
}

/* ---------- Page banner ---------- */
.ukm-banner { position: relative; background: #0B2545; color: #fff; overflow: hidden; }
.ukm-banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, #071A33 0%, rgba(11,37,69,.92) 45%, rgba(29,78,137,.55) 100%); z-index: 1; }
.ukm-banner::after { content: ""; position: absolute; right: -40px; bottom: -120px; width: 380px; height: 500px; background: url(assets/img/hand-white-gold.svg) no-repeat center / contain; opacity: .09; z-index: 1; }
.ukm-banner__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ukm-banner__in { position: relative; z-index: 2; max-width: 1168px; margin: 0 auto; padding: clamp(48px, 7vw, 92px) 24px clamp(44px, 6vw, 80px); }
.ukm-banner__eyebrow { font-family: Montserrat, sans-serif; font-weight: 700; font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: #EBD38E; margin: 0 0 14px; display: flex; align-items: center; gap: 12px; }
.ukm-banner__eyebrow::before { content: ""; width: 34px; height: 2px; background: #C9A54C; }
.ukm-banner__eyebrow a { color: inherit; text-decoration: none; }
.ukm-banner h1 { color: #fff; margin: 0; font-size: clamp(2.1rem, 5vw, 3.6rem); text-transform: uppercase; letter-spacing: 0.01em; }
.ukm-banner__sub { max-width: 640px; margin: 18px 0 0; color: #D5DEEA; font-size: 1.15rem; line-height: 1.6; }

/* ---------- Main ---------- */
.ukm-main { min-height: 40vh; }
.ukm-main--narrow { max-width: 808px; margin: 0 auto; padding: clamp(40px, 6vw, 72px) 24px; }
.ukm-main--narrow .entry-content > .alignwide { margin-inline: -80px; max-width: none; }
.ukm-meta { font-family: Montserrat, sans-serif; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #8C6A1F; }
.ukm-backlink { display: inline-block; margin-top: 40px; font-family: Montserrat, sans-serif; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; color: #0B2545; border-bottom: 2px solid #C9A54C; padding-bottom: 4px; }

/* ---------- News list ---------- */
.ukm-newslist { max-width: 1168px; margin: 0 auto; padding: clamp(44px, 6vw, 80px) 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px; }
.ukm-newscard { background: #fff; border: 1px solid #DDE3EC; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.ukm-newscard:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(11,37,69,.10); }
.ukm-newscard__img { aspect-ratio: 16 / 10; background: #E9EEF5 url(assets/img/hand-navy-gold.svg) no-repeat center / 22%; display: block; overflow: hidden; }
.ukm-newscard__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ukm-newscard__body { padding: 24px 24px 28px; border-top: 3px solid #C9A54C; flex: 1; }
.ukm-newscard h2 { font-size: 1.25rem; margin: 10px 0 10px; letter-spacing: 0; }
.ukm-newscard h2 a { color: #0B2545; text-decoration: none; }
.ukm-newscard h2 a:hover { color: #1D4E89; }
.ukm-newscard p { margin: 0; color: #3A4A5C; font-size: 0.98rem; }
.ukm-pagination { max-width: 1168px; margin: 0 auto; padding: 0 24px 64px; font-family: Montserrat, sans-serif; font-weight: 700; }
.ukm-pagination .page-numbers { display: inline-block; padding: 8px 14px; border: 1px solid #DDE3EC; margin-right: 6px; text-decoration: none; color: #0B2545; }
.ukm-pagination .current { background: #0B2545; color: #fff; border-color: #0B2545; }

/* ---------- Footer ---------- */
.ukm-footer { background: #071A33; color: #B9C8DA; font-size: 0.95rem; border-top: 4px solid #C9A54C; }
.ukm-footer a { color: #fff; text-decoration: none; }
.ukm-footer a:hover { color: #EBD38E; }
.ukm-footer__in { max-width: 1280px; margin: 0 auto; padding: 64px 24px 40px; display: grid; grid-template-columns: 1.5fr 1fr 1.2fr 1fr; gap: 48px; }
.ukm-footer__logo { height: 64px; width: auto; max-width: 100%; margin-left: -6px; }
.ukm-footer h2 { color: #EBD38E; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; margin: 0 0 18px; }
.ukm-footer p { margin: 0 0 12px; line-height: 1.65; }
.ukm-footer ul { list-style: none; margin: 0; padding: 0; }
.ukm-footer li { margin-bottom: 9px; }
.ukm-footer__social { display: flex; gap: 16px; margin-top: 18px; font-family: Montserrat, sans-serif; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.ukm-footer__social a { border-bottom: 1px solid #C9A54C; padding-bottom: 3px; }
.ukm-footer__base { border-top: 1px solid rgba(255,255,255,.1); }
.ukm-footer__base div { max-width: 1280px; margin: 0 auto; padding: 20px 24px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: 0.8rem; color: #8FA1B8; }
@media (max-width: 960px) { .ukm-footer__in { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .ukm-footer__in { grid-template-columns: 1fr; gap: 36px; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
.ukm-footer__in > div:nth-child(2) ul { columns: 2; column-gap: 24px; }
.ukm-footer li { break-inside: avoid; }

/* v1.1 plain style */
.ukm-nav a { font-size: 0.95rem; font-weight: 600; letter-spacing: 0; text-transform: none; padding: 12px 12px 14px; }
.ukm-nav a::after { left: 12px; right: 12px; bottom: 6px; }
.ukm-topbar__contact span { text-transform: none; letter-spacing: 0; font-size: 0.8rem; font-weight: 600; }
.ukm-banner::before, .ukm-banner::after { display: none; }
.ukm-banner__img { opacity: .35; }
.ukm-banner__in { padding-top: clamp(36px, 5vw, 60px); padding-bottom: clamp(32px, 4.5vw, 54px); }
.ukm-banner h1 { text-transform: none; font-weight: 700; font-size: clamp(1.9rem, 4vw, 2.8rem); }
.ukm-banner__eyebrow { text-transform: none; letter-spacing: 0; font-size: 0.9rem; font-weight: 600; margin-bottom: 8px; }
.ukm-banner__eyebrow::before { display: none; }
.ukm-banner__sub { font-size: 1.05rem; margin-top: 12px; }
.ukm-meta, .ukm-backlink, .ukm-burger, .ukm-footer__social { text-transform: none; letter-spacing: 0; font-size: 0.9rem; font-weight: 600; }
.ukm-newscard { border-radius: 6px; overflow: hidden; transition: none; }
.ukm-newscard:hover { transform: none; box-shadow: none; }
.ukm-newscard__body { border-top: 0; }
.ukm-newscard h2 { font-weight: 700; }
.ukm-footer { border-top: 0; }
.ukm-footer h2 { text-transform: none; letter-spacing: 0; font-size: 1rem; color: #fff; }
