/**
 * Studio Harm Hasenaar - Main Stylesheet
 *
 * Custom styles for the Studio Harm Hasenaar WordPress block theme
 */

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
	--shh-transition: 0.3s ease;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

html {
	scroll-behavior: smooth;
}

body {
	overflow-x: hidden;
}

figure {
	line-height: 0;
}

/* ==========================================================================
   Typography
   ========================================================================== */

a {
	text-decoration: none;
	transition: color var(--shh-transition);
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
	position: relative;
	z-index: 100;
}

.site-header .site-logo img {
	transition: transform var(--shh-transition);
}

.site-header .site-logo:hover img {
	transform: scale(1.05);
}

/* Navigation */
.site-header .wp-block-navigation {
	gap: 2rem;
}

.site-header .wp-block-navigation a,
footer .wp-block-column p a {
	position: relative;
}

.site-header .wp-block-navigation a::after,
footer .wp-block-column p a::after {
	content: '';
	position: absolute;
	bottom: -4px;
	left: 0;
	width: 0;
	height: 1px;
	background-color: var(--wp--preset--color--burgundy-rose);
	transition: width var(--shh-transition);
}

.site-header .wp-block-navigation a:hover::after,
footer .wp-block-column p a:hover::after {
	width: 100%;
}



/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer a {
	transition: color var(--shh-transition);
}

/*
.site-footer a:hover {
	color: var(--wp--preset--color--light-pink);
}*/

footer figure a::after {
	background-color: var(--wp--preset--color--white);
}

footer figure img {
	transition: transform var(--shh-transition);
}

footer figure:hover img {
	transform: scale(1.05);
}

/* ==========================================================================
   Floating Contact Buttons
   ========================================================================== */

.floating-contact-buttons {
	position: fixed;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	z-index: 1000;
	gap: 0 !important;
}

.floating-contact-buttons .wp-block-social-link {
	margin: 0 !important;
	border-radius: 0 !important;
}

.floating-contact-buttons .wp-block-social-link-anchor {
	transition: all var(--shh-transition);
	border-radius: 0 !important;
}

.floating-contact-buttons .wp-block-social-link:hover {
	transform: scale(1.1) translateX(-2px);
}

/* Background colors */
.floating-contact-buttons .wp-social-link-mail {
	background-color: var(--wp--preset--color--burgundy-rose);
}

.floating-contact-buttons .wp-social-link-whatsapp {
	background-color: var(--wp--preset--color--navy-blue-light);
}

/* Hover colors */
.floating-contact-buttons .wp-social-link-mail:hover {
	background-color: #8a3548;
}

.floating-contact-buttons .wp-social-link-whatsapp:hover {
	background-color: #25D366;
}

/* Custom @ symbol for mail icon */
.floating-contact-buttons .wp-social-link-mail svg {
	display: none !important;
}

.floating-contact-buttons .wp-social-link-mail .wp-block-social-link-anchor::before {
	content: '';
	display: block;
	width: 24px;
	height: 24px;
	background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiNmZmZmZmYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSI0Ij48L2NpcmNsZT48cGF0aCBkPSJNMTYgOHY1YTMgMyAwIDAgMCA2IDB2LTFhMTAgMTAgMCAxIDAtMy45MiA3Ljk0Ij48L3BhdGg+PC9zdmc+");
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}


/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
	min-height: 80vh;
	display: flex;
	align-items: center;
}

.hero-logo img {
	transition: transform var(--shh-transition);
}

.hero-logo:hover img {
	transform: scale(1.05);
}

/* ==========================================================================
   Project Cards
   ========================================================================== */

.project-card,
.story-card {
	position: relative;
	overflow: hidden;
}

.project-card__image img,
.story-card__image img,
.project-card .wp-block-post-featured-image img,
.story-card .wp-block-post-featured-image img {
	transition: transform var(--shh-transition);
}

.project-card:hover .wp-block-post-featured-image img,
.story-card:hover .wp-block-post-featured-image img,
.project-card:hover .project-card__image img,
.story-card:hover .story-card__image img {
	transform: scale(1.05);
}

.project-card__overlay,
.story-card__overlay {
	margin-top: 0;
}

.project-card__overlay a,
.story-card__overlay a {
	color: var(--wp--preset--color--white);
}

.project-card__overlay a:hover,
.story-card__overlay a:hover {
	color: var(--wp--preset--color--light-pink);
}

/* Grid layouts */
.projects-grid .wp-block-post-template,
.stories-grid .wp-block-post-template,
.projects-archive-grid .wp-block-post-template,
.stories-archive-grid .wp-block-post-template {
	gap: 1.5rem;
}

/* ==========================================================================
   Project Hero
   ========================================================================== */

.project-hero {
	position: relative;
	overflow: hidden;
}

.project-hero__image img {
	width: 100%;
	height: auto;
}

/* ==========================================================================
   Team Section
   ========================================================================== */

.team-member {
	position: relative;
}

.team-image img {
	transition: transform var(--shh-transition);
}

.team-member:hover .team-image img {
	transform: scale(1.02);
}

/* Alternating layout adjustments */
.team-member--left .wp-block-column:first-child {
	text-align: right;
}

.team-member--right .wp-block-column:last-child {
	text-align: left;
}

/* ==========================================================================
   Contact Page
   ========================================================================== */

.social-icons {
	gap: 1rem;
}

.social-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	color: var(--wp--preset--color--navy-blue);
	transition: all var(--shh-transition);
}

.social-icon:hover {
	color: var(--wp--preset--color--burgundy-rose);
	transform: translateY(-2px);
}

.social-icon svg {
	width: 48px;
	height: 48px;
}

.map-placeholder img {
	width: 100%;
	height: auto;
	min-height: 400px;
	object-fit: cover;
	background-color: var(--wp--preset--color--light-gray);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.wp-block-button.is-style-outline .wp-block-button__link {
	border: 1px solid var(--wp--preset--color--navy-blue);
	background: transparent;
	color: var(--wp--preset--color--navy-blue);
	padding: 0.75rem 1.5rem;
	transition: all var(--shh-transition);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--navy-blue);
	color: var(--wp--preset--color--white);
}

/* ==========================================================================
   Images
   ========================================================================== */

.wp-block-image img {
	display: block;
}

.wp-block-image.team-image {
	margin: 0;
}

/* Placeholder images */
img[src*="placeholder"] {
	background-color: var(--wp--preset--color--light-gray);
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

/* Tablet and below */
@media (max-width: 1024px) {
	.floating-contact-buttons {
		right: 0;
	}

	.floating-btn {
		width: 44px;
		height: 44px;
	}

	.floating-btn svg {
		width: 20px;
		height: 20px;
	}

	.team-member .wp-block-columns {
		flex-direction: column;
	}

	.team-member--left .wp-block-column:first-child {
		text-align: left;
		order: 2;
	}

	.team-member--left .wp-block-column:last-child {
		order: 1;
	}

	.team-member .wp-block-heading {
		text-align: left !important;
	}

	.team-member .has-text-align-right {
		text-align: left !important;
	}
}

/* Mobile */
@media (max-width: 768px) {
	.hero-section {
		min-height: 60vh;
	}

	.projects-grid .wp-block-post-template,
	.stories-grid .wp-block-post-template {
		grid-template-columns: 1fr;
	}

	.projects-archive-grid .wp-block-post-template,
	.stories-archive-grid .wp-block-post-template {
		grid-template-columns: repeat(2, 1fr);
	}

	.site-footer .wp-block-columns {
		flex-direction: column;
		gap: 2rem;
	}

	.floating-contact-buttons {
		bottom: 1rem;
		top: auto;
		transform: none;
		right: 1rem;
		flex-direction: row;
	}

	.floating-btn:hover {
		transform: translateY(-4px);
	}

	.team-member .wp-block-columns .wp-block-columns {
		grid-template-columns: repeat(2, 1fr);
	}

	.team-member .wp-block-columns .wp-block-columns .wp-block-column:last-child {
		display: none;
	}
}

@media (max-width: 480px) {
	.projects-archive-grid .wp-block-post-template,
	.stories-archive-grid .wp-block-post-template {
		grid-template-columns: 1fr;
	}

	.social-icons {
		justify-content: flex-start;
	}
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

/* Focus styles */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
	outline: 2px solid var(--wp--preset--color--burgundy-rose);
	outline-offset: 2px;
}

/* Skip link */
.skip-link {
	position: absolute;
	top: -100%;
	left: 0;
	background: var(--wp--preset--color--navy-blue);
	color: var(--wp--preset--color--white);
	padding: 0.5rem 1rem;
	z-index: 9999;
}

.skip-link:focus {
	top: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}

	html {
		scroll-behavior: auto;
	}
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
	.floating-contact-buttons,
	.site-header .wp-block-navigation {
		display: none;
	}

	.site-footer {
		background: none;
		color: var(--wp--preset--color--navy-blue);
	}

	a {
		text-decoration: underline;
	}
}

/* custom styles for square outline button */
.wp-block-button.is-style-square-outline .wp-block-button__link {
	border: 1px solid var(--wp--preset--color--navy-blue);
	background: transparent;
	color: var(--wp--preset--color--navy-blue);
	padding: 0.75rem;
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 0;
	transition: all var(--shh-transition);
	max-width: 100px;
}

.wp-block-button.is-style-square-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--navy-blue);
	color: var(--wp--preset--color--white);
}

/* Stories Section Animation */
@keyframes slideUpFade {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.stories-section .wp-block-post,
.philosophy-section > * {
	view-timeline-name: --story-card;
	view-timeline-axis: block;
	animation-name: slideUpFade;
	animation-fill-mode: both;
	animation-timing-function: ease-out;
	animation-timeline: view();
	animation-range: entry 25% cover 40%;
}
