/**
 * Home page template styles: portal + visa detail variants.
 * Loaded only on pages using template-home-portal.php or
 * template-home-visa-detail.php.
 */

:root {
	--hp-navy:       #122c54;
	--hp-navy-deep:  #0b1f3d;
	--hp-gold:       #b8873a;
	--hp-gold-soft:  #e2c98c;
	--hp-red:        #b8292e;
	--hp-text:       #1b1b1b;
	--hp-muted:      #5a6472;
	--hp-border:     #dfe3ea;
	--hp-bg:         #ffffff;
	--hp-bg-soft:    #f4f6f9;
	--hp-link:       #0854a8;
	--hp-link-hover: #063d7c;
}

/* ----------------------------------------------------------
   Shared: hide the theme's default site-header on these
   templates because each template renders its own masthead.
---------------------------------------------------------- */
.page-template-template-home-portal .site-header,
.page-template-template-home-visa-detail .site-header,
.page-template-template-home-portal .site-content,
.page-template-template-home-visa-detail .site-content {
	padding: 0;
	max-width: none;
}
.page-template-template-home-portal .site-header,
.page-template-template-home-visa-detail .site-header {
	display: none;
}

.page-template-template-home-portal,
.page-template-template-home-visa-detail {
	background: var(--hp-bg);
	color: var(--hp-text);
}

/* ==========================================================
   1. PORTAL TEMPLATE (home.gov.au style)
========================================================== */

.hp-portal {
	font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	color: var(--hp-text);
	background: var(--hp-bg);
}

.hp-portal__container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
	width: 100%;
}

.hp-portal__utility {
	background: #000;
	color: #fff;
	font-size: 13px;
}
.hp-portal__utility-links {
	list-style: none;
	margin: 0;
	padding: 8px 0;
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	justify-content: flex-end;
}
.hp-portal__utility-links a {
	color: #fff;
	text-decoration: none;
}
.hp-portal__utility-links a:hover {
	text-decoration: underline;
}

.hp-portal__masthead {
	background: #fff;
	border-bottom: 4px solid var(--hp-gold);
}
.hp-portal__masthead-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-top: 18px;
	padding-bottom: 18px;
	flex-wrap: wrap;
}

.hp-portal__brand {
	display: flex;
	align-items: center;
	gap: 14px;
	color: var(--hp-navy);
}
.hp-portal__crest {
	color: var(--hp-navy);
	display: inline-flex;
}
.hp-portal__brand-text {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}
.hp-portal__brand-top {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--hp-navy);
	font-weight: 700;
}
.hp-portal__brand-dept {
	font-size: 18px;
	font-weight: 700;
	color: var(--hp-navy);
}
.hp-portal__brand-site {
	font-size: 14px;
	color: var(--hp-muted);
	margin-top: 2px;
}

.hp-portal__search {
	display: flex;
	align-items: stretch;
	border: 1px solid #bbb;
	border-radius: 2px;
	overflow: hidden;
	min-width: 260px;
	background: #fff;
}
.hp-portal__search input {
	border: 0;
	padding: 8px 10px;
	font: inherit;
	font-size: 14px;
	flex: 1;
	outline: none;
}
.hp-portal__search-btn {
	border: 0;
	background: var(--hp-navy);
	color: #fff;
	padding: 0 12px;
	cursor: pointer;
}
.hp-portal__search-btn:hover {
	background: var(--hp-navy-deep);
}

.hp-portal__primary-nav {
	background: var(--hp-navy);
	color: #fff;
}
.hp-portal__primary-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
}
.hp-portal__primary-list a {
	display: block;
	padding: 14px 18px;
	color: #fff;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	border-right: 1px solid rgba(255,255,255,0.08);
}
.hp-portal__primary-list a:hover {
	background: var(--hp-navy-deep);
}
.hp-portal__menu-toggle {
	display: none;
	background: transparent;
	border: 0;
	color: #fff;
	padding: 10px 14px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.hp-portal__welcome {
	background: linear-gradient(135deg, var(--hp-navy) 0%, var(--hp-navy-deep) 100%);
	color: #fff;
	padding: 60px 0;
	position: relative;
	overflow: hidden;
}
.hp-portal__welcome::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 85% 30%, rgba(184,135,58,0.25), transparent 40%),
		radial-gradient(circle at 15% 80%, rgba(184,41,46,0.20), transparent 45%);
	pointer-events: none;
}
.hp-portal__welcome > .hp-portal__container {
	position: relative;
	z-index: 1;
}
.hp-portal__eyebrow {
	margin: 0;
	font-size: 14px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	opacity: 0.9;
}
.hp-portal__title {
	margin: 8px 0 0;
	font-size: 48px;
	line-height: 1.1;
	font-weight: 700;
}

.hp-portal__services {
	padding: 48px 0;
	background: var(--hp-bg-soft);
}
.hp-portal__section-title {
	margin: 0 0 24px;
	font-size: 28px;
	font-weight: 700;
	color: var(--hp-navy);
}
.hp-portal__section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
}
.hp-portal__section-head .hp-portal__section-title {
	margin: 0;
}
.hp-portal__see-all {
	font-weight: 600;
	color: var(--hp-link);
	text-decoration: none;
	font-size: 14px;
}
.hp-portal__see-all:hover {
	color: var(--hp-link-hover);
	text-decoration: underline;
}

.hp-portal__service-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 18px;
}
.hp-portal__service-card {
	display: flex;
	gap: 14px;
	padding: 22px;
	background: #fff;
	border: 1px solid var(--hp-border);
	border-radius: 6px;
	text-decoration: none;
	color: inherit;
	transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.hp-portal__service-card:hover {
	border-color: var(--hp-navy);
	box-shadow: 0 6px 18px rgba(18, 44, 84, 0.08);
	transform: translateY(-2px);
}
.hp-portal__service-icon {
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	border-radius: 6px;
	background: var(--hp-navy);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.hp-portal__service-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.hp-portal__service-title {
	font-size: 16px;
	font-weight: 700;
	color: var(--hp-navy);
}
.hp-portal__service-desc {
	font-size: 14px;
	color: var(--hp-muted);
}

.hp-portal__news {
	padding: 48px 0;
}
.hp-portal__news-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}
.hp-portal__news-card {
	background: #fff;
	border: 1px solid var(--hp-border);
	border-radius: 6px;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.hp-portal__news-date {
	margin: 0;
	font-size: 12px;
	color: var(--hp-muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}
.hp-portal__news-title {
	margin: 0;
	font-size: 18px;
	line-height: 1.3;
}
.hp-portal__news-title a {
	color: var(--hp-navy);
	text-decoration: none;
}
.hp-portal__news-title a:hover {
	color: var(--hp-link);
	text-decoration: underline;
}
.hp-portal__news-excerpt {
	margin: 0;
	font-size: 14px;
	color: var(--hp-text);
}

.hp-portal__contact {
	background: var(--hp-bg-soft);
	padding: 48px 0;
}
.hp-portal__contact-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}
.hp-portal__contact-card {
	background: #fff;
	border: 1px solid var(--hp-border);
	border-top: 4px solid var(--hp-navy);
	padding: 20px;
	border-radius: 4px;
}
.hp-portal__contact-card--hotline {
	border-top-color: var(--hp-red);
}
.hp-portal__contact-card h3 {
	margin: 0 0 10px;
	font-size: 18px;
	color: var(--hp-navy);
}
.hp-portal__contact-card p {
	margin: 0 0 8px;
	font-size: 14px;
}
.hp-portal__contact-card a {
	color: var(--hp-link);
}
.hp-portal__hotline-number {
	margin-top: 8px;
	font-size: 22px;
	font-weight: 700;
	color: var(--hp-red);
}

.hp-portal__page-content {
	padding: 32px 0;
}

.hp-portal__acknowledgement {
	background: var(--hp-navy);
	color: #fff;
	padding: 24px 0;
	font-size: 14px;
	line-height: 1.6;
}

/* Portal responsive */
@media (max-width: 900px) {
	.hp-portal__service-grid,
	.hp-portal__news-grid,
	.hp-portal__contact-grid {
		grid-template-columns: 1fr;
	}
	.hp-portal__title {
		font-size: 34px;
	}
	.hp-portal__menu-toggle {
		display: inline-flex;
		align-items: center;
		gap: 8px;
	}
	.hp-portal__primary-list {
		display: none;
		flex-direction: column;
		width: 100%;
	}
	.hp-portal__primary-list.is-open {
		display: flex;
	}
	.hp-portal__primary-list a {
		border-right: 0;
		border-bottom: 1px solid rgba(255,255,255,0.08);
	}
}

/* ==========================================================
   2. VISA DETAIL TEMPLATE (subclass 482 style)
========================================================== */

.hp-detail {
	font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	color: var(--hp-text);
	background: #fff;
}

.hp-detail__container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
	width: 100%;
}

.hp-detail__utility {
	background: #000;
	color: #fff;
	font-size: 12px;
}
.hp-detail__utility-links {
	list-style: none;
	margin: 0;
	padding: 6px 0;
	display: flex;
	gap: 16px;
	justify-content: flex-end;
	flex-wrap: wrap;
}
.hp-detail__utility-links a {
	color: #fff;
	text-decoration: none;
}
.hp-detail__utility-links a:hover {
	text-decoration: underline;
}

.hp-detail__masthead {
	background: #fff;
	border-bottom: 3px solid var(--hp-gold);
}
.hp-detail__masthead-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 0;
	gap: 20px;
	flex-wrap: wrap;
}
.hp-detail__brand {
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--hp-navy);
}
.hp-detail__brand-text {
	display: flex;
	flex-direction: column;
	line-height: 1.15;
}
.hp-detail__brand-top {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--hp-navy);
	font-weight: 700;
}
.hp-detail__brand-dept {
	font-size: 16px;
	font-weight: 700;
	color: var(--hp-navy);
}

.hp-detail__search {
	display: flex;
	align-items: stretch;
	border: 1px solid #bbb;
	border-radius: 2px;
	overflow: hidden;
	min-width: 240px;
}
.hp-detail__search input {
	border: 0;
	padding: 6px 10px;
	font: inherit;
	font-size: 13px;
	flex: 1;
	outline: none;
}
.hp-detail__search button {
	border: 0;
	background: var(--hp-navy);
	color: #fff;
	padding: 0 10px;
	cursor: pointer;
}

.hp-detail__primary-nav {
	background: var(--hp-navy);
	color: #fff;
}
.hp-detail__primary-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
}
.hp-detail__primary-nav a {
	display: block;
	padding: 12px 16px;
	color: #fff;
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
	border-right: 1px solid rgba(255,255,255,0.08);
}
.hp-detail__primary-nav a:hover {
	background: var(--hp-navy-deep);
}

.hp-detail__breadcrumb {
	background: var(--hp-bg-soft);
	border-bottom: 1px solid var(--hp-border);
	font-size: 13px;
}
.hp-detail__breadcrumb ol {
	list-style: none;
	margin: 0;
	padding: 10px 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	color: var(--hp-muted);
}
.hp-detail__breadcrumb li + li::before {
	content: "›";
	margin-right: 6px;
	color: var(--hp-muted);
}
.hp-detail__breadcrumb a {
	color: var(--hp-link);
	text-decoration: none;
}
.hp-detail__breadcrumb a:hover {
	text-decoration: underline;
}
.hp-detail__breadcrumb [aria-current="page"] {
	color: var(--hp-text);
	font-weight: 600;
}

.hp-detail__title-block {
	padding: 28px 0 18px;
	border-bottom: 1px solid var(--hp-border);
}
.hp-detail__eyebrow {
	margin: 0 0 4px;
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--hp-gold);
	font-weight: 700;
}
.hp-detail__title {
	margin: 0 0 12px;
	font-size: 34px;
	line-height: 1.2;
	font-weight: 700;
	color: var(--hp-navy);
}
.hp-detail__lede {
	margin: 0;
	font-size: 17px;
	color: var(--hp-text);
	max-width: 820px;
}

.hp-detail__body {
	padding: 32px 0 60px;
}
.hp-detail__body-grid {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 40px;
	align-items: start;
}

.hp-detail__sidebar {
	position: sticky;
	top: 20px;
}
.hp-detail__sidebar-box {
	background: #fff;
	border: 1px solid var(--hp-border);
	border-radius: 4px;
	margin-bottom: 16px;
	overflow: hidden;
}
.hp-detail__sidebar-title {
	margin: 0;
	padding: 10px 14px;
	font-size: 14px;
	background: var(--hp-navy);
	color: #fff;
	font-weight: 700;
}
.hp-detail__sidebar-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.hp-detail__sidebar-list li {
	border-top: 1px solid var(--hp-border);
}
.hp-detail__sidebar-list li:first-child {
	border-top: 0;
}
.hp-detail__sidebar-list a {
	display: block;
	padding: 10px 14px;
	font-size: 14px;
	color: var(--hp-link);
	text-decoration: none;
}
.hp-detail__sidebar-list a:hover {
	background: var(--hp-bg-soft);
	text-decoration: underline;
}

.hp-detail__content {
	min-width: 0;
}
.hp-detail__section {
	padding: 0 0 28px;
	margin-bottom: 28px;
	border-bottom: 1px solid var(--hp-border);
}
.hp-detail__section:last-of-type {
	border-bottom: 0;
}
.hp-detail__section h2 {
	margin: 0 0 12px;
	font-size: 24px;
	color: var(--hp-navy);
	font-weight: 700;
	scroll-margin-top: 20px;
}
.hp-detail__section p,
.hp-detail__section li {
	font-size: 15px;
	line-height: 1.65;
}
.hp-detail__section ul {
	padding-left: 20px;
}
.hp-detail__section ul li {
	margin-bottom: 6px;
}

.hp-detail__keyfacts {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	margin-top: 18px;
}
.hp-detail__keyfact {
	background: var(--hp-bg-soft);
	border-left: 4px solid var(--hp-gold);
	padding: 12px 14px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.hp-detail__keyfact-label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--hp-muted);
	font-weight: 700;
}
.hp-detail__keyfact-value {
	font-size: 17px;
	color: var(--hp-navy);
	font-weight: 700;
}

.hp-detail__cta {
	display: inline-block;
	background: var(--hp-navy);
	color: #fff;
	text-decoration: none;
	padding: 10px 18px;
	border-radius: 3px;
	font-weight: 700;
	font-size: 15px;
}
.hp-detail__cta:hover {
	background: var(--hp-navy-deep);
	color: #fff;
}

.hp-detail__pagefoot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-top: 20px;
	border-top: 1px solid var(--hp-border);
	flex-wrap: wrap;
}
.hp-detail__updated {
	margin: 0;
	font-size: 13px;
	color: var(--hp-muted);
}
.hp-detail__print {
	background: transparent;
	border: 1px solid var(--hp-border);
	padding: 6px 12px;
	font: inherit;
	font-size: 13px;
	cursor: pointer;
	border-radius: 3px;
}
.hp-detail__print:hover {
	border-color: var(--hp-navy);
	color: var(--hp-navy);
}

/* Visa detail responsive */
@media (max-width: 900px) {
	.hp-detail__body-grid {
		grid-template-columns: 1fr;
	}
	.hp-detail__sidebar {
		position: static;
	}
	.hp-detail__title {
		font-size: 26px;
	}
	.hp-detail__keyfacts {
		grid-template-columns: 1fr;
	}
}
