/*
Theme Name:     Omedia-Alvin
Theme URI:      https://omedia.mo
Description:    GeneratePress child theme for O MEDIA — Gutenberg-first, multilingual
Author:         O MEDIA
Author URI:     https://omedia.mo
Template:       generatepress
Version:        1.0.0
Text Domain:    omedia-alvin
*/

/* ============================================
   CSS Custom Properties
   ============================================ */
:root {
	--om-dark: #32373c;
	--om-black: #000000;
	--om-body-text: #535353;
	--om-bg: #f5f5f5;
	--om-white: #ffffff;
	--om-footer-bg: #2f2f2f;
	--om-footer-text: #d5d5d5;
	--om-red: #cd2122;
	--om-blue: #2d3489;
	--om-blue-dark: #1e2460;
	--om-radius-pill: 6px;
	--om-font-heading: "Montserrat", sans-serif;
	--om-font-body: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* ============================================
   Base / Body
   ============================================ */
body {
	font-family: var(--om-font-body);
	font-size: 15px;
	line-height: 1.7;
	color: var(--om-body-text);
	background-color: var(--om-bg);
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--om-font-heading);
	color: var(--om-black);
	font-weight: 700;
	line-height: 1.2;
}

h1 {
	font-size: 48px;
	letter-spacing: -0.5px;
	line-height: 1.15;
	margin-bottom: 0.6em;
}

/* H2 = section header: blue rule above, uppercase, letter-spaced */
h2 {
	font-size: 26px;
	font-weight: 700;
	color: var(--om-blue);
	text-transform: uppercase;
	letter-spacing: 1.2px;
	border-top: 2px solid var(--om-blue);
	padding-top: 20px;
	margin-top: 2.5em;
	margin-bottom: 0.9em;
}

h3 {
	font-size: 22px;
	font-weight: 600;
	margin-top: 1.6em;
	margin-bottom: 0.5em;
}

h4 {
	font-size: 17px;
	font-weight: 600;
	margin-top: 1.2em;
	margin-bottom: 0.4em;
}

h5 {
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
}

h6 {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--om-body-text);
}

a {
	color: var(--om-blue);
	text-decoration: underline;
}

a:hover {
	color: var(--om-blue-dark);
}

/* Chrome links stay clean (no underline) */
.om-logo,
.om-lang-switcher a,
.om-nav a,
.om-footer a,
.om-back-to-top {
	text-decoration: none;
}

/* ============================================
   Header
   ============================================ */
.site-header {
	background: var(--om-white);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
	position: sticky;
	top: 0;
	z-index: 100;
}

.site-header.is-shrunk {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* --- Top bar: language flags + social icons --- */
.om-top-bar {
	background: var(--om-bg);
	border-bottom: 1px solid #e0e0e0;
	overflow: hidden;
	max-height: 40px;
	transition: max-height 0.3s, opacity 0.3s, padding 0.3s;
	opacity: 1;
}

.site-header.is-shrunk .om-top-bar {
	max-height: 0;
	opacity: 0;
	border-bottom: none;
}

.om-top-bar-inner {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 20px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 6px 20px;
}

/* --- Main bar: logo + nav --- */
.om-main-bar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: 1200px;
	margin: 0 auto;
	padding: 12px 20px;
	transition: padding 0.3s;
}

.site-header.is-shrunk .om-main-bar-inner {
	padding-top: 6px;
	padding-bottom: 6px;
}

.om-logo img {
	max-height: 75px;
	width: auto;
	transition: max-height 0.3s;
}

.site-header.is-shrunk .om-logo img {
	max-height: 50px;
}

/* --- Language switcher with flags (top bar) --- */
.om-lang-switcher {
	display: flex;
	gap: 10px;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
}

.om-lang-switcher li {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 4px;
}

.om-lang-switcher img {
	width: 16px;
	height: auto;
	vertical-align: middle;
}

.om-lang-switcher a {
	font-size: 12px;
	font-weight: 600;
	color: var(--om-body-text);
	text-decoration: none;
	transition: color 0.2s;
}

.om-lang-switcher a:hover,
.om-lang-switcher .current-lang a {
	color: var(--om-black);
}

/* --- Override GP layout wrappers --- */
.featured-image.page-header-image {
	display: none;
}

#page,
.site-content,
.content-area,
.inside-article {
	display: block;
	width: 100%;
	max-width: 100%;
	padding: 0;
	margin: 0;
}

.site-content .content-area {
	float: none;
}

/* ============================================
   Navigation
   ============================================ */
.om-nav {
	display: flex;
	align-items: center;
}

.om-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 4px;
}

.om-nav a {
	font-size: 14px;
	font-weight: 600;
	color: var(--om-dark);
	padding: 8px 14px;
	border-radius: 4px;
	position: relative;
	overflow: hidden;
	transition: color 0.3s;
	z-index: 1;
}

.om-nav > ul > li > a::before {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--om-blue);
	border-radius: 4px;
	transform: scaleX(0);
	transform-origin: center;
	transition: transform 0.3s ease;
	z-index: -1;
}

.om-nav > ul > li > a:hover::before,
.om-nav > ul > li.current-menu-item > a::before,
.om-nav > ul > li.current_page_item > a::before {
	transform: scaleX(1);
}

.om-nav > ul > li > a:hover,
.om-nav > ul > li.current-menu-item > a,
.om-nav > ul > li.current_page_item > a {
	color: var(--om-white);
}

/* Dropdown */
.om-nav li {
	position: relative;
}

.om-nav li ul {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: var(--om-white);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	border-radius: 4px;
	min-width: 220px;
	padding: 8px 0;
	flex-direction: column;
	z-index: 200;
}

.om-nav li:hover > ul {
	display: flex;
}

.om-nav li ul a {
	padding: 6px 16px;
	font-size: 13px;
	font-weight: 400;
	border-radius: 0;
}

/* Mobile toggle */
.om-menu-toggle {
	display: none;
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: var(--om-dark);
	padding: 4px;
}

@media (max-width: 900px) {
	.om-menu-toggle {
		display: block;
	}

	.om-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--om-white);
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
		padding: 16px;
	}

	.om-nav.is-open {
		display: block;
	}

	.om-nav ul {
		flex-direction: column;
	}

	.om-nav li ul {
		position: static;
		box-shadow: none;
		padding-left: 16px;
	}

	.om-nav li:hover > ul {
		display: flex;
	}
}

/* ============================================
   Hero Banner (standard pages)
   ============================================ */
.om-page-banner {
	width: 100%;
	height: 30vh;
	min-height: 200px;
	max-height: 400px;
	overflow: hidden;
	position: relative;
}

.om-page-banner img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ============================================
   Homepage Hero (full-width image)
   ============================================ */
.om-hero {
	width: 100%;
	position: relative;
	overflow: hidden;
	background: var(--om-black);
}

.om-hero img {
	width: 100%;
	aspect-ratio: 16 / 5;
	object-fit: cover;
	display: block;
}

/* ============================================
   Content Area
   ============================================ */
.om-content-wrap {
	max-width: 960px;
	margin: 0 auto;
	padding: 60px 20px;
}

.entry-content {
	font-size: 15px;
	line-height: 1.8;
}

.entry-content p {
	margin-bottom: 1.4em;
}

/* ============================================
   Buttons
   ============================================ */
.wp-block-button__link,
button[type="submit"],
input[type="submit"],
.om-btn {
	background-color: var(--om-dark);
	color: var(--om-white);
	border: none;
	border-radius: var(--om-radius-pill);
	padding: 12px 28px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
	font-family: var(--om-font-body);
}

.wp-block-button__link:hover,
button[type="submit"]:hover,
input[type="submit"]:hover,
.om-btn:hover {
	background-color: var(--om-black);
	color: var(--om-white);
}

/* ============================================
   Forms (Fluent Forms)
   ============================================ */
.fluentform .ff-el-input--label label {
	font-weight: 600;
	color: var(--om-dark);
}

.fluentform input[type="text"],
.fluentform input[type="email"],
.fluentform textarea {
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 10px 14px;
	font-size: 15px;
	font-family: var(--om-font-body);
	width: 100%;
}

.fluentform input[type="text"]:focus,
.fluentform input[type="email"]:focus,
.fluentform textarea:focus {
	border-color: var(--om-dark);
	outline: none;
	box-shadow: 0 0 0 1px var(--om-dark);
}

.fluentform .ff-btn-submit {
	background-color: var(--om-blue);
	color: var(--om-white);
	border-radius: var(--om-radius-pill);
	padding: 12px 28px;
	font-size: 15px;
	font-weight: 600;
	border: none;
}

.fluentform .ff-btn-submit:hover {
	background-color: var(--om-blue-dark);
}

/* ============================================
   Footer
   ============================================ */
.om-footer {
	background: var(--om-footer-bg);
	border-top: 4px solid var(--om-white);
	padding: 30px 20px;
	text-align: center;
	color: var(--om-footer-text);
	font-size: 14px;
}

.om-footer a {
	color: var(--om-white);
}

.om-footer a:hover {
	color: var(--om-footer-text);
}

.om-back-to-top {
	display: inline-block;
	margin-top: 10px;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--om-footer-text);
	cursor: pointer;
}

.om-back-to-top:hover {
	color: var(--om-white);
}

/* ============================================
   Team Photos
   ============================================ */
.om-team-photo {
	float: right;
	width: 150px;
	height: 150px;
	object-fit: cover;
	border-radius: 0;
	margin: 0 0 16px 24px;
}

.om-content-wrap .wp-block-separator {
	clear: both;
}

.om-content-wrap .wp-block-spacer {
	clear: both;
}

@media (max-width: 600px) {
	.om-team-photo {
		float: none;
		display: block;
		margin: 0 auto 16px;
	}
}

/* ============================================
   Gutenberg Block Overrides
   ============================================ */
.wp-block-columns {
	gap: 40px;
}

.wp-block-separator {
	border-color: #e0e0e0;
}

.wp-block-image img {
	border-radius: 4px;
}

/* Alignwide / alignfull */
.alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
}

.alignwide {
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
}

/* ============================================
   Blur-up / LQIP progressive images
   ============================================ */
.om-blur-up {
	filter: blur(20px);
	transition: filter 0.6s ease;
	will-change: filter;
}

.om-blur-up.is-loaded {
	filter: blur(0);
}

/* ============================================
   Utility
   ============================================ */
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute;
	height: 1px;
	width: 1px;
	overflow: hidden;
}
