/*
Theme Name: Emotii si Culori Child
Theme URI: https://bogozi.com/wordpress-themes/emotiisiculori-theme/
Author: Attila Bögözi
Author URI: https://bogozi.com/
Description: Child theme for Emotii si Culori. Inherit styles and functionality from the parent theme.
Template: emotiisiculori-theme
Version: 1.3.8
Tested up to: 5.4
Requires PHP: 5.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: emotiisiculori-theme-child
Tags: child-theme, custom-homepage, custom-logo, shared-footer, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* --- General Layout --- */

/* Container styles for ebook home page */
.motive-section .container, .before-after-section .container, .potrivit-section .container {
    display: block;
}

.ghid-section .container {
    flex-wrap: wrap;
    gap: 0px;
}

.contine-section .container {
	column-gap: 100px;
}

.faq-section .container {
    flex-direction: column;
    gap: inherit;
}

/* --- 1. Ebook Hero Section --- */
.hero-section::before {
	content: none;
}

section .content-text, section .content-image {
    flex-basis: 50%;
}

.content-image img {
	vertical-align: bottom;
}

.vector-bg{
	flex: 1;
	position: relative;
	text-align: right;
	background-image: url('./img/vectors/vector_bg.svg');
	background-size: contain;
	background-repeat: no-repeat;
}

.hero-section h1 {
	font-size: 3rem;
	line-height: 1.2;
	margin: 0;
}

section .subheading {
	font-size: 1.1rem;
	line-height: 1.6;
}

/* Testimonial Box inside Hero */
.hero-testimonial {
	margin: 30px 0;
	display: flex;
	justify-content: space-between;
	gap: 20px;
	align-items: center;
}

.hero-testimonial .review-author-image {
	width: 80px;
	height: 80px;
	flex-shrink: 0;
}

.hero-testimonial .review-author-image img {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
}

.hero-testimonial .testimonial-text {
	color: var(--body-text);
	border: 2px solid var(--primary-purple);
	align-self: center;
	align-items: flex-start;
	padding: 16px;
	border-radius: 8px 8px 8px 0;

	p {
		margin: 0;
	}
}

.col-image .hero-main-image {
	position: relative;
	z-index: 2;
	/* To be on top of the decorative text */
	max-width: 100%;
	height: auto;
}

/* Responsive adjustments */
@media (max-width: 992px) {
	.ebook-hero-content {
		flex-direction: column;
	}

	.ebook-hero-content .col-text,
	.ebook-hero-content .col-image {
		max-width: 100%;
		text-align: center;
	}

	.hero-testimonial {
		max-width: 100%;
	}

	.col-image .deco-text {
		font-size: 6rem;
	}

	.ghid-section .content-image{
		margin-top: 60px;
		text-align: center;
	}

	.ghid-section .content-image img{
		width: 70%;
	}
}

/* --- Section 2: Motive --- */
.obtine-section .container,
.potrivit-section .container {
	background-position: right top;
}

.three-col-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
}

.motive-card {
	text-align: center;
	padding: 30px;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.motive-card.bordered {
	border-right: 3px solid var(--lightest-purple);

	&:last-child {
		border-right: none;
	}
}

/* Solutia */
.solutia-wrapper {
	width: 75%;
	margin: 60px auto 0;
	text-align: center;
	display: flex;
	flex-direction: column;

	svg {
		width: 100%;
		height: auto;
		margin: 0 auto;
	}
}

.solutia-text-wrapper {
	z-index: 5;
	background-color: #f7c891;
	flex-flow: column;
	justify-content: center;
	align-items: center;
	padding: 50px 20px;
	display: flex;
	position: relative;
	gap: 20px;
}

.solutia-text-wrapper h3 {
	margin: 0;
	padding: 0;
}

.solutia-text-wrapper p {
	margin: 0;
	padding: 0;
	font-weight: 500;
}

.solutia-text-wrapper::before,
.solutia-text-wrapper::after {
	content: '';
	position: absolute;
	left: 0;
	width: 100%;
	height: 25px;
	background-image: url('./img/vectors/light-orange-bg.svg');
	background-repeat: repeat-x;
	background-size: cover;
	background-position: top center;
	z-index: 11;
	pointer-events: none;
}

.solutia-text-wrapper::before {
	top: -24px;
}

.solutia-text-wrapper::after {
	bottom: -24px;
	transform: scaleY(-1);
}

/* --- Section 4: Obține --- */
.purple-parent .primary-btn:hover {
	--parent-bg: var(--primary-purple);
	background-color: var(--secondary-purple);
}

.purple-parent .primary-btn:hover::before,
.purple-parent .primary-btn:hover::after {
	--parent-bg: var(--white);
	background-color: var(--primary-purple);
	color: var(--secondary-purple);
}

/* --- Section 5: Chestionar --- */
.product-image img {
	mask-image: linear-gradient(to bottom, black 75%, transparent 100%);
	-webkit-mask-image: linear-gradient(to bottom, black 75%, transparent 100%);
	display: block;
	width: 100%;
}

/* --- Quiz Section --- */

/* By default, hide all individual result blocks inside the container */
#quiz-result-container .quiz-result {
	display: none;
}

/* ONLY show the result block that has the 'active' class */
#quiz-result-container .quiz-result.active {
	display: block;
}

.quiz-intro .section-title {
	margin: 0 0 20px 0;
}

/* Hide all questions except the active one */
.question {
	display: none;
}

.question.active {
	display: block;
}

.quiz-main-content {
	margin-bottom: 30px;
}

.question-title,
.quiz-result h3 {
	margin-bottom: 30px;
	margin-top: 0;	
	line-height: 1.3;
}

.quiz-result .result-subtitle {
	font-size: 1.1rem;
	font-weight: bold;
	margin-bottom: 20px;
}

.quiz-result .result-message {
	line-height: 1.6;
	margin-bottom: 30px;
}

.custom-radio {
	display: flex;
	align-items: center;
	margin-bottom: 1rem;
	cursor: pointer;
	background-color: rgba(255, 255, 255, 0.05);
	padding: 15px;
	border-radius: 8px;
	transition: background-color 0.2s ease;
}

.custom-radio:hover {
	background-color: rgba(255, 255, 255, 0.1);
}

.custom-radio input[type="radio"] {
	display: none;
	/* Hide the default radio button */
}

.radio-check {
	width: 24px;
	height: 24px;
	border: none;
	border-radius: 8px;
	margin-right: 15px;
	flex-shrink: 0;
	position: relative;
	background-color: var(--white);
}

/* Style for the selected radio button's checkmark */
.custom-radio input[type="radio"]:checked+.radio-check {
	background-color: var(--orange);
}

.custom-radio input[type="radio"]:checked+.radio-check::after {
	content: '✔';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 14px;
}

.quiz-progress-container[style*="visibility: hidden"],
.quiz-progress-text[style*="visibility: hidden"] {
	margin: 0;
	padding: 0;
	height: 0;
}

.quiz-progress-container {
	height: 6px;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 3px;
	margin-bottom: 10px;
	visibility: hidden;
	/* Start hidden */
}

.quiz-progress-bar {
	height: 100%;
	width: 0%;
	/* Starts at 0 */
	background: var(--white);
	border-radius: 3px;
}

.quiz-progress-text {
	text-align: center;
	margin-bottom: 20px;
	visibility: hidden;
	/* Start hidden */
}

/* Section 8: Video Reviews (Updated for Inline Player) */
.video-reviews-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 20px;
	margin-bottom: 20px;
}

.video-reviews-grid>.video.review-card {
	flex: 0 0 350px;
	margin-bottom: 0;
}

.video-reviews-grid .review-author::after {
	display: none;
}

/* NEW: The main container for each video card */
.video-player-container {
	display: block;
	position: relative;
	border-radius: 8px;
	overflow: hidden;
	cursor: pointer;
	transition: transform 0.3s ease;
	width: 100%;
	height: auto;
	min-height: 390px;
	aspect-ratio: 9/16;
}

.video-player-container:hover {
	transform: translateY(-5px);
}

.video-player-container:hover .play-icon-overlay {
	background-color: var(--primary-purple);
}

.video-thumbnail {
	position: relative;
	overflow: clip;
	height: 100%;
}

.video-thumbnail img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 9/16;
	object-fit: cover;
}

.video .review-author {
	margin-bottom: 0;
	margin-top: 10px;
	padding: 0;
}

.play-icon-overlay {
	/* background-color: none; (This is not a valid CSS value, it's better to remove it or use transparent) */
	background-color: transparent;
	position: absolute;
	bottom: 20px;
	left: 20px;
	width: 40px;
	height: 40px;
	border-radius: 20%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	transition: all 0.3s ease;
	pointer-events: none;
	/* This to make sure clicks go through to the container */
}

.play-icon-overlay svg {
	width: 32px;
	height: 32px;
}

/* --- Styles for the dynamically created <video> element --- */
.video-player-container video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	/* Make the video cover the container perfectly */
	z-index: 10;
	border-radius: 8px;
	aspect-ratio: 9 / 16;
	position: relative;
}

/* --- Styles for the loading indicator --- */
.video-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    /* This transform ensures it's perfectly centered */
    transform: translate(-50%, -50%); 
    z-index: 5; /* Places it on top of any other content */

    /* Spinner styles */
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    /* Using your theme color for the spinner */
    border-top-color: var(--primary-purple); 
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { 
        transform: translate(-50%, -50%) rotate(360deg); 
    }
}

/* --- Section 9: Potrivit --- */
.potrivit-section {

	.image-container {
		max-width: 60px;
		margin-bottom: 10px;
	}

	h3,
	p {
		margin: 0 0 10px;
		line-height: 1.2em;
	}
}

/* --- Section 10: Despre --- */
section#despre-mine {
	padding-bottom: 0;
}

.despre-section .content-image img {
	vertical-align: bottom;
}

/* --- Section 11: Cadou --- */
.cadou-image {
	padding: 70px 30px;
}

/* --- Section 12: Ghid CTA --- */
.ghid-section .two-col {
	display: flex;
	justify-content: space-around;
}

.ghid-section .price {
	font-size: 3rem;
	font-weight: bold;
	color: var(--white);
	font-family: var(--font-new-spirit);
	margin: 30px 0 20px;
}

.ghid-section p.subtitle {
	text-align: left;
}

.ghid-section .ghid-text {
	display: flex;
	justify-content: flex-start;
	flex-direction: column;
	align-items: flex-start;
}

/* --- Section 13: FAQ --- */
.faq-section {
	background-color: var(--light-sand);
}

.faq-section::after {
	content: none;
}

.faq-layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin: 50px 0 0;
	width: 100%;
}

/* Questions Column */
.faq-questions-column {
	display: flex;
	flex-direction: column;
	gap: 10px;
	text-align: left;
}

.faq-question-item {
	padding: 20px;
	font-weight: bold;
	font-size: 1.1rem;
	border-radius: 8px;
	background-color: var(--white);
	cursor: pointer;
	transition: all 0.3s ease;
	position: relative;
	padding-right: 50px;
}

.faq-arrow {
	position: absolute;
	right: 20px;
	top: 50%;
	transform: translateY(-50%);
	width: 30px;
	height: 30px;
	border-radius: 50%;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Active State Styling */
.faq-question-item.active {
	background-color: var(--beige);
}

.faq-question-item .faq-arrow {
	background-image: url('../emotiisiculori-theme/assets/img/vectors/check_orange.svg');
	background-repeat: no-repeat;
	background-size: 100% 100%;
	width: 25px;
	height: 25px;
}

.faq-question-item.active .faq-arrow {
	transform: translateY(-50%) rotate(-90deg);
}

/* Answers Column */
.faq-answers-column {
	position: relative;
	text-align: left;
}

.faq-answer-item {
	padding: 20px;
	border-radius: 8px;
	border: 2px solid var(--yellow);
	background-color: var(--white);
	opacity: 0;
	visibility: hidden;
	position: absolute;
	top: 0;
	transition: opacity 0.3s ease, visibility 0s 0.3s;
}

.faq-answer-item p {
	margin: 0;
}

.faq-answer-item.active {
	opacity: 1;
	visibility: visible;
	position: relative;
	/* Let it take up space in the document flow */
	transition: opacity 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 992px) {

	.solutia-wrapper {
		width: 100%;
	}

	.faq-layout {
		grid-template-columns: 1fr;
	}

	/* .section-content {
		flex-direction: column;
		text-align: center;
		display: flex;
		align-items: center;
		gap: 40px;
	} */

	section .content-text {
		flex: 1;
		max-width: 100%;
	}

	.motive-card.bordered {
		border: none;
	}

	.video-reviews-grid>.video.review-card {
		flex: 1;
	}
}

/* --- Responsive --- */
@media (max-width: 768px) {

	.three-col-grid {
		grid-template-columns: 1fr;
	}

	.author-image-small {
		display: none;
	}
}