/* =========================================================
 * Galeri Taharah — Page Styles
 * Loaded only on /galeri/ archive and /galeri/{slug}/ single
 * ========================================================= */

:root {
	--galeri-navy:        #1a2d5e;
	--galeri-navy-deep:   #0f1f47;
	--galeri-blue:        #3b6cb3;
	--galeri-text:        #1f2937;
	--galeri-muted:       #6b7280;
	--galeri-light:       #ffffff;
	--galeri-light-blue:  #e9eef9;
	--galeri-pill-green:  #a3d977;
	--galeri-card-radius: 18px;
	--galeri-cta-radius:  24px;
	--galeri-soft-shadow: 0 12px 40px rgba(20, 30, 70, 0.08);
}

.galeri-page {
	background: var(--galeri-light);
	color: var(--galeri-text);
}

/* ============== HERO ============== */
.galeri-hero {
	padding: clamp(48px, 7vw, 96px) 24px clamp(32px, 5vw, 56px);
	text-align: center;
}
.galeri-hero-title {
	font-size: clamp(2.5rem, 6vw, 5rem);
	line-height: 1.05;
	letter-spacing: -0.02em;
	margin: 0;
}
.galeri-hero-title span {
	display: block;
	font-weight: 300;
	color: var(--galeri-muted);
}
.galeri-hero-title strong {
	display: block;
	font-weight: 800;
	color: var(--galeri-navy);
}

/* ============== LISTING — CARD GRID ============== */
.galeri-cards {
	padding: 0 24px clamp(48px, 6vw, 96px);
}
.galeri-cards-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 20px;
	max-width: 1200px;
	margin: 0 auto;
}
.galeri-card {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: var(--galeri-card-radius);
	text-decoration: none;
	background: var(--galeri-navy);
	color: var(--galeri-light);
	aspect-ratio: 16 / 11;
	transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.galeri-card:hover,
.galeri-card:focus-visible {
	transform: translateY(-4px);
	box-shadow: var(--galeri-soft-shadow);
	outline: none;
}
.galeri-card-photo {
	position: absolute;
	inset: 0;
}
.galeri-card-photo img,
.galeri-card-photo .galeri-card-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.galeri-card-photo::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.05) 55%, transparent 100%);
	pointer-events: none;
}
.galeri-card-info {
	position: absolute;
	bottom: 18px;
	left: 20px;
	right: 20px;
	z-index: 2;
}
.galeri-card-emoji {
	display: inline-block;
	font-size: 1.25rem;
	line-height: 1;
	margin-bottom: 6px;
}
.galeri-card-title {
	font-size: clamp(1.5rem, 2.5vw, 2rem);
	font-weight: 800;
	line-height: 1.05;
	margin: 0;
	color: var(--galeri-light);
	letter-spacing: -0.01em;
}
.galeri-card-sub {
	font-size: 0.875rem;
	font-weight: 400;
	margin: 4px 0 0;
	color: var(--galeri-light);
	opacity: 0.92;
}

/* ============== SINGLE — DETAIL HEADER ============== */
.galeri-single .galeri-detail-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	max-width: 1200px;
	margin: 0 auto;
	padding: clamp(40px, 5vw, 64px) 24px 16px;
}
.galeri-detail-titles h1 {
	font-size: clamp(1.5rem, 2.5vw, 2rem);
	font-weight: 800;
	color: var(--galeri-navy);
	margin: 0;
	line-height: 1.15;
	letter-spacing: -0.01em;
}
.galeri-detail-titles .galeri-detail-sub {
	font-size: clamp(1.5rem, 2.5vw, 2rem);
	font-weight: 800;
	color: var(--galeri-navy);
	margin: 0;
	line-height: 1.15;
	letter-spacing: -0.01em;
}
.galeri-status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--galeri-pill-green);
	color: var(--galeri-navy-deep);
	font-weight: 700;
	font-size: 0.78rem;
	padding: 6px 14px;
	border-radius: 999px;
	margin-top: 4px;
	white-space: nowrap;
}
.galeri-status-label {
	font-weight: 400;
	color: var(--galeri-muted);
	font-size: 0.7rem;
	margin-right: 6px;
}

/* Description (the_content) */
.galeri-description {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px 32px;
}
.galeri-description p {
	font-size: 1rem;
	line-height: 1.7;
	color: var(--galeri-text);
	max-width: 800px;
}

/* Photo grid (masonry via CSS columns) */
.galeri-photos-section {
	max-width: 1200px;
	margin: 0 auto;
	padding: 24px 24px 64px;
}
.galeri-photos-heading {
	font-size: 0.85rem;
	font-weight: 400;
	color: var(--galeri-muted);
	letter-spacing: 0.02em;
	text-align: center;
	margin: 0 0 24px;
}
/* ============================================================
 * Photo grid — per-page layouts (matching Figma exact positions)
 * Container ratio 1100:1168 (Sindanghayu)
 * ============================================================ */

.galeri-photos-grid {
	position: relative;
	width: 100%;
	max-width: 1100px;
	margin: 0 auto;
}
.galeri-photos-grid .galeri-photo {
	position: absolute;
	object-fit: cover;
	border-radius: 12px;
	display: block;
}

/* Default: 3-col grid fallback (for pages without explicit Figma spec) */
.galeri-photos-grid:not([class*="galeri-grid--"]) {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-auto-rows: 200px;
	gap: 14px;
}
.galeri-photos-grid:not([class*="galeri-grid--"]) .galeri-photo {
	position: static;
	width: 100%;
	height: 100%;
}

/* ===== PASIR KIDUL layout (per Figma spec) ===== */
.galeri-grid--pasir-kidul {
	aspect-ratio: 1100 / 1168;
}
.galeri-grid--pasir-kidul .galeri-photo:nth-child(1) {
	left: 0;
	top: 0;
	width: 66.07%;
	height: 32.02%;
}
.galeri-grid--pasir-kidul .galeri-photo:nth-child(2) {
	left: 68.0%;
	top: 0;
	width: 32.0%;
	height: 32.02%;
}
.galeri-grid--pasir-kidul .galeri-photo:nth-child(3) {
	left: 0;
	top: 33.90%;
	width: 32.18%;
	height: 32.02%;
}
.galeri-grid--pasir-kidul .galeri-photo:nth-child(4) {
	left: 33.93%;
	top: 33.90%;
	width: 32.14%;
	height: 32.02%;
}
.galeri-grid--pasir-kidul .galeri-photo:nth-child(5) {
	left: 67.82%;
	top: 34.08%;
	width: 32.14%;
	height: 65.92%;
}
.galeri-grid--pasir-kidul .galeri-photo:nth-child(6) {
	left: 0;
	top: 67.98%;
	width: 32.18%;
	height: 32.02%;
}
.galeri-grid--pasir-kidul .galeri-photo:nth-child(7) {
	left: 33.91%;
	top: 67.04%;
	width: 32.18%;
	height: 32.96%;
}

/* ===== CIGADOG layout (per Figma spec) ===== */
.galeri-grid--cigadog {
	aspect-ratio: 1100 / 1168;
}
.galeri-grid--cigadog .galeri-photo:nth-child(1) {
	left: 0;
	top: 0;
	width: 32.14%;
	height: 32.02%;
}
.galeri-grid--cigadog .galeri-photo:nth-child(2) {
	left: 33.93%;
	top: 0;
	width: 66.07%;
	height: 32.02%;
}
.galeri-grid--cigadog .galeri-photo:nth-child(3) {
	left: 0;
	top: 33.90%;
	width: 59.91%;
	height: 32.02%;
}
.galeri-grid--cigadog .galeri-photo:nth-child(4) {
	left: 62.55%;
	top: 33.90%;
	width: 37.45%;
	height: 32.02%;
}
.galeri-grid--cigadog .galeri-photo:nth-child(5) {
	left: 0;
	top: 67.98%;
	width: 25.46%;
	height: 32.02%;
}
.galeri-grid--cigadog .galeri-photo:nth-child(6) {
	left: 27.36%;
	top: 67.98%;
	width: 25.46%;
	height: 32.02%;
}
.galeri-grid--cigadog .galeri-photo:nth-child(7) {
	left: 54.73%;
	top: 67.98%;
	width: 45.27%;
	height: 32.02%;
}

/* ===== SINDANGHAYU layout (per Figma spec) ===== */
.galeri-grid--sindanghayu {
	aspect-ratio: 1100 / 1168;
}
.galeri-grid--sindanghayu .galeri-photo:nth-child(1) {
	left: 0;
	top: 0;
	width: 32.14%;
	height: 65.92%;
}
.galeri-grid--sindanghayu .galeri-photo:nth-child(2) {
	left: 33.93%;
	top: 0;
	width: 66.07%;
	height: 32.02%;
}
.galeri-grid--sindanghayu .galeri-photo:nth-child(3) {
	left: 33.93%;
	top: 33.90%;
	width: 32.14%;
	height: 32.02%;
}
.galeri-grid--sindanghayu .galeri-photo:nth-child(4) {
	left: 67.86%;
	top: 33.90%;
	width: 32.14%;
	height: 32.02%;
}
.galeri-grid--sindanghayu .galeri-photo:nth-child(5) {
	left: 0;
	top: 67.98%;
	width: 45.27%;
	height: 32.02%;
}
.galeri-grid--sindanghayu .galeri-photo:nth-child(6) {
	left: 47.19%;
	top: 67.55%;
	width: 25.46%;
	height: 32.02%;
}
.galeri-grid--sindanghayu .galeri-photo:nth-child(7) {
	left: 74.54%;
	top: 67.98%;
	width: 25.46%;
	height: 32.02%;
}

/* Mobile: stack vertically */
@media (max-width: 768px) {
	.galeri-photos-grid[class*="galeri-grid--"] {
		aspect-ratio: auto !important;
		display: flex;
		flex-direction: column;
		gap: 14px;
	}
	.galeri-photos-grid[class*="galeri-grid--"] .galeri-photo {
		position: static;
		width: 100%;
		height: auto;
		left: auto !important;
		top: auto !important;
	}
}

/* ============== SHARE / CTA SECTION (shared) ============== */
.galeri-share {
	background: var(--galeri-light-blue);
	padding: clamp(40px, 5vw, 64px) 24px clamp(64px, 8vw, 96px);
}
.galeri-share-inner {
	max-width: 800px;
	margin: 0 auto;
	background: var(--galeri-light);
	border-radius: var(--galeri-cta-radius);
	padding: clamp(24px, 4vw, 40px);
	box-shadow: var(--galeri-soft-shadow);
	text-align: center;
}
.galeri-share-inner p {
	font-size: 0.95rem;
	line-height: 1.7;
	color: var(--galeri-text);
	margin: 0 auto 24px;
	max-width: 620px;
}
.galeri-share-actions {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	flex-wrap: wrap;
}
.galeri-share-cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
	color: var(--galeri-navy);
	font-size: 0.95rem;
}
.galeri-share-cta svg {
	color: var(--galeri-navy);
}
.galeri-social {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 999px;
	color: var(--galeri-light);
	text-decoration: none;
	transition: transform 0.2s ease;
}
.galeri-social:hover {
	transform: scale(1.06);
}
.galeri-social-ig {
	background: linear-gradient(135deg, #f58529 0%, #dd2a7b 50%, #515bd4 100%);
}
.galeri-social-li {
	background: #0a66c2;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
	.galeri-card,
	.galeri-social { transition: none; }
}

/* 2026-05-21 — Sindanghayu: shift crop ke atas, fokus wajah */
.galeri-card[href*="sindanghayu"] .galeri-card-img {
	object-position: center 20%;
}
