/**
 * 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: 500px;
	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-background {
	position: absolute;
	width: 100%;
	height: 100%;
	background: #1D252D;
	opacity: 0.3;
	top: 0;
	left: 0;
	z-index: 0;
}

.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: 'Montserrat', sans-serif !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	line-height: 22px !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: 'Gilda Display', serif !important;
	font-size: 60px !important;
	font-weight: 400 !important;
	line-height: 60px !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: 40px;
	font-family: var(--plastpro-font-family, 'Montserrat', sans-serif);
	font-weight: 300;
	line-height: 32px;
	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: 40px;
	font-family: var(--plastpro-font-family-heading, 'Gilda Display', serif);
	font-weight: 400;
	line-height: 40px;
	word-wrap: break-word;
	margin-bottom: 1.5rem;
}

.gallery-item-paragraph {
	font-family: var(--plastpro-font-family, 'Montserrat', sans-serif);
	font-size: 1.125rem;
	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;
	}

	.hero-text-content .hero-title {
		font-size: 54px !important;
		line-height: 54px !important;
	}

	.hero-text-content .hero-description {
		font-size: 13px !important;
		line-height: 20px !important;
	}
}

@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;
	}

	.hero-text-content .hero-title {
		font-size: 48px !important;
		line-height: 48px !important;
	}

	.hero-text-content .hero-description {
		font-size: 13px !important;
		line-height: 20px !important;
	}

	.gallery-item {
		gap: 3rem;
	}

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

	.gallery-item-title {
		font-size: 2rem;
	}
}

@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-background {
		height: 100%;
	}

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

	.hero-text-content .hero-title {
		font-size: 36px !important;
		line-height: 40px !important;
	}

	.hero-text-content .hero-description {
		font-size: 12px !important;
		line-height: 18px !important;
	}

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

	.gallery-items-title {
		font-size: 2rem;
		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: 1.75rem;
		margin-bottom: 1rem;
	}

	.gallery-item-paragraph {
		font-size: 1rem;
	}
}

@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;
	}

	.hero-text-content .hero-title {
		font-size: 28px !important;
		line-height: 32px !important;
	}

	.hero-text-content .hero-description {
		font-size: 11px !important;
		line-height: 16px !important;
	}

	.gallery-item-title {
		font-size: 1.5rem;
	}

	.gallery-item-paragraph {
		font-size: 0.9375rem;
	}
}

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

.featured-items-title {
	font-size: 2.5rem;
	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: 1.5rem;
	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: 2rem;
	}

	.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-width blocks in entry-content (e.g. You May Also Like, Featured Article): set block to Full width in toolbar */
.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;
}

.entry-content .alignfull > *,
.entry-content .alignwide > * {
	width: 100%;
	min-width: 100%;
	box-sizing: border-box;
}

/* Allow full-bleed to extend past container when block is set to Full width */
.site-main:has(.entry-content .alignfull),
.site-main:has(.entry-content .alignwide),
.site-container:has(.entry-content .alignfull),
.site-container:has(.entry-content .alignwide) {
	overflow-x: visible;
}

