/* ==========================================
   HEADER.CSS - FULLY OPTIMIZED (20% CHIỀU CAO THẤP HƠN)
   Dựa trên phân tích logo 2000x1110px
   ========================================== */

/* ==========================================
   PHẦN 1: HEADER TOP (Gradient Xanh Động) - COMPACT
   ========================================== */

.header-top {
    background: linear-gradient(135deg, #1e5ba8 0%, #2874c9 25%, #1e5ba8 50%, #164a8a 75%, #1e5ba8 100%);
    background-size: 400% 400%;
    animation: headerGradientFlow 12s ease-in-out infinite;
    padding: 8px 10px; /* Tối ưu cho logo 50px */
    position: relative;
    overflow: hidden;
}

@keyframes headerGradientFlow {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 50% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    75% {
        background-position: 50% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.header-top::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.15) 50%,
        transparent 70%
    );
    animation: headerShine 6s infinite;
    pointer-events: none;
}

@keyframes headerShine {
    0% {
        transform: translate(-100%, -100%) rotate(45deg);
    }
    100% {
        transform: translate(100%, 100%) rotate(45deg);
    }
}

.header-top::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle at 50% 50%,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 70%
    );
    animation: headerGlow 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes headerGlow {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

.header-top-content {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Logo - OPTIMIZED SIZE */
.header-logo {
    flex-shrink: 0;
}

.header-logo img {
    height: 50px; /* TỐI ƯU: Giảm từ 90px → 50px (giảm 44%) */
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.header-logo img:hover {
    transform: scale(1.05);
}

/* Text và Slogan - COMPACT */
.header-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.header-company-name {
    font-size: 22px;
    font-weight: 600;
    color: white;
    margin: 0;
    line-height: 1.1;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(255, 255, 255, 0.2);
}

.header-slogan {
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    line-height: 1.2;
    letter-spacing: 0.3px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* Mobile Menu Button */
.header-mobile-menu-btn {
    display: none;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 22px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.header-mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.header-mobile-menu-btn:active {
    transform: scale(0.95);
}

/* ==========================================
   PHẦN 2: MENU NAVIGATION (Sticky - Trắng) - COMPACT
   ========================================== */

.header-nav-wrapper {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-nav-wrapper.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.header-nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 40px;
}

.header-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 28px;
}

.header-nav li {
    margin: 0;
}

.header-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 0;
    display: block;
    position: relative;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.header-nav a:hover {
    color: #1e5ba8;
    font-weight: 750;
}

.header-nav a::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #1e5ba8, #228b22);
    transition: width 0.3s ease;
}

.header-nav a:hover::after {
    width: 100%;
}

/* Close Menu Button */
.header-close-menu-btn {
    display: none;
}

/* ==========================================
   RESPONSIVE - MOBILE
   ========================================== */

@media (max-width: 768px) {
    .header-top {
        padding: 5px 15px; /* Giảm padding cho mobile */
        position: sticky;
        top: 0;
        z-index: 2000;
    }
    
    .header-top-content {
        gap: 8px;
    }
    
    .header-logo img {
        height: 35px; /* Mobile: 35px */
    }
    
    .header-company-name {
        font-size: 15px;
        letter-spacing: 0.5px;
        line-height: 1.1;
    }
    
    .header-slogan {
        font-size: 11px;
        line-height: 1.2;
    }
    
    .header-mobile-menu-btn {
        display: block !important;
    }
    
    .header-nav-wrapper {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: #ffffff;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        transition: right 0.3s ease;
        z-index: 3000;
        overflow-y: auto;
    }
    
    .header-nav-wrapper.active {
        right: 0;
    }
    
    .header-nav-content {
        padding: 20px;
    }
    
    .header-nav {
        flex-direction: column;
        align-items: stretch;
        min-height: auto;
    }
    
    .header-nav ul {
        flex-direction: column;
        gap: 0;
    }
    
    .header-nav li {
        border-bottom: 1px solid #f0f0f0;
    }
    
    .header-nav a {
        font-size: 16px;
        padding: 15px 0;
        font-weight: 300;
    }
    
    .header-nav a:hover {
        font-weight: 700;
    }
    
    .header-nav a::after {
        display: none;
    }
    
    .header-close-menu-btn {
        display: block !important;
        background: none;
        border: none;
        font-size: 32px;
        color: #1e5ba8;
        cursor: pointer;
        padding: 8px;
        margin-bottom: 20px;
        margin-left: auto;
        transition: all 0.3s ease;
    }
    
    .header-close-menu-btn:hover {
        color: #228b22;
        transform: scale(1.1) rotate(90deg);
    }
    
    .header-close-menu-btn:active {
        transform: scale(0.95) rotate(90deg);
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .header-top {
        padding: 10px 12px;
    }
    
    .header-logo img {
        height: 55px; /* Small mobile: 32px */
    }
    
    .header-company-name {
        font-size: 10px;
    }
    
    .header-slogan {
        font-size: 9px;
    }
    
    .header-mobile-menu-btn {
        font-size: 20px;
        padding: 5px 9px;
    }
    
    .header-nav-wrapper {
        width: 260px;
    }
}

/* Desktop Large - 1920x1080 */
@media (min-width: 1920px) {
    .header-top {
        padding: 10px 20px; /* Desktop lớn: padding 10px */
    }
    
    .header-logo img {
        height: 55px; /* Desktop lớn: 55px */
    }
    
    .header-company-name {
        font-size: 24px;
        line-height: 1.1;
    }
    
    .header-slogan {
        font-size: 15px;
        line-height: 1.2;
    }
    
    .header-nav {
        min-height: 45px;
    }
    
    .header-nav a {
        font-size: 15px;
        padding: 9px 0;
    }
    
    .header-nav ul {
        gap: 32px;
    }
}

/* Laptop - 1366x768 */
@media (min-width: 1024px) and (max-width: 1366px) {
    .header-top {
        padding: 7px 20px; /* Laptop: padding 7px */
    }
    
    .header-logo img {
        height: 45px; /* Laptop: 45px */
    }
    
    .header-company-name {
        font-size: 20px;
        line-height: 1.1;
    }
    
    .header-slogan {
        font-size: 13px;
        line-height: 1.2;
    }
    
    .header-nav {
        min-height: 38px;
    }
    
    .header-nav ul {
        gap: 24px;
    }
    
    .header-nav a {
        font-size: 13px;
        padding: 7px 0;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1023px) {
    .header-top {
        padding: 6px 15px; /* Tablet: padding 6px */
    }
    
    .header-logo img {
        height: 40px; /* Tablet: 40px */
    }
    
    .header-company-name {
        font-size: 18px;
        line-height: 1.1;
    }
    
    .header-slogan {
        font-size: 12px;
        line-height: 1.2;
    }
    
    .header-nav ul {
        gap: 20px;
    }
    
    .header-nav a {
        font-size: 13px;
    }
}

/* ==========================================
   TỔNG KẾT KÍCH THƯỚC LOGO VÀ CHIỀU CAO HEADER
   ========================================== */

/*
DESKTOP LARGE (≥1920px):
- Logo: 55px
- Padding: 10px × 2 = 20px
- Text: ~25px
- Total header height: ~66px ✅

DESKTOP/LAPTOP (1024-1919px):
- Logo: 45-50px
- Padding: 7-8px × 2 = 14-16px
- Text: ~25px
- Total header height: ~59-66px ✅

TABLET (769-1023px):
- Logo: 40px
- Padding: 6px × 2 = 12px
- Text: ~22px
- Total header height: ~52px ✅

MOBILE (≤768px):
- Logo: 35px
- Padding: 5px × 2 = 10px
- Text: ~20px
- Total header height: ~45px ✅

SMALL MOBILE (≤480px):
- Logo: 32px
- Padding: 4px × 2 = 8px
- Text: ~18px
- Total header height: ~40px ✅

GIẢM TRUNG BÌNH 30-40% CHIỀU CAO SO VỚI BẢN GỐC! 🎉
*/