/*
Theme Name: Lansia Prima Child
Theme URI: https://lansiaprima.com/
Template: generatepress
Description: Child theme untuk Lansia Prima — tips sehat & perawatan untuk lansia. Dibuat di atas GeneratePress.
Author: Lansia Prima
Version: 1.3.2
Text Domain: lansiaprima-child
*/

/* CATATAN: palet warna di bawah ini SEMENTARA, dipilih untuk tema
kesehatan lansia (biru tenang = tepercaya, oranye hangat = ramah).
Begitu logo diupload, warna ini akan disesuaikan presisi. */

/* =========================================================
   1. VARIABEL WARNA & TIPOGRAFI
   Palet lebih dalam & editorial: krem hangat, tinta gelap
   kehijauan, teal pekat, terracotta lembut sebagai aksen.
   Serif untuk judul (karakter/kredibilitas), sans untuk body
   (kenyamanan baca panjang & performa).
========================================================= */
:root {
	--ak-bg: #f6f5f1;
	--ak-surface: #ffffff;
	--ak-ink: #1f2d3a;           /* navy gelap — untuk judul */
	--ak-text: #33322c;
	--ak-text-muted: #6b6a63;
	--ak-accent: #1e5f8c;        /* biru tenang — kesan tepercaya/medis */
	--ak-accent-soft: #e6f0f7;   /* biru sangat muda, background badge */
	--ak-green: #2f8f5f;         /* hijau segar — aksen CTA, kesan sehat/vitalitas */
	--ak-border: #e4e1d8;
	--ak-max-width: 700px;
	--ak-wide-width: 1100px;
	--ak-radius: 4px;
	--ak-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--ak-font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
}

/* =========================================================
   2. GLOBAL
========================================================= */
body {
	background-color: var(--ak-bg);
	color: var(--ak-text);
	font-family: var(--ak-font-body);
	font-size: 17px;
	line-height: 1.75;
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--ak-accent);
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
}

.site-header,
.main-navigation {
	background-color: var(--ak-surface);
	border-bottom: 1px solid var(--ak-border);
}

.site-title,
.site-title a {
	font-family: var(--ak-font-display);
	font-weight: 600;
	font-style: italic;
	color: var(--ak-ink);
	letter-spacing: -0.01em;
}

.main-navigation a {
	color: var(--ak-text);
	font-weight: 500;
	font-size: 0.85rem;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	position: relative;
}
.main-navigation a:hover {
	color: var(--ak-accent);
	text-decoration: none;
}
.main-navigation a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -4px;
	width: 0;
	height: 1px;
	background: var(--ak-green);
	transition: width 0.2s ease;
}
.main-navigation a:hover::after {
	width: 100%;
}

/* =========================================================
   3. ARTIKEL SINGLE — dibatasi lebar supaya nyaman dibaca,
   judul pakai serif untuk kesan editorial.
========================================================= */
.single-post .entry-content {
	max-width: var(--ak-max-width);
	margin-left: auto;
	margin-right: auto;
}

.single-post .entry-title {
	font-family: var(--ak-font-display);
	font-size: 2.6rem;
	line-height: 1.2;
	font-weight: 600;
	color: var(--ak-ink);
	max-width: var(--ak-max-width);
	margin-left: auto;
	margin-right: auto;
}

.entry-content p {
	margin-bottom: 1.4em;
}

.entry-content h2 {
	font-family: var(--ak-font-display);
	margin-top: 2em;
	font-size: 1.6rem;
	font-weight: 600;
	color: var(--ak-ink);
}
.entry-content h3 {
	margin-top: 1.6em;
	font-size: 1.15rem;
	font-weight: 700;
}

.entry-content img {
	border-radius: var(--ak-radius);
}

.entry-meta,
.entry-meta a {
	color: var(--ak-text-muted);
	font-size: 0.82rem;
	letter-spacing: 0.02em;
}

/* Label kategori — kotak tegas, bukan pill bulat, kesan lebih editorial */
.entry-meta .cat-links a {
	background: transparent;
	color: var(--ak-green);
	padding: 0;
	border-radius: 0;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 0.72rem;
	letter-spacing: 0.06em;
}

/* =========================================================
   4. HEADER HALAMAN ARSIP/KATEGORI
   GP menampilkan judul kategori (mis. "Care Guides") lewat
   .page-header/.archive-header — dipercantik jadi banner
   editorial, bukan kotak teks polos.
========================================================= */
.page-header,
.archive-header {
	max-width: var(--ak-wide-width);
	margin: 0 auto;
	padding: 2.5em 1.5em 1.5em;
	border-bottom: 1px solid var(--ak-border);
	margin-bottom: 2em;
}
.page-header .page-title,
.archive-header .archive-title {
	font-family: var(--ak-font-display);
	font-size: 2rem;
	font-weight: 600;
	color: var(--ak-ink);
	margin: 0;
}
.page-header .taxonomy-description,
.archive-header .archive-description {
	color: var(--ak-text-muted);
	font-size: 0.95rem;
	margin-top: 0.5em;
	max-width: var(--ak-max-width);
}

/* =========================================================
   5. GRID ARTIKEL DI HALAMAN BERANDA/ARSIP
   Grid seragam 3 kolom, kartu dengan border halus + hover
   ringan supaya terasa "diklik", bukan teks mengambang.
========================================================= */
.blog .site-main,
.archive .site-main,
.home .site-main {
	max-width: var(--ak-wide-width);
	margin-left: auto;
	margin-right: auto;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2.2em 1.8em;
	padding: 1em 1.2em;
}

.inside-article {
	background: var(--ak-surface);
	border: 1px solid var(--ak-border);
	border-radius: var(--ak-radius);
	padding: 1.1em 1.1em 1.3em;
	transition: border-color 0.15s ease, transform 0.15s ease;
}
.blog article:hover .inside-article,
.archive article:hover .inside-article,
.home article:hover .inside-article {
	border-color: var(--ak-accent);
	transform: translateY(-2px);
}

.blog .entry-title,
.archive .entry-title,
.home .entry-title {
	font-family: var(--ak-font-display);
	font-weight: 600;
	color: var(--ak-ink);
	font-size: 1.15rem;
	line-height: 1.35;
	margin: 0.7em 0 0.4em;
}

.blog .entry-title a,
.archive .entry-title a,
.home .entry-title a {
	color: var(--ak-ink);
}
.blog .entry-title a:hover,
.archive .entry-title a:hover,
.home .entry-title a:hover {
	color: var(--ak-accent);
	text-decoration: none;
}

.blog .post-image img,
.archive .post-image img,
.home .post-image img {
	border-radius: var(--ak-radius);
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;
	width: 100%;
}

.blog .entry-summary,
.archive .entry-summary,
.home .entry-summary {
	color: var(--ak-text-muted);
	font-size: 0.9rem;
	line-height: 1.6;
	margin-top: 0.3em;
}

.blog .entry-meta,
.archive .entry-meta,
.home .entry-meta {
	margin-top: 0.8em;
	padding-top: 0.6em;
	border-top: 1px solid var(--ak-border);
}

@media (max-width: 900px) {
	.blog .site-main,
	.archive .site-main,
	.home .site-main {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 600px) {
	.blog .site-main,
	.archive .site-main,
	.home .site-main {
		grid-template-columns: 1fr;
	}
}

/* =========================================================
   5. SLOT IKLAN — dibuat menonjol tapi tidak mengganggu.
   Class ini dipanggil dari functions.php via hook GeneratePress.
========================================================= */
.ak-ad-slot {
	max-width: var(--ak-max-width);
	margin: 2.4em auto;
	text-align: center;
	overflow: hidden;
	padding: 1.4em 0;
	border-top: 1px solid var(--ak-border);
	border-bottom: 1px solid var(--ak-border);
}

.ak-ad-slot::before {
	content: "Iklan";
	display: block;
	font-size: 0.68rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ak-text-muted);
	margin-bottom: 10px;
}

.ak-ad-slot--top { margin-top: 1em; }
.ak-ad-slot--in-content { margin: 2em auto; }
.ak-ad-slot--bottom { margin-top: 2.5em; }

/* =========================================================
   7. HOMEPAGE — hero, quick links, intro, trust, artikel,
   FAQ, newsletter. Section terpisah dari grid arsip/blog.
========================================================= */
.ak-home .site-main {
	display: block;
	max-width: none;
	padding: 0;
}

.ak-btn {
	display: inline-block;
	padding: 0.8em 1.6em;
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	border-radius: var(--ak-radius);
	text-decoration: none;
}
.ak-btn:hover {
	text-decoration: none;
}
.ak-btn-primary {
	background: var(--ak-green);
	color: #fff;
}
.ak-btn-primary:hover {
	background: #256e49;
}

/* --- Hero: gambar + deskripsi (2 kolom) --- */
.ak-hero {
	padding: 3.5em 1.5em;
	background: var(--ak-surface);
	border-bottom: 1px solid var(--ak-border);
}
.ak-hero-inner {
	max-width: var(--ak-wide-width);
	margin: 0 auto;
	display: grid;
	grid-template-columns: 0.9fr 1.1fr;
	gap: 3em;
	align-items: center;
}
.ak-hero-media img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--ak-radius);
	display: block;
}
.ak-hero-art-frame {
	background: var(--ak-accent);
	border-radius: var(--ak-radius);
	aspect-ratio: 4 / 3;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2em;
}
.ak-hero-art-frame svg {
	width: 100%;
	max-width: 220px;
}
.ak-eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.72rem;
	color: var(--ak-green);
	font-weight: 700;
	margin-bottom: 0.8em;
}
.ak-hero h1 {
	font-family: var(--ak-font-display);
	font-size: 2.3rem;
	line-height: 1.25;
	font-weight: 600;
	color: var(--ak-ink);
	margin: 0 0 0.6em;
}
.ak-hero-tagline {
	color: var(--ak-text-muted);
	font-size: 1rem;
	line-height: 1.7;
	margin-bottom: 1.6em;
}

/* --- Deskripsi panjang (section 2, di bawah hero) --- */
.ak-home-about {
	background: var(--ak-surface);
	border-bottom: 1px solid var(--ak-border);
	padding: 3em 1.5em;
}
.ak-home-about-inner {
	max-width: var(--ak-max-width);
	margin: 0 auto;
}
.ak-home-about h2 {
	font-family: var(--ak-font-display);
	font-size: 1.6rem;
	color: var(--ak-ink);
	margin-bottom: 0.8em;
}
.ak-home-about p {
	color: var(--ak-text-muted);
	font-size: 1rem;
	line-height: 1.8;
	margin-bottom: 1.1em;
}
.ak-home-about p:last-child {
	margin-bottom: 0;
}

/* --- Heading tersentral (dipakai section kategori) --- */
.ak-section-heading--centered {
	justify-content: center;
	border-bottom: none;
	margin-bottom: 1.8em;
}
.ak-section-heading--centered h2 {
	text-align: center;
}

/* --- Quick links --- */
.ak-quick-links {
	max-width: var(--ak-wide-width);
	margin: 0 auto;
	padding: 3.5em 1.5em;
}
.ak-quick-links-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1em;
}
.ak-quick-link-card {
	background: var(--ak-surface);
	border: 1px solid var(--ak-border);
	border-radius: var(--ak-radius);
	padding: 1.4em 1.2em;
	display: flex;
	flex-direction: column;
	gap: 0.3em;
	color: var(--ak-ink);
	position: relative;
	transition: border-color 0.15s ease, transform 0.15s ease;
}
.ak-quick-link-card:hover {
	border-color: var(--ak-accent);
	transform: translateY(-2px);
	text-decoration: none;
}
.ak-quick-link-label {
	font-family: var(--ak-font-display);
	font-weight: 600;
	font-size: 1.05rem;
}
.ak-quick-link-desc {
	font-size: 0.82rem;
	color: var(--ak-text-muted);
}
.ak-quick-link-arrow {
	position: absolute;
	top: 1.2em;
	right: 1.2em;
	color: var(--ak-green);
	font-size: 0.9rem;
}

/* --- Trust strip --- */
.ak-trust-strip {
	max-width: var(--ak-wide-width);
	margin: 0 auto 3em;
	padding: 0 1.5em;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5em;
	text-align: center;
}
.ak-trust-item {
	border-top: 2px solid var(--ak-green);
	padding-top: 1em;
}
.ak-trust-number {
	display: block;
	font-family: var(--ak-font-display);
	font-size: 1.3rem;
	font-weight: 600;
	color: var(--ak-ink);
}
.ak-trust-label {
	display: block;
	font-size: 0.82rem;
	color: var(--ak-text-muted);
	margin-top: 0.2em;
}

/* --- Artikel terbaru --- */
.ak-home-articles {
	max-width: var(--ak-wide-width);
	margin: 0 auto 3em;
	padding: 0 1.5em;
}
.ak-section-heading {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 1.2em;
	border-bottom: 1px solid var(--ak-border);
	padding-bottom: 0.6em;
}
.ak-section-heading h2 {
	font-family: var(--ak-font-display);
	font-size: 1.5rem;
	color: var(--ak-ink);
	margin: 0;
}
.ak-view-all {
	font-size: 0.82rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.ak-home-articles-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.8em;
}
.ak-home-article-card {
	color: inherit;
	display: block;
}
.ak-home-article-card:hover {
	text-decoration: none;
}
.ak-home-article-thumb img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--ak-radius);
	margin-bottom: 0.7em;
}
.ak-home-article-cat {
	display: block;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ak-green);
	margin-bottom: 0.3em;
}
.ak-home-article-title {
	font-family: var(--ak-font-display);
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--ak-ink);
	margin: 0 0 0.35em;
}
.ak-home-article-excerpt {
	font-size: 0.85rem;
	line-height: 1.6;
	color: var(--ak-text-muted);
	margin: 0;
}
.ak-home-article-card:hover .ak-home-article-title {
	color: var(--ak-accent);
}

/* --- FAQ --- */
.ak-home-faq {
	max-width: var(--ak-max-width);
	margin: 0 auto 3em;
	padding: 0 1.5em;
}
.ak-home-faq h2 {
	font-family: var(--ak-font-display);
	font-size: 1.5rem;
	color: var(--ak-ink);
	margin-bottom: 0.8em;
}
.ak-faq-item {
	border-bottom: 1px solid var(--ak-border);
	padding: 1em 0;
}
.ak-faq-item summary {
	cursor: pointer;
	font-weight: 600;
	color: var(--ak-ink);
}
.ak-faq-item p {
	color: var(--ak-text-muted);
	margin: 0.7em 0 0;
	font-size: 0.92rem;
}

/* --- Newsletter --- */
.ak-newsletter {
	background: var(--ak-accent-soft);
	text-align: center;
	padding: 3em 1.5em;
}
.ak-newsletter h2 {
	font-family: var(--ak-font-display);
	font-size: 1.5rem;
	color: var(--ak-ink);
	margin-bottom: 0.3em;
}
.ak-newsletter p {
	color: var(--ak-text-muted);
	margin-bottom: 1.2em;
}
.ak-newsletter-form {
	display: flex;
	justify-content: center;
	gap: 0.6em;
	flex-wrap: wrap;
}
.ak-newsletter-form input[type="email"] {
	padding: 0.8em 1em;
	border: 1px solid var(--ak-border);
	border-radius: var(--ak-radius);
	min-width: 260px;
	font-size: 0.95rem;
}

@media (max-width: 900px) {
	.ak-hero-inner { grid-template-columns: 1fr; gap: 1.5em; }
	.ak-quick-links-grid { grid-template-columns: repeat(2, 1fr); }
	.ak-trust-strip { grid-template-columns: 1fr; gap: 1.2em; }
	.ak-home-articles-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
	.ak-hero { padding: 2.2em 1.2em; }
	.ak-hero h1 { font-size: 1.6rem; }
	.ak-quick-links-grid { grid-template-columns: 1fr; }
	.ak-home-articles-grid { grid-template-columns: 1fr; gap: 1.5em; }
	.ak-home-article-excerpt { font-size: 0.88rem; }
	.ak-newsletter-form input[type="email"] { min-width: 100%; }
}

/* =========================================================
   8. RESPONSIVE — artikel single
========================================================= */
@media (max-width: 768px) {
	body { font-size: 16px; }

	.single-post .entry-title { font-size: 1.7rem; }
}

/* Hormati preferensi pengguna yang mematikan animasi */
@media (prefers-reduced-motion: reduce) {
	.main-navigation a::after {
		transition: none;
	}
}

/* =========================================================
   9. FOOTER LENGKAP
========================================================= */
.ak-site-footer {
	background: var(--ak-ink);
	color: rgba(255,255,255,0.75);
	padding: 3.5em 1.5em 1.5em;
}
.ak-footer-inner {
	max-width: var(--ak-wide-width);
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1fr;
	gap: 2.5em;
	padding-bottom: 2.5em;
	border-bottom: 1px solid rgba(255,255,255,0.12);
}
.ak-footer-brand {
	font-family: var(--ak-font-display);
	font-style: italic;
	font-weight: 600;
	font-size: 1.3rem;
	color: #fff;
	margin-bottom: 0.6em;
	display: block;
}
.ak-footer-tagline {
	font-size: 0.85rem;
	line-height: 1.7;
	color: rgba(255,255,255,0.6);
	max-width: 320px;
}
.ak-footer-col h4 {
	color: #fff;
	font-family: var(--ak-font-display);
	font-size: 0.95rem;
	font-weight: 600;
	margin: 0 0 1em;
}
.ak-footer-col ul { list-style: none; margin: 0; padding: 0; }
.ak-footer-col li { margin-bottom: 0.6em; }
.ak-footer-col a {
	color: rgba(255,255,255,0.7);
	font-size: 0.85rem;
	text-decoration: none;
}
.ak-footer-col a:hover { color: #fff; text-decoration: underline; }

.ak-footer-bottom {
	max-width: var(--ak-wide-width);
	margin: 0 auto;
	padding-top: 1.5em;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.8em;
	font-size: 0.78rem;
	color: rgba(255,255,255,0.5);
}
.ak-footer-bottom a { color: rgba(255,255,255,0.5); }
.ak-footer-bottom a:hover { color: #fff; }
.ak-footer-legal { display: flex; gap: 1.2em; flex-wrap: wrap; }

@media (max-width: 900px) {
	.ak-footer-inner { grid-template-columns: 1fr 1fr; gap: 2em; }
}
@media (max-width: 600px) {
	.ak-footer-inner { grid-template-columns: 1fr; gap: 1.8em; }
	.ak-site-footer { padding: 2.5em 1.2em 6em; } /* extra bottom padding: ruang untuk bottom nav */
}

/* =========================================================
   10. BOTTOM NAVIGATION (mobile, seperti app)
   Hanya tampil di layar ≤768px. Ikon + label, bukan link teks.
========================================================= */
#ak-bottom-nav {
	display: none;
}
@media (max-width: 768px) {
	body { padding-bottom: env(safe-area-inset-bottom, 0); }

	#ak-bottom-nav {
		display: flex;
		position: fixed;
		left: 0; right: 0; bottom: 0;
		z-index: 9990;
		background: var(--ak-surface);
		border-top: 1px solid var(--ak-border);
		padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
		box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
	}
	.ak-nav-item {
		flex: 1;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 3px;
		padding: 6px 2px;
		background: none;
		border: none;
		color: var(--ak-text-muted);
		font-size: 0.65rem;
		font-weight: 600;
		text-decoration: none;
		cursor: pointer;
		font-family: var(--ak-font-body);
	}
	.ak-nav-item svg {
		width: 22px;
		height: 22px;
		stroke: currentColor;
		fill: none;
		stroke-width: 1.8;
	}
	.ak-nav-item.is-active,
	.ak-nav-item:active { color: var(--ak-accent); }

	/* Supaya konten paling bawah halaman tidak ketutupan bottom nav */
	.site-content,
	#content { padding-bottom: 64px; }
}

/* --- Panel Kategori & Pencarian (slide-up ala app) --- */
.ak-sheet-overlay {
	position: fixed;
	inset: 0;
	background: rgba(28,43,40,0.45);
	z-index: 9995;
	display: none;
	opacity: 0;
	transition: opacity 0.2s ease;
}
.ak-sheet-overlay.is-open { display: block; opacity: 1; }

.ak-sheet {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 9996;
	background: var(--ak-surface);
	border-radius: 16px 16px 0 0;
	padding: 1.2em 1.3em calc(1.4em + env(safe-area-inset-bottom, 0px));
	max-height: 70vh;
	overflow-y: auto;
	transform: translateY(100%);
	transition: transform 0.25s ease;
	box-shadow: 0 -6px 24px rgba(0,0,0,0.14);
}
.ak-sheet.is-open { transform: translateY(0); }

.ak-sheet-handle {
	width: 36px; height: 4px;
	background: var(--ak-border);
	border-radius: 999px;
	margin: 0 auto 1em;
}
.ak-sheet-title {
	font-family: var(--ak-font-display);
	font-size: 1.15rem;
	font-weight: 600;
	color: var(--ak-ink);
	margin: 0 0 1em;
}
.ak-sheet-cat-list {
	display: flex;
	flex-direction: column;
}
.ak-sheet-cat-list a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: transparent;
	border: none;
	border-bottom: 1px solid var(--ak-border);
	padding: 0.95em 0.2em;
	font-size: 0.92rem;
	font-weight: 600;
	color: var(--ak-ink);
	text-decoration: none;
}
.ak-sheet-cat-list a:last-child { border-bottom: none; }
.ak-sheet-cat-list a::after {
	content: "\2192";
	color: var(--ak-text-muted);
	font-weight: 400;
}
.ak-sheet-cat-list a:hover { color: var(--ak-accent); }

.ak-sheet-search-form {
	display: flex;
	gap: 0.5em;
}
.ak-sheet-search-form input[type="search"] {
	flex: 1;
	padding: 0.8em 1em;
	border: 1px solid var(--ak-border);
	border-radius: var(--ak-radius);
	font-size: 0.95rem;
}
.ak-sheet-search-form button {
	background: var(--ak-accent);
	color: #fff;
	border: none;
	border-radius: var(--ak-radius);
	padding: 0 1.2em;
	font-weight: 600;
	cursor: pointer;
}
