/*
	Theme Name: ADSDIGI
	Description: Themes hỗ trợ Genesis Theme v2.7.3 and Wordpress v5.0 trở lên
	Template: genesis
*/

/* CSS Variables
------------------------------------------------------------ */
:root {
	/* Font chữ - Tự động đồng bộ từ custom/functions.php và WEBSITE-STANDARDS.md */
	--font-main: 'Nunito Sans', sans-serif;
	--font-accent: 'Dancing Script', cursive;

	/* Bảng màu chuẩn - Tham chiếu từ WEBSITE-STANDARDS.md */
	--primary: #d92e36;
	--primary-gradient: linear-gradient(135deg, #d92e36, #111317);
	--accent: #111317;
	--text: #333333;
	--text-dark: #222222;
	--text-muted: #666666;
	--border: #dddddd;
	--bg-light: #f5f5f5;
}

/* Defaults
------------------------------------------------------------ */

/* Box-sizing Reset
------------------------------------------------------------ */
*,
*:before,
*:after {
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}

/* Base Body & Reset (Mức tối thiểu dùng chung)
------------------------------------------------------------ */
html {
	font-size: 16px;
	-webkit-text-size-adjust: 100%;
}

body {
	background-color: #ffffff;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
select,
textarea {
	color: var(--text, #333333);
	font-family: var(--font-main, Arial, sans-serif);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.6;
	margin: 0;
	padding: 0;
	text-decoration: none;
}

li,
ol,
ul {
	margin: 0;
	padding: 0;
}

ol li {
	list-style-type: decimal;
}

strong,
b {
	font-weight: 700;
}

/* Hyperlinks
------------------------------------------------------------ */
a,
a:visited {
	color: var(--primary, #0c3325);
	text-decoration: none;
	transition: color 0.2s ease;
}

a:hover {
	color: var(--accent, #efc00e);
	text-decoration: none;
}

a img {
	border: none;
}

/* Media Reset chống tràn layout
------------------------------------------------------------ */
img,
svg,
video,
iframe {
	max-width: 100%;
	height: auto;
	vertical-align: middle;
}

/* Selection Highlight
------------------------------------------------------------ */
::-moz-selection {
	background-color: var(--accent, #efc00e);
	color: #ffffff;
}

::selection {
	background-color: var(--accent, #efc00e);
	color: #ffffff;
}

/* Base Form Controls
------------------------------------------------------------ */
input,
label,
select,
textarea {
	color: var(--text-dark, #222222);
	font-family: var(--font-main, Arial, sans-serif);
	font-size: 16px;
	font-weight: 400;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="search"],
select,
textarea {
	background-color: #ffffff;
	border: 1px solid var(--border, #dddddd);
	border-radius: 4px;
	padding: 10px 14px;
	width: 100%;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
	border-color: var(--primary, #0c3325);
	box-shadow: 0 0 0 2px rgba(12, 51, 37, 0.12);
	outline: none;
}

/* Typography cho Bài viết & Tiêu đề trang
------------------------------------------------------------ */
.entry-title,
.page-title {
	color: var(--text-dark, #222);
	font-family: var(--font-main, 'Geist', Arial, sans-serif);
	font-size: 32px;
	font-weight: 700;
	line-height: 1.3;
	margin-bottom: 0.5em;
}

.entry-content h1 { font-size: 32px; font-weight: 700; line-height: 1.3; margin: 1em 0 0.5em; }
.entry-content h2 { font-size: 26px; font-weight: 700; line-height: 1.3; margin: 1em 0 0.5em; }
.entry-content h3 { font-size: 22px; font-weight: 600; line-height: 1.3; margin: 1em 0 0.5em; }
.entry-content h4 { font-size: 18px; font-weight: 600; line-height: 1.3; margin: 0.8em 0 0.4em; }
.entry-content h5, .entry-content h6 { font-size: 16px; font-weight: 600; line-height: 1.3; margin: 0.8em 0 0.4em; }
.entry-content p  { margin-bottom: 1.2em; }
.entry-content ul { padding-left: 20px; margin-bottom: 1.2em; list-style-type: disc; }
.entry-content ol { padding-left: 20px; margin-bottom: 1.2em; list-style-type: decimal; }
.entry-content li { margin-bottom: 0.4em; }

.site-container {
	margin: 0 auto;
	overflow-x: clip;
}

.wrap {
	margin: 0 auto;
	max-width: 1200px;
}

.clear:before,
.clear:after,
.wrap:before,
.wrap:after {
	content: " ";
	display: table;
}

.clear:after,
.wrap:after {
	clear: both;
}

/* Genesis Layout Engine
------------------------------------------------------------ */
.content-sidebar-wrap {
	float: left;
	width: 100%;
}

.content-sidebar .content-sidebar-wrap,
.full-width-content .content-sidebar-wrap,
.sidebar-content .content-sidebar-wrap {
	width: 100%;
}

.sidebar-content-sidebar .content-sidebar-wrap,
.sidebar-sidebar-content .content-sidebar-wrap {
	float: right;
}

/* Content */
.content {
	float: left;
	padding: 0;
	width: 100%;
}

.content-sidebar .content,
.sidebar-content .content {
	width: calc(100% - 340px);
}

.sidebar-content .content,
.sidebar-sidebar-content .content {
	float: right;
}

.full-width-content .content {
	width: 100%;
	float: none;
}

/* Sidebars */
.sidebar {
	display: inline;
	float: right;
	width: 320px;
}

.sidebar-primary {
	float: right;
}

.sidebar-secondary {
	float: left;
	width: 180px;
}

.sidebar-content .sidebar-primary,
.sidebar-sidebar-content .sidebar-primary {
	float: left;
}

.content-sidebar-sidebar .sidebar-secondary {
	float: right;
}

/* WordPress Core Alignment Classes
------------------------------------------------------------ */
.alignleft {
	float: left;
	margin: 0.5em 1.5em 1em 0;
}

.alignright {
	float: right;
	margin: 0.5em 0 1em 1.5em;
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.alignnone {
	margin: 0.5em 1em 1em 0;
}

.wp-caption {
	max-width: 100%;
	margin-bottom: 1.5em;
	text-align: center;
}

.wp-caption img {
	display: block;
	margin: 0 auto;
	max-width: 100%;
	height: auto;
}

.wp-caption-text {
	font-size: 0.875rem;
	line-height: 1.4;
	color: var(--text-muted, #666666);
	margin-top: 0.5em;
}

/* Pagination & Breadcrumb
------------------------------------------------------------ */
.archive-pagination,
.pagination {
	clear: both;
	margin: 2em 0;
	text-align: center;
}

.pagination ul {
	display: inline-block;
	padding: 0;
	margin: 0;
	list-style: none;
}

.pagination li {
	display: inline-block;
	margin: 0 4px;
}

.pagination li a,
.pagination li.active a {
	display: inline-block;
	padding: 8px 14px;
	border: 1px solid var(--border, #dddddd);
	border-radius: 4px;
	text-decoration: none;
	color: var(--text-dark, #222222);
}

.pagination li.active a,
.pagination li a:hover {
	background-color: var(--primary, #0c3325);
	color: #ffffff;
	border-color: var(--primary, #0c3325);
}

/* Accessibility / Screen Reader
------------------------------------------------------------ */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus,
.genesis-skip-link:focus {
	clip: auto !important;
	clip-path: none;
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	height: auto;
	left: 8px;
	top: 8px;
	padding: 12px 20px;
	position: absolute;
	text-decoration: none;
	width: auto;
	z-index: 100000;
	background: #ffffff;
	color: var(--primary, #0c3325);
	border: 2px solid var(--primary, #0c3325);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Genesis Title Toggle Support (Genesis 3.1+)
------------------------------------------------------------ */
.genesis-title-hidden .entry-title,
.genesis-title-hidden .page-title {
	display: none;
}

/* Gutenberg Block Alignments (Wide & Full)
------------------------------------------------------------ */
.alignwide {
	margin-left: -40px;
	margin-right: -40px;
	max-width: unset;
}

.alignfull {
	margin-left: calc(-100vw / 2 + 100% / 2);
	margin-right: calc(-100vw / 2 + 100% / 2);
	max-width: 100vw;
	width: 100vw;
}

/* Sticky Header Wrapper & Site Header
------------------------------------------------------------ */
.sticky-header-wrapper {
	position: relative;
	z-index: 1000;
}

.site-header {
	background-color: #ffffff;
	width: 100%;
	position: relative;
	z-index: 1000;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
	min-height: 90px;
	transition: min-height 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header .wrap {
	display: flex;
	justify-content: space-between;
	align-items: center;
	min-height: 90px;
	transition: min-height 0.3s ease;
}

/* Khu vực Logo & Tiêu đề */
.site-header .title-area {
	display: flex;
	align-items: center;
	padding: 0;
	margin: 0;
	width: auto;
}

.site-header .site-title {
	margin: 0;
	padding: 0;
	line-height: 1;
	font-size: 24px;
	font-weight: 700;
}

.site-header .site-title a,
.site-header .site-title a:hover {
	display: inline-flex;
	align-items: center;
	background: none;
	text-decoration: none;
	text-indent: 0;
	color: var(--primary, #0b2e64);
}

/* Chuẩn hóa ảnh Logo từ caia-settings-logo */
.site-header .site-title img,
.site-header .title-area img {
	max-height: 70px;
	width: auto;
	max-width: 260px;
	object-fit: contain;
	display: block;
	transition: max-height 0.3s ease;
}

.site-header .site-description {
	display: none;
}

/* Khu vực Widget bên phải Header (ô tìm kiếm, hotline...) */
.site-header .header-widget-area {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 16px;
	margin-left: auto;
}

/* Header Search Widget (Chuẩn dùng chung)
------------------------------------------------------------ */
.site-header .widget_search,
.site-header .widget-search {
	position: relative;
	width: 100%;
	max-width: 280px;
	margin: 0;
}

.site-header .search-form {
	display: flex;
	align-items: center;
	position: relative;
	width: 100%;
	max-width: 280px;
	margin: 0;
}

.site-header .search-form-input {
	height: 42px;
	width: 100%;
	padding: 0 46px 0 16px;
	font-family: var(--font-main);
	font-size: 16px;
	color: var(--text-dark, #222);
	background-color: #f7faf8;
	border: 1px solid var(--border, #dddddd);
	border-radius: 22px;
	outline: none;
	transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header .search-form-input:focus {
	background-color: #ffffff;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(12, 51, 37, 0.12);
}

.site-header .search-form-submit {
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	width: 34px;
	height: 34px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background-color: var(--primary);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='16' height='16' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	font-size: 0;
	color: transparent;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

/* Header Nav Menu Widget (Khi kéo Menu vào Header Right)
------------------------------------------------------------ */
.site-header .widget_nav_menu {
	margin: 0;
	padding: 0;
}

.site-header .widget_nav_menu .widget-wrap,
.site-header .nav-header {
	display: flex;
	align-items: center;
}

.site-header .nav-header ul.genesis-nav-menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
	background: transparent;
	gap: 50px;
}

.site-header .nav-header ul.genesis-nav-menu > li {
	position: relative;
	list-style: none;
	margin: 0;
	padding-bottom: 16px;
	margin-bottom: -16px;
}

/* Chữ cấp 1 trong Header: Tự nhiên, không in hoa, gạch chân màu accent */
.site-header .nav-header ul.genesis-nav-menu > li > a {
	color: var(--primary, #0c3325);
	display: inline-flex;
	align-items: center;
	padding: 10px 0;
	min-height: auto;
	font-size: 16px;
	font-weight: 600;
	text-transform: none;
	text-decoration: none;
	background: transparent;
	border-bottom: 2px solid transparent;
	transition: color 0.2s ease, border-color 0.2s ease;
}

/* Hover & Active: Đổi màu chữ sang accent và hiện gạch chân thanh mảnh */
.site-header .nav-header ul.genesis-nav-menu > li:hover > a,
.site-header .nav-header ul.genesis-nav-menu > li.current-menu-item > a,
.site-header .nav-header ul.genesis-nav-menu > li.current_page_item > a {
	color: var(--accent, #efc00e);
	border-bottom-color: var(--accent, #efc00e);
	background-color: transparent;
}

/* Mũi tên chỉ mục có menu con trong Header */
.site-header .nav-header li.menu-item-has-children > a::after {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	margin-left: 8px;
	margin-bottom: 2px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
}

/* Sub-menu trong Header (Bo tròn mềm mại 12px, nền trắng thanh thoát) */
.site-header .nav-header .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 180px;
	background: #ffffff;
	border: 1px solid rgba(12, 51, 37, 0.08);
	border-radius: 12px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
	list-style: none;
	margin: 0;
	padding: 6px 0;
	z-index: 99999;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* Cầu nối trong suốt phủ rộng chống đứt quãng hover khi rê chuột vào menu con */
.site-header .nav-header .sub-menu::before {
	content: "";
	position: absolute;
	top: -25px;
	left: -25px;
	right: -25px;
	height: 30px;
	display: block;
	background: transparent;
}

/* Hiển thị sub-menu khi hover vào li cha hoặc chính sub-menu */
.site-header .nav-header li.menu-item-has-children:hover > .sub-menu,
.site-header .nav-header li.menu-item-has-children:focus-within > .sub-menu,
.site-header .nav-header .sub-menu:hover {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* Từng mục con trong Sub-menu Header */
.site-header .nav-header .sub-menu li {
	position: relative;
	list-style: none;
	width: 100%;
	margin: 0;
	padding: 0;
	border-bottom: 1px solid #f2f4f2;
}

.site-header .nav-header .sub-menu li:last-child {
	border-bottom: none;
}

.site-header .nav-header .sub-menu li a {
	display: block;
	padding: 12px 22px;
	color: var(--primary, #0c3325);
	font-size: 16px;
	font-weight: 500;
	text-transform: none;
	text-decoration: none;
	background-color: transparent;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.site-header .nav-header .sub-menu li a:hover {
	background-color: rgba(12, 51, 37, 0.05);
	color: var(--primary, #0c3325);
}

/* Sub-menu cấp 3 (nếu có) */
.site-header .nav-header .sub-menu .sub-menu {
	top: 0;
	left: 100%;
	margin-top: -6px;
}

/* Hiệu ứng thu gọn khi cuộn trang */
body.is-scrolled .site-header {
	min-height: 60px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
	border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.is-scrolled .site-header .wrap {
	min-height: 60px;
}

body.is-scrolled .site-header .site-title img,
body.is-scrolled .site-header .title-area img {
	max-height: 48px;
}

/* Navigation Menu
------------------------------------------------------------ */
.nav-primary {
	width: 100%;
	min-height: 50px;
	background: var(--primary-gradient, var(--primary));
	position: relative;
	z-index: 990;
}

.nav-primary .wrap {
	position: relative;
}

.nav-primary .genesis-nav-menu,
.menu-primary,
.menu-secondary {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nav-primary .genesis-nav-menu > li,
.menu-primary > li,
.menu-secondary > li {
	position: relative;
	list-style: none;
	margin-right: 2px;
}

.nav-primary .genesis-nav-menu > li > a,
.menu-primary > li > a,
.menu-secondary > li > a {
	color: #ffffff;
	display: flex;
	align-items: center;
	padding: 0 25px;
	min-height: 50px;
	font-size: 16px;
	font-weight: 600;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-primary .genesis-nav-menu > li:hover > a,
.nav-primary .genesis-nav-menu > li.current-menu-item > a,
.menu-primary > li:hover > a,
.menu-primary > li.current-menu-item > a,
.menu-primary > li.current_page_item > a {
	background-color: rgba(0, 0, 0, 0.18);
	color: var(--accent, #efc00e);
}

/* Mũi tên chỉ mục có menu con trong nav-primary */
.nav-primary .genesis-nav-menu li.menu-item-has-children > a::after,
.menu-primary li.menu-item-has-children > a::after {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	margin-left: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
}

/* ============================================================
   SUB-MENU CẤP 2 (ĐỒNG BỘ MÀU CHỦ ĐẠO & ĐIỂM NHẤN)
   ============================================================ */
.nav-primary .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 230px;
	background: var(--primary, #0c3325);
	border-top: 2px solid var(--accent, #efc00e);
	border-radius: 0 0 6px 6px;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
	list-style: none;
	margin: 0;
	padding: 4px 0;
	z-index: 9999;
}

/* Cầu nối trong suốt chống mất hover khi rê chuột xuống menu con */
.nav-primary .sub-menu::before {
	content: "";
	position: absolute;
	top: -8px;
	left: 0;
	width: 100%;
	height: 8px;
}

/* Hiển thị menu con khi hover */
.nav-primary li.menu-item-has-children:hover > .sub-menu,
.nav-primary li.menu-item-has-children:focus-within > .sub-menu {
	display: block;
	animation: navSubMenuFade 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes navSubMenuFade {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Từng mục con trong Sub-menu */
.nav-primary .sub-menu li {
	position: relative;
	list-style: none;
	width: 100%;
	margin: 0;
	padding: 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-primary .sub-menu li:last-child {
	border-bottom: none;
}

.nav-primary .sub-menu li a {
	display: block;
	padding: 7px 20px;
	color: #ffffff;
	font-size: 16px;
	font-weight: 500;
	text-transform: none;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.nav-primary .sub-menu li a:hover {
	background-color: rgba(0, 0, 0, 0.2);
	color: var(--accent, #efc00e);
	padding-left: 25px;
}

/* Sub-menu cấp 3 (nếu có) */
.nav-primary .sub-menu .sub-menu {
	top: 0;
	left: 100%;
	border-top: none;
	border-left: 3px solid var(--accent, #efc00e);
	border-radius: 0 6px 6px 0;
}

.nav-primary .sub-menu li.menu-item-has-children > a::after {
	transform: rotate(-45deg);
	float: right;
	margin-top: 6px;
}

/* Nút mở Menu Mobile (#click-menu)
------------------------------------------------------------ */
#click-menu {
	top: 22px;
	right: 15px;
}

.logged-in #click-menu {
	top: calc(22px + 46px);
}

#click-menu .line,
.click-menu .line {
	background-color: var(--primary, #0c3325);
	border-radius: 3px;
	width: 28px;
}

/* ============================================================
   RESPONSIVE MEDIA QUERIES (CHUẨN AGENTS.MD: TỪ LỚN XUỐNG NHỎ)
   ============================================================ */

/* 1. Breakpoint 960px */
@media (max-width: 960px) {
	/* Genesis Content & Sidebar layout */
	.content-sidebar .content,
	.sidebar-content .content,
	.sidebar-sidebar-content .content,
	.content,
	.sidebar,
	.sidebar-primary,
	.sidebar-secondary {
		float: none;
		width: 100%;
		margin-left: 0;
		margin-right: 0;
	}

	/* Ẩn widget nav_menu trong Header ở màn <=960px */
	.site-header .widget_nav_menu {
		display: none;
	}
}

/* 2. Breakpoint 768px (Mobile) */
@media (max-width: 768px) {
	/* Header & Logo Mobile */
	.site-header {
		min-height: 65px;
	}

	.site-header .wrap {
		min-height: 65px;
		justify-content: flex-start;
		padding: 0 15px;
	}

	.site-header .title-area {
		margin: 0;
		text-align: left;
	}

	.site-header .site-title img,
	.site-header .title-area img {
		max-height: 45px;
		max-width: 180px;
	}

	/* Ẩn toàn bộ khu vực Header Widget Area (ô tìm kiếm, menu phụ...) trên mobile */
	.site-header .header-widget-area {
		display: none;
	}
}
