/* ==========================================================================
   Regex 1.0 - Main Design System & Base CSS (Fixed White Header & Maroon Logo)
   Author: Regex Dot Pvt Ltd
   ========================================================================== */

/* 1. CSS Custom Properties / Variables */
:root {
	--rg-dark: #131427;
	--rg-dark-surface: #1a1c36;
	--rg-pink-bar: #d81b60;
	--rg-maroon: #990033;
	--rg-maroon-hover: #b3003b;
	--rg-orange: #ff9800;
	--rg-orange-hover: #e68a00;
	--rg-bg-white: #ffffff;
	--rg-bg-light: #f4f5f7;
	
	--rg-text-dark: #1f2937;
	--rg-text-muted: #6b7280;
	--rg-text-light: #ffffff;
	--rg-border-light: #e5e7eb;
	--rg-border-dark: rgba(255, 255, 255, 0.1);
	
	/* Montserrat Global Font Family */
	--rg-font-main: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--rg-font-heading: 'Montserrat', var(--rg-font-main);
	
	--rg-radius-sm: 6px;
	--rg-radius-md: 10px;
	--rg-radius-lg: 16px;
	--rg-radius-full: 9999px;
	
	--rg-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
	--rg-shadow-md: 0 10px 25px rgba(0, 0, 0, 0.08);
	
	--rg-transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	--rg-container-width: 1240px;
}

/* 2. Global Reset */
*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	font-size: 16px;
	scroll-behavior: smooth;
}

body {
	font-family: var(--rg-font-main);
	background-color: var(--rg-bg-white);
	color: var(--rg-text-dark);
	line-height: 1.6;
	overflow-x: clip;
	-webkit-font-smoothing: antialiased;
}

a {
	color: inherit;
	text-decoration: none;
	transition: var(--rg-transition);
}

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

ul, ol, li {
	list-style: none;
}

/* 3. Typography Defaults - Montserrat */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--rg-font-heading);
	color: #131427;
	font-weight: 700;
	line-height: 1.2;
}

/* Hero Section Headings (Always Pure White on Dark Hero Backgrounds) */
.rg-hero h1,
.rg-hero h2,
.rg-hero-title,
[class*="-hero"] h1,
[class*="-hero"] h2,
[class*="-hero-title"] {
	color: #ffffff !important;
}

/* 4. Layout Container & Utility Grids */
.rg-container {
	width: 100%;
	max-width: var(--rg-container-width);
	margin-left: auto;
	margin-right: auto;
	padding-left: 24px;
	padding-right: 24px;
}

.rg-section {
	padding-top: 80px;
	padding-bottom: 80px;
	position: relative;
	background-color: var(--rg-bg-white);
}

.rg-section-header {
	text-align: center;
	max-width: 800px;
	margin: 0 auto 50px;
}

.rg-section-title {
	font-family: var(--rg-font-heading);
	font-size: 2.2rem;
	font-weight: 800;
	color: #131427;
	margin-bottom: 12px;
	letter-spacing: -0.02em;
}

/* Force White Color on Headings inside Dark Background Sections */
[style*="131427"] h2,
[style*="131427"] h3,
[style*="19182d"] h2,
[style*="19182d"] h3,
[class*="-audience-section"] h2,
[class*="-audience-section"] h3,
[class*="-audience-section"] [class*="-section-title"],
.rg-saasbridge-audience-section h2,
.rg-coursebridge-audience-section h2,
.rg-suite-audience-section h2,
.rg-lms-audience-section h2,
.rg-scormxd-audience-section h2,
.rg-easyscorm-audience-section h2 {
	color: #ffffff !important;
}

.rg-section-subtitle {
	font-family: var(--rg-font-main);
	font-size: 1rem;
	color: var(--rg-text-muted);
	line-height: 1.6;
}

/* Grid System Utility Classes */
.rg-grid-two {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 40px;
}

.rg-grid-three {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 36px;
}

.rg-grid-four {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 32px;
}

.rg-grid-five {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 24px;
}

/* 5. Header Component (Transparent on Hero -> White & Maroon Logo on Scroll) */
.rg-site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 99999 !important;
	width: 100%;
	background-color: transparent;
	transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
	padding: 20px 0;
}

body.admin-bar .rg-site-header {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar #wpadminbar {
		position: fixed !important;
		top: 0 !important;
	}
	body.admin-bar .rg-site-header {
		top: 46px !important;
	}
}

.rg-site-header.scrolled {
	background-color: #ffffff;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	padding: 12px 0;
}

.rg-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

/* Logo Switching Mechanics */
.rg-brand-logo {
	display: flex;
	align-items: center;
}

.rg-brand-logo img,
.rg-logo-white,
.rg-logo-maroon {
	height: 38px !important;
	max-height: 38px !important;
	width: auto !important;
	object-fit: contain;
}

.rg-brand-logo .rg-logo-white {
	display: block;
}

.rg-brand-logo .rg-logo-maroon {
	display: none;
}

.rg-site-header.scrolled .rg-brand-logo .rg-logo-white {
	display: none;
}

.rg-site-header.scrolled .rg-brand-logo .rg-logo-maroon {
	display: block;
}

/* Primary Navigation Menu (.rg-menu-list) */
.rg-nav-desktop {
	display: flex;
	align-items: center;
}

.rg-menu-list {
	display: flex;
	align-items: center;
	gap: 32px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.rg-menu-list > li {
	position: relative;
	margin: 0;
	padding: 0;
}

.rg-menu-list > li > a {
	font-family: var(--rg-font-heading);
	font-weight: 600;
	font-size: 0.95rem;
	color: #ffffff;
	padding: 10px 0;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	position: relative;
	transition: var(--rg-transition);
	white-space: nowrap;
}

/* Animated Expanding Underline for Normal Links on Hover */
.rg-menu-list > li > a::after {
	content: '';
	position: absolute;
	bottom: 2px;
	left: 0;
	width: 0;
	height: 2px;
	background-color: var(--rg-orange);
	transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.rg-site-header.scrolled .rg-menu-list > li > a {
	color: var(--rg-text-dark);
}

.rg-site-header.scrolled .rg-menu-list > li > a::after {
	background-color: var(--rg-maroon);
}

.rg-menu-list > li > a:hover {
	color: var(--rg-orange);
}

.rg-menu-list > li > a:hover::after {
	width: 100%;
}

.rg-site-header.scrolled .rg-menu-list > li > a:hover {
	color: var(--rg-maroon);
}

/* Continuous Sweeping Line Animation for "Stay Ahead with AI" */
.rg-menu-list > li > a[href*="stay-ahead-with-ai"]::after,
.rg-menu-list > li:first-child > a::after {
	content: '';
	position: absolute;
	bottom: 2px;
	height: 2px;
	background-color: #fbab5c;
	animation: rgLineSweep 3s ease-in-out infinite;
}

.rg-site-header.scrolled .rg-menu-list > li > a[href*="stay-ahead-with-ai"]::after,
.rg-site-header.scrolled .rg-menu-list > li:first-child > a::after {
	background-color: var(--rg-maroon);
}

.rg-menu-list > li > a[href*="stay-ahead-with-ai"],
.rg-menu-list > li:first-child > a {
	color: #fbab5c !important;
}

.rg-site-header.scrolled .rg-menu-list > li > a[href*="stay-ahead-with-ai"],
.rg-site-header.scrolled .rg-menu-list > li:first-child > a {
	color: var(--rg-maroon) !important;
}

@keyframes rgLineSweep {
	0% {
		left: 0;
		width: 0%;
		opacity: 0.6;
	}
	35% {
		left: 0;
		width: 100%;
		opacity: 1;
	}
	50% {
		left: 100%;
		width: 0%;
		opacity: 0.6;
	}
	85% {
		left: 0;
		width: 100%;
		opacity: 1;
	}
	100% {
		left: 0;
		width: 0%;
		opacity: 0.6;
	}
}

/* Dropdown Caret Arrow using ::before */
.rg-menu-list li.menu-item-has-children > a::before {
	content: '▾';
	font-size: 0.75rem;
	order: 2;
	margin-left: 2px;
	display: inline-block;
	transition: transform 0.2s ease;
}

.rg-menu-list li.menu-item-has-children:hover > a::before {
	transform: rotate(180deg);
}

/* Dropdown Sub-menu (.sub-menu) */
.rg-menu-list .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	background-color: #ffffff;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
	border-radius: var(--rg-radius-sm);
	padding: 12px 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: var(--rg-transition);
	z-index: 1001;
	list-style: none;
}

.rg-menu-list li.menu-item-has-children:hover .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.rg-menu-list .sub-menu li {
	margin: 0;
	padding: 0;
	width: 100%;
}

.rg-menu-list .sub-menu li a {
	color: var(--rg-text-dark) !important;
	display: block;
	padding: 8px 20px;
	font-size: 0.9rem;
	font-weight: 500;
	white-space: nowrap;
}

.rg-menu-list .sub-menu li a:hover {
	color: var(--rg-maroon) !important;
	background-color: var(--rg-bg-light);
}

/* Mobile Toggle */
.rg-mobile-toggle {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
	z-index: 1002;
}

.rg-mobile-toggle span {
	display: block;
	width: 26px;
	height: 2px;
	background-color: #ffffff;
	margin: 6px 0;
	transition: var(--rg-transition);
}

.rg-site-header.scrolled .rg-mobile-toggle span {
	background-color: var(--rg-text-dark);
}

/* Mobile Drawer Backdrop */
.rg-mobile-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(19, 20, 39, 0.6);
	backdrop-filter: blur(4px);
	z-index: 1004;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.rg-mobile-backdrop.is-open {
	opacity: 1;
	visibility: visible;
}

/* Mobile Drawer Container */
.rg-mobile-drawer {
	position: fixed;
	top: 0;
	right: -100%;
	width: 85%;
	max-width: 360px;
	height: 100vh;
	background-color: #ffffff;
	box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
	z-index: 1005;
	padding: 24px 28px 40px;
	transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.rg-mobile-drawer.is-open {
	right: 0;
}

/* Mobile Drawer Logo Fix: Force Maroon Logo Visible on White Background */
.rg-mobile-drawer .rg-brand-logo .rg-logo-white {
	display: none !important;
}

.rg-mobile-drawer .rg-brand-logo .rg-logo-maroon {
	display: block !important;
	height: 36px !important;
	max-height: 36px !important;
	width: auto !important;
}

.rg-mobile-drawer-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 20px;
	border-bottom: 1px solid #f3f4f6;
	margin-bottom: 24px;
}

.rg-mobile-close {
	background: #f4f5f7;
	border: none;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	color: #131427;
	cursor: pointer;
	transition: all 0.2s ease;
}

.rg-mobile-close:hover {
	background: #9c1c3c;
	color: #ffffff;
}

/* Mobile Menu Navigation Styling */
.rg-mobile-nav {
	flex-grow: 1;
}

.rg-mobile-menu {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.rg-mobile-menu > li {
	margin: 0;
	padding: 0;
}

.rg-mobile-menu > li > a {
	font-family: var(--rg-font-heading);
	font-size: 16px;
	font-weight: 700;
	color: #131427;
	display: block;
	padding: 6px 0;
	transition: color 0.2s ease;
}

.rg-mobile-menu > li > a:hover {
	color: #9c1c3c;
}

/* Sub-menu inside Mobile Drawer */
.rg-mobile-menu .sub-menu {
	list-style: none;
	padding: 6px 0 6px 14px;
	margin: 6px 0 10px 0;
	border-left: 2px solid #fbab5c;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.rg-mobile-menu .sub-menu li a {
	font-family: var(--rg-font-main);
	font-size: 14.5px;
	font-weight: 500;
	color: #4b5563;
	display: block;
	padding: 4px 0;
	transition: color 0.2s ease, transform 0.2s ease;
}

.rg-mobile-menu .sub-menu li a:hover {
	color: #9c1c3c;
	transform: translateX(4px);
}

.rg-mobile-drawer-footer {
	padding-top: 24px;
	border-top: 1px solid #f3f4f6;
	margin-top: 24px;
}

/* 6. Footer Component (Exact Production Site Design) */
.rg-site-footer {
	background-color: #19182d;
	color: #f2f2f2;
	padding: 50px 0 30px;
	position: relative;
	border-top: 1px solid #192130;
}

.rg-footer-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.rg-footer-brand {
	margin-bottom: 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.rg-footer-brand img {
	height: 38px;
	width: auto;
}

.rg-footer-tagline {
	color: #9ca3af;
	font-size: 0.9rem;
	margin-top: 12px;
	font-family: var(--rg-font-main);
}

.rg-footer-socials {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 24px;
}

.rg-social-icon {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: #1f2938;
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
}

.rg-social-icon:hover {
	background-color: #ffffff;
	color: #19182d;
	transform: translateY(-2px);
}

.rg-footer-divider {
	width: 100%;
	border: 0;
	border-top: 1px solid #192130;
	margin: 20px 0 24px;
}

.rg-footer-bottom {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	color: #f2f2f2;
	font-family: var(--rg-font-main);
	font-size: 15px;
	font-weight: 500;
}

.rg-footer-bottom a {
	color: #f2f2f2;
	text-decoration: none;
	transition: color 0.3s ease;
}

.rg-footer-bottom a:hover {
	color: #fbab5c;
}

/* Back to Top Button */
.rg-back-to-top {
	position: fixed;
	bottom: 24px;
	right: 24px;
	width: 40px;
	height: 40px;
	background-color: #6b7280;
	color: #ffffff;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	z-index: 999;
	transition: background-color 0.3s ease;
}

.rg-back-to-top:hover {
	background-color: #9c1c3c;
	color: #ffffff;
}

/* Utility Button Classes */
.rg-btn-orange {
	display: inline-block;
	background-color: var(--rg-orange);
	color: #ffffff;
	font-family: var(--rg-font-heading);
	font-weight: 600;
	font-size: 0.95rem;
	padding: 12px 28px;
	border-radius: var(--rg-radius-sm);
	box-shadow: 0 4px 14px rgba(255, 152, 0, 0.3);
	transition: var(--rg-transition);
}

.rg-btn-orange:hover {
	background-color: var(--rg-orange-hover);
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
	color: #ffffff;
}

.rg-btn-maroon {
	display: inline-block;
	background-color: var(--rg-maroon);
	color: #ffffff;
	font-family: var(--rg-font-heading);
	font-weight: 600;
	font-size: 0.95rem;
	padding: 12px 28px;
	border-radius: var(--rg-radius-sm);
	transition: var(--rg-transition);
}

.rg-btn-maroon:hover {
	background-color: var(--rg-maroon-hover);
	color: #ffffff;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
	.rg-nav-desktop {
		display: none;
	}
	.rg-mobile-toggle {
		display: block;
	}
	.rg-grid-five {
		grid-template-columns: repeat(2, 1fr);
	}
	.rg-grid-four {
		grid-template-columns: repeat(2, 1fr);
	}
	.rg-grid-three {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 768px) {
	.rg-grid-two,
	.rg-grid-five {
		grid-template-columns: 1fr;
	}
	.rg-footer-bottom {
		flex-direction: column;
		gap: 6px;
		text-align: center;
	}
}
