/* Homepage section blocks — shared styles for Peptide Gutenberg blocks */
/* Full-bleed rules live in assets/css/tokens.css (no 100vw) */

.prg-home-section-wrap {
	width: 100%;
	max-width: none;
	margin: 30px auto 40px;
	box-sizing: border-box;
	overflow-x: hidden;
	position: relative;
	z-index: 2;
}

.prg-home-section-wrap>.section-block,
.prg-home-section-wrap>.extra-cta-section {
	width: 100%;
	max-width: var(--prg-home-max-width, 1200px);
	margin-left: auto;
	margin-right: auto;
	box-sizing: border-box;
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes shimmer {
	0% {
		background-position: -200% 0;
	}

	100% {
		background-position: 200% 0;
	}
}

@keyframes rotate {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}

.section-block {
	background: var(--card-bg);
	border-radius: 12px;
	padding: 25px 20px;
	margin-bottom: 25px;
	box-shadow: var(--shadow-home-md);
	border: 1px solid #e2e8f0;
	position: relative;
	overflow: hidden;
	animation: fadeInUp 0.8s ease both;
}

.section-block::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--secondary-color) 0%, var(--color-secondary-light) 50%, var(--secondary-color) 100%);
	background-size: 200% 100%;
	animation: shimmer 3s linear infinite;
	pointer-events: none;
}

.section-block h2 {
	font-size: 1.6rem;
	color: var(--secondary-color);
	margin-bottom: 12px;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.section-block h2 i {
	color: var(--primary-color);
	font-size: 1.3rem;
}

.section-block>p {
	font-size: 1rem;
	color: #4a5568;
	margin-bottom: 20px;
	line-height: 1.6;
}

.home-card-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	margin-top: 20px;
}

.home-card {
	background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
	border-radius: 10px;
	padding: 20px;
	box-shadow: var(--shadow-home-sm);
	transition: all 0.3s ease;
	border: 1px solid #e2e8f0;
	position: relative;
	overflow: hidden;
}

.home-card h3 {
	font-size: 1.2rem;
	color: var(--secondary-color);
	margin-bottom: 12px;
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-weight: 600;
	line-height: 1;
}

.home-card h3 .fas {
	margin-top: 4px;
}

.home-card h3 i {
	color: var(--primary-color);
	font-size: 1rem;
}

.home-card p {
	font-size: 0.95rem;
	line-height: 1.5;
	color: #4a5568;
	margin-bottom: 15px;
}

.home-card a {
	color: var(--accent-color);
	font-weight: 600;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 0.95rem;
}

.home-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	border-color: var(--primary-color);
}

.home-card a:hover {
	text-decoration: underline;
}

.home-card-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 15px;
}

.home-card-btn {
	display: inline-block;
	padding: 6px 16px;
	background-color: transparent;
	color: var(--accent-color);
	border: 1px solid var(--accent-color);
	border-radius: 20px;
	font-size: 0.9rem;
	font-weight: 500;
	text-decoration: none;
	transition: all 0.3s ease;
	cursor: pointer;
}

.home-card .home-card-btn:hover {
	background-color: var(--accent-color);
	color: #ffffff;
	text-decoration: none;
}

.why-section {
	display: flex;
	flex-direction: column;
	gap: 25px;
}

.why-content {
	order: 2;
}

.why-content ul {
	list-style: none;
	padding: 0;
	margin: 15px 0;
}

.why-content li {
	padding: 10px 0;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.95rem;
	color: #4a5568;
}

.why-content li i {
	color: var(--accent-color);
	font-size: 1.1rem;
	flex-shrink: 0;
}

.why-content .why-footer-note {
	margin-top: 20px;
	font-size: 0.95rem;
	color: #718096;
}

.why-image {
	order: 1;
	text-align: center;
}

.why-image img {
	width: 100%;
	max-width: 100%;
	height: auto;
	border-radius: 10px;
	box-shadow: var(--shadow-home-md);
}

.calc-container {
	display: flex;
	flex-direction: column;
	gap: 30px;
}

.calc-intro-section {
	order: 1;
}

.calc-calculator-section {
	order: 2;
}

.calc-intro-section h3 {
	font-size: 1.1rem;
	color: var(--secondary-color);
	margin: 20px 0 12px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.calc-intro-section h3 i {
	color: var(--primary-color);
	font-size: 1rem;
}

.calc-intro-section ul {
	list-style: none;
	padding: 0;
}

.calc-intro-section li {
	padding: 8px 0;
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 0.9rem;
	color: #4a5568;
}

.calc-intro-section li i {
	color: var(--accent-color);
	margin-top: 2px;
	flex-shrink: 0;
}

.calc-intro-section a {
	color: var(--home-accent, var(--accent-color));
	font-weight: 600;
}

.prg-peptide-calculator {
	background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
	padding: 20px;
	border-radius: 10px;
	box-shadow: var(--shadow-home-md);
	border: 1px solid #e2e8f0;
	width: 100%;
	max-width: 100%;
}

.prg-peptide-calculator h3 {
	color: var(--secondary-color);
	font-size: 1.3rem;
	margin-bottom: 12px;
}

.prg-peptide-calculator p {
	font-size: 0.9rem;
	color: #718096;
	margin-bottom: 15px;
}

.prg-peptide-calculator label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	color: var(--secondary-color);
	font-size: 0.95rem;
}

.prg-peptide-calculator input,
.prg-peptide-calculator select {
	width: 100%;
	padding: 10px;
	border: 2px solid #e2e8f0;
	border-radius: 6px;
	font-size: 16px;
	transition: all 0.3s ease;
	-webkit-appearance: none;
}

.prg-peptide-calculator .input-group {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
}

.prg-peptide-calculator .input-group input {
	flex: 1;
	min-width: 0;
}

.prg-peptide-calculator .input-group select {
	width: 80px;
	flex-shrink: 0;
}

.prg-peptide-calculator input:focus,
.prg-peptide-calculator select:focus {
	outline: none;
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.prg-peptide-calculator button {
	background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
	color: white;
	border: none;
	padding: 12px 25px;
	border-radius: 6px;
	font-weight: 600;
	font-size: 1rem;
	cursor: pointer;
	transition: all 0.3s ease;
	width: 100%;
	margin-top: 15px;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}

.prg-calc-results {
	margin-top: 15px;
	padding: 15px;
	background: white;
	border-radius: 6px;
	border: 2px solid #e2e8f0;
	font-size: 0.95rem;
}

.extra-cta-section {
	background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
	border-radius: 12px;
	padding: 35px 20px;
	text-align: center;
	color: white;
	position: relative;
	overflow: hidden;
}

.extra-cta-section::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 100%;
	height: 100%;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
	animation: rotate 30s linear infinite;
	pointer-events: none;
	transform-origin: center center;
}

.extra-cta-section h2 {
	font-size: 1.8rem;
	margin-bottom: 15px;
	position: relative;
	z-index: 1;
	color: white;
}

.extra-cta-section p {
	font-size: 1rem;
	margin-bottom: 25px;
	opacity: 0.95;
	position: relative;
	z-index: 1;
	padding: 0 10px;
}

.extra-cta-section a {
	display: inline-block;
	background: white;
	color: var(--secondary-color);
	padding: 12px 30px;
	border-radius: 30px;
	text-decoration: none;
	font-weight: 600;
	font-size: 1rem;
	transition: all 0.3s ease;
	position: relative;
	z-index: 1;
}

.extra-cta-section a:hover {
	background: var(--color-home-light-bg);
	color: var(--secondary-color);
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.extra-cta-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
	margin-top: 8px;
}

.extra-cta-buttons .cta-btn-secondary {
	background: var(--secondary-color);
	color: #fff;
}

.extra-cta-buttons .cta-btn-outline {
	background: transparent;
	border: 2px solid #fff;
	color: #fff;
}

@media (min-width: 768px) {
	.prg-home-section-wrap {
		margin-top: 30px;
		margin-bottom: 60px;
	}

	.section-block {
		padding: 35px 30px;
		border-radius: 16px;
		margin-bottom: 35px;
	}

	.section-block h2 {
		font-size: 2rem;
	}

	.home-card-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 25px;
	}

	.why-section {
		flex-direction: row;
	}

	.why-content {
		order: 1;
		flex: 1;
	}

	.why-image {
		order: 2;
		flex: 1;
	}

	.why-image img {
		max-width: 400px;
	}

	.calc-container {
		flex-direction: row;
	}

	.calc-intro-section,
	.calc-calculator-section {
		flex: 1;
	}

	.prg-peptide-calculator {
		padding: 25px;
	}

	.extra-cta-section {
		padding: 45px 35px;
		border-radius: 16px;
	}

	.extra-cta-section h2 {
		font-size: 2.2rem;
	}

	.extra-cta-section p {
		font-size: 1.1rem;
		padding: 0;
	}
}

@media (min-width: 1024px) {
	.section-block {
		padding: 40px;
		margin-bottom: 40px;
	}

	.section-block h2 {
		font-size: 2.2rem;
	}

	.section-block>p {
		font-size: 1.1rem;
	}

	.home-card-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 30px;
	}

	.home-card {
		padding: 30px;
	}

	.home-card h3 {
		font-size: 1.4rem;
	}

	.home-card p {
		font-size: 1rem;
	}

	.calc-intro-section h3 {
		font-size: 1.3rem;
	}

	.calc-intro-section li {
		font-size: 1rem;
	}

	.prg-peptide-calculator {
		padding: 30px;
	}

	.prg-peptide-calculator h3 {
		font-size: 1.5rem;
	}

	.extra-cta-section {
		padding: 50px 40px;
	}

	.extra-cta-section h2 {
		font-size: 2.5rem;
	}

	.extra-cta-section p {
		font-size: 1.2rem;
	}
}

/* Block editor — match frontend container width */
.editor-styles-wrapper .wp-block-peptideresourceguide-card-section,
.editor-styles-wrapper .wp-block-peptideresourceguide-why-guides,
.editor-styles-wrapper .wp-block-peptideresourceguide-peptide-calculator,
.editor-styles-wrapper .wp-block-peptideresourceguide-cta-section,
.block-editor-block-list__block[data-type="peptideresourceguide/card-section"],
.block-editor-block-list__block[data-type="peptideresourceguide/why-guides"],
.block-editor-block-list__block[data-type="peptideresourceguide/peptide-calculator"],
.block-editor-block-list__block[data-type="peptideresourceguide/cta-section"] {
	width: 100%;
	max-width: none;
}

.editor-styles-wrapper .prg-home-section-wrap.is-editor,
.block-editor-block-list__block .prg-home-section-wrap.is-editor {
	width: 100%;
	max-width: none;
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--prg-home-gutter, 15px);
	padding-right: var(--prg-home-gutter, 15px);
	box-sizing: border-box;
}

.editor-styles-wrapper .prg-home-section-wrap.is-editor .section-block,
.editor-styles-wrapper .prg-home-section-wrap.is-editor .extra-cta-section,
.block-editor-block-list__block .prg-home-section-wrap.is-editor .section-block,
.block-editor-block-list__block .prg-home-section-wrap.is-editor .extra-cta-section {
	width: 100%;
	max-width: var(--prg-home-max-width, 1200px);
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 0;
	box-sizing: border-box;
}

.editor-styles-wrapper .prg-home-section-wrap.is-editor .home-card-grid,
.block-editor-block-list__block .prg-home-section-wrap.is-editor .home-card-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.editor-styles-wrapper .prg-home-section-wrap.is-editor .why-section,
.block-editor-block-list__block .prg-home-section-wrap.is-editor .why-section {
	flex-direction: row;
}

.editor-styles-wrapper .prg-home-section-wrap.is-editor .why-content,
.block-editor-block-list__block .prg-home-section-wrap.is-editor .why-content {
	order: 1;
	flex: 1;
}

.editor-styles-wrapper .prg-home-section-wrap.is-editor .why-image,
.block-editor-block-list__block .prg-home-section-wrap.is-editor .why-image {
	order: 2;
	flex: 1;
}

.editor-styles-wrapper .prg-home-section-wrap.is-editor .calc-container,
.block-editor-block-list__block .prg-home-section-wrap.is-editor .calc-container {
	flex-direction: row;
}

.editor-styles-wrapper .prg-home-section-wrap.is-editor .calc-intro-section,
.editor-styles-wrapper .prg-home-section-wrap.is-editor .calc-calculator-section,
.block-editor-block-list__block .prg-home-section-wrap.is-editor .calc-intro-section,
.block-editor-block-list__block .prg-home-section-wrap.is-editor .calc-calculator-section {
	flex: 1;
}

@media (max-width: 781px) {

	.editor-styles-wrapper .prg-home-section-wrap.is-editor .home-card-grid,
	.block-editor-block-list__block .prg-home-section-wrap.is-editor .home-card-grid {
		grid-template-columns: 1fr;
	}

	.editor-styles-wrapper .prg-home-section-wrap.is-editor .why-section,
	.block-editor-block-list__block .prg-home-section-wrap.is-editor .why-section,
	.editor-styles-wrapper .prg-home-section-wrap.is-editor .calc-container,
	.block-editor-block-list__block .prg-home-section-wrap.is-editor .calc-container {
		flex-direction: column;
	}
}