/*
Theme Name: Family Portal
Theme URI: https://github.com/family-portal
Description: Giao diện cổng thông tin gia tộc (Vietnamese family portal). Dùng cùng plugin Family Portal Core.
Version: 1.0.0
Author: ConnectAI
Text Domain: family-portal
*/

:root {
	--fpc-primary: #1a5f4a;
	--fpc-primary-light: #2d8f6f;
	--fpc-bg: #f8f6f1;
	--fpc-card: #fff;
	--fpc-text: #2c2c2c;
	--fpc-muted: #666;
	--fpc-accent: #f1efe7;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: "Be Vietnam Pro", sans-serif;
	color: var(--fpc-text);
	background: #fff;
	line-height: 1.6;
}

.wrap {
	max-width: 1080px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

.site-header .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.site-header {
	padding: 1.25rem 0;
	border-bottom: 1px solid #eee;
	background: #fff;
}

.site-header a {
	color: var(--fpc-primary);
	font-weight: 600;
	text-decoration: none;
	font-size: 1.1rem;
}

.site-header .site-header-company {
	color: var(--fpc-muted);
	font-weight: 500;
	font-size: 0.95rem;
}

.site-header .site-header-company:hover {
	color: var(--fpc-primary);
}

.site-header-logo {
	display: inline-flex;
	align-items: center;
}

.site-header-logo-img {
	height: 40px;
	width: auto;
	display: block;
	vertical-align: middle;
}

.site-footer a {
	color: var(--fpc-primary);
	text-decoration: none;
}

.site-footer a:hover {
	text-decoration: underline;
}

.site-footer {
	border-top: 1px solid #eee;
	padding: 2rem 0;
	color: var(--fpc-muted);
	font-size: 0.9rem;
}

body.fpc-portal {
	margin: 0;
	font-family: "Be Vietnam Pro", sans-serif;
	background: var(--fpc-bg);
	color: var(--fpc-text);
	line-height: 1.6;
}

.fpc-portal .fpc-wrap {
	max-width: 960px;
	margin: 0 auto;
	padding: 0 1rem;
}

.fpc-portal .fpc-header {
	background: var(--fpc-primary);
	color: #fff;
	padding: 1rem 0;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.fpc-portal .fpc-header h1 {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.2;
}

.fpc-portal .fpc-branding {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.fpc-portal .fpc-logo-link {
	display: flex;
	align-items: center;
	padding: 6px;
	background: rgba(255,255,255,0.1);
	border-radius: 8px;
	transition: background 0.2s;
}

.fpc-portal .fpc-logo-link:hover {
	background: rgba(255,255,255,0.2);
}

.fpc-portal .fpc-logo-img {
	height: 32px;
	width: auto;
	display: block;
}

.fpc-portal .fpc-nav {
	display: flex;
	gap: 1.5rem;
	margin-top: 0.75rem;
	flex-wrap: wrap;
}

.fpc-portal .fpc-nav a {
	color: rgba(255,255,255,0.9);
	text-decoration: none;
	font-weight: 500;
}

.fpc-portal .fpc-nav a:hover {
	color: #fff;
}

.fpc-portal .fpc-nav a.is-active {
	color: #fff;
	font-weight: 600;
	border-bottom: 2px solid rgba(255,255,255,0.95);
	padding-bottom: 2px;
}

.fpc-portal .fpc-main {
	padding: 2rem 0;
	min-height: 50vh;
}

.fpc-portal .fpc-card {
	background: var(--fpc-card);
	border-radius: 8px;
	box-shadow: 0 1px 4px rgba(0,0,0,0.08);
	padding: 1.5rem;
	margin-bottom: 1.5rem;
}

.fpc-portal .fpc-card h2 {
	margin-top: 0;
	color: var(--fpc-primary);
	font-size: 1.25rem;
}

.fpc-portal .fpc-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.fpc-portal .fpc-list li {
	border-bottom: 1px solid #eee;
	padding: 0.75rem 0;
}

.fpc-portal .fpc-list li:last-child {
	border-bottom: none;
}

.fpc-portal .fpc-list a {
	color: var(--fpc-primary);
	text-decoration: none;
	font-weight: 500;
}

.fpc-portal .fpc-list a:hover {
	text-decoration: underline;
}

.fpc-portal .fpc-meta {
	color: var(--fpc-muted);
	font-size: 0.875rem;
	margin-top: 0.5rem;
}

/* Family tree container */
.fpc-tree-container {
	background: var(--fpc-card);
	border-radius: 8px;
	box-shadow: 0 1px 4px rgba(0,0,0,0.08);
	min-height: 400px;
	max-height: 70vh;
	overflow-y: auto;
	overflow-x: auto;
	position: relative;
}

.fpc-tree-container svg {
	display: block;
}

.fpc-tree-node {
	cursor: pointer;
}

.fpc-tree-node:hover {
	opacity: 0.9;
}

.fpc-tree-node rect {
	fill: var(--fpc-primary-light);
	stroke: var(--fpc-primary);
	stroke-width: 1;
	rx: 4;
}

/* Phân biệt màu theo giới tính */
.fpc-tree-node.fpc-gender-male rect {
	fill: #2d8f6f; /* xanh lá đậm hơn */
	stroke: #1a5f4a;
}

.fpc-tree-node.fpc-gender-female rect {
	fill: #c75d7a; /* hồng rượu vang */
	stroke: #a63b63;
}

.fpc-tree-node text {
	fill: #fff;
	font-size: 12px;
	text-anchor: middle;
}

.fpc-member-modal {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.4);
	z-index: 1000;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.fpc-member-modal.is-open {
	display: flex;
}

.fpc-member-modal .fpc-modal-inner {
	background: var(--fpc-card);
	border-radius: 8px;
	max-width: 400px;
	width: 100%;
	padding: 1.5rem;
	max-height: 90vh;
	overflow-y: auto;
}

.fpc-portal .fpc-footer {
	text-align: center;
	padding: 1.5rem;
	color: var(--fpc-muted);
	font-size: 0.875rem;
	border-top: 1px solid #eee;
	margin-top: 2rem;
}

.fpc-portal .fpc-footer a {
	color: var(--fpc-primary-light);
	text-decoration: none;
}

.fpc-portal .fpc-footer a:hover {
	text-decoration: underline;
}

.fpc-portal .fpc-intro p {
	margin: 0 0 1rem;
}

.fpc-portal .fpc-empty {
	color: var(--fpc-muted);
	font-style: italic;
}

.fpc-landing .fpc-hero {
	background: linear-gradient(120deg, rgba(26,95,74,0.08), rgba(45,143,111,0.12));
	padding: 3.5rem 0 3rem;
}

.fpc-landing .fpc-kicker {
	text-transform: uppercase;
	font-size: 0.85rem;
	letter-spacing: 0.08em;
	color: var(--fpc-muted);
	margin-bottom: 0.75rem;
}

.fpc-landing h1 {
	font-size: 2.4rem;
	margin: 0 0 1rem;
	color: var(--fpc-primary);
}

.fpc-landing .fpc-lead {
	font-size: 1.1rem;
	max-width: 720px;
	margin-bottom: 1.5rem;
	color: var(--fpc-text);
}

.fpc-landing .fpc-hero-actions {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 2rem;
}

.fpc-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem 1.5rem;
	border-radius: 999px;
	text-decoration: none;
	font-weight: 600;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fpc-button.primary {
	background: var(--fpc-primary);
	color: #fff;
	box-shadow: 0 10px 20px rgba(26,95,74,0.2);
}

.fpc-button.ghost {
	border: 1px solid var(--fpc-primary);
	color: var(--fpc-primary);
}

.fpc-button:hover {
	transform: translateY(-1px);
}

.fpc-landing .fpc-hero-stats {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.fpc-landing .fpc-stat {
	background: #fff;
	border-radius: 12px;
	padding: 1rem 1.25rem;
	box-shadow: 0 6px 20px rgba(0,0,0,0.05);
}

.fpc-landing .fpc-stat strong {
	display: block;
	font-size: 1.4rem;
	color: var(--fpc-primary);
}

.fpc-landing .fpc-section {
	padding: 3rem 0;
}

.fpc-landing .fpc-section.fpc-accent {
	background: var(--fpc-accent);
}

.fpc-landing .fpc-section h2 {
	margin-top: 0;
	color: var(--fpc-primary);
	font-size: 1.8rem;
}

.fpc-landing .fpc-grid {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	margin-top: 2rem;
}

.fpc-landing .fpc-card {
	background: #fff;
	border-radius: 12px;
	padding: 1.5rem;
	box-shadow: 0 8px 22px rgba(0,0,0,0.06);
}

.fpc-landing .fpc-card h3 {
	margin-top: 0;
	color: var(--fpc-primary);
	font-size: 1.1rem;
}

.fpc-landing .fpc-checklist {
	list-style: none;
	padding: 0;
	margin: 1.5rem 0 0;
	display: grid;
	gap: 0.75rem;
}

.fpc-landing .fpc-checklist li {
	padding-left: 1.5rem;
	position: relative;
}

.fpc-landing .fpc-checklist li::before {
	content: "✓";
	position: absolute;
	left: 0;
	color: var(--fpc-primary);
	font-weight: 700;
}

.fpc-landing .fpc-steps {
	counter-reset: fpc-step;
	display: grid;
	gap: 1.25rem;
	margin-top: 1.5rem;
}

.fpc-landing .fpc-step {
	background: #fff;
	border-radius: 12px;
	padding: 1.25rem 1.5rem;
	box-shadow: 0 6px 16px rgba(0,0,0,0.05);
	position: relative;
}

.fpc-landing .fpc-step::before {
	counter-increment: fpc-step;
	content: counter(fpc-step, decimal-leading-zero);
	position: absolute;
	top: 1rem;
	right: 1.25rem;
	font-size: 1.1rem;
	color: var(--fpc-muted);
}

.fpc-landing .fpc-pricing {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	margin-top: 2rem;
}

.fpc-landing .fpc-price-card {
	border: 1px solid #e5e5e5;
	border-radius: 16px;
	padding: 1.75rem;
	background: #fff;
}

.fpc-landing .fpc-price-card.highlight {
	border-color: var(--fpc-primary);
	box-shadow: 0 12px 30px rgba(26,95,74,0.12);
}

.fpc-landing .fpc-price-title {
	font-weight: 700;
	color: var(--fpc-primary);
	margin-bottom: 0.5rem;
}

.fpc-landing .fpc-price-note {
	color: var(--fpc-muted);
	font-size: 0.9rem;
	margin-top: 0.75rem;
}

.fpc-landing .fpc-faq {
	display: grid;
	gap: 1rem;
	margin-top: 1.5rem;
}

.fpc-landing .fpc-faq-item {
	background: #fff;
	border-radius: 12px;
	padding: 1.25rem 1.5rem;
	box-shadow: 0 6px 16px rgba(0,0,0,0.04);
}

.fpc-landing .fpc-cta {
	background: var(--fpc-primary);
	color: #fff;
}

.fpc-landing .fpc-cta h2,
.fpc-landing .fpc-cta p {
	color: #fff;
}

.fpc-landing .fpc-cta .fpc-button {
	background: #fff;
	color: var(--fpc-primary);
}

/* Trang tìm kiếm gia tộc */
.fpc-search-families .fpc-section {
	padding: 2rem 0 3rem;
}

.fpc-search-families h1 {
	font-size: 1.75rem;
	color: var(--fpc-primary);
	margin-bottom: 0.5rem;
}

.fpc-search-form {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin: 1.5rem 0;
	align-items: center;
}

.fpc-search-form input[type="search"] {
	flex: 1;
	min-width: 200px;
	padding: 0.6rem 1rem;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 1rem;
}

.fpc-search-form input[type="search"]:focus {
	outline: none;
	border-color: var(--fpc-primary);
	box-shadow: 0 0 0 2px rgba(26, 95, 74, 0.15);
}

.fpc-search-meta {
	color: var(--fpc-muted);
	font-size: 0.95rem;
	margin-bottom: 1.25rem;
}

.fpc-search-meta a {
	color: var(--fpc-primary);
	text-decoration: none;
}

.fpc-search-meta a:hover {
	text-decoration: underline;
}

.fpc-family-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.75rem;
}

.fpc-family-item {
	background: #fff;
	border-radius: 8px;
	padding: 1rem 1.25rem;
	box-shadow: 0 2px 8px rgba(0,0,0,0.06);
	border: 1px solid #eee;
}

.fpc-family-item a {
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--fpc-primary);
	text-decoration: none;
}

.fpc-family-item a:hover {
	text-decoration: underline;
}

.fpc-family-meta {
	color: var(--fpc-muted);
	font-size: 0.875rem;
	margin-top: 0.35rem;
}

.fpc-search-families .fpc-empty {
	color: var(--fpc-muted);
	font-style: italic;
	margin: 1rem 0;
}

.fpc-back-landing {
	margin-top: 2rem;
}

.fpc-back-landing a {
	color: var(--fpc-primary);
	text-decoration: none;
}

.fpc-back-landing a:hover {
	text-decoration: underline;
}

.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute;
	height: 1px;
	width: 1px;
	overflow: hidden;
}
