forked from UKSOURCE/hailearning.edu.vn
272 lines
6.1 KiB
CSS
272 lines
6.1 KiB
CSS
/* ========================================
|
|
HEADER RESPONSIVE FIXES
|
|
Additional responsive adjustments for header
|
|
======================================== */
|
|
|
|
/* ========================================
|
|
MOBILE & TABLET (max-width: 991px)
|
|
======================================== */
|
|
|
|
@media (max-width: 991px) {
|
|
/* Ensure header is always visible and sticky */
|
|
#header-sticky {
|
|
position: sticky !important;
|
|
top: 0;
|
|
z-index: 999;
|
|
background-color: var(--white);
|
|
}
|
|
|
|
/* Add shadow when scrolled */
|
|
#header-sticky.sticky {
|
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
/* Header container adjustments */
|
|
.header-1 .container-fluid {
|
|
padding-left: 20px;
|
|
padding-right: 20px;
|
|
}
|
|
|
|
/* Header main layout */
|
|
.header-1 .header-main {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 12px 0;
|
|
min-height: 60px;
|
|
}
|
|
|
|
/* Logo section */
|
|
.header-1 .header-left {
|
|
flex: 0 0 auto;
|
|
}
|
|
|
|
.header-1 .header-left .logo {
|
|
margin: 0;
|
|
}
|
|
|
|
.header-1 .header-left .logo img {
|
|
max-height: 40px;
|
|
height: 40px;
|
|
width: auto;
|
|
object-fit: contain;
|
|
}
|
|
|
|
/* Right section with icons */
|
|
.header-1 .header-right {
|
|
flex: 0 0 auto;
|
|
margin-top: 0 !important;
|
|
}
|
|
|
|
.header-1 .header-right .header-call-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
}
|
|
|
|
/* Search icon mobile styling */
|
|
.header-1 .header-right .main-header__search {
|
|
width: 40px;
|
|
height: 40px;
|
|
border: 2px solid var(--theme);
|
|
border-radius: 50%;
|
|
background: transparent;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 0;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.header-1 .header-right .main-header__search i {
|
|
font-size: 16px;
|
|
color: var(--theme);
|
|
transition: color 0.3s ease;
|
|
}
|
|
|
|
.header-1 .header-right .main-header__search:hover {
|
|
background-color: var(--theme);
|
|
}
|
|
|
|
.header-1 .header-right .main-header__search:hover i {
|
|
color: var(--white);
|
|
}
|
|
|
|
/* Hamburger icon mobile styling */
|
|
.header-1 .header__hamburger {
|
|
margin: 0;
|
|
}
|
|
|
|
.header-1 .header__hamburger .sidebar__toggle {
|
|
font-size: 24px;
|
|
color: var(--header);
|
|
padding: 8px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: color 0.3s ease;
|
|
}
|
|
|
|
.header-1 .header__hamburger .sidebar__toggle:hover {
|
|
color: var(--theme);
|
|
}
|
|
|
|
/* Ensure icons don't stick to edges */
|
|
.header-1 .header-right .header-call-item > * {
|
|
flex-shrink: 0;
|
|
}
|
|
}
|
|
|
|
/* ========================================
|
|
SMALL MOBILE (max-width: 480px)
|
|
======================================== */
|
|
|
|
@media (max-width: 480px) {
|
|
.header-1 .container-fluid {
|
|
padding-left: 15px;
|
|
padding-right: 15px;
|
|
}
|
|
|
|
.header-1 .header-main {
|
|
padding: 10px 0;
|
|
min-height: 55px;
|
|
}
|
|
|
|
.header-1 .header-left .logo img {
|
|
max-height: 35px;
|
|
height: 35px;
|
|
}
|
|
|
|
.header-1 .header-right .header-call-item {
|
|
gap: 10px;
|
|
}
|
|
|
|
.header-1 .header-right .main-header__search {
|
|
width: 38px;
|
|
height: 38px;
|
|
}
|
|
|
|
.header-1 .header-right .main-header__search i {
|
|
font-size: 15px;
|
|
}
|
|
|
|
.header-1 .header__hamburger .sidebar__toggle {
|
|
font-size: 22px;
|
|
padding: 6px;
|
|
}
|
|
}
|
|
|
|
/* ========================================
|
|
DESKTOP (min-width: 992px)
|
|
======================================== */
|
|
|
|
@media (min-width: 992px) {
|
|
/* Ensure desktop layout is not affected */
|
|
.header-1 .header-main {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
/* Desktop menu visible */
|
|
.header-1 .mean__menu-wrapper {
|
|
display: block;
|
|
}
|
|
|
|
/* Desktop button visible */
|
|
/* .header-1 .header-right .theme-btn {
|
|
display: inline-flex;
|
|
} */
|
|
|
|
/* Ensure proper desktop search icon */
|
|
.header-1 .header-right .main-header__search {
|
|
width: 40px;
|
|
height: 40px;
|
|
border-radius: 50%;
|
|
background-color: var(--bg);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
}
|
|
|
|
/* ========================================
|
|
PREVENT LAYOUT SHIFT ON LOAD
|
|
======================================== */
|
|
|
|
.header-1 {
|
|
transition: none;
|
|
}
|
|
|
|
.header-1.sticky {
|
|
transition: box-shadow 0.3s ease;
|
|
}
|
|
|
|
/* ========================================
|
|
Z-INDEX MANAGEMENT
|
|
======================================== */
|
|
|
|
.header-1 {
|
|
z-index: 999;
|
|
}
|
|
|
|
.mobile-slide-menu {
|
|
z-index: 99999;
|
|
}
|
|
|
|
.mobile-menu-overlay {
|
|
z-index: 99998;
|
|
}
|
|
|
|
.offcanvas__info {
|
|
z-index: 9999999;
|
|
}
|
|
|
|
.offcanvas__overlay {
|
|
z-index: 900;
|
|
}
|
|
|
|
/* ========================================
|
|
ACCESSIBILITY IMPROVEMENTS
|
|
======================================== */
|
|
|
|
@media (max-width: 991px) {
|
|
/* Focus states for mobile */
|
|
.mobile-search-icon:focus,
|
|
.mobile-hamburger .sidebar__toggle:focus {
|
|
outline: 2px solid var(--theme);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
/* Touch target sizes */
|
|
.mobile-search-icon,
|
|
.mobile-hamburger .sidebar__toggle {
|
|
min-width: 44px;
|
|
min-height: 44px;
|
|
}
|
|
}
|
|
|
|
/* ========================================
|
|
HIDE OFFCANVAS ON MOBILE (Prevent Menu Overlap)
|
|
======================================== */
|
|
|
|
@media (max-width: 991px) {
|
|
/* Hide the old offcanvas menu on mobile - only use new mobile menu */
|
|
.offcanvas__info,
|
|
.offcanvas__overlay {
|
|
display: none !important;
|
|
visibility: hidden !important;
|
|
pointer-events: none !important;
|
|
}
|
|
}
|
|
|
|
@media (min-width: 992px) {
|
|
/* Hide mobile menu on desktop - only use offcanvas */
|
|
.mobile-slide-menu,
|
|
.mobile-menu-overlay {
|
|
display: none !important;
|
|
visibility: hidden !important;
|
|
pointer-events: none !important;
|
|
}
|
|
}
|