/*
 Theme Name: DigiSilta AI
 Theme URI: https://digisilta.fi
 Author: DigiSilta
 Author URI: https://digisilta.fi
 Description: Base PHP theme for DigiSilta without Elementor, intended for AI-friendly and human-editable layouts.
 Version: 0.1.0
 Text Domain: digisilta
*/

:root {
	--ds-primary: #0f172a;
	--ds-secondary: #14b8a6;
	--ds-accent: #f97316;
	--ds-bg: #ffffff;
	--ds-text: #0d1321;
	--ds-font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
	--ds-border-radius: 24px;
	--ds-elevation: 0.12;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: var(--ds-font-family);
	background: var(--ds-bg);
	color: var(--ds-text);
	line-height: 1.6;
}

.ds-container {
	margin: 0 auto;
	padding: 4rem 1.5rem;
	width: 100%;
}

.ds-site-main {
	min-height: 60vh;
}

.ds-block {
	margin-bottom: 4rem;
	padding: 3rem;
	border-radius: var(--ds-border-radius, 20px);
	background: var(--ds-block-bg, rgba(255, 255, 255, 0.9));
	color: var(--ds-block-text, var(--ds-text));
	font-family: var(--ds-block-font, var(--ds-font-family));
	box-shadow: 0 30px 60px rgba(15, 23, 42, calc(var(--ds-elevation, 0.15)));
}

.ds-block h1,
.ds-block h2,
.ds-block h3,
.ds-block h4 {
	color: var(--ds-block-heading, var(--ds-text));
	margin-top: 0;
}

.ds-block-hero {
	position: relative;
	overflow: hidden;
}

.ds-block-hero::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(135deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.55));
	transition: opacity 0.2s ease;
}

.ds-block-hero--mode-media::after {
	opacity: 0;
}

.ds-block-hero__inner {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 2rem;
	align-items: center;
}

.ds-block-hero__content h1 {
	font-size: clamp(2.4rem, 5vw, 3.5rem);
	line-height: 1.1;
	margin-bottom: 1rem;
}

.ds-eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.2em;
	font-size: 0.85rem;
	color: var(--ds-secondary);
	margin: 0 0 1rem;
}

.ds-hero-subtitle {
	font-size: 1.1rem;
	color: rgba(15, 23, 42, 0.8);
}

.ds-hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-top: 1.5rem;
}

.ds-hero-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.ds-hero-bg img,
.ds-hero-bg video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ds-hero-bg--slider {
	overflow: hidden;
}

.ds-hero-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.8s ease;
	background-size: cover;
	background-position: center;
}

.ds-hero-slide.is-active {
	opacity: 1;
}

.ds-hero-slide__caption {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	bottom: 2rem;
	background: rgba(0, 0, 0, 0.4);
	color: #fff;
	padding: 0.35rem 1rem;
	border-radius: 999px;
	font-size: 0.85rem;
}

.ds-block-hero--mode-media .ds-block-hero__media img {
	border-radius: calc(var(--ds-border-radius, 20px) - 6px);
	box-shadow: 0 20px 45px rgba(15, 23, 42, 0.2);
}

.ds-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.95rem 1.8rem;
	border-radius: 999px;
	font-weight: 600;
	text-decoration: none;
	border: 1px solid transparent;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
}

.ds-btn--primary {
	background: var(--ds-block-accent, var(--ds-primary));
	color: #fff;
	box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
}

.ds-btn--ghost {
	background: transparent;
	color: var(--ds-primary);
	border-color: rgba(15, 23, 42, 0.2);
}

.ds-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 30px 60px rgba(15, 23, 42, 0.18);
}

.ds-block__header {
	margin-bottom: 2rem;
	text-align: left;
}

.ds-block-title {
	margin: 0 0 0.5rem;
	font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.ds-block-intro {
	margin: 0;
	color: rgba(15, 23, 42, 0.75);
	font-size: 1.05rem;
}

.ds-services-grid,
.ds-references-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1.5rem;
}

.ds-service-card,
.ds-reference-card {
	padding: 1.75rem;
	background: #fff;
	border-radius: calc(var(--ds-border-radius, 20px) - 4px);
	box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
	min-height: 100%;
}

.ds-service-card__icon img,
.ds-reference-card__logo img {
	max-height: 64px;
	width: auto;
}

.ds-service-card__title {
	margin: 1rem 0 0.5rem;
	font-size: 1.25rem;
}

.ds-service-card__description {
	margin: 0 0 1rem;
	color: rgba(15, 23, 42, 0.7);
}

.ds-service-card__link {
	font-weight: 600;
	color: var(--ds-primary);
	text-decoration: none;
}

.ds-block-cta {
	background: var(--ds-block-bg, var(--ds-primary));
	color: var(--ds-block-text, #fff);
}

.ds-block-cta__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2rem;
	justify-content: space-between;
}

.ds-block-cta .ds-btn--primary {
	background: #fff;
	color: var(--ds-block-accent, var(--ds-primary));
}

.ds-block-contact__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 2rem;
}

.ds-contact-list,
.ds-social-links {
	list-style: none;
	padding: 0;
	margin: 1rem 0 0;
}

.ds-contact-list li,
.ds-social-links li {
	margin-bottom: 0.35rem;
}

.ds-contact-form {
	background: rgba(255, 255, 255, 0.9);
	padding: 1.5rem;
	border-radius: calc(var(--ds-border-radius, 20px) - 6px);
	box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.ds-contact-map iframe {
	width: 100%;
	min-height: 280px;
	border: 0;
	border-radius: calc(var(--ds-border-radius, 20px) - 6px);
}

.ds-promises-grid {
	display: grid;
	gap: 1.5rem;
}

.ds-promises-grid.columns-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.ds-promises-grid.columns-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.ds-promises-grid.columns-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.ds-promise-card {
	padding: 1.75rem;
	border-radius: calc(var(--ds-border-radius, 20px) - 8px);
	background: rgba(255, 255, 255, 0.8);
	box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.ds-promise-card__icon {
	width: 48px;
	height: 48px;
	border-radius: 14px;
	background: rgba(0, 0, 0, 0.06);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 1rem;
	font-size: 1.5rem;
}

.ds-price-table {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.ds-price-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 1rem;
	padding-bottom: 1rem;
	border-bottom: 1px dashed rgba(15, 23, 42, 0.2);
}

.ds-price-row__value {
	text-align: right;
	font-weight: 700;
	font-size: 1.1rem;
}

.ds-price-row__value .note {
	display: block;
	font-weight: 400;
	font-size: 0.9rem;
	color: rgba(15, 23, 42, 0.7);
}

.ds-gallery {
	display: grid;
	gap: 1rem;
}

.ds-gallery.grid.columns-2 { grid-template-columns: repeat(2, 1fr); }
.ds-gallery.grid.columns-3 { grid-template-columns: repeat(3, 1fr); }
.ds-gallery.grid.columns-4 { grid-template-columns: repeat(4, 1fr); }
.ds-gallery.grid.columns-5 { grid-template-columns: repeat(5, 1fr); }
.ds-gallery.grid.columns-6 { grid-template-columns: repeat(6, 1fr); }

.ds-gallery__item {
	position: relative;
	overflow: hidden;
	border-radius: calc(var(--ds-border-radius, 20px) - 10px);
	break-inside: avoid;
}

.ds-gallery__item img {
	width: 100%;
	display: block;
	object-fit: cover;
}

.ds-gallery__item figcaption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
.ds-gallery.masonry {
	display: block;
	column-gap: 1rem;
}

.ds-gallery.masonry .ds-gallery__item {
	margin-bottom: 1rem;
}

.ds-gallery.masonry.columns-2 { column-count: 2; }
.ds-gallery.masonry.columns-3 { column-count: 3; }
.ds-gallery.masonry.columns-4 { column-count: 4; }
.ds-gallery.masonry.columns-5 { column-count: 5; }
.ds-gallery.masonry.columns-6 { column-count: 6; }

	padding: 0.75rem 1rem;
	background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.75));
	color: #fff;
	font-size: 0.9rem;
}

.ds-carousel {
	position: relative;
}

.ds-carousel__track {
	display: flex;
	gap: 1.5rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding: 1rem 0;
}

.ds-carousel__slide {
	min-width: 260px;
	scroll-snap-align: center;
	border-radius: calc(var(--ds-border-radius, 20px) - 8px);
	overflow: hidden;
	background: rgba(255, 255, 255, 0.9);
	box-shadow: 0 15px 25px rgba(0, 0, 0, 0.08);
}

.ds-carousel__slide img {
	width: 100%;
	display: block;
}

.ds-carousel__slide figcaption {
	padding: 1rem 1.5rem;
}

.ds-carousel__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	border: 0;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	cursor: pointer;
}

.ds-carousel__nav--prev { left: 0; }
.ds-carousel__nav--next { right: 0; }

.ds-shortcode {
	margin-top: 1.5rem;
}

.ds-contact-people {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 2rem;
}

.ds-contact-person {
	padding: 1.5rem;
	border-radius: calc(var(--ds-border-radius, 20px) - 10px);
	box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
	background: rgba(255, 255, 255, 0.9);
}

.ds-contact-person__visual img {
	width: 100%;
	border-radius: calc(var(--ds-border-radius, 20px) - 14px);
	margin-bottom: 1rem;
}

.ds-contact-person__content .role {
	color: rgba(15, 23, 42, 0.6);
	margin: 0 0 0.5rem;
}

.ds-contact-meta {
	list-style: none;
	padding: 0;
	margin: 1rem 0 0;
}

.ds-contact-meta li a {
	color: var(--ds-block-accent, var(--ds-primary));
	text-decoration: none;
}

.ds-form {
	display: grid;
	gap: 1rem;
}

.ds-form-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.ds-form-field input,
.ds-form-field textarea,
.ds-form-field select {
	border-radius: 12px;
	border: 1px solid rgba(15, 23, 42, 0.15);
	padding: 0.85rem 1rem;
	font-size: 1rem;
	font-family: inherit;
}

.ds-form-field textarea {
	min-height: 120px;
	resize: vertical;
}

.ds-form-alert {
	padding: 1rem 1.5rem;
	border-radius: 12px;
	margin-bottom: 1rem;
	font-weight: 600;
}

.ds-form-alert--success {
	background: rgba(34, 197, 94, 0.1);
	color: #065f46;
}

.ds-form-alert--error {
	background: rgba(239, 68, 68, 0.1);
	color: #7f1d1d;
}

.ds-form-hp {
	position: absolute;
	left: -9999px;
	opacity: 0;
}

.ds-custom-html :where(p, ul, ol, h1, h2, h3, h4) {
	margin-top: 0;
}

.ds-faq-big {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 3rem;
}

.ds-faq-accordion {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.ds-faq-item {
	border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.ds-faq-item__toggle {
	width: 100%;
	background: none;
	border: none;
	color: inherit;
	font-size: 1.05rem;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.75rem 0;
	cursor: pointer;
}

.ds-faq-item__icon {
	font-size: 1.5rem;
	transition: transform 0.2s ease;
	color: var(--ds-block-accent, var(--ds-accent));
}

.ds-faq-item__toggle[aria-expanded="true"] .ds-faq-item__icon {
	transform: rotate(45deg);
}

.ds-faq-item__content {
	padding-bottom: 0.85rem;
	color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 600px) {
	.ds-container {
		padding: 3rem 1rem;
	}
	.ds-block {
		padding: 2rem;
	}
}
