/* ===== SPELFORM ARCHIVE PAGE ===== */

.ledarportal-spelform-archive {
	min-height: 60vh;
}

/* Edit Toolbar */
.ledarportal-spelform-edit-toolbar {
	padding: 2rem 0 0 0;
}

/* Archive Header (fallback if BB Themer not available) */
.spelform-archive-header {
	background: #f8f8f8;
	padding: 3rem 0;
	margin-bottom: 0;
	border-bottom: 1px solid #e0e0e0;
}

.spelform-archive-title {
	font-size: 2.5rem;
	font-weight: 700;
	margin: 0;
	text-align: center;
	color: #1a1a1a;
}

@media (max-width: 768px) {
	.spelform-archive-header {
		padding: 2rem 0;
	}

	.spelform-archive-title {
		font-size: 2rem;
	}
}

/* Text + Bild Layout (Bild till höger) */
.text-bild-layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
	align-items: start;
	padding: 4rem 0;
}

.text-content h1 {
	font-size: 2.5rem;
	font-weight: 700;
	margin-bottom: 1.5rem;
	color: #1a1a1a;
	text-align: left;
}

.text-content .spelform-text {
	font-size: 1.125rem;
	line-height: 1.7;
	color: #555;
}

.text-content .spelform-text p {
	margin-bottom: 1rem;
}

.bild-content img {
	width: 100%;
	height: auto;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ===== SPELFORM SECTION LAYOUTS ===== */

.spelform-sektion-fullwidth.bg-white {
	background: #ffffff;
}

.spelform-sektion-fullwidth.bg-gray {
	background: #f4f4f4;
}

.spelform-sektion {
	padding: 2.5rem 0;
}

/* Section Headings */
.spelform-rubrik {
	font-size: 2rem;
	font-weight: 700;
	margin-bottom: 1.5rem;
	color: #1a1a1a;
	text-align: left;
}

.spelform-sektion h2 {
	font-size: 2rem;
	font-weight: 700;
	margin-bottom: 2.5rem;
	color: #1a1a1a;
	text-align: left;
}

/* Text Content */
.spelform-text {
	font-size: 1.125rem;
	line-height: 1.7;
	color: #555;
}

.spelform-text p {
	margin-bottom: 1rem;
}

.spelform-text ul,
.spelform-text ol {
	margin-bottom: 1rem;
	padding-left: 1.5rem;
}

.spelform-text li {
	margin-bottom: 0.5rem;
}

/* Text + Bild Layout - Image Left */
.text-bild-layout.reverse {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
	align-items: start;
}

/* Text Only Layout */
.text-layout {
	max-width: 900px;
	margin: 0 auto;
}

/* Image Only Layout */
.bild-layout {
	text-align: center;
}

.bild-layout img {
	width: 100%;
	max-width: 900px;
	height: auto;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	margin: 0 auto;
}

.spelform-bildtext {
	font-size: 0.95rem;
	color: #666;
	margin-top: 1rem;
	font-style: italic;
}

.spelform-table-wrapper {
	overflow-x: auto;
	margin-top: 2rem;
}

.spelform-table {
	width: 100%;
	border-collapse: collapse;
	background: #ffffff;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	border-radius: 8px;
	overflow: hidden;
}

.spelform-table tr {
	border-bottom: 1px solid #e0e0e0;
}

.spelform-table tr:last-child {
	border-bottom: none;
}

.spelform-table td {
	padding: 1.25rem 1.5rem;
	font-size: 1rem;
	color: #555;
	vertical-align: top;
}

.spelform-table td:first-child {
	font-weight: 600;
	color: #1a1a1a;
	width: 30%;
}

.spelform-table tr:nth-child(even) {
	background: #f8f8f8;
}

/* ===== SPELFORM CAROUSEL ===== */

.spelform-carousel-wrapper {
	position: relative;
	padding: 0 60px;
}

.spelform-carousel {
	overflow: hidden;
	position: relative;
}

.spelform-carousel-track {
	display: flex;
	gap: 1.5rem;
	transition: transform 0.4s ease-in-out;
}

.spelform-carousel-item {
	flex: 0 0 calc(33.333% - 1rem);
	min-width: 0;
}

/* Spelform Card - Matching spelform page carousel style */
.spelform-card {
	background: transparent;
	height: 100%;
	display: flex;
	flex-direction: column;
}

.spelform-card-image {
	position: relative;
	width: 100%;
}

.spelform-card-image img {
	width: 100%;
	height: 280px;
	object-fit: cover;
	border-radius: 8px;
	transition: transform 0.3s ease;
}

.spelform-card:hover .spelform-card-image img {
	transform: scale(1.02);
}

.spelform-card-content {
	padding: 0;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}

.spelform-card-content h3 {
	font-size: 1.125rem;
	font-weight: 600;
	margin: 0;
	padding-top: 1.25rem;
	line-height: 1.5;
}

.spelform-card-content h3 a {
	color: #1a1a1a;
	text-decoration: none;
	transition: color 0.2s ease;
	display: block;
}

.spelform-card-content h3 a:hover {
	color: var(--ast-global-color-0, #29A166);
}

.spelform-age {
	font-size: 0.9375rem;
	color: var(--ast-global-color-0, #29A166);
	font-weight: 600;
	margin: 0.5rem 0 0.75rem 0;
}

.spelform-intro {
	font-size: 0.9375rem;
	line-height: 1.6;
	color: #666;
	margin-bottom: 1rem;
	flex-grow: 1;
}

.spelform-card-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--ast-global-color-0, #29A166);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9375rem;
	transition: gap 0.2s ease;
}

.spelform-card-link:hover {
	gap: 0.75rem;
}

.spelform-card-link .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

/* Carousel Navigation Buttons */
.spelform-carousel-prev,
.spelform-carousel-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	background: #ffffff;
	border: none;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.3s ease;
	z-index: 10;
	padding: 0;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.spelform-carousel-prev {
	left: 0;
}

.spelform-carousel-next {
	right: 0;
}

.spelform-carousel-prev:hover,
.spelform-carousel-next:hover {
	background: var(--ast-global-color-0, #29A166);
	transform: translateY(-50%) scale(1.1);
	box-shadow: 0 6px 20px rgba(var(--ast-global-color-0-rgb, 41, 161, 102), 0.3);
}

.spelform-carousel-prev .dashicons,
.spelform-carousel-next .dashicons {
	font-size: 24px;
	width: 24px;
	height: 24px;
	color: var(--ast-global-color-0, #29A166);
	transition: color 0.3s ease;
}

.spelform-carousel-prev:hover .dashicons,
.spelform-carousel-next:hover .dashicons {
	color: #ffffff;
}

.spelform-carousel-prev:disabled,
.spelform-carousel-next:disabled {
	opacity: 0.3;
	cursor: not-allowed;
	background: #f0f0f0;
}

.spelform-carousel-prev:disabled:hover,
.spelform-carousel-next:disabled:hover {
	background: #f0f0f0;
	transform: translateY(-50%);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Dots Navigation - Simple & Clean */
.spelform-carousel-dots {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.75rem;
	margin-top: 2rem;
}

.spelform-carousel-dot {
	width: 12px;
	height: 12px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: #c7c7c7;
	cursor: pointer;
	transition: all 0.3s ease;
	position: relative;
}

.spelform-carousel-dot:hover {
	background: #999;
}

.spelform-carousel-dot.active {
	width: 32px;
	border-radius: 6px;
	background: var(--ast-global-color-0, #29A166);
}

.spelform-carousel-dot.active:hover {
	background: var(--ast-global-color-0, #29A166);
	opacity: 0.85;
}

/* Focus state for accessibility */
.spelform-carousel-dot:focus {
	outline: 2px solid var(--ast-global-color-0, #29A166);
	outline-offset: 2px;
}

/* ===== RESPONSIVE ===== */

/* Tablets */
@media (max-width: 1024px) {
	.text-bild-layout,
	.text-bild-layout.reverse {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	.text-content h1 {
		font-size: 2rem;
	}

	.spelform-rubrik {
		font-size: 1.75rem;
	}

	.spelform-text {
		font-size: 1.05rem;
	}

	.spelform-carousel-item {
		flex: 0 0 calc(50% - 0.75rem);
	}

	.spelform-carousel-wrapper {
		padding: 0 50px;
	}

	.spelform-card-image img {
		height: 260px;
	}
}

/* Mobile */
@media (max-width: 768px) {
	.spelform-sektion {
		padding: 3rem 0;
	}

	.text-content h1 {
		font-size: 1.75rem;
		margin-bottom: 1rem;
	}

	.spelform-rubrik {
		font-size: 1.5rem;
		margin-bottom: 1rem;
	}

	.text-content .spelform-text,
	.spelform-text {
		font-size: 1rem;
	}

	.spelform-sektion h2 {
		font-size: 1.5rem;
		margin-bottom: 2rem;
	}

	.spelform-sektion {
		padding: 2rem 0;
	}

	.spelform-table td {
		padding: 1rem 1.25rem;
		font-size: 0.95rem;
	}

	.spelform-table td:first-child {
		width: 35%;
	}

	.spelform-carousel-item {
		flex: 0 0 100%;
	}

	.spelform-carousel-wrapper {
		padding: 0 40px;
	}

	.spelform-carousel-prev,
	.spelform-carousel-next {
		width: 40px;
		height: 40px;
	}

	.spelform-carousel-prev .dashicons,
	.spelform-carousel-next .dashicons {
		font-size: 20px;
		width: 20px;
		height: 20px;
	}

	.spelform-card-image img {
		height: 260px;
		border-radius: 12px;
	}

	.spelform-card-content h3 {
		font-size: 1.125rem;
		padding-top: 1rem;
	}

	/* Slightly larger touch targets on mobile */
	.spelform-carousel-dot {
		width: 36px;
		height: 36px;
	}
}

/* Small mobile */
@media (max-width: 480px) {
	.text-content h1 {
		font-size: 1.5rem;
	}

	.spelform-rubrik {
		font-size: 1.35rem;
	}

	.spelform-text {
		font-size: 0.95rem;
	}

	.spelform-sektion {
		padding: 1.5rem 0;
	}

	.spelform-table td {
		padding: 0.875rem 1rem;
		font-size: 0.9rem;
	}

	.spelform-table td:first-child {
		width: 40%;
	}

	.spelform-carousel-wrapper {
		padding: 0 30px;
	}

	.spelform-card-image img {
		height: 240px;
	}

	.spelform-card-content h3 {
		font-size: 1.05rem;
		padding-top: 0.875rem;
	}
}
