/* Mahajrya Website - Universal Stylesheet
 * All CSS styles for public, member, and course areas
 * Based on definitions.txt specifications
 */

/* ============================================
   UNIVERSAL STYLES (Apply Everywhere)
   ============================================ */

/* Base Styles */
* {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
	font-family: serif;
	font-size: 16px;
	color: white;
	line-height: 1.6;
	background-color: #000;
}

/* Typography */
/* Use Georgia as the elegant serif font (most fancy native serif available) */
/* IMPORTANT: Titles are NEVER bold - they are bigger but use normal font weight */
/* IMPORTANT: ALL text (title, subtitle, normal) has drop-shadow by default throughout entire website */
h1, h2, h3, h4, h5, h6, p, div, span, li, a, label, td, th {
	font-family: Georgia, "Times New Roman", Times, serif;
	font-weight: normal; /* Titles are never bold - only bigger */
	color: white;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.21)); /* Global drop-shadow for ALL text (reduced by 30%) */
}

h1, h2, h3, h4, h5, h6 {
	margin: 0.67em 0 0.065em 0; /* Reduced bottom margin by half for closer spacing */
}

/* Reduce spacing when subtitle/paragraph follows a heading */
h1 + p, h1 + [subtitle],
h2 + p, h2 + [subtitle],
h3 + p, h3 + [subtitle],
h4 + p, h4 + [subtitle],
h5 + p, h5 + [subtitle],
h6 + p, h6 + [subtitle] {
	margin-top: 0.2em; /* Minimal top margin when following a title */
}

h1 { 
	font-size: 2.5em; 
	font-weight: normal !important; /* NEVER bold - only size differentiates */
}
h2 { 
	font-size: 2em; 
	font-weight: normal !important; /* NEVER bold */
}
h3 { 
	font-size: 1.75em; 
	font-weight: normal !important; /* NEVER bold */
}
h4 { 
	font-size: 1.5em; 
	font-weight: normal !important; /* NEVER bold */
}
h5 { 
	font-size: 1.25em; 
	font-weight: normal !important; /* NEVER bold */
}
h6 { 
	font-size: 1.1em; 
	font-weight: normal !important; /* NEVER bold */
}

/* Title class - bigger than subtitle, but NEVER bold */
/* When [title] tag is used, it should render as h1 or h2, which are already styled above */
/* This .title class is for explicit title styling */
.title {
	font-size: 2em; /* Bigger than subtitle (1.25em) */
	font-weight: normal !important; /* NEVER bold - only size differentiates */
}

/* Title big - larger than normal title, but still NOT bold */
h1.title-big, h1[class*="big"] {
	font-size: 3.5em; /* Bigger than normal h1 */
	font-weight: normal !important; /* NEVER bold */
}

/* Buttons */
button, .button, input[type="button"], input[type="submit"] {
	font-family: sans-serif;
	font-size: 16px;
	padding: 7px 13px;
	border: 1px solid white;
	border-radius: 5px;
	background-color: rgba(0, 0, 0, 0.2);
	color: white;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

button:hover, .button:hover, input[type="button"]:hover, input[type="submit"]:hover {
	background-color: rgba(0, 0, 0, 0.8);
}

/* Menu Bar (Multiple buttons sharing a single bar) */
.menu-bar {
	display: flex;
	border: 1px solid white;
	border-radius: 5px;
	overflow: hidden;
	background-color: transparent;
}

.menu-bar button, .menu-bar .button, .menu-bar a {
	font-family: sans-serif;
	font-size: 16px;
	padding: 7px 13px;
	border: none;
	border-right: 1px solid #888;
	background-color: transparent;
	color: white;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.3s ease;
	flex: 1;
	text-align: center;
	white-space: nowrap; /* Prevent text wrapping */
}

.menu-bar button:last-child, .menu-bar .button:last-child, .menu-bar a:last-child {
	border-right: none;
}

.menu-bar button:hover, .menu-bar .button:hover, .menu-bar a:hover {
	background-color: rgba(0, 0, 0, 0.8);
}

.menu-bar a.active {
	background-color: rgba(0, 112, 255, 0.5); /* zone3 color with transparency */
	font-weight: bold;
}

/* Hamburger Menu (Mobile) */
.hamburger-menu {
	display: none;
}

.hamburger-icon {
	display: none;
	cursor: pointer;
	font-size: 24px;
	color: white;
	padding: 10px;
}

/* Images */
/* IMPORTANT: Images do NOT have drop-shadow by default - only when specifically requested */
img {
	border: 1px solid #ddd;
	border-radius: 5px;
	max-width: 100%;
	height: auto;
	filter: none !important; /* No drop-shadow on images unless explicitly added via inline style */
}

/* Links */
a {
	color: white;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

/* ============================================
   ZONE SYSTEM
   ============================================ */

/* Zone Container */
.zone {
	width: 100%;
	min-height: 400px;
	position: relative;
	border-top: 2px solid white;
	padding: 27px 0;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.zone:first-child {
	border-top: none;
}

/* Zone Background Colors */
.zone1 {
	background-color: #6AB0E0; /* Sky blue - pure blue, no green tint */
}

.zone2 {
	background-color: #73B69E; /* Richer, darker soft green - slightly greener and darker */
}

.zone3 {
	background-color: #0070FF; /* Darker azur blue */
}

.zone4 {
	background-color: #2D5016; /* Darker forest green */
}

/* Zone Background Images/Videos */
.zone video, .zone img.zone-background {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
}

.zone img.zone-background {
	display: none; /* Hidden until loaded */
	z-index: 0;
}

.zone img.zone-background.zone-image-active {
	display: block;
}

.zone video {
	display: none; /* Hidden until loaded and ready to play */
	z-index: 1; /* Video overlays image when playing */
}

.zone video.zone-video-active {
	display: block;
}

.zone > * {
	position: relative;
	z-index: 2; /* Content should be above video and image backgrounds */
}

/* Container for content within zones */
.zone-container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 13px;
}

/* ============================================
   ROW AND CELL SYSTEM
   ============================================ */

/* Row */
.row {
	display: flex;
	flex-wrap: nowrap; /* Prevent wrapping on desktop - cells stay side-by-side */
	margin: 13px 0;
	width: 100%;
}

/* Cells */
.cell1, .cell2, .cell3 {
	padding: 7px;
	box-sizing: border-box; /* Include padding in width calculation */
}

/* Desktop: Cells side by side */
/* Default: cell1 takes full width when alone */
.cell1 {
	flex: 1 1 100%; /* Default: full width */
	min-width: 0; /* Allow shrinking */
}

/* When cell2 exists in the same row, both cells share 50/50 */
.row > .cell1:not(:only-child),
.row > .cell2 {
	flex: 0 1 50%; /* Fixed 50% width, can shrink if needed */
	min-width: 0;
}

/* When cell3 exists, all three share 33.333% */
.row > .cell3 {
	flex: 0 1 33.333%; /* Fixed 33.333% width */
	min-width: 0;
}

/* When cell3 exists, adjust cell1 and cell2 to 33.333% */
.row:has(.cell3) > .cell1,
.row:has(.cell3) > .cell2 {
	flex: 0 1 33.333%;
}

/* Mobile: Cells stack vertically */
@media (max-width: 768px) {
	.row {
		flex-wrap: wrap; /* Allow wrapping on mobile */
	}
	
	.cell1, .cell2, .cell3 {
		flex: 1 1 100% !important; /* Override flex to force full width stacking */
		width: 100%;
	}
	
	.zone-container {
		width: 100%;
		padding: 0 7px;
	}
}

/* ============================================
   HEADER STRUCTURE
   ============================================ */

/* Header Banner */
.header-banner {
	width: 100%;
	background-color: #0070FF; /* zone3 color */
	text-align: center;
	padding: 13px 0;
	font-family: Georgia, "Times New Roman", Times, serif;
	font-weight: 400; /* Normal weight, not bold or heavy */
	font-size: 1.8em; /* Bigger than before */
	line-height: 1.4;
}

.header-banner,
.header-banner * {
	font-weight: 400 !important; /* Ensure no bold inheritance */
}

/* Header Bar */
.header-bar {
	width: 100%;
	background-color: #6AB0E0; /* zone1 color */
	padding: 10px 0;
}

.header-content {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 13px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 7px; /* Add gap between nav and right menus */
	min-width: 0; /* Allow shrinking */
}

.header-nav {
	display: flex;
	justify-content: flex-start;
	flex: 0 1 auto; /* Allow some flexibility */
	min-width: 0; /* Allow shrinking */
}

.header-right-menus {
	display: flex;
	flex-direction: row;
	gap: 7px;
	justify-content: flex-end;
	align-items: center;
	flex: 0 1 auto; /* Allow shrinking and growing */
	min-width: 0; /* Allow shrinking below content size if needed */
}

.login-menu, .member-menu {
	display: flex;
	flex-shrink: 0;
	min-width: 0; /* Allow shrinking if needed */
}

.member-menu .menu-bar {
	flex-wrap: nowrap; /* Prevent menu bar from wrapping */
	min-width: fit-content; /* Allow menu bar to expand to fit content */
}

.member-menu .menu-bar a:first-child {
	flex: 0 1 auto; /* Allow name to take natural width, can shrink if needed */
	white-space: nowrap; /* Keep name on one line */
	overflow: hidden;
	text-overflow: ellipsis; /* Show ellipsis if still too long */
	min-width: fit-content; /* At least fit the content */
}

.member-menu .menu-bar a:last-child {
	flex: 0 0 auto; /* Log out button keeps its natural width */
	white-space: nowrap;
}

.language-menu {
	display: flex;
	flex-shrink: 0;
}

/* Mobile Header */
@media (max-width: 768px) {
	.header-content {
		flex-direction: column;
		gap: 10px;
		padding: 0 7px;
	}
	
	.header-nav, .header-right-menus, .login-menu, .language-menu {
		display: none;
	}
	
	.hamburger-icon {
		display: block;
	}
	
	.hamburger-menu {
		display: block;
		width: 100%;
		background-color: rgba(0, 0, 0, 0.9);
		padding: 13px;
	}
	
	.hamburger-menu.active {
		display: block;
	}
	
	.hamburger-menu .menu-bar {
		flex-direction: column;
		border: none;
	}
	
	.hamburger-menu .menu-bar button,
	.hamburger-menu .menu-bar .button,
	.hamburger-menu .menu-bar a {
		border-right: none;
		border-bottom: 1px solid #888;
	}
	
	.hamburger-menu .menu-bar button:last-child,
	.hamburger-menu .menu-bar .button:last-child,
	.hamburger-menu .menu-bar a:last-child {
		border-bottom: none;
	}
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
	width: 100%;
	background-color: #6BB3D6; /* zone1 color - darker sky blue */
	padding: 20px 0;
	margin-top: 27px;
}

.footer-content {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 13px;
	text-align: center;
	font-size: 0.9em;
	color: white;
}

@media (max-width: 768px) {
	.footer-content {
		padding: 0 10px;
	}
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Text Formatting */
.center {
	text-align: center;
}

.bold {
	font-weight: bold;
}

/* Content Formatting */
[title] {
	font-weight: normal; /* Titles are never bold */
	font-size: 1.5em;
}

[subtitle] {
	font-weight: normal; /* Subtitles are never bold */
	font-size: 1.25em;
	margin-bottom: 0.25em; /* Reduced bottom margin by half */
}

[text] {
	font-weight: regular;
}

[center] {
	text-align: center;
}
