/*
Theme Name: Gallery Home Nails Style
Description: Classic PHP theme with the Nails Gallery look: centered header, a 3-column square photo grid with swipeable tiles and titles, and a clean single-post view.
Version: 1.0.0
Requires at least: 6.1
Requires PHP: 7.4
Text Domain: gallery-home-nails-style
*/

:root {
	--paper: #ffffff;
	--ink: #1c1c1e;
	--muted: #8e8e93;
	--line: #dbdbdb;
	--accent: #e1306c;
	
	--font-heading: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
	--font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.5;
	background: var(--paper);
	color: var(--ink);
}

a {
	color: var(--ink);
}

/* ---------- Header ---------- */

.site-header {
	text-align: center;
	padding: 1.5rem 1rem;
}

.site-title {
	font-size: 2rem;
	font-weight: 700;
	text-decoration: none;
}

.site-description {
	margin: 0.25rem 0 0;
	font-size: 0.875rem;
	color: var(--muted);
}

.site-title,
.card-title,
.entry-title {
	font-family: var(--font-heading);
}

/* ---------- Home grid ---------- */

main {
	max-width: 935px;
	margin: 0 auto;
	padding: 0 0 2rem;
}

.gallery {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.25rem 4px;
}

.card {
	min-width: 0;
	margin: 0;
}

.tile {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: var(--line);
}

.strip {
	display: flex;
	height: 100%;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
	-webkit-overflow-scrolling: touch;
}

.strip::-webkit-scrollbar {
	display: none;
}

.slide {
	flex: 0 0 100%;
	height: 100%;
	scroll-snap-align: start;
	display: block;
}

.slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tile-text {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	text-align: center;
	color: var(--ink);
	text-decoration: none;
}

.card-title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	padding: 0.4rem 0.1rem 0;
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--ink);
	text-decoration: none;
}

.card-title:hover {
	text-decoration: underline;
}

/* ---------- Dots (added by assets/strips.js) ---------- */

.dots {
	display: flex;
	justify-content: center;
	gap: 6px;
	padding-top: 0.6rem;
}

.dots span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--line);
	transition: background 0.15s ease;
}

.dots span.is-active {
	background: var(--accent);
}

/* On home tiles the dots sit over the bottom of the photo */
.tile .dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 8px;
	padding-top: 0;
	pointer-events: none;
}

.tile .dots span {
	background: rgba(255, 255, 255, 0.55);
	box-shadow: 0 0 2px rgba(0, 0, 0, 0.4);
}

.tile .dots span.is-active {
	background: #fff;
}

/* ---------- Pagination ---------- */

.pagination {
	margin: 2rem 0;
	text-align: center;
}

.pagination .nav-links {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.pagination a,
.pagination span {
	display: inline-block;
	padding: 0.4rem 0.8rem;
	color: var(--ink);
	text-decoration: none;
}

.pagination .current {
	font-weight: 700;
}

/* ---------- Single post ---------- */

.single {
	max-width: 640px;
	margin: 2rem auto;
	padding: 0 1rem;
}

.entry-title {
	margin: 0 0 0.25rem;
	font-size: 1.5rem;
	font-weight: 600;
}

.entry-date {
	margin: 0 0 1.5rem;
	font-size: 0.875rem;
	color: var(--muted);
}

.entry-content img {
	max-width: 100%;
	height: auto;
}

.entry-content .wp-block-gallery {
	display: flex;
	flex-wrap: nowrap;
	gap: 0;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	margin: 0;
}

.entry-content .wp-block-gallery::-webkit-scrollbar {
	display: none;
}

.entry-content .wp-block-gallery figure.wp-block-image {
	flex: 0 0 100% !important;
	width: 100% !important;
	max-width: 100%;
	margin: 0;
	scroll-snap-align: center;
	scroll-snap-stop: always;
}

.entry-content .wp-block-gallery figure.wp-block-image img {
	display: block;
	width: 100%;
	height: auto !important;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.entry-content > .wp-block-image {
	margin: 0;
}

.entry-content > .wp-block-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.post-nav {
	display: flex;
	justify-content: space-between;
	margin-top: 2rem;
}

/* ---------- Footer ---------- */

.site-footer {
	padding: 2rem 1rem;
	text-align: center;
	font-size: 0.875rem;
}

.site-footer a {
	color: var(--muted);
	text-decoration: none;
}

/* ---------- Small screens: edge-to-edge grid ---------- */

@media (max-width: 640px) {
	main {
		padding: 0;
	}
	.gallery {
		grid-template-columns: 1fr;
		gap: 1.5rem 0;
	}
}
