/*
 * Global Stylesheet for Homie9.vn
 * Mobile-First Responsive Design | Max-Width: 1400px | Glassmorphism Header
 */

:root {
	--navy-dark: #0a192f;
	--navy-primary: #0f2137;
	--navy-card: #142a45;
	--gold-primary: #d4af37;
	--gold-hover: #f3cf65;
	--gold-dark: #b38f24;
	--white: #ffffff;
	--light-bg: #f8fafc;
	--card-bg: #ffffff;
	--border-color: #e2e8f0;
	--text-main: #334155;
	--text-muted: #64748b;
	--text-heading: #0a192f;
	--radius-sm: 6px;
	--radius-md: 10px;
	--radius-lg: 16px;
	--shadow-sm: 0 2px 6px rgba(0,0,0,0.06);
	--shadow-md: 0 6px 18px rgba(0,0,0,0.08);
	--shadow-hover: 0 12px 30px rgba(10, 25, 47, 0.15);
	--transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: var(--text-main);
	background-color: var(--light-bg);
	line-height: 1.6;
	font-size: 15px;
	overflow-x: hidden;
}

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

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

/* Container: max-width 1400px on Laptop/Desktop, Auto on Mobile */
.homie9-container {
	width: 100%;
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 20px;
}

@media (min-width: 1600px) {
	.homie9-container {
		max-width: 1440px;
	}
}

@media (max-width: 768px) {
	.homie9-container {
		padding: 0 16px;
	}
}

/* ==================== 0. BRAND H1 (SEO STRUCTURE) ==================== */
.homie9-brand-h1 {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* ==================== 1. PRELOADER SCREEN ==================== */
#homie9-preloader {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: #ffffff;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.8s ease;
}

#homie9-preloader.preloader-hidden {
	transform: translateY(-100%);
	opacity: 0;
	pointer-events: none;
}

.preloader-content {
	text-align: center;
	max-width: 500px;
	width: 85vw;
	display: flex;
	flex-direction: column;
	align-items: center;
	animation: preloaderPulse 1.8s ease-in-out infinite;
}

.preloader-logo {
	max-width: 100%;
	width: 100%;
	height: auto;
	margin-bottom: 20px;
}

.preloader-spinner-bar {
	width: 100%;
	height: 3px;
	background: #e2e8f0;
	border-radius: 4px;
	overflow: hidden;
	position: relative;
}

.preloader-spinner-bar::after {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, #00d2ff 0%, #ffd700 70%, #d4af37 100%);
	box-shadow: 0 0 10px rgba(212, 175, 55, 0.8);
	animation: preloaderLoading 1.6s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes preloaderPulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.03); }
}

@keyframes preloaderLoading {
	0% { left: -100%; }
	100% { left: 100%; }
}

/* ==================== 2. HEADER OVERLAY SECTION 1 ==================== */
.site-header-glass {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 1000;
	background: transparent;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	border-bottom: none;
	transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header-glass.header-scrolled {
	position: fixed;
	background: rgba(10, 25, 47, 0.96);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
	border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

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

/* Logo */
.site-branding {
	display: flex;
	align-items: center;
}

.homie9-header-logo {
	height: 60px;
	width: auto;
	object-fit: contain;
	transition: var(--transition);
}

.homie9-header-logo:hover {
	transform: scale(1.02);
}

/* Main Nav - Aligned to Right */
.main-navigation.nav-align-right {
	margin-left: auto;
}

.homie9-menu-list {
	display: flex;
	align-items: center;
	list-style: none;
	gap: 22px;
}

.homie9-menu-list li a {
	color: var(--white);
	font-weight: 400;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	padding: 10px 0;
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 3px;
	transition: color 0.25s ease, text-shadow 0.25s ease;
}

.homie9-menu-list li a:hover,
.homie9-menu-list li.current-menu-item a {
	color: var(--gold-primary);
	text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.homie9-menu-list li a::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0%;
	height: 2px;
	background: var(--gold-primary);
	transition: width 0.25s ease;
}

.homie9-menu-list li a:hover::after,
.homie9-menu-list li.current-menu-item a::after {
	width: 100%;
}

.dropdown-arrow {
	font-size: 10px;
	opacity: 0.8;
}

/* ==================== 3. MEGA MENU "DỰ ÁN" ==================== */
.menu-item-mega {
	position: static !important;
}

.homie9-mega-menu {
	position: absolute;
	top: 100%;
	left: 0;
	width: 100%;
	background: rgba(10, 25, 47, 0.96);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	border-bottom: 2px solid var(--gold-primary);
	padding: 24px 0 20px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0.3s;
	pointer-events: none;
}

.menu-item-mega.is-active .homie9-mega-menu,
.menu-item-mega:hover .homie9-mega-menu,
.homie9-mega-menu.is-hovered {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	pointer-events: auto;
	transition-delay: 0s;
}

.mega-menu-inner {
	width: 100%;
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 20px;
}

.mega-menu-projects-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 22px;
}

.mega-project-card {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	transition: var(--transition);
}

.mega-proj-img-wrap {
	position: relative;
	width: 100%;
	height: 200px;
	border-radius: var(--radius-sm);
	overflow: hidden;
	background: var(--navy-card);
	border: 1px solid rgba(255, 255, 255, 0.12);
}

.mega-proj-img {
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
	transition: transform 0.45s ease;
}

.mega-project-card:hover .mega-proj-img {
	transform: scale(1.05);
}

/* 4-Edge Neon Line Animations: Blue Navy (#00d2ff, #0099ff) + Golden (#ffd700, #d4af37) */
.neon-line {
	position: absolute;
	pointer-events: none;
	z-index: 2;
}

/* 1. Cạnh trên: Chạy từ phải sang trái */
.neon-line-top {
	top: 0;
	right: 0;
	width: 0;
	height: 2px;
	background: linear-gradient(270deg, #00d2ff 0%, #ffd700 70%, #d4af37 100%);
	box-shadow: 0 0 10px #00d2ff, 0 0 18px rgba(212, 175, 55, 0.9);
	transition: width 0.35s ease-out;
}

/* 2. Cạnh phải: Chạy từ trên xuống dưới */
.neon-line-right {
	top: 0;
	right: 0;
	width: 2px;
	height: 0;
	background: linear-gradient(180deg, #00d2ff 0%, #ffd700 70%, #d4af37 100%);
	box-shadow: 0 0 10px #00d2ff, 0 0 18px rgba(212, 175, 55, 0.9);
	transition: height 0.35s ease-out;
}

/* 3. Cạnh dưới: Chạy từ trái sang phải */
.neon-line-bottom {
	bottom: 0;
	left: 0;
	width: 0;
	height: 2px;
	background: linear-gradient(90deg, #00d2ff 0%, #ffd700 70%, #d4af37 100%);
	box-shadow: 0 0 10px #00d2ff, 0 0 18px rgba(212, 175, 55, 0.9);
	transition: width 0.35s ease-out;
}

/* 4. Cạnh trái: Chạy từ dưới lên trên */
.neon-line-left {
	bottom: 0;
	left: 0;
	width: 2px;
	height: 0;
	background: linear-gradient(0deg, #00d2ff 0%, #ffd700 70%, #d4af37 100%);
	box-shadow: 0 0 10px #00d2ff, 0 0 18px rgba(212, 175, 55, 0.9);
	transition: height 0.35s ease-out;
}

/* Khi hover vào card hoặc khi active */
.mega-project-card:hover .neon-line-top,
.mega-project-card:hover .neon-line-bottom,
.hero-card-nav-item:hover .neon-line-top,
.hero-card-nav-item:hover .neon-line-bottom,
.hero-card-nav-item.is-active .neon-line-top,
.hero-card-nav-item.is-active .neon-line-bottom {
	width: 100%;
}

.mega-project-card:hover .neon-line-right,
.mega-project-card:hover .neon-line-left,
.hero-card-nav-item:hover .neon-line-right,
.hero-card-nav-item:hover .neon-line-left,
.hero-card-nav-item.is-active .neon-line-right,
.hero-card-nav-item.is-active .neon-line-left {
	height: 100%;
}

/* Tên dự án nằm bên dưới ảnh */
.mega-proj-info {
	padding: 10px 4px 0;
	text-align: center;
}

.mega-proj-title {
	color: #ffffff;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: color 0.25s ease, text-shadow 0.25s ease;
}

.mega-project-card:hover .mega-proj-title {
	color: var(--gold-primary);
	text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* Nút XEM TẤT CẢ DỰ ÁN góc phải bên dưới khung dự án */
.mega-menu-footer-bar {
	display: flex;
	justify-content: flex-end;
	margin-top: 18px;
	padding-top: 6px;
}

.view-all-projects-link {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	color: var(--gold-primary);
	font-size: 12px;
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	transition: color 0.25s ease;
}

.view-all-projects-link:hover {
	color: #ffffff;
}

.custom-long-arrow {
	display: inline-flex;
	align-items: center;
	transition: transform 0.25s ease;
}

.custom-long-arrow svg {
	display: block;
	width: 50px;
	height: 8px;
}

.view-all-projects-link:hover .custom-long-arrow {
	transform: translateX(5px);
}

/* ==================== 4. FOOTER ==================== */
.site-footer {
	background: var(--navy-dark);
	color: #94a3b8;
	padding-top: 55px;
	margin-top: 60px;
	border-top: 3px solid var(--gold-primary);
}

.footer-widgets-grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1.5fr;
	gap: 40px;
	padding-bottom: 40px;
}

.footer-logo-wrap {
	margin-bottom: 12px;
}

.footer-logo-img {
	max-height: 48px;
	width: auto;
}

.footer-tagline {
	font-size: 13px;
	color: #e2e8f0;
	margin: 8px 0 12px;
	font-weight: 600;
}

.footer-company-desc {
	font-size: 13px;
	color: #94a3b8;
	line-height: 1.5;
}

.footer-widget-title {
	color: #ffffff;
	font-size: 16px;
	font-weight: 700;
	margin-bottom: 18px;
	border-left: 3px solid var(--gold-primary);
	padding-left: 10px;
}

.footer-links, .footer-contact-list {
	list-style: none;
}

.footer-links li, .footer-contact-list li {
	margin-bottom: 10px;
	font-size: 14px;
}

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

.footer-bottom-bar {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding: 20px 0;
	text-align: center;
	font-size: 13px;
}

/* Floating Actions */
.homie9-floating-actions {
	position: fixed;
	bottom: 25px;
	right: 25px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	z-index: 9999;
}

.btn-floating {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 15px rgba(0,0,0,0.25);
	font-size: 22px;
	position: relative;
	transition: transform 0.2s;
}

.btn-floating:hover {
	transform: scale(1.1);
}

.btn-floating.btn-zalo { background: #0068ff; color: #fff; }
.btn-floating.btn-call { background: #e11d48; color: #fff; }

/* Mobile Hamburger Button (Ẩn trên Desktop, 3 gạch trên Mobile) */
.menu-toggle {
	display: none !important;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 6px;
	z-index: 1001;
}

.menu-toggle span {
	display: block;
	width: 24px;
	height: 2px;
	background: #ffffff;
	margin: 5px 0;
	border-radius: 2px;
	transition: var(--transition);
}

.menu-toggle:hover span {
	background: var(--gold-primary);
}

/* ==================== 5. FULLSCREEN FLOATING MOBILE NAVIGATION ==================== */
.mobile-menu-fullscreen {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: #0a192f;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	padding: 70px 20px 50px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.35s ease, visibility 0.35s ease;
}

.mobile-menu-fullscreen.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.mobile-menu-close-btn {
	position: fixed;
	top: 18px;
	right: 20px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid var(--gold-primary);
	color: var(--gold-primary);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	font-size: 20px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 1000000;
	transition: var(--transition);
}

.mobile-menu-close-btn:hover {
	background: var(--gold-primary);
	color: #0a192f;
	transform: rotate(90deg);
}

.mobile-menu-inner-wrap {
	width: 100%;
	max-width: 420px;
	margin: auto 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.mobile-nav-list {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	gap: 10px;
	list-style: none;
	text-align: center;
}

.mobile-nav-item {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.mobile-nav-item a {
	color: var(--gold-primary);
	font-size: 15px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	padding: 8px 16px;
	display: inline-block;
	transition: color 0.25s ease, text-shadow 0.25s ease;
}

.mobile-nav-item a:hover {
	color: #ffffff;
	text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

/* Mobile Projects Section in Fullscreen Navigation */
.mobile-nav-projects-block {
	width: 100%;
	margin: 10px 0;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(212, 175, 55, 0.25);
	border-radius: var(--radius-md);
	padding: 14px 12px;
}

.mobile-proj-header-link {
	font-size: 14px !important;
	font-weight: 800 !important;
	color: #ffd700 !important;
	border-bottom: 1px solid rgba(212, 175, 55, 0.3);
	padding-bottom: 8px !important;
	margin-bottom: 12px !important;
	width: 100%;
	display: block;
}

.mobile-projects-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
}

.mobile-project-row {
	display: flex;
	flex-direction: column;
	background: rgba(10, 25, 47, 0.8);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: var(--radius-sm);
	overflow: hidden;
	text-decoration: none;
	transition: all 0.25s ease;
}

.mobile-project-row:hover {
	border-color: var(--gold-primary);
	transform: translateY(-2px);
	box-shadow: 0 4px 14px rgba(212, 175, 55, 0.25);
}

.mob-proj-img {
	width: 100%;
	height: 100px;
	background-size: cover;
	background-position: center;
}

.mob-proj-name {
	padding: 8px 10px;
	color: #ffffff;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	background: rgba(15, 33, 55, 0.95);
	text-align: center;
	transition: color 0.25s ease;
}

.mobile-project-row:hover .mob-proj-name {
	color: var(--gold-primary);
}

/* ==================== 6. RESPONSIVE MEDIA QUERIES ==================== */
@media (max-width: 991px) {
	.header-inner {
		height: 70px;
		min-height: 70px;
	}

	.homie9-header-logo {
		height: 48px;
	}

	.footer-widgets-grid {
		grid-template-columns: 1fr;
	}

	/* Hide desktop menu on mobile, rely on fullscreen mobile overlay */
	.main-navigation.nav-align-right .homie9-menu-list {
		display: none;
	}

	.menu-toggle {
		display: block !important;
	}
}

@media (max-width: 576px) {
	.homie9-header-logo {
		height: 42px;
	}
}
