/* CSS Variables for theming */
:root {
	--bg: #0b3a77; /* Blue background */
	--brand-blue: #292E4B; /* Header/nav brand color */
	--header-bg: #2F7694; /* Navbar color in light theme */
	--chip-bg: rgba(120, 190, 255, 0.35);
	--chip-bg-hover: rgba(120, 190, 255, 0.5);
	--chip-text: #ffffff;
	--text: #ffffff; /* White text by default */
	--text-soft: #e6eef7;
	--header-ink: #0f1b28; /* Header text dark in light theme */
	--panel-bg: rgba(255,255,255,0.12);
	--border: rgba(255,255,255,0.25);
	--accent: #4da3ff; /* Light blue accent */
	--accent-hover: #2d8be6;
	--accent-active: #1c6ebd;
	--shadow-sm: 0 2px 4px rgba(0,0,0,0.25);
	--shadow-md: 0 4px 12px rgba(0,0,0,0.35);
	--focus-ring: 2px solid var(--accent);
	--transition: 0.25s cubic-bezier(.4,.14,.3,1);
}

body.dark {
	--bg: #0f1b28;
	--text: #e2ecf5;
	--text-soft: #b9c9d6;
	--header-bg: #282F49;
	--header-ink: #ffffff;
	--panel-bg: #1f3a4d;
	--border: #2d4d61;
	--accent: #4da3ff;
	--accent-hover: #328be6;
	--accent-active: #1c6ebd;
	--shadow-sm: 0 2px 4px rgba(0,0,0,0.5);
	--shadow-md: 0 4px 14px rgba(0,0,0,0.55);
	--focus-ring: 2px solid var(--accent);
	--chip-bg: rgba(30, 90, 150, 0.55);
	--chip-bg-hover: rgba(30, 90, 150, 0.7);
	--chip-text: #eaf4ff;
}

html, body { max-width: 100%; overflow-x: hidden; }
body { font-family: "Inter", "Segoe UI", Arial, sans-serif; margin:0; background:var(--bg); color:var(--text); transition:background var(--transition), color var(--transition); line-height:1.65; text-rendering:optimizeLegibility; }
main { padding:32px 24px 64px; max-width:1050px; margin:0 auto; }
p { margin: 0 0 16px; color: var(--text-soft); }
.site-footer { text-align: center; padding: 18px 16px 28px; color: var(--text-soft); font-size: 12px; }
.site-footer small { opacity: 0.85; }
.site-footer a { color: inherit; text-decoration: none; font-weight: 600; }
.site-footer a:hover { text-decoration: underline; }
h1, h2, h3 { letter-spacing: -0.01em; }
.site-header { background:var(--header-bg) !important; color:var(--header-ink); width:100%; box-shadow:var(--shadow-sm); transition:background-color .6s ease, color .6s ease, box-shadow .6s ease; position:sticky; top:0; z-index:1000; mix-blend-mode:normal; isolation:isolate; backdrop-filter:saturate(140%) blur(10px); }
.header-inner { max-width:1200px; margin:0 auto; display:flex; align-items:center; justify-content:center; gap:48px; padding:18px 42px; }
.actions-group { display:flex; align-items:center; gap:12px; }
.menu-toggle { display:none; background:var(--accent); color:#fff; border:0; padding:8px 14px; font-size:18px; border-radius:6px; cursor:pointer; transition:background var(--transition), transform var(--transition); }
.menu-toggle:hover { background:var(--accent-hover); transform:translateY(-2px); }
.menu-toggle:active { background:var(--accent-active); transform:translateY(0); }
.menu-toggle:focus { outline:var(--focus-ring); outline-offset:2px; }
.site-header .brand { display:flex; align-items:center; gap:12px; }
.site-header .brand a { font-size:18px; font-weight:600; color:var(--header-ink); text-decoration:none; position:relative; }
.brand a::after { content:''; position:absolute; left:0; bottom:-4px; width:0; height:3px; background:var(--accent); transition:width .35s ease; border-radius:2px; }
.brand a:hover::after { width:100%; }
.brand .logo { display:inline-block; width:110px; height:auto; filter:none; transition: opacity .6s ease, transform .6s ease; }
.brand .logo.is-fading { opacity: 0; transform: scale(0.98); }
@media (max-width: 700px) {
	.brand .logo { width:96px; }
}
.main-nav { flex:1; background: var(--header-bg) !important; transition: background-color .6s ease; }
.nav-list { list-style:none; padding:0; margin:0; display:flex; gap:42px; justify-content:center; }
.site-header .nav-list a { text-decoration:none; color:var(--header-ink); font-weight:600; position:relative; padding:10px 4px; font-size:17px; transition:color var(--transition); }
.site-header .nav-list a:hover { color:#1b2d3a; }
body.dark .site-header .nav-list a:hover { color:#e9f3ff; }
.site-header .nav-list a::after { content:''; position:absolute; left:0; bottom:-6px; height:3px; width:0; background:var(--accent); transition:width .35s ease; border-radius:2px; }
.site-header .nav-list a:hover::after { width:100%; }
.site-header .nav-list a.active { color:var(--header-ink); }
.site-header .nav-list a.active::after { width:100%; background:var(--header-ink); opacity:0.6; }
.lang-switcher { position:relative; }
.lang-switcher button, .theme-toggle { background:var(--chip-bg); color:var(--chip-text); border:1px solid rgba(255,255,255,0.35); padding:12px 20px; cursor:pointer; font-size:15px; border-radius:10px; font-weight:600; display:inline-flex; align-items:center; gap:8px; transition:background var(--transition), transform var(--transition), box-shadow var(--transition), border-color var(--transition); position:relative; box-shadow:0 6px 16px rgba(0,0,0,0.18); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.lang-switcher button#langToggle {
	box-shadow:0 0 0 3px rgba(255,255,255,0.6), 0 0 0 6px rgba(11,97,164,0.35);
}
body.dark .lang-switcher button#langToggle {
	box-shadow:0 0 0 3px rgba(24,48,64,0.9), 0 0 0 6px rgba(77,163,255,0.35);
}
.lang-switcher button:hover, .theme-toggle:hover { background:var(--chip-bg-hover); transform:translateY(-3px); box-shadow:var(--shadow-md); border-color: rgba(255,255,255,0.6); }
.lang-switcher button:active, .theme-toggle:active { background:var(--chip-bg); transform:translateY(0); box-shadow:var(--shadow-sm); }
.theme-toggle { font-size:16px; }
.lang-switcher ul { position:absolute; top:calc(100% + 4px); right:0; background:var(--panel-bg); border:1px solid var(--border); padding:4px; list-style:none; margin:0; width:130px; box-shadow:var(--shadow-md); border-radius:8px; animation:fadeIn .25s ease; z-index:1100; }
.lang-switcher ul.hidden { display:none; }
.lang-switcher ul li { margin:0; }
.lang-switcher ul li button { width:100%; background:transparent; color:var(--text); border:0; padding:8px 10px; text-align:left; cursor:pointer; border-radius:4px; font-size:14px; transition:background var(--transition), color var(--transition); }
.lang-switcher ul li button:hover { background:var(--header-bg); color:var(--accent-active); }
main h2 { margin-top:40px; color:var(--text); font-size:28px; }
main h3 { margin-top:28px; color:var(--text); font-size:22px; }
main ul { margin:12px 0 20px 18px; padding:0; }
main ul li { margin:8px 0; color:var(--text-soft); }
button#btn { margin-top:24px; background:var(--accent); color:#fff; border:0; padding:12px 20px; cursor:pointer; border-radius:6px; font-size:15px; transition:background var(--transition), transform var(--transition), box-shadow var(--transition); }
button#btn:hover { background:var(--accent-hover); transform:translateY(-2px); box-shadow:var(--shadow-sm); }
button#btn:active { background:var(--accent-active); transform:translateY(0); }

/* Center content blur panel */
.content-panel {
	backdrop-filter: blur(14px) saturate(130%);
	-webkit-backdrop-filter: blur(14px) saturate(130%);
	background: linear-gradient(180deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0.10) 100%);
	padding: 36px 46px;
	border-radius: 26px;
	box-shadow: 0 12px 40px rgba(0,0,0,0.28);
	border: 1px solid rgba(255,255,255,0.28);
	position: relative;
	overflow: hidden;
}
body.dark .content-panel {
	background: rgba(24,48,64,0.55);
	border: 1px solid rgba(255,255,255,0.18);
}
.content-panel h2:first-child { margin-top:0; }
.content-panel > section + section { margin-top: 24px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.12); }
.content-panel a { color: var(--accent); font-weight:600; text-decoration:none; }
.content-panel a:hover { text-decoration:underline; }
.content-panel ul { list-style:none; }
.content-panel ul li { position:relative; padding-left:18px; }
.content-panel ul li::before { content:""; position:absolute; left:0; top:9px; width:8px; height:8px; border-radius:50%; background:var(--accent); box-shadow:0 0 0 3px rgba(77,163,255,0.25); }
.section-block { margin-bottom: 10px; }
.section-grid { display:grid; gap:24px; align-items:stretch; }
.section-grid.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; align-items:start; }
.section-grid.two-col > .info-card { height: 100%; }
.m365 .section-grid.two-col { grid-template-rows: 1fr; }
.info-card > :first-child { margin-top: 0; }
.info-card { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2); border-radius: 18px; padding: 22px 24px; box-shadow: 0 10px 28px rgba(0,0,0,0.18); }
body.dark .info-card { background: rgba(16,32,44,0.55); border-color: rgba(255,255,255,0.12); }
.cta-row { margin-top: 14px; }
.contact-layout { align-items:start; }
.contacts .contact-layout { row-gap: 44px; }
.contacts .info-card { margin-bottom: 16px; }
.contacts .contact-layout { margin-bottom: 28px; }
.contacts .content-panel { padding-bottom: 64px; }
.cta-card { margin: 64px auto 0; text-align: center; display:inline-block; padding: 14px 20px; }
.content-panel .cta-card { display: inline-block; }
.content-panel .cta-card-wrap { text-align: center; }
.cta-button { display:inline-block; background: rgba(77,163,255,0.22); color:#ffffff !important; text-decoration:none; font-weight:700; padding: 10px 18px; border-radius: 10px; box-shadow: var(--shadow-sm); border: 1px solid rgba(255,255,255,0.35); transition: background var(--transition), transform var(--transition), box-shadow var(--transition), color var(--transition); }
.cta-button:visited { color:#ffffff !important; }
.cta-button:hover { background: rgba(77,163,255,0.35); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.cta-button:active { background: rgba(77,163,255,0.28); transform: translateY(0); box-shadow: var(--shadow-sm); }
.cta-card .cta-row { margin: 0; }

/* Background image scaffolding */
/* Per-page background images (replace placeholders with your files) */
/* Keep optional background images; the blue base ensures consistent branding */
body.home {
	background-image: url('images/home.jpg');
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
	background-attachment: fixed;
}
body.home.dark { background-image: url('images/home-dark.jpg'); }

/* Remove spacing on home so hero touches header */
body.home main {
	padding-top: 0;
	padding-left: 0;
	padding-right: 0;
	max-width: 100%;
}

/* Remove header blur/shadow on home to avoid overlap line with hero video */
body.home .site-header {
	box-shadow: none;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
}

/* Hero video background */
.hero {
	position: relative;
	min-height: 100vh;
	width: 100vw; /* full-bleed width */
	margin-left: calc(50% - 50vw); /* break out of centered main */
	overflow: hidden;
}
.hero-video {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 0;
	filter: brightness(0.65) saturate(120%);
}
.hero-overlay {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 64px 24px;
	text-align: center;
}
.hero-title {
	margin: 0;
	font-size: 56px;
	line-height: 1.1;
	color: #ffffff;
	text-shadow: 0 8px 28px rgba(0,0,0,0.45);
}
.hero-sub { color: rgba(255,255,255,0.95); max-width: 900px; font-size:18px; }
.hero-cta {
	display: inline-block;
	background: var(--accent);
	color: #fff;
	text-decoration: none;
	font-weight: 700;
	padding: 12px 20px;
	border-radius: 10px;
	box-shadow: var(--shadow-sm);
	transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.hero-cta:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.hero-cta:active { background: var(--accent-active); transform: translateY(0); }

@media (max-width: 700px) {
	.hero-title { font-size: 42px; }
}

/* Scroll cue button */
.scroll-cue {
	margin-top: 18px;
	background: transparent;
	border: 2px solid rgba(255,255,255,0.85);
	color: #ffffff;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	box-shadow: var(--shadow-sm);
	transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
}
.scroll-cue:hover { transform: translateY(2px); background: rgba(255,255,255,0.12); }
.scroll-cue:active { transform: translateY(0); }

/* Contact form styles */
form#contactForm {
	display: block;
	margin: 20px 0 32px;
}
form#contactForm .grid-2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}
form#contactForm label { display: flex; flex-direction: column; gap: 6px; color: var(--text); }
form#contactForm input, form#contactForm textarea {
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 10px 12px;
	background: #ffffff;
	color: #0b3766;
	box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
body.dark form#contactForm input, body.dark form#contactForm textarea {
	background: #183040;
	color: #e2ecf5;
}
form#contactForm button[type="submit"] { margin-top: 12px; }

.consent-block { display:flex; align-items:flex-start; gap:10px; margin-top:12px; }
.consent-block input[type="checkbox"] { margin-top: 4px; }
.consent-block .consent-label { color: var(--text); }

/* Required field markers */
.req-star { color: var(--accent); margin-left: 4px; font-size: 0.9em; font-weight: 700; }
.required-note { margin: 4px 0 12px; font-size: 12px; color: var(--text-soft); }

@media (max-width: 700px) {
	form#contactForm .grid-2 { grid-template-columns: 1fr; }
}

body.m365 {
	background-image: url('images/m365.jpg');
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
	background-attachment: fixed;
}
body.m365.dark { background-image: url('images/m365-dark.jpg'); }

/* Strengthen readability for Microsoft 365 page in light mode */
body.m365:not(.dark) .content-panel {
	background: rgba(10, 47, 94, 0.36); /* deeper navy overlay for contrast */
	border: 1px solid rgba(255,255,255,0.28);
	color: #ffffff;
}
body.m365:not(.dark) .content-panel a {
	color: var(--accent);
}


body.contacts {
	background-image: url('images/contacts.jpg');
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
	background-attachment: fixed;
}
body.contacts.dark { background-image: url('images/contacts-dark.jpg'); }

/* Optional radial vignette overlay for focus */
body::before {
	display:none; /* Disable global overlay to prevent any blending over header */
}
body.dark::before {
	display:none; /* Keep dark mode clean, no overlay blending */
}

@media (max-width: 700px) {
	.content-panel { padding:24px 24px; border-radius:18px; }
	.section-grid.two-col { grid-template-columns: 1fr; }
}

/* Animations */
@keyframes slideDown {
	0% { transform:translateY(-25px); opacity:0; }
	100% { transform:translateY(0); opacity:1; }
}
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

@media (max-width: 900px) {
	.menu-toggle { display:block; }
	.header-inner { flex-wrap:nowrap; justify-content:space-between; gap:16px; padding:14px 22px; }
	.main-nav { position:absolute; top:70px; left:0; right:0; background:var(--header-bg); box-shadow:var(--shadow-md); padding:22px 30px; transform:translateY(-25px); opacity:0; pointer-events:none; border-bottom:4px solid var(--accent); }
	.main-nav.open { animation:slideDown .35s cubic-bezier(.33,.55,.28,.99) forwards; pointer-events:auto; }
	.nav-list { flex-direction:column; gap:14px; }
	.nav-list a { padding:8px 4px; font-size:16px; }
	.actions-group { margin-left:auto; }
}

@media (max-width: 600px) {
	.brand a { font-size:16px; }
	.menu-toggle { font-size:20px; padding:6px 12px; }
	.main-nav { top:56px; }
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
	.main-nav { transition:none; }
	.lang-switcher ul { transition:none; }
}
