/*
Theme Name: KaniSkolan
Theme URI: https://kaniskolan.se/
Author: KaniSkolan
Description: Custom WordPress theme replicating the KaniSkolan front page design - spirituell och personlig utveckling. Built for the Gutenberg block editor.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: kaniskolan
*/

/* -------------------------------------------------
   0. Fonts, resets & variables
------------------------------------------------- */
:root {
	--color-body: #666666;
	--color-heading: #664533;
	--color-link: #aa1ec9;
	--color-gold: #ffd691;
	--color-cream: #fcede8;
	--color-nav-link: #0f0006;
	--color-purple: #8300e9;
	--color-blue: #2ea3f2;
	--gradient-nav: linear-gradient(144deg, #ffde4c 68%, #6d0000 100%);
	--font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
	--font-body: 'Open Sans', Arial, sans-serif;
}

* { box-sizing: border-box; }

/* The Group block wraps its children in an extra inner-container div
   when no explicit "layout" attribute is set. Neutralize it so our
   Grid/Flexbox layouts (features-grid, alven-columns, footer-columns,
   etc.) see their intended children directly. */
.wp-block-group__inner-container { display: contents; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.7em;
	font-weight: 400;
	color: var(--color-body);
	background: #fff;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--color-link); text-decoration: none; transition: opacity .2s ease; }
a:hover { opacity: .75; }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	color: var(--color-heading);
	line-height: 1.2em;
	font-weight: 500;
	margin: 0 0 .5em;
}

h1 { font-size: 40px; }
h2 { font-size: 28px; }
h3 { font-size: 22px; }

ul { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 1em; }

.container {
	width: 90%;
	max-width: 1200px;
	margin: 0 auto;
}

.btn {
	display: inline-block;
	padding: .8em 1.8em;
	border-radius: 3px;
	font-family: var(--font-heading);
	font-weight: 600;
	text-align: center;
	border: 2px solid transparent;
	transition: all .25s ease;
	cursor: pointer;
}
.btn:hover { opacity: 1; transform: translateY(-2px); }

/* Screen-reader only */
.screen-reader-text {
	position: absolute !important;
	clip: rect(1px, 1px, 1px, 1px);
	width: 1px; height: 1px;
	overflow: hidden;
}

/* -------------------------------------------------
   1. Site Header / Navigation
------------------------------------------------- */
.site-header {
	position: relative;
	z-index: 100;
	background: var(--gradient-nav);
	box-shadow: 0 17px 18px -6px rgba(0,0,0,.4);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 92%;
	max-width: 1400px;
	margin: 0 auto;
	padding: 10px 0;
}

.site-logo img {
	max-width: 220px;
	width: 100%;
	height: auto;
}

.main-navigation { flex: 1; display: flex; justify-content: flex-end; }

.main-navigation ul {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
}

.main-navigation > div > ul > li {
	position: relative;
}

.main-navigation a {
	display: block;
	padding: 12px 16px;
	color: var(--color-nav-link);
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
}

.main-navigation .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 260px;
	background: rgba(255, 222, 76, 0.95);
	border: 1px solid #4c2c03;
	box-shadow: 0 8px 16px rgba(0,0,0,.25);
	padding: 6px 0;
}

.main-navigation .menu-item-has-children:hover > .sub-menu,
.main-navigation .menu-item-has-children:focus-within > .sub-menu {
	display: block;
}

.main-navigation .sub-menu a {
	color: #2b1403;
	font-weight: 500;
	padding: 10px 18px;
}

.main-navigation .sub-menu .sub-menu {
	top: 0;
	left: 100%;
}

.main-navigation .menu-item-has-children > a:after {
	content: '\25BE';
	margin-left: 6px;
	font-size: 11px;
}

.menu-toggle {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 10px;
	width: 44px;
	height: 44px;
	position: relative;
}
.menu-toggle span,
.menu-toggle span:before,
.menu-toggle span:after {
	content: '';
	display: block;
	width: 24px;
	height: 2px;
	background: var(--color-nav-link);
	position: relative;
	transition: all .25s ease;
}
.menu-toggle span:before { position: absolute; top: -8px; }
.menu-toggle span:after { position: absolute; top: 8px; }

@media only screen and (max-width: 980px) {
	.menu-toggle { display: block; margin-left: auto; }
	.main-navigation { display: none; width: 100%; order: 3; }
	.main-navigation.is-open { display: block; }
	.main-navigation > div > ul { flex-direction: column; align-items: stretch; width: 100%; }
	.main-navigation .sub-menu { position: static; display: block; box-shadow: none; border: none; background: rgba(255,222,76,.5); }
	.main-navigation .menu-item-has-children:hover > .sub-menu { display: block; }
	.header-inner { flex-wrap: wrap; }
}

/* -------------------------------------------------
   2. Hero section
------------------------------------------------- */
.hero {
	position: relative;
	background: linear-gradient(180deg, rgba(52,33,7,.7) 0%, rgba(52,33,7,.46) 100%),
	            url('assets/images/hero-bg.png') center top / cover no-repeat;
	padding: 90px 0 70px;
	text-align: right;
	overflow: hidden;
}

.hero-eyebrow {
	color: #fff;
	font-size: clamp(22px, 3vw, 34px);
	margin-bottom: 0;
}

.hero-title {
	font-variant: small-caps;
	font-size: clamp(38px, 11vw, 130px);
	color: #fff;
	margin: -10px 0 0;
	line-height: 1.1em;
}

.hero-subtitle {
	color: #fff;
	font-size: clamp(24px, 3.4vw, 40px);
	margin-top: 10px;
	margin-bottom: 90px;
}

.hero-card {
	width: 84%;
	max-width: 900px;
	margin: -40px auto 0;
	position: relative;
	text-align: center;
	background: linear-gradient(180deg, rgba(224,154,69,.55) 0%, rgba(224,155,65,.3) 100%);
	backdrop-filter: blur(2px);
	box-shadow: 0 12px 18px -6px rgba(0,0,0,.3);
	border-radius: 6px;
	padding: 40px 30px 34px;
}

.hero-card h2 {
	color: var(--color-gold);
	font-size: clamp(26px, 4vw, 50px);
	text-shadow: 0.05em 0.05em 0.03em rgba(0,0,0,.4);
	margin-bottom: 14px;
}

.hero-card p {
	color: #fff;
	font-style: italic;
	font-size: 18px;
	max-width: 640px;
	margin: 0 auto;
}

/* -------------------------------------------------
   3. Feature icon grid ("Astrologi & Naturens Cykler" etc)
------------------------------------------------- */
.features {
	background: rgba(196, 151, 117, 0.12);
	padding: 70px 0 50px;
}

.features-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 40px 30px;
}

@media only screen and (max-width: 980px) {
	.features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media only screen and (max-width: 600px) {
	.features-grid { grid-template-columns: 1fr; }
}

.feature-item { text-align: center; }

.feature-item .icon-wrap {
	width: 130px;
	height: 130px;
	margin: 0 auto 18px;
	border-radius: 50%;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.feature-item .icon-wrap img { width: 60%; height: 60%; object-fit: contain; }

.feature-item h3 {
	font-variant: small-caps;
	font-weight: 600;
	font-size: 22px;
	margin-bottom: 12px;
}

.feature-item p { font-size: 15px; color: var(--color-body); }

.feature-item details { margin-top: 6px; }
.feature-item summary {
	cursor: pointer;
	color: var(--color-link);
	font-weight: 600;
	font-size: 14px;
	list-style: none;
}
.feature-item summary::-webkit-details-marker { display: none; }
.feature-item details[open] summary { margin-bottom: 8px; }

/* -------------------------------------------------
   4. StarCode Healing section
------------------------------------------------- */
.starcode {
	position: relative;
	background: linear-gradient(180deg, rgba(0,84,219,.35) 0%, rgba(0,10,163,.25) 100%),
	            url('assets/images/starcode-bg.jpg') center / cover no-repeat;
	padding: 30px 0 80px;
	text-align: center;
	color: #fff;
}

.starcode-logo { max-width: 480px; margin: 0 auto 10px; }

.starcode-card {
	max-width: 760px;
	margin: 30px auto 0;
	background: linear-gradient(180deg, rgba(224,154,69,.28) 0%, rgba(224,155,65,.13) 100%);
	box-shadow: 0 12px 18px -6px rgba(0,0,0,.3);
	border-radius: 8px;
	padding: 24px 30px 40px;
}

.starcode-eyebrow {
	background: rgba(6,25,229,.25);
	display: inline-block;
	padding: 10px 30px;
	margin: 0 0 16px;
	color: #fff;
	text-shadow: 0 .1em .1em rgba(0,0,0,.4);
}
.starcode-eyebrow p { margin: 0; font-size: 20px; line-height: 1.3em; }

.starcode-card h2 {
	color: var(--color-gold);
	font-size: clamp(30px, 5vw, 60px);
	text-shadow: 0.05em 0.04em 0.05em rgba(0,0,0,.4);
	margin: 10px 0 20px;
}

.starcode-card p {
	color: var(--color-gold);
	text-shadow: 0 .1em .1em rgba(0,0,0,.4);
	font-size: 18px;
	line-height: 1.6em;
	margin-bottom: 26px;
}

.btn-starcode {
	background: linear-gradient(144deg, #ffde4c 68%, #6d0000 100%);
	color: #fff;
	font-size: clamp(18px, 2.4vw, 30px);
	text-shadow: 0 .08em 0 rgba(0,0,0,.4);
	box-shadow: 6px 6px 18px rgba(0,0,0,.3);
	padding: .6em 1.6em;
}

/* -------------------------------------------------
   5. Shamansk Healing Retreat (parallax banner)
------------------------------------------------- */
.retreat {
	position: relative;
	background: linear-gradient(180deg, rgba(147,49,0,.51) 9%, rgba(176,192,232,0) 96%),
	            url('assets/images/retreat-bg.jpg') center / cover no-repeat fixed;
	padding: 100px 0;
	text-align: center;
	color: #fff;
}

.retreat h1 {
	color: #fff;
	font-size: clamp(40px, 8vw, 100px);
	text-shadow: 0 .1em .1em rgba(0,0,0,.4);
	margin-bottom: 10px;
}

.retreat h2 {
	color: rgba(252,235,224,.92);
	font-size: clamp(24px, 4.4vw, 50px);
	margin-bottom: 20px;
}

.retreat .btn {
	background: rgba(96,67,0,.5);
	color: #fff;
	font-size: clamp(20px, 3vw, 34px);
	box-shadow: 6px 6px 18px rgba(0,0,0,.3);
}

/* -------------------------------------------------
   6. Thank you / portraits section
------------------------------------------------- */
.thanks {
	padding: 60px 0;
}

.thanks .container {
	display: grid;
	grid-template-columns: 3fr 1fr 1fr;
	gap: 24px;
	align-items: center;
}

.thanks h1 { font-size: 40px; }
.thanks p { font-size: 16px; line-height: 1.8em; }

.thanks .portrait {
	border-radius: 50%;
	overflow: hidden;
	box-shadow: 6px 6px 18px rgba(0,0,0,.3);
	aspect-ratio: 1 / 1;
}
.thanks .portrait img { width: 100%; height: 100%; object-fit: cover; }

@media only screen and (max-width: 767px) {
	.thanks .container { grid-template-columns: 1fr; text-align: center; }
	.thanks .portrait { max-width: 220px; margin: 0 auto; }
}

/* -------------------------------------------------
   7. Blog slider
------------------------------------------------- */
.blog-section {
	background: rgba(196, 151, 117, 0.12);
	padding: 40px 0 50px;
}

.blog-section h2 {
	text-align: center;
	margin-bottom: 20px;
}

.blog-slider {
	position: relative;
	max-width: 900px;
	margin: 0 auto;
	border-radius: 15px;
	overflow: hidden;
	box-shadow: 0 2px 18px rgba(0,0,0,.3);
	background: url('assets/images/blog-bg.jpg') center / cover no-repeat;
}

.blog-slide {
	display: none;
	background: rgba(6,25,229,.35);
	color: #fff;
	padding: 60px 40px;
	text-align: center;
	min-height: 320px;
}
.blog-slide.is-active { display: flex; flex-direction: column; justify-content: center; }

.blog-slide h3 { margin-bottom: 16px; }
.blog-slide h3 a {
	color: #fff;
	font-size: 26px;
	text-shadow: 0 .08em 0 rgba(0,0,0,.4);
}
.blog-slide .excerpt { font-size: 15px; max-width: 640px; margin: 0 auto 20px; }

.blog-slide .btn {
	background: rgba(255,255,255,.15);
	border: 1px solid #fff;
	color: #fff;
	align-self: center;
}

.blog-nav {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 18px;
}
.blog-nav button {
	width: 10px; height: 10px;
	border-radius: 50%;
	border: 1px solid var(--color-heading);
	background: transparent;
	cursor: pointer;
	padding: 0;
}
.blog-nav button.is-active { background: var(--color-heading); }

/* -------------------------------------------------
   8. Alven Inner Ring Tradition section
------------------------------------------------- */
.alven { background: rgba(2, 107, 24, 0.1); padding: 60px 0; }

.alven-heading {
	display: grid;
	grid-template-columns: 1fr 4fr;
	gap: 24px;
	align-items: center;
	margin-bottom: 30px;
}
.alven-heading img { max-width: 160px; margin: 0 auto; }
.alven-heading h1, .alven-heading h2, .alven-heading h3 { text-align: center; }
.alven-heading h1 { font-size: 42px; }
.alven-heading h2 { font-size: 28px; }

.alven-card {
	background: rgba(252,235,224,.92);
	border-radius: 10px;
	box-shadow: 0 12px 18px -6px rgba(0,0,0,.3);
	padding: 24px 30px 10px;
	margin-bottom: 30px;
}
.alven-card h1 { color: #993300; font-size: 34px; }

.alven-columns {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	align-items: start;
}

.alven-image-wrap { text-align: center; }
.alven-image-wrap img {
	border-radius: 500px;
	box-shadow: 6px 6px 18px rgba(0,0,0,.3);
	max-width: 320px;
	margin: 0 auto 20px;
}

.countdown {
	background: #ad8c5f;
	border-radius: 10px;
	color: #fff;
	text-align: center;
	padding: 20px;
}
.countdown h4 { color: #fff; margin-bottom: 10px; }
.countdown-values { display: flex; justify-content: center; gap: 6px; font-size: 26px; font-weight: 700; }
.countdown-values .sep { opacity: .6; }
.countdown-values .value-box { text-align: center; min-width: 46px; }
.countdown-values .label { display: block; font-size: 11px; font-weight: 400; text-transform: uppercase; }

.alven-list ul { margin: 16px 0; }
.alven-list li {
	position: relative;
	padding-left: 22px;
	margin-bottom: 8px;
	font-size: 15px;
}
.alven-list li:before {
	content: '\2726';
	position: absolute;
	left: 0;
	color: var(--color-gold);
	color: #ad8c5f;
}

.alven-testimonials { margin-top: 20px; }
.alven-testimonials summary {
	cursor: pointer;
	font-family: var(--font-heading);
	font-size: 20px;
	color: var(--color-heading);
	list-style: none;
	font-weight: 600;
}
.alven-testimonials summary::-webkit-details-marker { display: none; }
.alven-testimonials .testimonial-body { padding-top: 14px; font-size: 15px; }
.alven-testimonials .testimonial-body p { margin-bottom: 12px; }

.btn-alven {
	display: inline-block;
	margin-top: 16px;
	border: 2px solid var(--color-purple);
	color: var(--color-purple) !important;
	background: #fff;
	border-radius: 4px;
	box-shadow: 0 12px 18px -6px rgba(0,0,0,.3);
}

@media only screen and (max-width: 767px) {
	.alven-heading { grid-template-columns: 1fr; }
	.alven-columns { grid-template-columns: 1fr; }
}

/* -------------------------------------------------
   9. Footer
------------------------------------------------- */
.site-footer {
	background: linear-gradient(178deg, #472100 6%, rgba(216,144,0,.21) 100%),
	            url('assets/images/footer-bg.png') center / cover no-repeat;
	color: #fff;
	padding: 60px 0 0;
}

.footer-columns {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
	padding-bottom: 40px;
}

.site-footer h2 { color: rgba(224,224,224,.87); font-size: 22px; }
.site-footer h4 { color: #fff; font-size: 20px; }
.site-footer p, .site-footer a { color: #fff; font-size: 15px; }

.footer-social { display: flex; gap: 12px; margin-top: 14px; }
.footer-social a {
	width: 40px; height: 40px;
	border: 1px solid #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
}

.footer-newsletter {
	border-top: 1px solid rgba(255,255,255,.51);
	padding: 30px 0;
	text-align: center;
}
.footer-newsletter h2 { color: #cecece; }
.footer-newsletter p { max-width: 560px; margin: 0 auto 18px; opacity: .85; }
.footer-newsletter form { display: flex; justify-content: center; gap: 10px; max-width: 420px; margin: 0 auto; flex-wrap: wrap; }
.footer-newsletter input[type="email"] {
	flex: 1;
	min-width: 200px;
	padding: 12px 16px;
	border: none;
	border-radius: 3px;
	box-shadow: 0 2px 18px rgba(0,0,0,.3);
}
.footer-newsletter button {
	background: transparent;
	border: 1px solid #fff;
	color: #fff;
	padding: 12px 24px;
	border-radius: 3px;
	cursor: pointer;
}

.footer-bottom {
	border-top: 1px solid rgba(255,255,255,.12);
	text-align: center;
	padding: 16px 0;
	font-size: 14px;
}

@media only screen and (max-width: 767px) {
	.footer-columns { grid-template-columns: 1fr; text-align: center; }
	.footer-social { justify-content: center; }
}

/* -------------------------------------------------
   10. Editor / Gutenberg content defaults (inner pages)
------------------------------------------------- */
.site-content {
	width: 90%;
	max-width: 900px;
	margin: 60px auto;
}
