/**
 * HPBC Hero Widget Styles
 */

/* Main Container */
.hpbc-hero-widget {
	width: 100%;
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: center;
	box-sizing: border-box;
}

/* Hero Container - Flexbox Layout */
.hero-container {
	display: flex;
	width: 100%;
	margin: 0 auto;
	align-items: center;
	gap: 40px;
	box-sizing: border-box;
}

/* Reverse columns when enabled */
.hero-container.reverse {
	flex-direction: row-reverse;
}

/* Content Section (Left Side) */
.hero-content {
	flex: 0 0 50%;
	max-width: 50%;
	padding-right: 20px;
	box-sizing: border-box;
}

.hero-container.reverse .hero-content {
	padding-right: 0;
	padding-left: 20px;
}

/* Media Section (Right Side) */
.hero-media {
	flex: 0 0 50%;
	max-width: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
}

/* Title Styling */
.hero-title {
	font-size: 2.5rem;
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 20px 0;
	color: #333333;
}

/* Description Styling */
.hero-description {
	font-size: 1.1rem;
	line-height: 1.6;
	margin: 0;
	color: #666666;
}

.hero-description p {
	margin: 0 0 15px 0;
}

.hero-description p:last-child {
	margin-bottom: 0;
}

/* Image Styling */
.hero-media img {
	max-width: 100%;
	height: auto;
	display: block;
	border-radius: 8px;
}

/* Video Styling */
.hero-media video {
	max-width: 100%;
	height: auto;
	display: block;
	border-radius: 8px;
}

/* Video Wrapper for Embedded Videos */
.video-wrapper {
	position: relative;
	width: 100%;
	padding-bottom: 56.25%; /* 16:9 aspect ratio */
	height: 0;
	overflow: hidden;
	border-radius: 8px;
}

.video-wrapper iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: none;
	border-radius: 8px;
}

/* Responsive Design */

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
	.hero-container {
		gap: 60px;
	}

	.hero-title {
		font-size: 3rem;
	}

	.hero-description {
		font-size: 1.2rem;
	}
}

/* Desktop (992px to 1199px) */
@media (max-width: 1199px) {
	.hero-container {
		gap: 40px;
	}

	.hero-title {
		font-size: 2.5rem;
	}
}

/* Tablet (768px to 991px) */
@media (max-width: 991px) {
	.hero-container {
		gap: 30px;
	}

	.hero-content {
		padding-right: 15px;
	}

	.hero-container.reverse .hero-content {
		padding-right: 0;
		padding-left: 15px;
	}

	.hero-title {
		font-size: 2.2rem;
	}

	.hero-description {
		font-size: 1rem;
	}
}

/* Mobile Landscape (576px to 767px) */
@media (max-width: 767px) {
	.hero-container {
		flex-direction: column;
		gap: 20px;
		text-align: center;
	}

	.hero-container.reverse {
		flex-direction: column;
	}

	.hero-content,
	.hero-media {
		flex: 1 1 100%;
		max-width: 100% !important;
		padding: 0;
		width: 100%;
	}

	.hero-content {
		order: 1;
	}

	.hero-media {
		order: 2;
		width: 100% !important;
	}

	.hero-title {
		font-size: 2.2rem;
		margin-bottom: 15px;
		line-height: 1.3;
		word-wrap: break-word;
	}

	.hero-description {
		font-size: 1.1rem;
		margin-bottom: 20px;
		line-height: 1.5;
	}

	/* Full width media on mobile */
	.hero-media img,
	.hero-media video {
		width: 100% !important;
		max-width: 100% !important;
		height: auto !important;
		border-radius: 8px;
	}

	.video-wrapper {
		width: 100% !important;
		max-width: 100% !important;
		padding-bottom: 56.25%; /* Maintain 16:9 aspect ratio */
	}
}

/* Mobile Portrait (up to 575px) */
@media (max-width: 575px) {
	.hpbc-hero-widget {
		padding: 30px 15px;
	}

	.hero-container {
		gap: 20px;
	}

	.hero-title {
		font-size: 1.9rem;
		margin-bottom: 12px;
		line-height: 1.2;
		word-wrap: break-word;
	}

	.hero-description {
		font-size: 1rem;
		margin-bottom: 15px;
		line-height: 1.4;
	}

	/* Ensure full width media */
	.hero-content,
	.hero-media {
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 !important;
		padding: 0 !important;
	}

	.hero-media img,
	.hero-media video {
		width: 100% !important;
		max-width: 100% !important;
		height: auto !important;
		display: block;
	}
}

/* Extra Small Mobile (up to 480px) */
@media (max-width: 480px) {
	.hpbc-hero-widget {
		padding: 25px 10px;
	}

	.hero-container {
		gap: 15px;
	}

	.hero-title {
		font-size: 1.7rem;
		margin-bottom: 10px;
		line-height: 1.2;
		word-wrap: break-word;
	}

	.hero-description {
		font-size: 0.95rem;
		margin-bottom: 12px;
		line-height: 1.4;
	}

	/* Full width media for extra small screens */
	.hero-content,
	.hero-media {
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 !important;
		padding: 0 !important;
	}

	.hero-media img,
	.hero-media video {
		width: 100% !important;
		max-width: 100% !important;
		height: auto !important;
		border-radius: 6px;
	}

	.video-wrapper {
		width: 100% !important;
		max-width: 100% !important;
		border-radius: 6px;
	}
}

/* Full Width Container Override */
.elementor-section-full_width .hpbc-hero-widget {
	max-width: none;
}

.elementor-section-full_width .hero-container {
	max-width: none;
	padding: 0 40px;
}

/* True Full Width - No Padding/Margin */
.elementor-section-full_width .hpbc-hero-widget.no-padding {
	padding: 0 !important;
	margin: 0 !important;
}

.elementor-section-full_width .hpbc-hero-widget.no-padding .hero-container {
	padding: 0 !important;
	margin: 0 !important;
	max-width: 100vw;
}

/* Full Width with Custom Padding Control */
.elementor-section-full_width .hpbc-hero-widget.custom-padding .hero-container {
	padding-left: var(--hero-padding-left, 40px);
	padding-right: var(--hero-padding-right, 40px);
}

@media (max-width: 767px) {
	.elementor-section-full_width .hero-container {
		padding: 0 15px;
	}

	.elementor-section-full_width .hpbc-hero-widget.custom-padding .hero-container {
		padding-left: var(--hero-padding-left-mobile, 15px);
		padding-right: var(--hero-padding-right-mobile, 15px);
	}

	/* Ensure full width for mobile hero sections */
	.elementor-section-full_width .hpbc-hero-widget {
		width: 100% !important;
		max-width: 100% !important;
	}

	.elementor-section-full_width .hero-media {
		width: 100% !important;
		max-width: 100% !important;
	}

	.elementor-section-full_width .hero-media img,
	.elementor-section-full_width .hero-media video {
		width: 100% !important;
		max-width: 100% !important;
	}

	.elementor-section-full_width .video-wrapper {
		width: 100% !important;
		max-width: 100% !important;
	}
}

@media (max-width: 480px) {
	.elementor-section-full_width .hero-container {
		padding: 0 10px;
	}

	.elementor-section-full_width .hpbc-hero-widget.custom-padding .hero-container {
		padding-left: var(--hero-padding-left-mobile, 10px);
		padding-right: var(--hero-padding-right-mobile, 10px);
	}

	/* Extra small mobile full width adjustments */
	.elementor-section-full_width .hpbc-hero-widget {
		padding: 20px 5px !important;
	}

	.elementor-section-full_width .hero-media {
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 !important;
	}
}

/* Animation and Transitions */
.hero-media img,
.hero-media video,
.video-wrapper {
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-media img:hover,
.hero-media video:hover,
.video-wrapper:hover {
	transform: translateY(-2px);
}

/* Accessibility */
.hero-media img,
.hero-media video,
.video-wrapper iframe {
	outline: none;
}

.hero-media img:focus,
.hero-media video:focus,
.video-wrapper iframe:focus {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
}

/* RTL Support */
.rtl .hero-content {
	padding-right: 0;
	padding-left: 20px;
}

.rtl .hero-container.reverse .hero-content {
	padding-left: 0;
	padding-right: 20px;
}

@media (max-width: 991px) {
	.rtl .hero-content {
		padding-left: 15px;
		padding-right: 0;
	}

	.rtl .hero-container.reverse .hero-content {
		padding-right: 15px;
		padding-left: 0;
	}
}

/* Print Styles */
@media print {
	.hpbc-hero-widget {
		background: none !important;
		color: #000 !important;
	}

	.hero-title {
		color: #000 !important;
	}

	.hero-description {
		color: #333 !important;
	}

	.video-wrapper {
		display: none;
	}
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
	.hero-title {
		color: #000;
	}

	.hero-description {
		color: #333;
	}
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
	.hero-media img,
	.hero-media video,
	.video-wrapper {
		transition: none;
	}

	.hero-media img:hover,
	.hero-media video:hover,
	.video-wrapper:hover {
		transform: none;
	}
}
