/*!
Theme Name: SpicaMag Child Theme
Template: spicamag
Theme URI: https://mag.spicanet.net/
Author: Spicanet
Author URI: https://spicanet.net
Description: Child theme for SpicaMag.
Version: 1.0.4
Tested up to: 5.4
Requires PHP: 5.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: spicamag
*/

/* Variables */
:root {
	--primary-color: #26A69A;
	--secondary-color: #FFB300;
	--navbar-color: #17485E;
	--navbar-link-color: #FAF6ED;
	--navbar-link-hover-color: #FFD859;
	--hero-background-color: #47E5BC;
	--hero-text-color: #11424B;
	--background-color: #F7FCFC;
	--text-color: #183649;
	--link-color: #2D95F3;
	--link-hover-color: #FD6C35;
	--button-color: #1D7C6B;
	--button-text-color: #F3FFFA;
	--button-hover-color: #FFB300;
	--button-hover-text-color: #133C33;
	--button-secondary-color: #FFDE79;
	--button-secondary-text-color: #234256;
	--button-secondary-hover-color: #26A69A;
	--button-secondary-hover-text-color: #FFF0DA;
	--border-color: #B9F6CA;
	--border-radius: 8px;
	--box-shadow: 0 2px 16px 0 #E1F7F4;
	--font-family: 'Roboto', sans-serif;
	--font-size: 17px;
	--line-height: 1.6;
}

/* TOC widget styles */
.widget.widget_toc {
	padding: 20px;
	background: #fff;
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius);
	box-shadow: var(--box-shadow);
}
.widget.widget_toc .widget-title {
	margin: 0 0 14px 0;
	font-size: 18px;
	line-height: 1.3;
	color: var(--text-color);
}
.wp-block-toc-list.wp-block-toc {
	margin: 0;
	padding: 0;
	list-style: none;
}
.wp-block-toc-list.wp-block-toc .toc-item {
	margin: 6px 0;
}
.wp-block-toc-list.wp-block-toc .toc-item a {
	color: var(--link-color);
	text-decoration: none;
	padding: 6px 0;
	display: inline-block;
}
.wp-block-toc-list.wp-block-toc .toc-item a:hover {
	color: var(--link-hover-color);
	text-decoration: underline;
}

/* Sticky TOC on desktop */
@media (min-width: 992px) {
	/* Make the whole sidebar sticky to avoid ancestor overflow/transform issues */
	.sidebar.sidebar-sticky {
		position: sticky;
		top: 30px;
		z-index: 2;
	}
	/* Let the list inside widget scroll, not the sticky container itself */
	.sidebar.sidebar-sticky .widget.widget_toc { max-height: none; overflow: visible; }
	.sidebar.sidebar-sticky .widget.widget_toc .wp-block-toc-list { max-height: calc(100vh - 120px); overflow: auto; }
}

/* Nested TOC levels */
.wp-block-toc-list.wp-block-toc .toc-item.toc-level-2 > a {
	font-weight: 700;
}
.wp-block-toc-list.wp-block-toc .toc-children {
	margin: 6px 0 6px 16px;
	padding-left: 12px;
	list-style: none;
	border-left: 2px solid rgba(0,0,0,0.06);
}
.wp-block-toc-list.wp-block-toc .toc-item.toc-level-3 > a,
.wp-block-toc-list.wp-block-toc .toc-item.toc-level-4 > a {
	font-weight: 400;
}
.wp-block-toc-list.wp-block-toc .toc-item.toc-level-3 { margin: 4px 0; }
.wp-block-toc-list.wp-block-toc .toc-item.toc-level-4 { margin: 2px 0; }

/* RankMath How To Block Styles */
.rank-math-block.rank-math-howto {
	margin: 30px 0;
	padding: 25px;
	background: #fff;
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius);
	box-shadow: var(--box-shadow);
}

.rank-math-howto-description {
	margin-bottom: 25px;
	padding-bottom: 20px;
	border-bottom: 2px solid var(--border-color);
}

.rank-math-howto-description p {
	margin: 0;
	font-size: var(--font-size);
	line-height: var(--line-height);
	color: var(--text-color);
}

.rank-math-steps {
	margin: 0;
	padding: 0;
	list-style: none;
}

.rank-math-step {
	margin: 20px 0;
	padding: 20px;
	background: var(--background-color);
	border-left: 4px solid var(--primary-color);
	border-radius: var(--border-radius);
	transition: all 0.3s ease;
}

.rank-math-step:hover {
	box-shadow: 0 4px 12px rgba(38, 166, 154, 0.15);
	transform: translateX(4px);
}

.rank-math-step-title {
	margin: 0 0 12px 0;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.4;
	color: var(--text-color);
}

.rank-math-step-content {
	margin: 0;
}

.rank-math-step-content p {
	margin: 0;
	font-size: var(--font-size);
	line-height: var(--line-height);
	color: var(--text-color);
}

/* RankMath FAQ Block Styles */
.rank-math-block.rank-math-faq {
	margin: 30px 0;
	padding: 25px;
	background: #fff;
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius);
	box-shadow: var(--box-shadow);
}

.rank-math-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.rank-math-list-item {
	margin: 20px 0;
	padding: 0;
	border-bottom: 1px solid var(--border-color);
}

.rank-math-list-item:last-child {
	border-bottom: none;
}

.rank-math-question {
	margin: 0 0 12px 0;
	padding: 15px 50px 15px 20px;
	position: relative;
	background: var(--background-color);
	border-left: 4px solid var(--secondary-color);
	border-radius: var(--border-radius);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.4;
	color: var(--text-color);
	cursor: pointer;
	transition: all 0.3s ease;
}

.rank-math-question:hover {
	background: rgba(255, 179, 0, 0.1);
	border-left-color: var(--link-hover-color);
}

.rank-math-question:focus {
	outline: 2px solid var(--primary-color);
	outline-offset: 2px;
}

.rank-math-answer {
	margin: 0;
	padding: 15px 20px 15px 44px;
	overflow: hidden;
	transition: all 0.3s ease;
	display: none;
}

/* Show answers when JavaScript is enabled and item is active */
.rank-math-list-item.faq-item-active .rank-math-answer {
	display: block;
}

.rank-math-answer p {
	margin: 0 0 12px 0;
	font-size: var(--font-size);
	line-height: var(--line-height);
	color: var(--text-color);
}

.rank-math-answer p:last-child {
	margin-bottom: 0;
}

/* FAQ Accordion Styles */

.rank-math-question .faq-icon {
	position: absolute;
	right: 20px;
	top: 50%;
	transform: translateY(-50%);
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.3s ease;
}

.rank-math-question .faq-icon::before,
.rank-math-question .faq-icon::after {
	content: '';
	position: absolute;
	background-color: var(--text-color);
	transition: all 0.3s ease;
}

.rank-math-question .faq-icon::before {
	width: 2px;
	height: 12px;
}

.rank-math-question .faq-icon::after {
	width: 12px;
	height: 2px;
}

.rank-math-question[aria-expanded="true"] .faq-icon {
	transform: translateY(-50%) rotate(45deg);
}

.rank-math-list-item.faq-item-active .rank-math-question {
	background: rgba(255, 179, 0, 0.15);
	border-left-color: var(--primary-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.rank-math-block.rank-math-howto,
	.rank-math-block.rank-math-faq {
		padding: 20px;
		margin: 20px 0;
	}

	.rank-math-step {
		padding: 15px;
		margin: 15px 0;
	}

	.rank-math-step-title,
	.rank-math-question {
		font-size: 18px;
	}

	.rank-math-answer {
		padding: 12px 15px 12px 35px;
	}
}