/* === Minimal Reset & Base === */
*,
*::before,
*::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	list-style: none;
}
html,
body {
	overflow-x: hidden;
}
:root {
	--site-width: 1400px;
	--primary-color: #14647c;
	--header-height: 80px;
	--middle-column-indent: clamp(2rem, 6vw, 4rem);
	--gallery-top-offset: 8rem; /* Adjust this value if needed for fine-tuning */
}
html {
	scroll-behavior: smooth;
	scroll-snap-type: y proximity;
	font-size: 16px;
}
body {
	font-family: "Poppins", sans-serif;
	background-color: #fff;
	/* color: #464646; */
	padding-block-start: var(--header-height);
}
a {
	color: var(--primary-color);
	text-decoration: none;
	cursor: pointer;
}
/* Visually Hidden (for screen readers) */
.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
/* === Header === */
header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: var(--header-height);
	background-color: #fff;
	z-index: 1000;
}
.header-container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 100%;
	padding-inline: clamp(1rem, 5vw, 20px);
}
.logo img {
	height: clamp(40px, 8vw, 50px);
}
/* === Navigation Shared === */
.header-nav-links,
.footer-nav-links {
	display: flex;
	gap: clamp(10px, 3vw, 20px);
	font-weight: 500;
}
.header-nav-links {
	margin-left: auto;
	align-items: center;
	justify-content: flex-end;
	font-size: clamp(0.9rem, 1.8vw, 1.1rem);
}
.header-nav-links a,
.footer-nav-links a {
	color: var(--primary-color);
	position: relative;
}
.header-nav-links a::after,
.footer-nav-links a::after {
	content: "";
	position: absolute;
	bottom: -0.15em;
	left: 0;
	right: 0;
	background: var(--primary-color);
	height: 1.5px;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.25s ease-in-out;
}
.header-nav-links a:hover::after,
.header-nav-links a:focus::after,
.footer-nav-links a:hover::after,
.footer-nav-links a:focus::after {
	transform: scaleX(1.1);
}
/* Current page indicator */
nav a[aria-current="page"] {
	font-weight: 600;
}
nav a[aria-current="page"]::after {
	transform: scaleX(1);
	height: 2px;
}
/* === Hamburger Menu === */
.ham-menu {
	display: none;
	flex-direction: column;
	gap: 4px;
	cursor: pointer;
	background: transparent;
	border: none;
	padding: 8px;
	border-radius: 4px;
	z-index: 1002;
}
.ham-menu span {
	width: 25px;
	height: 3px;
	background-color: var(--primary-color);
	border-radius: 3px;
	transition: all 0.3s ease;
}
.ham-menu:hover span {
	background-color: rgb(144, 210, 216);
}
.ham-menu:focus-visible {
	outline: 2px solid var(--primary-color);
	outline-offset: 4px;
}
.ham-menu.active span:nth-child(1) {
	transform: rotate(45deg) translate(5px, 5px);
}
.ham-menu.active span:nth-child(2) {
	opacity: 0;
}
.ham-menu.active span:nth-child(3) {
	transform: rotate(-45deg) translate(5px, -5px);
}
/* === Mobile Navigation === */
@media (max-width: 768px) {
	.ham-menu {
		display: flex;
	}
	.header-nav-links {
		position: fixed;
		top: var(--header-height);
		left: 0;
		width: 100%;
		height: calc(100vh - var(--header-height));
		background-color: rgb(144, 210, 216);
		flex-direction: column;
		justify-content: center;
		align-items: center;
		gap: 3rem;
		opacity: 0;
		transform: scaleY(0);
		transform-origin: top;
		transition: opacity 0.3s ease, transform 0.4s ease;
		z-index: 1001;
		padding-block: 2rem;
	}
	.header-nav-links.active {
		opacity: 1;
		transform: scaleY(1);
	}
	.header-nav-links a {
		font-size: 2rem;
	}
	.header-container {
		padding-inline: 1rem;
	}
}
/* === Sections (shared) === */
section {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	background-attachment: fixed;
}
.section-overlay {
	position: relative;
}
.section-overlay::before {
	content: "";
	position: absolute;
	inset: 0;
	/* White background */
	background: rgba(255, 255, 255, 0.1);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	z-index: 0;
}
/* Background images for main sections */
.hero {
	background-image: url("../img/portfolio/main/DJI_0058.webp");
}
.about {
	background-image: url("../img/portfolio/main/IMG_2443_TP.webp");
}
.people {
	background-image: url("../img/portfolio/main/IMG_3236.webp");
}
.portraits {
	background-image: url("../img/portfolio/main/IMG_3878copy.webp");
}
.places {
	background-image: url("../img/portfolio/main/IMG_2443_TP.webp");
}
.contact {
	background: linear-gradient(135deg, #f8a9b1 0%, #f89da9 50%, #f69db8 100%);
}
/* === Hero Section === */
.hero-container {
	min-height: 100vh;
	display: grid;
	grid-template-columns: 1fr;
	width: 100%;
	position: relative;
	z-index: 1;
}
.hero-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: clamp(1rem, 4vw, 2rem);
	text-align: center;
	padding-inline: clamp(1rem, 5vw, 2rem);
}
.hero-header {
	color: #ffffff;
	font-size: clamp(4rem, 10vw, 9rem);
	font-weight: 700;
	text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}
.hero-text {
	color: #14647c;
	font-size: clamp(2rem, 6vw, 4.5rem);
	font-weight: 600;
}
/* === Titled Sections (About, People preview, etc.) === */
.about-container,
.people-container,
.portraits-container,
.places-container,
.contact-container {
	min-height: 100vh;
	display: grid;
	grid-template-columns: minmax(150px, 2fr) minmax(min(400px, 100%), 3fr) minmax(
			80px,
			1fr
		);
	width: 100%;
	padding-inline: clamp(1rem, 5vw, 20px);
	position: relative;
	z-index: 1;
}
.content-header {
	grid-column: 1;
	align-self: center;
	justify-self: start;
	text-align: left;
	padding-inline-start: clamp(1rem, 5vw, 20px);
	color: #fff;
	font-size: clamp(3.5rem, 8vw, 7rem);
	font-weight: 700;
	position: relative;
	z-index: 1;
}
/* Contact title override */
.contact .content-header {
	color: #14647c;
	text-shadow: none;
}
.section-intro {
	grid-column: 2;
	align-self: center;
	justify-self: start;
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: clamp(1.5rem, 4vw, 3rem);
	padding-inline-start: var(--middle-column-indent);
	padding-inline-end: clamp(1rem, 4vw, 4rem);
	align-items: flex-start;
	padding: 5em 0;
}
.section-intro .content-text {
	color: #fff;
	line-height: 1.8;
	font-size: clamp(1.15rem, 2.5vw, 1.75rem);
	max-width: 80ch;
	position: relative;
	z-index: 1;
}
.gallery-button {
	align-self: flex-end;
	background-color: #14647c;
	color: #fff;
	padding: clamp(0.4em, 1vw, 0.6em) clamp(0.8em, 2vw, 1.4em);
	border-radius: 8px;
	font-size: clamp(1rem, 2vw, 1.3rem);
	font-weight: 500;
	transition: opacity 0.3s ease, transform 0.2s ease;
}
.gallery-button:hover,
.gallery-button:focus {
	opacity: 0.85;
	transform: translateX(4px);
}
/* Contact specific */
.contact .contact-social-media {
	grid-column: 3;
	align-self: center;
	justify-self: center;
	display: flex;
	flex-direction: column;
	gap: 30px;
	font-size: 2rem;
	color: #14647c;
}
.contact .contact-social-media a {
	color: inherit;
	transition: opacity 0.3s ease;
}
.contact .contact-social-media a:hover,
.contact .contact-social-media a:focus {
	opacity: 0.8;
}
/* === Contact Form === */
.content-contact-form {
	width: 100%;
	max-width: 65ch;
	margin-block-end: 0.5em;
}

#contactForm,
#contactForm fieldset {
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
	background: transparent !important;
	padding: 0 !important;
	margin: 0 !important;
	min-width: 0; /* Fixes some browsers adding default width */
}

#contactForm {
	color: #000;
	padding-block: 1em;
}

#contactForm input,
#contactForm textarea {
	display: block;
	width: 100%;
	padding: 1.1em 1em;
	margin-block: 0.5em 0;
	border: none;
	border-bottom: 2px solid #14647c;
	border-radius: 5px;
	background: rgba(255, 255, 255, 0.9);
	font-family: inherit;
	font-size: 1rem;
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
	outline: none;
	box-shadow: none;
}

#contactForm input:focus,
#contactForm textarea:focus {
	outline: none !important;
	border-bottom-color: rgb(144, 210, 216);
	box-shadow: 0 2px 8px rgba(20, 100, 124, 0.15);
}

#contactForm textarea {
	min-height: 7em;
}

#contactForm button {
	background-color: #14647c;
	color: #fff;
	padding: 0.9em 1.4em;
	margin-block-start: 1em;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 500;
	transition: opacity 0.3s ease, transform 0.2s ease;
}

#contactForm button:hover,
#contactForm button:focus {
	opacity: 0.85;
	transform: translateX(4px);
}

/* Success message */
.success-message {
	font-size: 2.2rem;
	max-width: 20ch;
	line-height: 180%;
	color: #14647c;
	text-transform: capitalize;
}

/* NEW SUCCESS */
.form-feedback {
	padding: 1rem;
	margin-bottom: 1.5rem;
	border-radius: 4px;
	text-align: center;
}
.form-feedback.success {
	background: #d4edda;
	color: #155724;
}
.form-feedback.error {
	background: #f8d7da;
	color: #721c24;
}

/* === Masonry Gallery Pages (People, Places, Portraits) === */
.gallery-container {
	min-height: 100vh;
	display: grid;
	grid-template-columns: minmax(80px, 1fr) minmax(min(400px, 100%), 5fr) minmax(
			80px,
			1fr
		);
	width: 100%;
	padding-inline: clamp(1rem, 5vw, 20px);
	position: relative;
	z-index: 1;
	align-content: start;
	padding-top: var(--gallery-top-offset);
}

/* Vertical title on gallery pages - Desktop and Tablet */
.gallery-section .content-header {
	grid-column: 1;
	grid-row: 1;
	align-self: start;
	justify-self: center;
	writing-mode: vertical-rl;
	text-orientation: mixed;
	transform: rotate(180deg);
	white-space: nowrap;
	padding: 0;
	margin: 0;
	color: rgba(246, 166, 178, 0.25);
	font-size: clamp(3rem, 7vw, 6rem);
	font-weight: 700;
}

.images-container {
	grid-column: 2;
	grid-row: 1;
	align-self: start;
	width: 100%;
	max-width: 1600px;
	margin-inline: auto;
	padding-top: 0;
	padding-bottom: clamp(4rem, 8vw, 6rem);
}

.gallery-grid {
	column-count: 4;
	column-gap: clamp(1.5rem, 3vw, 2.5rem);
	width: 100%;
}

.gallery-item {
	break-inside: avoid;
	margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
	position: relative;
	overflow: hidden;
	border-radius: 8px;
	background-color: #f5f5f5;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	cursor: pointer;
}
.gallery-item:hover,
.gallery-item:focus-within {
	/* transform: translateY(-6px); */
	transform: translateY(-1px);
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
	z-index: 5;
}
.gallery-item img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 0.4s ease;
}
.gallery-item:hover img,
.gallery-item:focus-within img {
	/* transform: scale(1.03); */
	transform: scale(1.001);
}
.no-images {
	column-span: all;
	text-align: center;
	font-size: clamp(1.2rem, 2.5vw, 1.8rem);
	color: #666;
	padding-block: 4rem;
}
/* Loading skeleton */
.gallery-item img[loading="lazy"] {
	background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
	background-size: 200% 100%;
	animation: loading 1.5s infinite;
}
@keyframes loading {
	0% {
		background-position: 200% 0;
	}
	100% {
		background-position: -200% 0;
	}
}
/* Masonry responsive */
@media (max-width: 1200px) {
	.gallery-grid {
		column-count: 3;
	}

	.contact .contact-social-media {
		gap: 0.5em;
		font-size: 1.2rem;

		color: #14647c;
	}
}
@media (max-width: 992px) {
	.gallery-grid {
		column-count: 3;
	}
}
@media (max-width: 768px) {
	.gallery-container {
		grid-template-columns: 1fr;
		padding-inline: 1rem;
		align-content: start;
		padding-top: 0;
	}
	.gallery-section .content-header {
		grid-column: 1;
		grid-row: 1;
		align-self: start;
		justify-self: center;
		writing-mode: vertical-rl;
		text-orientation: mixed;
		transform: rotate(180deg);
		white-space: nowrap;
		padding: 2rem 0 1rem;
		margin: 0;
		color: rgba(246, 166, 178, 0.25);
		font-size: clamp(3rem, 9vw, 6rem);
		padding: 2rem 0 1rem;
	}
	.images-container {
		grid-row: auto;
		padding-top: 0;
		padding-bottom: clamp(2rem, 5vw, 4rem);
	}
	.gallery-grid {
		column-count: 2;
		column-gap: 1rem;
	}
	.gallery-item {
		margin-bottom: 1rem;
	}
}
@media (max-width: 480px) {
	.gallery-container {
		grid-template-columns: 1fr;
		padding-inline: 1rem;
		padding-top: 0;
		align-content: start;
		gap: 0;
	}

	.gallery-section .content-header {
		transform: rotate(360deg);
		grid-column: 1;
		grid-row: 1;
		align-self: start;
		/* justify-self: center; */
		writing-mode: initial;
		white-space: nowrap;
		padding: 1rem 0 1rem;
		margin: 0;
		color: rgba(246, 166, 178, 0.25);
		font-size: clamp(1rem, 9vw, 3rem);
	}

	.images-container {
		grid-column: 1 / -1;
		grid-row: 2;
		padding-top: 0;
		padding-bottom: clamp(3rem, 8vw, 5rem);
	}

	.gallery-grid {
		column-count: 1;
		column-gap: 0;
	}
	.gallery-item {
		margin-bottom: 1.5rem;
	}
}
/* === Lightbox === */
.lightbox-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.95);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	align-items: center;
	justify-content: center;
	z-index: 2000;
	opacity: 0;
	transition: opacity 0.4s ease;
}
.lightbox-overlay.active {
	display: flex;
	opacity: 1;
}
/* .lightbox-content {
	position: relative;
	max-width: 95%;
	max-height: 95%;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
	animation: lightboxZoom 0.5s ease;
}
.lightbox-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
} */

/* Lightbox image scaling - best compromise for photography */
.lightbox-content {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex; /* modern centering helper */
	align-items: center;
	justify-content: center;
}

.lightbox-img {
	max-width: 95vw; /* ← most important - almost full viewport width */
	max-height: 95vh; /* ← most important - almost full viewport height */
	width: auto; /* let natural aspect ratio decide */
	height: auto;
	object-fit: contain; /* very helpful fallback + modern browsers */
	/* Optional nice touches: */
	box-shadow: 0 0 40px rgba(0, 0, 0, 0.9);
	border-radius: 4px;
	transition: transform 0.15s ease; /* smooth zoom if you add later */
}

/* Optional: slight zoom on hover/tap (very popular in 2025 photography sites) */
.lightbox-img:hover {
	transform: scale(1.02);
}

.lightbox-close,
.lightbox-nav {
	position: absolute;
	background: rgba(255, 255, 255, 0.2);
	border: none;
	border-radius: 50%;
	color: white;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.3s;
}
.lightbox-close {
	top: 20px;
	right: 30px;
	width: 44px;
	height: 44px;
	font-size: 28px;
}
.lightbox-nav {
	top: 50%;
	transform: translateY(-50%);
	width: 50px;
	height: 50px;
	font-size: 30px;
}
.lightbox-prev {
	left: 30px;
}
.lightbox-next {
	right: 30px;
}
.lightbox-close:hover,
.lightbox-close:focus,
.lightbox-nav:hover,
.lightbox-nav:focus {
	background: rgba(255, 255, 255, 0.4);
}
@keyframes lightboxZoom {
	from {
		transform: scale(0.8);
		opacity: 0;
	}
	to {
		transform: scale(1);
		opacity: 1;
	}
}
@media (max-width: 768px) {
	.lightbox-close {
		top: 15px;
		right: 15px;
		width: 40px;
		height: 40px;
		font-size: 24px;
	}
	.lightbox-nav {
		width: 40px;
		height: 40px;
		font-size: 24px;
	}
}
/* === Footer === */
footer {
	width: 100%;
	background: linear-gradient(
		135deg,
		rgba(254, 149, 193, 0.1) 0%,
		rgba(248, 157, 169, 0.25) 50%,
		rgba(246, 166, 178, 0.15) 100%
	);
}
.footer-container {
	display: grid;
	grid-template-areas: "header nav" "copyright copyright";
	grid-template-columns: 4fr 2fr;
	grid-template-rows: 1fr auto;
	align-items: center;
	padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 5vw, 20px) clamp(1rem, 3vw, 2rem);
}
.footer-header {
	grid-area: header;
	justify-self: start;
	/* padding-inline-start: 10%; */
	color: #14647c;
	font-size: clamp(3rem, 20vw, 12rem);
	font-weight: 700;
}
.footer-nav {
	grid-area: nav;
	justify-self: center;
}
.footer-nav-links {
	flex-direction: column;
	align-items: center;
	gap: 30px;
	font-size: clamp(1.2rem, 3vw, 1.5rem);
}
.copyright-text {
	grid-area: copyright;
	text-align: center;
	padding-block: 1rem 2rem;
	color: #464646;
}

@media (max-width: 1200px) {
	.footer-header {
		grid-area: header;
		justify-self: start;
		/* padding-inline-start: 10%; */
		color: #14647c;
		font-size: clamp(2.5rem, 16vw, 10rem);
		font-weight: 700;
	}

	.footer-nav-links {
		display: none;
	}
}

@media (max-width: 768px) {
	.footer-container {
		grid-template-areas: "header" "copyright";
		grid-template-columns: 1fr;
		/* padding: clamp(2rem, 5vw, 4rem) 1rem clamp(1rem, 3vw, 2rem); */
	}
	.footer-header {
		justify-self: center;
		/* padding-inline-start: 0; */
	}
	.footer-nav-links {
		display: none;
	}
}

@media (max-width: 468px) {
	.footer-container {
		grid-template-areas: "header" "copyright";
		grid-template-columns: 1fr;
		/* padding: clamp(1.5rem, 4vw, 3rem) 0.5rem clamp(1rem, 3vw, 2rem); */
	}
	.footer-header {
		/* justify-self: center; */
		/* padding-inline-start: 0; */
		padding: 0;
	}
	.footer-nav-links {
		display: none;
	}
}

/* === General Responsive Adjustments === */
@media (max-width: 1200px) {
	:root {
		--middle-column-indent: clamp(1.8rem, 5vw, 3.5rem);
	}
	.hero-header {
		font-size: clamp(3.5rem, 9vw, 7rem);
	}
	.content-header {
		font-size: clamp(3rem, 7vw, 6rem);
	}
	.hero-text {
		font-size: clamp(1.8rem, 5vw, 4rem);
	}
}
@media (max-width: 992px) {
	:root {
		--middle-column-indent: clamp(1.5rem, 4vw, 3rem);
	}
	.hero-header {
		font-size: clamp(3rem, 8vw, 6rem);
	}
	.content-header {
		font-size: clamp(2.8rem, 7vw, 5.5rem);
	}
}
@media (max-width: 768px) {
	section {
		background-attachment: scroll;
	}
	.about-container,
	.people-container,
	.portraits-container,
	.places-container,
	.contact-container {
		grid-template-columns: 1fr;
		padding-inline: 1rem;
	}
	.content-header {
		grid-column: 1;
		justify-self: center;
		text-align: center;
		padding-inline-start: 0;
		font-size: clamp(2.8rem, 9vw, 5rem);
	}
	.section-intro {
		grid-column: 1;
		justify-self: center;
		padding-inline: 1rem 0;
		align-items: center;
		gap: clamp(1.5rem, 5vw, 3rem);
	}
	.section-intro .content-text {
		text-align: center;
		max-width: 80ch;
	}
	.gallery-button {
		align-self: center;
	}
	.contact .contact-social-media {
		grid-column: 1;
		margin-block-start: 0rem;
	}
}
/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
