/*
Theme Name: DKK Finland
Theme URI: https://dkkfinland.fi
Description: Custom theme for DKK Finland Oy - Julkisivutyöt
Version: 1.0
Author: DKK Finland
Text Domain: dkk-finland
*/

/* ========================================
   VARIABLES
======================================== */
:root {
	--primary: #1a365d;
	--primary-dark: #0f2440;
	--accent: #2563eb;
	--text: #1e293b;
	--text-light: #64748b;
	--bg: #ffffff;
	--bg-alt: #f8fafc;
	--border: #e2e8f0;
}

/* ========================================
   RESET & BASE
======================================== */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
	color: var(--text);
	line-height: 1.6;
	background: var(--bg);
}

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

a {
	color: var(--accent);
	text-decoration: none;
	transition: color 0.2s;
}

a:hover {
	color: var(--primary);
}

h1,
h2,
h3,
h4,
h5,
h6 {
	color: var(--primary);
	line-height: 1.3;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ========================================
   BUTTONS
======================================== */
.btn {
	display: inline-block;
	padding: 14px 28px;
	font-weight: 600;
	text-decoration: none;
	border-radius: 3px;
	transition: all 0.2s;
	font-size: 1rem;
	cursor: pointer;
	border: none;
}

.btn-primary {
	background: var(--accent);
	color: white;
}

.btn-primary:hover {
	background: #1d4ed8;
	color: white;
}

.btn-outline {
	background: transparent;
	color: white;
	border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
	border-color: white;
	background: rgba(255, 255, 255, 0.1);
	color: white;
}

.btn-secondary {
	background: var(--bg-alt);
	color: var(--primary);
	border: 1px solid var(--border);
}

.btn-secondary:hover {
	background: var(--border);
	color: var(--primary);
}

/* ========================================
   HEADER
======================================== */
.site-header {
	background: var(--bg);
	border-bottom: 1px solid var(--border);
	position: sticky;
	top: 0;
	z-index: 100;
}

.header-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 0; /* Slightly reduced padding */
	max-height: 100px !important; /* Relaxed constraint */
	overflow: hidden; /* Cut off anything that overflows */
}

.logo {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--primary);
	text-decoration: none;
	display: flex;
	align-items: center;
}

.logo img,
.custom-logo-link img {
	max-height: 50px !important; /* Force small height */
	width: auto !important;
	max-width: 180px !important; /* Prevent wide logos from breaking layout */
	object-fit: contain;
	margin: 0; /* Reset margins to avoid unexpected spacing */
}

.logo span {
	color: var(--accent);
}

.logo:hover {
	color: var(--primary);
}

/* Navigation */
.main-nav {
	display: flex;
	gap: 32px;
	align-items: center;
}

.main-nav a {
	color: var(--text);
	text-decoration: none;
	font-weight: 500;
	font-size: 0.95rem;
	transition: color 0.2s;
}

.main-nav a:hover,
.main-nav a.current-menu-item {
	color: var(--accent);
}

.nav-cta {
	background: var(--primary);
	color: white !important;
	padding: 10px 20px;
	border-radius: 3px;
}

.nav-cta:hover {
	background: var(--primary-dark);
	color: white !important;
}

/* Mobile Menu */
.mobile-menu-btn {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
}

.mobile-menu-btn span {
	display: block;
	width: 24px;
	height: 2px;
	background: var(--text);
	margin: 6px 0;
	transition: 0.3s;
}

.mobile-nav {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: var(--bg);
	border-bottom: 1px solid var(--border);
	padding: 20px;
}

.mobile-nav.active {
	display: block;
}

.mobile-nav a {
	display: block;
	padding: 12px 0;
	color: var(--text);
	font-weight: 500;
	border-bottom: 1px solid var(--border);
}

.mobile-nav a:last-child {
	border-bottom: none;
}

/* ========================================
   HERO SECTION
======================================== */
.hero {
	position: relative;
	min-height: 500px;
	display: flex;
	align-items: center;
	background-size: cover;
	background-position: center;
	color: white;
}

.hero::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(15, 36, 64, 0.85);
}

.hero .container {
	position: relative;
	z-index: 1;
}

.hero-content {
	max-width: 650px;
	padding: 60px 0;
}

.hero h1 {
	font-size: 2.5rem;
	font-weight: 700;
	line-height: 1.2;
	margin-bottom: 20px;
	color: white;
}

.hero p {
	font-size: 1.1rem;
	opacity: 0.9;
	margin-bottom: 28px;
}

.hero-buttons {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

/* Page Hero (smaller) */
.page-hero {
	min-height: 300px;
	padding: 80px 0;
}

.page-hero h1 {
	font-size: 2.25rem;
}

/* ========================================
   SECTIONS
======================================== */
.section {
	padding: 80px 0;
}

.section-alt {
	background: var(--bg-alt);
}

.section-header {
	text-align: center;
	margin-bottom: 48px;
}

.section-header h2 {
	font-size: 2rem;
	color: var(--primary);
	margin-bottom: 12px;
}

.section-header p {
	color: var(--text-light);
	max-width: 600px;
	margin: 0 auto;
}

/* ========================================
   SERVICES GRID
======================================== */
.services-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.service-card {
	background: var(--bg);
	border: 1px solid var(--border);
	overflow: hidden;
	transition: box-shadow 0.2s;
}

.service-card:hover {
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.service-card img {
	width: 100%;
	height: 200px;
	object-fit: cover;
}

.service-card-content {
	padding: 24px;
}

.service-card h3 {
	font-size: 1.15rem;
	margin-bottom: 10px;
	color: var(--primary);
}

.service-card p {
	color: var(--text-light);
	font-size: 0.9rem;
	margin-bottom: 16px;
}

.service-link {
	color: var(--accent);
	text-decoration: none;
	font-weight: 500;
	font-size: 0.9rem;
}

.service-link:hover {
	text-decoration: underline;
}

/* ========================================
   ABOUT SECTION
======================================== */
.about-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 64px;
	align-items: center;
}

.about-content h2 {
	font-size: 2rem;
	color: var(--primary);
	margin-bottom: 24px;
}

.about-content p {
	color: var(--text-light);
	margin-bottom: 16px;
}

.about-stats {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 24px;
	margin-top: 32px;
}

.stat-item {
	border-left: 3px solid var(--accent);
	padding-left: 16px;
}

.stat-number {
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--primary);
}

.stat-label {
	color: var(--text-light);
	font-size: 0.9rem;
}

.about-image img {
	width: 100%;
	height: 400px; /* Limit height */
	object-fit: cover; /* Crop gracefully */
	display: block;
}

/* ========================================
   BLOG / Referenssikohteet
======================================== */
.blog-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.blog-card {
	background: var(--bg);
	border: 1px solid var(--border);
	overflow: hidden;
	transition: box-shadow 0.2s;
}

.blog-card:hover {
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.blog-card img,
.blog-card .post-thumbnail {
	width: 100%;
	height: 180px;
	object-fit: cover;
}

.blog-card-content {
	padding: 20px;
}

.blog-date {
	font-size: 0.8rem;
	color: var(--text-light);
	margin-bottom: 8px;
}

.blog-card h3 {
	font-size: 1rem;
	color: var(--primary);
	margin-bottom: 10px;
	line-height: 1.4;
}

.blog-card h3 a {
	color: inherit;
	text-decoration: none;
}

.blog-card h3 a:hover {
	color: var(--accent);
}

.blog-card p,
.blog-card .excerpt {
	color: var(--text-light);
	font-size: 0.85rem;
	margin-bottom: 12px;
}

.blog-link {
	color: var(--accent);
	text-decoration: none;
	font-weight: 500;
	font-size: 0.85rem;
}

.blog-link:hover {
	text-decoration: underline;
}

.view-all-btn {
	text-align: center;
	margin-top: 40px;
}

/* Single Post */
.single-post-content {
	max-width: 800px;
	margin: 0 auto;
}

.single-post-content img {
	margin: 24px 0;
}

.single-post-content p {
	margin-bottom: 16px;
}

.single-post-content h2,
.single-post-content h3 {
	margin: 32px 0 16px;
}

.post-meta {
	color: var(--text-light);
	margin-bottom: 24px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--border);
}

/* ========================================
   FEATURES / WHY US
======================================== */
.features-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 32px;
}

.feature-item {
	text-align: center;
	padding: 24px 16px;
}

.feature-icon {
	width: 56px;
	height: 56px;
	background: var(--bg);
	border: 1px solid var(--border);
	margin: 0 auto 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
}

.feature-item h3 {
	font-size: 1rem;
	margin-bottom: 8px;
	color: var(--primary);
}

.feature-item p {
	color: var(--text-light);
	font-size: 0.85rem;
}

/* ========================================
   CTA SECTION
======================================== */
.cta {
	padding: 80px 0;
	background: var(--primary);
	color: white;
	text-align: center;
}

.cta h2 {
	font-size: 2rem;
	margin-bottom: 16px;
	color: white;
}

.cta p {
	opacity: 0.9;
	margin-bottom: 32px;
	max-width: 500px;
	margin-left: auto;
	margin-right: auto;
}

/* ========================================
   CONTACT SECTION
======================================== */
.contact-grid {
	display: grid;
	grid-template-columns: 1fr 1.5fr;
	gap: 48px;
}

.contact-info h2 {
	font-size: 1.75rem;
	color: var(--primary);
	margin-bottom: 24px;
}

.contact-item {
	display: flex;
	gap: 16px;
	margin-bottom: 24px;
}

.contact-item-icon {
	width: 40px;
	height: 40px;
	background: var(--bg-alt);
	border: 1px solid var(--border);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.contact-item-text strong {
	display: block;
	color: var(--primary);
	margin-bottom: 4px;
}

.contact-item-text span,
.contact-item-text a {
	color: var(--text-light);
	text-decoration: none;
}

.contact-item-text a:hover {
	color: var(--accent);
}

/* Contact Form */
.contact-form {
	background: var(--bg-alt);
	padding: 32px;
	border: 1px solid var(--border);
}

.contact-form h3 {
	font-size: 1.25rem;
	color: var(--primary);
	margin-bottom: 24px;
}

/* Contact Form 7 Styling */
.wpcf7-form label {
	display: block;
	margin-bottom: 6px;
	font-weight: 500;
	font-size: 0.9rem;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea,
.wpcf7-form select {
	width: 100%;
	padding: 12px;
	border: 1px solid var(--border);
	background: var(--bg);
	font-family: inherit;
	font-size: 1rem;
	transition: border-color 0.2s;
	margin-bottom: 16px;
	border-radius: 3px;
}

.wpcf7-form input:focus,
.wpcf7-form textarea:focus,
.wpcf7-form select:focus {
	outline: none;
	border-color: var(--accent);
}

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

.wpcf7-form input[type="submit"] {
	background: var(--primary);
	color: white;
	border: none;
	padding: 14px 32px;
	font-weight: 600;
	cursor: pointer;
	font-size: 1rem;
	border-radius: 3px;
	transition: background 0.2s;
}

.wpcf7-form input[type="submit"]:hover {
	background: var(--primary-dark);
}

.wpcf7-form .form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.wpcf7-response-output {
	margin-top: 16px;
	padding: 12px;
	border-radius: 3px;
}

.wpcf7-mail-sent-ok {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.wpcf7-validation-errors {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

/* ========================================
   FOOTER
======================================== */
.site-footer {
	background: var(--primary-dark);
	color: white;
	padding: 48px 0 24px;
}

.footer-content {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr;
	gap: 48px;
	margin-bottom: 48px;
}

.footer-brand .logo {
	color: white;
	display: inline-block;
	margin-bottom: 16px;
}

.footer-brand p {
	opacity: 0.7;
	font-size: 0.9rem;
}

.footer-links h4,
.footer-contact h4 {
	font-size: 1rem;
	margin-bottom: 16px;
	color: white;
}

.footer-links a {
	display: block;
	color: rgba(255, 255, 255, 0.7);
	text-decoration: none;
	margin-bottom: 8px;
	font-size: 0.9rem;
}

.footer-links a:hover {
	color: white;
}

.footer-contact p {
	color: rgba(255, 255, 255, 0.7);
	font-size: 0.9rem;
	margin-bottom: 8px;
	word-wrap: break-word; /* Prevent long emails/addresses from breaking layout */
}

.footer-social {
	margin-top: 12px;
}

.social-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: rgba(255, 255, 255, 0.8);
	text-decoration: none;
	transition: color 0.2s;
}

.social-link:hover {
	color: #e1306c; /* Instagram color */
}

.social-link svg {
	flex-shrink: 0;
}

.footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding-top: 24px;
	text-align: center;
	color: rgba(255, 255, 255, 0.5);
	font-size: 0.85rem;
}

/* ========================================
   PAGINATION
======================================== */
.pagination {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 48px;
}

.pagination a,
.pagination span {
	display: inline-block;
	padding: 10px 16px;
	border: 1px solid var(--border);
	color: var(--text);
	text-decoration: none;
}

.pagination a:hover,
.pagination .current {
	background: var(--primary);
	color: white;
	border-color: var(--primary);
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 1024px) {
	.services-grid,
	.blog-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.features-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.footer-content {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 768px) {
	/* Mobile header padding */
	.header-inner {
		padding-left: 16px;
		padding-right: 16px;
	}

	.main-nav {
		display: none;
	}

	.mobile-menu-btn {
		display: block;
	}

	.hero h1 {
		font-size: 1.75rem;
	}

	.hero {
		min-height: 400px;
	}

	.hero-buttons {
		flex-direction: column;
	}

	.hero-buttons .btn {
		text-align: center;
	}

	.services-grid,
	.blog-grid {
		grid-template-columns: 1fr;
	}

	.about-grid,
	.contact-grid {
		grid-template-columns: 1fr;
	}

	.wpcf7-form .form-row {
		grid-template-columns: 1fr;
	}

	.features-grid {
		grid-template-columns: 1fr;
	}

	.footer-content {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	.section-header h2 {
		font-size: 1.5rem;
	}

	.section {
		padding: 60px 0;
	}

	.page-hero {
		min-height: 200px;
		padding: 60px 0;
	}

	.page-hero h1 {
		font-size: 1.75rem;
	}
}

/* ========================================
   SERVICE PAGE SPECIFIC STYLES
======================================== */

/* Service Hero */
.service-hero {
	min-height: 350px;
}

.service-hero .hero-subtitle {
	font-size: 1.15rem;
	opacity: 0.9;
	margin-top: 8px;
}

/* Service Description Section */
.service-description {
	padding: 80px 0;
}

.service-content-wrapper {
	display: grid;
	grid-template-columns: 1.5fr 1fr;
	gap: 48px;
	align-items: start;
}

.service-main-content h2 {
	font-size: 1.75rem;
	color: var(--primary);
	margin-bottom: 20px;
}

.service-main-content h3 {
	font-size: 1.25rem;
	color: var(--primary);
	margin: 28px 0 16px;
}

.service-intro {
	font-size: 1.1rem;
	color: var(--text);
	margin-bottom: 20px;
	line-height: 1.7;
}

.service-details p {
	color: var(--text-light);
	margin-bottom: 16px;
	line-height: 1.7;
}

.service-details ul {
	margin: 16px 0 24px 24px;
	color: var(--text-light);
}

.service-details ul li {
	margin-bottom: 8px;
	line-height: 1.6;
}

.service-sidebar {
	position: sticky;
	top: 100px;
}

.service-image-box img {
	width: 100%;
	height: auto;
	border: 1px solid var(--border);
}

/* Why Choose Us Section */
.service-why-us .section-header {
	margin-bottom: 40px;
}

.why-us-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
	max-width: 900px;
	margin: 0 auto;
}

.why-us-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 16px 20px;
	background: var(--bg);
	border: 1px solid var(--border);
	transition: box-shadow 0.2s;
}

.why-us-item:hover {
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.why-us-icon {
	font-size: 1.2rem;
	flex-shrink: 0;
}

.why-us-text {
	color: var(--text);
	font-size: 0.95rem;
	line-height: 1.5;
}

.why-us-footer {
	text-align: center;
	max-width: 700px;
	margin: 32px auto 0;
	color: var(--text-light);
	font-size: 1rem;
	line-height: 1.6;
}

/* Service Contact Section */
.service-contact {
	background: var(--bg);
}

.service-contact .contact-info h2 {
	margin-bottom: 16px;
}

.service-contact .contact-info > p {
	color: var(--text-light);
	margin-bottom: 24px;
}

/* Form styling (shared with home page) */
.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.form-group {
	margin-bottom: 16px;
}

.form-group label {
	display: block;
	margin-bottom: 6px;
	font-weight: 500;
	font-size: 0.9rem;
	color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
	width: 100%;
	padding: 12px;
	border: 1px solid var(--border);
	background: var(--bg);
	font-family: inherit;
	font-size: 1rem;
	transition: border-color 0.2s;
	border-radius: 3px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
	outline: none;
	border-color: var(--accent);
}

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

/* Responsive for service pages */
@media (max-width: 1024px) {
	.why-us-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 768px) {
	.service-content-wrapper {
		grid-template-columns: 1fr;
	}

	.service-sidebar {
		position: static;
		order: -1;
	}

	.service-hero {
		min-height: 250px;
	}

	.service-main-content h2 {
		font-size: 1.5rem;
	}

	.form-row {
		grid-template-columns: 1fr;
	}
}

/* =============================================
   VIDEOS SECTION
   ============================================= */

.videos-section {
	background: var(--bg-light);
}

.videos-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
}

.video-card {
	background: var(--white);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	transition:
		transform 0.3s ease,
		box-shadow 0.3s ease;
}

.video-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.video-player {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
}

.video-player video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.video-card-content {
	padding: 1.5rem;
}

.video-title {
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--text-dark);
	margin-bottom: 0.75rem;
	line-height: 1.4;
}

.video-description {
	font-size: 0.95rem;
	color: var(--text-muted);
	line-height: 1.6;
	margin: 0;
}

/* Videos Section Responsive */
@media (max-width: 1024px) {
	.videos-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 1.5rem;
	}
}

@media (max-width: 768px) {
	.videos-grid {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.video-title {
		font-size: 1rem;
	}

	.video-description {
		font-size: 0.9rem;
	}

	.video-card-content {
		padding: 1.25rem;
	}
}

/* =============================================
   SERVICE PAGE ENHANCEMENTS
   ============================================= */

.service-hero {
	min-height: 400px;
	display: flex;
	align-items: center;
	position: relative;
}

.service-hero::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(
		135deg,
		rgba(0, 40, 85, 0.85) 0%,
		rgba(0, 60, 120, 0.7) 100%
	);
}

.service-hero .hero-content {
	position: relative;
	z-index: 1;
	text-align: center;
	max-width: 800px;
	margin: 0 auto;
}

.service-hero h1 {
	font-size: 3rem;
	margin-bottom: 1rem;
	color: var(--white);
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.service-hero .hero-subtitle {
	font-size: 1.4rem;
	color: rgba(255, 255, 255, 0.9);
	margin-bottom: 2rem;
}

/* Service Description */
.service-content-wrapper {
	display: grid;
	grid-template-columns: 1fr 380px;
	gap: 3rem;
	align-items: start;
}

.service-main-content h2 {
	font-size: 2rem;
	color: var(--primary);
	margin-bottom: 1.5rem;
}

.service-intro {
	font-size: 1.15rem;
	line-height: 1.8;
	color: var(--text-dark);
	margin-bottom: 1.5rem;
}

.service-details {
	line-height: 1.8;
	color: var(--text-muted);
}

.service-details h3 {
	font-size: 1.3rem;
	color: var(--text-dark);
	margin: 2rem 0 1rem;
}

.service-details ul {
	margin: 1rem 0 1.5rem 1.5rem;
}

.service-details li {
	margin-bottom: 0.5rem;
	position: relative;
	padding-left: 0.5rem;
}

.service-details li::marker {
	color: var(--accent);
}

/* Service Sidebar */
.service-sidebar {
	position: sticky;
	top: 100px;
}

.service-image-box {
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
	margin-bottom: 1.5rem;
}

.service-image-box img {
	width: 100%;
	height: 400px; /* Limit height to prevent too long images */
	object-fit: cover; /* Crop content to fill the box without distortion */
	display: block;
}

.service-cta-box {
	background: linear-gradient(
		135deg,
		var(--primary) 0%,
		var(--primary-light) 100%
	);
	padding: 2rem;
	border-radius: 12px;
	color: var(--white);
	text-align: center;
}

.service-cta-box h4 {
	font-size: 1.3rem;
	margin-bottom: 0.75rem;
}

.service-cta-box p {
	opacity: 0.9;
	margin-bottom: 1.25rem;
	font-size: 0.95rem;
}

.btn-block {
	display: block;
	width: 100%;
}

.btn-secondary {
	background: var(--white);
	color: var(--primary);
	border: none;
	padding: 0.875rem 1.75rem;
	font-weight: 600;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s ease;
	text-decoration: none;
	display: inline-block;
}

.btn-secondary:hover {
	background: rgba(255, 255, 255, 0.9);
	transform: translateY(-2px);
}

/* Why Choose Us Section */
.why-us-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1rem;
	margin-bottom: 2rem;
}

.why-us-item {
	display: flex;
	align-items: flex-start; /* Align to top for consistency */
	gap: 0.875rem;
	padding: 1rem 1.25rem;
	background: var(--white);
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
	border-left: 3px solid var(--accent);
	min-height: 100%; /* Ensure full height in grid */
}

.why-us-item:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.why-us-icon {
	flex-shrink: 0;
	width: 28px;
	height: 28px;
	background: var(--accent);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--white);
	margin-top: 2px; /* Align with text cap height */
}

.why-us-icon svg {
	width: 14px;
	height: 14px;
}

.why-us-text {
	font-size: 0.95rem;
	color: var(--text-dark);
	line-height: 1.4;
}

.why-us-footer {
	text-align: center;
	font-size: 1.1rem;
	color: var(--text-muted);
	font-style: italic;
	max-width: 700px;
	margin: 0 auto;
}

/* 3-column services grid */
.services-grid-3 {
	grid-template-columns: repeat(3, 1fr);
}

/* Contact Section on Service Page */
.service-contact .contact-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4rem;
	align-items: start;
}

.contact-info h2 {
	font-size: 2rem;
	color: var(--primary);
	margin-bottom: 1rem;
}

.contact-info > p {
	color: var(--text-muted);
	margin-bottom: 2rem;
	line-height: 1.7;
}

.contact-item {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.contact-item-icon {
	flex-shrink: 0;
	width: 50px;
	height: 50px;
	background: linear-gradient(
		135deg,
		var(--primary) 0%,
		var(--primary-light) 100%
	);
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--white);
}

.contact-item-text {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.contact-item-text strong {
	color: var(--text-dark);
	font-size: 0.9rem;
}

.contact-item-text a,
.contact-item-text span {
	color: var(--text-muted);
	text-decoration: none;
	font-size: 1rem;
}

.contact-item-text a:hover {
	color: var(--primary);
}

/* Contact Form */
.contact-form {
	background: var(--white);
	padding: 2.5rem;
	border-radius: 16px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.contact-form h3 {
	font-size: 1.5rem;
	color: var(--primary);
	margin-bottom: 1.5rem;
}

.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.form-group {
	margin-bottom: 1.25rem;
}

.form-group label {
	display: block;
	font-weight: 500;
	color: var(--text-dark);
	margin-bottom: 0.5rem;
	font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
	width: 100%;
	padding: 0.875rem 1rem;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	font-size: 1rem;
	transition:
		border-color 0.3s ease,
		box-shadow 0.3s ease;
	font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(0, 60, 120, 0.1);
}

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

/* Service Page Responsive */
@media (max-width: 1024px) {
	.service-content-wrapper {
		grid-template-columns: 1fr;
	}

	.service-sidebar {
		position: static;
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 1.5rem;
	}

	.services-grid-3 {
		grid-template-columns: repeat(2, 1fr);
	}

	.service-contact .contact-grid {
		grid-template-columns: 1fr;
		gap: 2rem;
	}
}

@media (max-width: 768px) {
	.service-hero h1 {
		font-size: 2rem;
	}

	.service-hero .hero-subtitle {
		font-size: 1.1rem;
	}

	.service-sidebar {
		grid-template-columns: 1fr;
	}

	.services-grid-3 {
		grid-template-columns: 1fr;
	}

	.why-us-grid {
		grid-template-columns: 1fr;
	}

	.form-row {
		grid-template-columns: 1fr;
	}

	.contact-form {
		padding: 1.5rem;
	}
}

/* ========================================
   POST GALLERY & LIGHTBOX
   ======================================== */

.post-gallery-section {
	margin-top: 48px;
	margin-bottom: 48px;
}

.post-gallery-section h3 {
	font-size: 1.5rem;
	color: var(--primary);
	margin-bottom: 24px;
	border-bottom: 2px solid var(--border);
	padding-bottom: 12px;
}

.post-gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 16px;
}

.gallery-item {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 4px;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
	width: 100%;
	height: 180px;
	object-fit: cover;
	transition:
		transform 0.3s ease,
		filter 0.3s ease;
	display: block;
}

.gallery-item:hover img {
	transform: scale(1.05);
	filter: brightness(1.1);
}

/* Lightbox */
.lightbox-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.9);
	z-index: 10000;
	display: flex;
	justify-content: center;
	align-items: center;
	opacity: 0;
	visibility: hidden;
	transition:
		opacity 0.3s ease,
		visibility 0.3s ease;
}

.lightbox-overlay.active {
	opacity: 1;
	visibility: visible;
}

.lightbox-content {
	position: relative;
	max-width: 90%;
	max-height: 90vh;
	display: flex;
	justify-content: center;
	align-items: center;
}

.lightbox-image {
	max-width: 100%;
	max-height: 90vh;
	object-fit: contain;
	border-radius: 4px;
	box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
	position: absolute;
	top: 20px;
	right: 20px;
	background: rgba(255, 255, 255, 0.1);
	color: white;
	border: none;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	font-size: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition:
		background 0.2s,
		transform 0.2s;
	z-index: 10002;
}

.lightbox-close:hover {
	background: rgba(255, 255, 255, 0.3);
	transform: rotate(90deg);
}

.lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255, 255, 255, 0.1);
	color: white;
	border: none;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	font-size: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition:
		background 0.2s,
		transform 0.2s;
	z-index: 10002;
}

.lightbox-nav:hover {
	background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
	left: 20px;
}

.lightbox-next {
	right: 20px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
	.post-gallery-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}

	.gallery-item img {
		height: 140px;
	}

	.lightbox-nav {
		width: 40px;
		height: 40px;
		font-size: 18px;
		background: rgba(0, 0, 0, 0.4);
	}

	.lightbox-close {
		top: 15px;
		right: 15px;
		width: 36px;
		height: 36px;
		font-size: 24px;
		background: rgba(0, 0, 0, 0.4);
	}

	.lightbox-prev {
		left: 10px;
	}

	.lightbox-next {
		right: 10px;
	}
}

/* ========================================
   FOOTER GALLERY
======================================== */
.footer-gallery {
	margin-top: 40px;
	margin-bottom: 32px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding-top: 32px;
}

.footer-gallery h4 {
	color: white;
	margin-bottom: 16px;
	font-size: 1.1rem;
}

.footer-gallery-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 12px;
}

.footer-gallery-grid .gallery-item {
	height: 80px;
	border-radius: 4px;
	overflow: hidden;
	display: block;
}

.footer-gallery-grid img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: opacity 0.2s;
}

.footer-gallery-grid .gallery-item:hover img {
	opacity: 0.8;
}

@media (max-width: 768px) {
	.footer-gallery-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* ========================================
   REFERENCES PAGE - ACCORDION TABLE
======================================== */
#references-table-wrap {
	overflow-x: auto;
}

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

.references-table thead {
	background: var(--primary);
	color: white;
}

.references-table thead th {
	padding: 16px 12px;
	text-align: left;
	font-weight: 600;
	font-size: 0.9rem;
	white-space: nowrap;
}

.references-table tbody tr.accordion-tab {
	cursor: pointer;
	transition: background 0.2s;
	border-bottom: 1px solid #eee;
}

.references-table tbody tr.accordion-tab:hover {
	background: #f5f5f5;
}

.references-table tbody tr.accordion-tab.active {
	background: #e8f4f8;
}

.references-table tbody td {
	padding: 14px 12px;
	font-size: 0.9rem;
	vertical-align: middle;
}

/* Column widths */
.ref-col-project {
	width: 18%;
	font-weight: 600;
}

.ref-col-client {
	width: 18%;
}

.ref-col-completed {
	width: 8%;
	text-align: center;
}

.ref-col-type {
	width: 12%;
}

.ref-col-content {
	width: 22%;
	color: #666;
}

.ref-col-scope {
	width: 8%;
}

.ref-col-area {
	width: 10%;
}

.ref-col-more {
	width: 4%;
	text-align: center;
}

/* Plus/Minus toggle icon */
.accordion-plus {
	display: inline-block;
	width: 24px;
	height: 24px;
	position: relative;
	border-radius: 50%;
	background: var(--primary);
	transition:
		transform 0.3s,
		background 0.3s;
}

.accordion-plus::before,
.accordion-plus::after {
	content: "";
	position: absolute;
	background: white;
	transition: transform 0.3s;
}

.accordion-plus::before {
	width: 12px;
	height: 2px;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

.accordion-plus::after {
	width: 2px;
	height: 12px;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

.accordion-tab.active .accordion-plus {
	background: var(--primary);
	transform: rotate(45deg);
}

/* Hidden panel row */
.accordion-panel {
	display: none;
	background: #fafafa;
}

.accordion-panel.active {
	display: table-row;
}

.accordion-panel td {
	padding: 0 !important;
}

.accordion-panel-content {
	padding: 24px;
	display: flex;
	gap: 24px;
	align-items: flex-start;
	animation: slideDown 0.3s ease;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.accordion-panel-image {
	flex-shrink: 0;
}

.accordion-panel-image img {
	max-width: 300px;
	height: auto;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.accordion-panel-text {
	flex: 1;
}

.accordion-panel-text h3 {
	margin: 0 0 12px;
	color: var(--primary-dark);
	font-size: 1.3rem;
}

.accordion-panel-text p {
	margin: 0 0 12px;
	color: #555;
	line-height: 1.6;
}

/* Gallery inside accordion panel */
.accordion-panel-gallery {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 16px;
}

.accordion-panel-gallery a {
	display: block;
	width: 80px;
	height: 80px;
	border-radius: 4px;
	overflow: hidden;
	transition:
		transform 0.2s,
		box-shadow 0.2s;
}

.accordion-panel-gallery a:hover {
	transform: scale(1.05);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.accordion-panel-gallery img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* No references message */
.no-references {
	text-align: center;
	padding: 60px 20px;
	background: white;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.no-references p {
	color: #888;
	font-size: 1.1rem;
}

/* Responsive - Mobile */
@media (max-width: 992px) {
	.references-table {
		font-size: 0.85rem;
	}

	.references-table thead th,
	.references-table tbody td {
		padding: 10px 8px;
	}

	/* Hide some columns on tablet */
	.ref-col-client,
	.ref-col-content,
	.ref-col-scope {
		display: none;
	}
}

@media (max-width: 768px) {
	.references-section {
		padding: 40px 0 60px;
	}

	/* Stack table as cards on mobile */
	.references-table,
	.references-table thead,
	.references-table tbody,
	.references-table th,
	.references-table td,
	.references-table tr {
		display: block;
	}

	.references-table thead {
		display: none;
	}

	.references-table tbody tr.accordion-tab {
		margin-bottom: 12px;
		border-radius: 8px;
		box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
		border: none;
		padding: 12px;
		position: relative;
	}

	.references-table tbody td {
		padding: 4px 0;
		display: flex;
		justify-content: space-between;
	}

	.references-table tbody td::before {
		content: attr(data-label);
		font-weight: 600;
		color: #888;
		margin-right: 8px;
	}

	.ref-col-project {
		font-size: 1.1rem;
		padding-bottom: 8px !important;
		border-bottom: 1px solid #eee;
		margin-bottom: 8px;
	}

	.ref-col-project::before {
		display: none;
	}

	.ref-col-more {
		position: absolute;
		top: 12px;
		right: 12px;
	}

	.ref-col-more::before {
		display: none;
	}

	/* Show all columns on mobile cards EXCEPT Tilaaja and Sisältö */
	.ref-col-scope {
		display: flex;
	}

	/* Keep Tilaaja and Sisältö hidden on mobile (like saumasto.fi) */
	.ref-col-client,
	.ref-col-content {
		display: none !important;
	}

	.accordion-panel-content {
		flex-direction: column;
		padding: 16px;
	}

	.accordion-panel-image img {
		max-width: 100%;
	}
}

/* ========================================
   REFERENCES SHOWCASE (Homepage)
======================================== */
.references-showcase {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	margin-bottom: 40px;
}

.reference-card {
	display: block;
	background: white;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
	transition:
		transform 0.3s,
		box-shadow 0.3s;
	text-decoration: none;
	color: inherit;
}

.reference-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.reference-card-image {
	position: relative;
	height: 220px;
	overflow: hidden;
}

.reference-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s;
}

.reference-card:hover .reference-card-image img {
	transform: scale(1.08);
}

.reference-gallery-badge {
	position: absolute;
	top: 12px;
	right: 12px;
	background: rgba(0, 0, 0, 0.75);
	color: white;
	padding: 6px 12px;
	border-radius: 20px;
	font-size: 0.85rem;
	font-weight: 500;
	backdrop-filter: blur(4px);
}

.reference-type-badge {
	position: absolute;
	bottom: 12px;
	left: 12px;
	background: var(--primary);
	color: white;
	padding: 6px 14px;
	border-radius: 20px;
	font-size: 0.8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.reference-card-content {
	padding: 20px;
}

.reference-card-content h3 {
	margin: 0 0 12px;
	font-size: 1.15rem;
	color: var(--primary-dark);
	line-height: 1.4;
}

.reference-card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	font-size: 0.85rem;
	color: #666;
}

.reference-card-meta span {
	display: flex;
	align-items: center;
	gap: 4px;
}

.no-references-home {
	grid-column: 1 / -1;
	text-align: center;
	padding: 60px;
	color: #888;
	font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 992px) {
	.references-showcase {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.references-showcase {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.reference-card-image {
		height: 180px;
	}
}

/* ========================================
   REFERENCES PAGE - CARDS GRID
======================================== */
.references-section {
	padding: 60px 0 80px;
}

.reference-cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
}

/* Card Base Styles for Page */
.references-section .reference-card {
	display: flex;
	flex-direction: column;
	background: white;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	transition: box-shadow 0.3s ease;
}

/* Expanded card as overlay - Pinterest style */
.references-section .reference-card.expanded {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 1000;
	width: 90%;
	max-width: 900px;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 25px 100px rgba(0, 0, 0, 0.3);
	animation: modalAppear 0.3s ease forwards;
}

@keyframes modalAppear {
	from {
		opacity: 0;
		transform: translate(-50%, -50%) scale(0.9);
	}
	to {
		opacity: 1;
		transform: translate(-50%, -50%) scale(1);
	}
}

/* Hide expand button when card is expanded */
.reference-card.expanded .reference-card-expand {
	display: none;
}

/* Overlay backdrop */
.reference-card-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.7);
	z-index: 999;
	animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.reference-card-overlay.active {
	display: block;
}

.references-section .reference-card:hover {
	transform: none;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.reference-card-inner {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.reference-card-front {
	display: flex;
	flex-direction: column;
	flex: 1;
}

/* Card Image */
.references-section .reference-card-image {
	position: relative;
	height: 200px;
	overflow: hidden;
	background: var(--bg-alt);
}

/* Expanded card image - larger height */
.references-section .reference-card.expanded .reference-card-image {
	height: 400px;
}

.references-section .reference-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.references-section .reference-card:hover .reference-card-image img {
	transform: scale(1.05);
}

.reference-card-no-image {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, var(--bg-alt) 0%, #e2e8f0 100%);
}

.reference-card-no-image svg {
	width: 64px;
	height: 64px;
	color: var(--text-light);
	opacity: 0.5;
}

/* Card Content */
.references-section .reference-card-content {
	padding: 24px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.reference-card-title {
	font-size: 1.2rem;
	font-weight: 600;
	color: var(--primary-dark);
	margin: 0 0 12px;
	line-height: 1.4;
}

.references-section .reference-card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.reference-card-type {
	background: var(--primary);
	color: white;
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.reference-card-year {
	background: var(--bg-alt);
	color: var(--text-light);
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 0.8rem;
	font-weight: 500;
}

/* Card Info */
.reference-card-info {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 20px;
	flex: 1;
	padding: 12px;
	background: var(--bg-alt);
	border-radius: 8px;
}

.reference-card-info-item {
	display: flex;
	gap: 8px;
	font-size: 0.85rem;
	flex-wrap: wrap;
}

.reference-card-info-item .info-label {
	color: var(--text-light);
	font-weight: 600;
	min-width: 60px;
}

.reference-card-info-item .info-value {
	color: var(--text);
	flex: 1;
}

/* Expand Button */
.reference-card-expand {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 12px 20px;
	background: var(--bg-alt);
	border: none;
	border-radius: 8px;
	color: var(--primary);
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	margin-top: auto;
}

.reference-card-expand:hover {
	background: var(--primary);
	color: white;
}

.reference-card-expand svg {
	transition: transform 0.3s ease;
}

.reference-card.expanded .reference-card-expand svg {
	transform: rotate(180deg);
}

/* Card Details (Expandable) */
.reference-card-details {
	display: none;
	padding: 0 24px 24px;
	border-top: 1px solid var(--border);
	animation: slideDown 0.3s ease;
}

.reference-card.expanded .reference-card-details {
	display: block;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.reference-card-details-content {
	padding-top: 20px;
	font-size: 0.95rem;
	line-height: 1.7;
	color: var(--text);
}

.reference-card-details-content p {
	margin-bottom: 12px;
}

/* Card Gallery */
.reference-card-gallery {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
	margin-top: 20px;
}

.reference-card-gallery a {
	display: block;
	border-radius: 8px;
	overflow: hidden;
	aspect-ratio: 1;
}

.reference-card-gallery img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.reference-card-gallery a:hover img {
	transform: scale(1.1);
}

/* Collapse Button */
.reference-card-collapse {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	padding: 14px;
	margin-top: 20px;
	background: var(--primary);
	border: none;
	border-radius: 8px;
	color: white;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
}

.reference-card-collapse:hover {
	background: var(--primary-dark);
}

/* No References */
.no-references {
	text-align: center;
	padding: 80px 40px;
	background: var(--bg-alt);
	border-radius: 12px;
	color: var(--text-light);
	font-size: 1.1rem;
}

/* Responsive - Tablet */
@media (max-width: 992px) {
	.reference-cards {
		grid-template-columns: repeat(2, 1fr);
		gap: 24px;
	}

	.reference-card-gallery {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Responsive - Mobile */
@media (max-width: 600px) {
	.references-section {
		padding: 40px 0 60px;
	}

	.reference-cards {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.references-section .reference-card-image {
		height: 180px;
	}

	.references-section .reference-card-content {
		padding: 20px;
	}

	.reference-card-title {
		font-size: 1.1rem;
	}

	.reference-card-gallery {
		grid-template-columns: repeat(2, 1fr);
	}

	.reference-card-details {
		padding: 0 20px 20px;
	}
}
