/**
 * Global Block Styles
 * 
 * Styles for Gutenberg blocks (Hero, Gallery Items) that can be used on any page/post/CPT
 * 
 * @package Plastpro
 * @since 1.0.0
 */

/* Hero Block Styles */
.hero {
	position: relative;
	width: 100%;
	min-height: var(--plastpro-hero-min-height);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.hero-background {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.hero-overlay {
	position: relative;
	width: 100%;
	height: 100%;
	background: rgba(29, 37, 45, 0.3); /* #1D252D at 30% opacity */
	z-index: 1;
}

.hero-text-wrapper {
	position: absolute;
	left: calc(45% - 50px);
	height: 183px;
	display: flex;
	align-items: center;
	top: 50%;
	transform: translateY(-50%);
}

.hero-text-content {
	position: relative;
	z-index: 1;
	padding: 20px 32px;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.hero-text-content .hero-description {
	font-family: var(--plastpro-font-family) !important;
	font-size: var(--font-size-small) !important;
	font-weight: 700 !important;
	line-height: 1.4 !important;
	text-transform: uppercase !important;
	margin: 0 0 10px 0 !important;
	color: #FFFFFF !important;
	white-space: pre-wrap;
	letter-spacing: 0.5px;
}

.hero-text-content .hero-title {
	font-family: var(--plastpro-font-family-heading) !important;
	font-size: var(--font-size-display) !important;
	font-weight: 400 !important;
	line-height: 1.1 !important;
	margin: 0 !important;
	color: #FFFFFF !important;
	white-space: normal;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

/* Gallery Items Block Styles */
.gallery-items {
	padding: 4rem 0;
	background: #FFFFFF;
}

.gallery-items-title {
	color: #000000;
	font-size: var(--font-size-display);
	font-family: var(--plastpro-font-family);
	font-weight: 300;
	line-height: 1.2;
	word-wrap: break-word;
	margin-bottom: 3rem;
	text-align: center;
}

.gallery-item {
	display: flex;
	align-items: center;
	gap: 4rem;
	margin-bottom: 4rem;
}

.gallery-item:last-child {
	margin-bottom: 0;
}

/* Image on left, content on right */
.gallery-item-left {
	flex-direction: row;
}

/* Image on right, content on left */
.gallery-item-right {
	flex-direction: row-reverse;
}

.gallery-item-image {
	flex: 0 0 500px;
	width: 500px;
	height: 500px;
	overflow: hidden;
}

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

.gallery-item-content {
	flex: 1;
	max-width: 600px;
}

.gallery-item-title {
	color: #000000;
	font-size: var(--font-size-display);
	font-family: var(--plastpro-font-family-heading);
	font-weight: 400;
	line-height: 1.2;
	word-wrap: break-word;
	margin-bottom: 1.5rem;
}

.gallery-item-paragraph {
	font-family: var(--plastpro-font-family);
	font-size: var(--font-size-large);
	font-weight: 400;
	line-height: 1.6;
	color: #1D252D;
}

.gallery-item-paragraph p {
	margin-bottom: 1rem;
}

.gallery-item-paragraph p:last-child {
	margin-bottom: 0;
}

/* Responsive Styles */
@media (max-width: 1200px) {
	.hero-text-wrapper {
		width: 800px;
	}

	.hero-text-content {
		padding: 20px 28px;
	}

}

@media (max-width: 1024px) {
	.hero-text-wrapper {
		left: 50%;
		transform: translate(-50%, -50%);
		width: calc(100% - 40px);
		max-width: 860px;
	}

	.hero-text-content {
		padding: 18px 28px;
	}

	.gallery-item {
		gap: 3rem;
	}

	.gallery-item-image {
		flex: 0 0 400px;
		width: 400px;
		height: 400px;
	}

	.gallery-item-title {
		font-size: var(--font-size-h2);
	}
}

@media (max-width: 820px) {
	.hero-text-wrapper {
		left: 50%;
		transform: translate(-50%, -50%);
		width: calc(100% - 40px);
		max-width: calc(100% - 40px);
	}
}

@media (max-width: 768px) {
	.hero-text-wrapper {
		left: 50%;
		transform: translate(-50%, -50%);
		width: calc(100% - 40px);
		max-width: calc(100% - 40px);
		height: auto;
		min-height: 150px;
	}

	.hero-text-content {
		padding: 16px 20px;
	}

	.gallery-items {
		padding: 3rem 0;
	}

	.gallery-items-title {
		font-size: var(--font-size-h2);
		line-height: 1.5;
		margin-bottom: 2rem;
	}

	.gallery-item {
		flex-direction: column !important;
		gap: 2rem;
		margin-bottom: 3rem;
	}

	.gallery-item-image {
		flex: 0 0 auto;
		width: 100%;
		max-width: 500px;
		height: auto;
		aspect-ratio: 1 / 1;
	}

	.gallery-item-content {
		max-width: 100%;
	}

	.gallery-item-title {
		font-size: var(--font-size-h3);
		margin-bottom: 1rem;
	}

	.gallery-item-paragraph {
		font-size: var(--font-size-h6);
	}
}

@media (max-width: 480px) {
	.hero-text-wrapper {
		left: 50%;
		transform: translate(-50%, -50%);
		width: calc(100% - 20px);
		max-width: calc(100% - 20px);
		min-height: 120px;
	}

	.hero-text-content {
		padding: 12px 16px;
	}

	.gallery-item-title {
		font-size: var(--font-size-h3);
	}

	.gallery-item-paragraph {
		font-size: var(--font-size-body);
	}
}

/* Featured Items Block Styles (reusable for Featured Series) */
.featured-items {
	padding: 4rem 0;
	background: #F8F9FA;
}

.featured-items-title {
	font-size: var(--font-size-h1);
	font-weight: 700;
	margin-bottom: 2.5rem;
	color: #1D252D;
	text-align: center;
}

.featured-items-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 2rem;
	margin-bottom: 3rem;
}

/* Featured Items Card */
.featured-items-card {
	background: #FFFFFF;
	border: 1px solid #E5E5E5;
	border-radius: 8px;
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-items-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.featured-items-image {
	width: 100%;
	height: 250px;
	overflow: hidden;
	background: #F5F5F5;
}

.featured-items-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.featured-items-card:hover .featured-items-image img {
	transform: scale(1.05);
}

.featured-items-content {
	padding: 1.5rem;
	text-align: center;
}

.featured-items-title-card {
	font-size: var(--font-size-h3);
	font-weight: 700;
	margin-bottom: 1rem;
}

.featured-items-title-card a {
	color: #1D252D;
	text-decoration: none;
	transition: color 0.3s ease;
}

.featured-items-title-card a:hover {
	color: var(--plastpro-orange, #E87722);
}

.featured-items-link {
	display: inline-block;
	color: var(--plastpro-orange, #E87722);
	font-weight: 700;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: color 0.3s ease;
	margin-top: 0.5rem;
}

.featured-items-link:hover {
	color: #C65A0F;
}

.featured-items-footer {
	text-align: center;
	margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
	.featured-items-title {
		font-size: var(--font-size-h2);
	}

	.featured-items-grid {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.featured-items {
		padding: 2rem 0;
	}
}

@media (max-width: 480px) {
	.featured-items-grid {
		grid-template-columns: 1fr;
	}
}

/* Full/wide: break out of constrained parent (100vw); .site-main overflow-x: clip prevents horizontal scroll */
.entry-content .alignfull,
.entry-content .alignwide {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(-50vw + 50%);
	margin-right: calc(-50vw + 50%);
	box-sizing: border-box;
}

/* Full: direct child fills wrapper. Wide: direct child constrained to site-container-max-wide and centered */
.entry-content .alignfull > *:not(.technical-documents-inner) {
	width: 100%;
	min-width: 100%;
	box-sizing: border-box;
}

.entry-content .alignwide > *:not(.technical-documents-inner) {
	max-width: var(--site-container-max-wide);
	margin-left: auto;
	margin-right: auto;
	width: 100%;
	box-sizing: border-box;
}

/* Full-bleed blocks use 100vw in style.css; .site-main { overflow-x: clip } in style.css contains overflow so no horizontal scroll. Do not set overflow-x: visible here. */

