/* ADM Cloudtech OÜ - Custom Styles */

/* CSS Variables for consistent theming */
:root {
	--primary-color: #ff6b6b;
	--secondary-color: #4ecdc4;
	--accent-color: #ffe66d;
	--dark-color: #2d3436;
	--light-color: #f8fafc;
	--success-color: #00b894;
	--warning-color: #fdcb6e;
	--danger-color: #e17055;
	--text-color: #2d3436;
	--text-muted: #636e72;
	--border-color: #ddd;
	--shadow-color: rgba(0, 0, 0, 0.1);
	--gradient-primary: linear-gradient(
		135deg,
		#ff6b6b 0%,
		#4ecdc4 50%,
		#ffe66d 100%
	);
	--gradient-secondary: linear-gradient(135deg, #2d3436 0%, #636e72 100%);
}

/* Base styles and optimizations */
* {
	box-sizing: border-box;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
		Ubuntu, Cantarell, sans-serif;
	line-height: 1.6;
	color: var(--text-color);
	margin: 0;
	padding: 0;
	scroll-behavior: smooth;
}

/* Performance optimizations */
img {
	max-width: 100%;
	height: auto;
	display: block;
	loading: lazy;
	opacity: 1;
}

/* Improved link styles */
a {
	color: var(--primary-color);
	text-decoration: none;
	transition: color 0.3s ease;
}

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

/* Enhanced button styles */
.btn {
	border-radius: 12px;
	font-weight: 600;
	padding: 14px 28px;
	transition: all 0.3s ease;
	border: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	position: relative;
	overflow: hidden;
}

.btn::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(
		90deg,
		transparent,
		rgba(255, 255, 255, 0.2),
		transparent
	);
	transition: left 0.5s;
}

.btn:hover::before {
	left: 100%;
}

.btn:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.btn-primary {
	background: var(--gradient-primary);
	color: white;
	border: 2px solid transparent;
}

.btn-primary:hover {
	background: var(--gradient-primary);
	color: white;
	box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.btn-outline-light {
	background: transparent;
	border: 2px solid rgba(255, 255, 255, 0.3);
	color: white;
	backdrop-filter: blur(10px);
}

.btn-outline-light:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.6);
	color: white;
	box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

/* Card enhancements */
.card {
	border: none;
	border-radius: 20px;
	overflow: hidden;
	transition: all 0.4s ease;
	background: rgba(255, 255, 255, 0.9);
	backdrop-filter: blur(10px);
	position: relative;
}

.card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: var(--gradient-primary);

	transition: opacity 0.4s ease;
	z-index: -1;
}

.card:hover::before {
	opacity: 0.05;
}

.card:hover {
	transform: translateY(-8px) scale(1.02);
	box-shadow: 0 15px 40px rgba(255, 107, 107, 0.15);
}

.card-img-top {
	height: 220px;
	object-fit: cover;
	transition: transform 0.4s ease;
	filter: brightness(0.9);
}

.card:hover .card-img-top {
	transform: scale(1.1);
	filter: brightness(1);
}

/* Navigation enhancements */
.navbar {
	padding: 1rem 0;
	backdrop-filter: blur(20px);
	background: rgba(45, 52, 54, 0.95) !important;
	box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
	border-bottom: 1px solid rgba(255, 107, 107, 0.2);
}

.navbar-brand img {
	transition: all 0.3s ease;
	filter: brightness(1.2);
}

.navbar-brand:hover img {
	transform: scale(1.1) rotate(5deg);
}

.nav-link {
	font-weight: 600;
	margin: 0 0.8rem;
	transition: all 0.3s ease;
	position: relative;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	font-size: 0.9rem;
}

.nav-link::after {
	content: '';
	position: absolute;
	bottom: -5px;
	left: 50%;
	width: 0;
	height: 2px;
	background: var(--gradient-primary);
	transition: all 0.3s ease;
	transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
	width: 100%;
}

.nav-link:hover {
	color: var(--primary-color) !important;
	transform: translateY(-2px);
}

/* Hero section */
.hero {
	position: relative;
	min-height: 100vh;
	background: var(--gradient-primary);
	background-image: url('../images/hero-bg.jpg');
	background-size: cover;
	background-position: center;
	background-attachment: fixed;
	display: flex;
	align-items: center;
	color: white;
	overflow: hidden;
}

.hero::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03' fill-rule='evenodd'%3E%3Cpath d='m0 40l40-40h-40v40zm40 0v-40h-40l40 40z'/%3E%3C/g%3E%3C/svg%3E");
	z-index: 1;
}

.hero-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(
		135deg,
		rgba(255, 107, 107, 0.85),
		rgba(78, 205, 196, 0.85),
		rgba(255, 230, 109, 0.85)
	);
	z-index: 2;
}

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

.hero h1 {
	font-size: 4rem;
	font-weight: 800;
	margin-bottom: 1.5rem;
	text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
	background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	line-height: 1.1;
}

.hero .lead {
	font-size: 1.4rem;
	margin-bottom: 2.5rem;
	text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
	font-weight: 400;
	opacity: 0.95;
}

/* Page header for internal pages */
.page-header {
	background: var(--gradient-primary);
	color: white;
	padding: 140px 0 80px;
	text-align: center;
	position: relative;
	overflow: hidden;
}

.page-header::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3Ccircle cx='60' cy='30' r='4'/%3E%3Ccircle cx='30' cy='60' r='4'/%3E%3Ccircle cx='0' cy='30' r='4'/%3E%3Ccircle cx='30' cy='0' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
	z-index: 1;
}

.page-header > .container {
	position: relative;
	z-index: 2;
}

.page-header h1 {
	font-size: 3.5rem;
	font-weight: 800;
	margin-bottom: 1.5rem;
	text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
	background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.page-header .lead {
	font-size: 1.3rem;
	text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
	opacity: 0.9;
}

/* Section spacing */
section {
	position: relative;
	overflow: hidden;
}

section.py-5 {
	padding: 80px 0;
}

/* Background variations */
.bg-light {
	background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
	position: relative;
}

.bg-light::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ff6b6b' fill-opacity='0.02' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
	z-index: 1;
}

.bg-light > .container {
	position: relative;
	z-index: 2;
}

.bg-primary {
	background: var(--gradient-primary) !important;
	position: relative;
}

.bg-primary::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.1' fill-rule='evenodd'%3E%3Cpath d='M20 20c0-16.569-13.431-30-30-30C-26.569-10-40 3.431-40 20s13.431 30 30 30c16.569 0 30-13.431 30-30z'/%3E%3C/g%3E%3C/svg%3E");
	z-index: 1;
}

.bg-primary > .container {
	position: relative;
	z-index: 2;
}

/* Form styling */
.form-control,
.form-select {
	border-radius: 8px;
	border: 2px solid var(--border-color);
	padding: 12px 16px;
	font-size: 1rem;
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus,
.form-select:focus {
	border-color: var(--primary-color);
	box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.form-label {
	font-weight: 600;
	margin-bottom: 0.5rem;
	color: var(--text-color);
}

.invalid-feedback {
	display: block;
	width: 100%;
	margin-top: 0.25rem;
	font-size: 0.875rem;
	color: var(--danger-color);
}

.form-control.is-invalid,
.form-select.is-invalid {
	border-color: var(--danger-color);
}

.form-check-input:checked {
	background-color: var(--primary-color);
	border-color: var(--primary-color);
}

/* Cookie consent banner */
.cookie-consent {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: var(--gradient-secondary);
	color: white;
	padding: 24px 0;
	z-index: 1050;
	box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.4);
	transform: translateY(100%);
	transition: all 0.4s ease;
	border-top: 2px solid rgba(99, 102, 241, 0.3);
	backdrop-filter: blur(20px);
}

.cookie-consent.show {
	transform: translateY(0);
}

.cookie-consent p {
	margin: 0;
	font-size: 0.9rem;
}

.cookie-consent .btn {
	padding: 8px 20px;
	font-size: 0.9rem;
	border-radius: 6px;
}

.cookie-consent .btn-outline-light {
	border-color: rgba(255, 255, 255, 0.3);
	color: rgba(255, 255, 255, 0.8);
}

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

/* Footer styling */
footer {
	background: var(--gradient-secondary) !important;
	color: white;
	position: relative;
	overflow: hidden;
}

footer::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ff6b6b' fill-opacity='0.05'%3E%3Cpath d='M0 0h80v80H0V0zm20 20v40h40V20H20zm20 35a15 15 0 1 1 0-30 15 15 0 0 1 0 30z' fill-rule='nonzero'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
	z-index: 1;
}

footer > .container {
	position: relative;
	z-index: 2;
}

footer h5 {
	color: white;
	font-weight: 600;
}

footer a {
	color: rgba(255, 255, 255, 0.7);
	transition: color 0.3s ease;
}

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

footer .fab {
	font-size: 1.2rem;
	transition: transform 0.3s ease;
}

footer .fab:hover {
	transform: scale(1.2);
}

/* Utility classes */
.text-primary {
	color: var(--primary-color) !important;
}

.text-muted {
	color: var(--text-muted) !important;
}

.shadow {
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

.shadow-sm {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.rounded {
	border-radius: 12px !important;
}

/* Creative gradient text */
.gradient-text {
	background: var(--gradient-primary);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	font-weight: 700;
}

/* Interactive elements */
.interactive-card {
	position: relative;
	overflow: hidden;
	cursor: pointer;
}

.interactive-card::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	background: radial-gradient(
		circle,
		rgba(255, 107, 107, 0.1) 0%,
		transparent 70%
	);
	transform: translate(-50%, -50%);
	transition: width 0.6s ease, height 0.6s ease;
}

.interactive-card:hover::after {
	width: 300px;
	height: 300px;
}

/* Glowing effects */
.glow {
	box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
	animation: pulse 2s ease-in-out infinite;
}

/* Service icons with creative hover effects */
.service-icon {
	display: inline-block;
	padding: 20px;
	background: var(--gradient-primary);
	border-radius: 50%;
	color: white;
	font-size: 2rem;
	transition: all 0.4s ease;
	position: relative;
	overflow: hidden;
}

.service-icon::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 50%;
	transform: translate(-50%, -50%);
	transition: width 0.4s ease, height 0.4s ease;
}

.service-icon:hover::before {
	width: 100px;
	height: 100px;
}

.service-icon:hover {
	transform: scale(1.1) rotate(5deg);
	box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
}

/* Animation classes */
.fade-in {
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
	opacity: 1;
	transform: translateY(0);
}

/* Creative animations */
@keyframes float {
	0%,
	100% {
		transform: translateY(0px);
	}
	50% {
		transform: translateY(-10px);
	}
}

@keyframes pulse {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0.7;
	}
}

@keyframes slideInFromLeft {
	0% {
		transform: translateX(-100%);
	}
	100% {
		transform: translateX(0);
		opacity: 1;
	}
}

@keyframes slideInFromRight {
	0% {
		transform: translateX(100%);
	}
	100% {
		transform: translateX(0);
		opacity: 1;
	}
}

@keyframes scaleIn {
	0% {
		transform: scale(0.8);
	}
	100% {
		transform: scale(1);
		opacity: 1;
	}
}

@keyframes rotateIn {
	0% {
		transform: rotate(-180deg) scale(0.8);
	}
	100% {
		transform: rotate(0deg) scale(1);
		opacity: 1;
	}
}

.animate-float {
	animation: float 3s ease-in-out infinite;
}

.animate-pulse {
	animation: pulse 2s ease-in-out infinite;
}

.animate-slide-left {
	animation: slideInFromLeft 0.8s ease-out;
}

.animate-slide-right {
	animation: slideInFromRight 0.8s ease-out;
}

.animate-scale {
	animation: scaleIn 0.6s ease-out;
}

.animate-rotate {
	animation: rotateIn 0.8s ease-out;
}

/* Loading animation */
.loading {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 3px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	border-top-color: white;
	animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.hero h1 {
		font-size: 2.5rem;
	}

	.hero .lead {
		font-size: 1.1rem;
	}

	.page-header h1 {
		font-size: 2.5rem;
	}

	.display-4 {
		font-size: 2.5rem;
	}

	.display-5 {
		font-size: 2rem;
	}

	section.py-5 {
		padding: 60px 0;
	}

	.hero {
		background-attachment: scroll;
	}

	.cookie-consent .col-md-8,
	.cookie-consent .col-md-4 {
		text-align: center;
		margin-bottom: 1rem;
	}

	.cookie-consent .text-end {
		text-align: center !important;
	}
}

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

	.hero .lead {
		font-size: 1rem;
	}

	.page-header h1 {
		font-size: 2rem;
	}

	.btn {
		padding: 10px 20px;
		font-size: 0.9rem;
	}

	.card-img-top {
		height: 150px;
	}

	.hero {
		min-height: 70vh;
	}

	.page-header {
		padding: 100px 0 40px;
	}
}

/* Print styles */
@media print {
	.navbar,
	.cookie-consent,
	.btn,
	footer {
		display: none !important;
	}

	.hero {
		background: none !important;
		color: black !important;
	}

	.page-header {
		background: none !important;
		color: black !important;
	}

	body {
		font-size: 12pt;
		line-height: 1.4;
	}

	h1,
	h2,
	h3,
	h4,
	h5,
	h6 {
		color: black !important;
	}

	.card {
		border: 1px solid #ccc !important;
		box-shadow: none !important;
	}
}

/* Accessibility improvements */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Focus styles for better accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
	outline: 2px solid var(--primary-color);
	outline-offset: 2px;
}

/* Skip to content link */
.skip-to-content {
	position: absolute;
	top: -40px;
	left: 6px;
	background: var(--primary-color);
	color: white;
	padding: 8px;
	text-decoration: none;
	border-radius: 4px;
	z-index: 1060;
	transition: top 0.3s ease;
}

.skip-to-content:focus {
	top: 6px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
	.btn {
		border: 2px solid currentColor;
	}

	.card {
		border: 2px solid var(--border-color);
	}

	.form-control,
	.form-select {
		border: 2px solid var(--border-color);
	}
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
	* {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}

	.hero {
		background-attachment: scroll;
	}
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
	.bg-light {
		background-color: #1f2937 !important;
		color: white;
	}

	.text-muted {
		color: #9ca3af !important;
	}

	.card {
		background-color: #374151;
		border-color: #4b5563;
		color: white;
	}

	.form-control,
	.form-select {
		background-color: #374151;
		border-color: #4b5563;
		color: white;
	}

	.form-control::placeholder {
		color: #9ca3af;
	}
}
