/* ==========================================
   1. CORE SETUP & MODERN VARIABLE DESIGN
   ========================================== */
* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #0b0f19;
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    color: #f8fafc;
}

/* Khung Slider cao cấp */
.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, #0f1d36 0%, #070a13 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Cấu trúc Slide chuẩn Mỹ - Sửa lỗi đè nghẹt sự kiện click */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* Khóa tương tác khi slide đang ẩn */
    transform: scale(0.98) translateY(10px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                visibility 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    
    display: flex;
    flex-direction: column;
    padding: 6vh 7vw;
}

/* Trạng thái slide active kích hoạt mượt mà */
.slide.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto; /* Mở lại tương tác */
    transform: scale(1) translateY(0);
}

/* ==========================================
   2. TYPOGRAPHY (TYPO PHONG CÁCH APPLE)
   ========================================== */
h1 {
    font-size: clamp(28px, 4.5vw, 56px);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 15px 0;
    background: linear-gradient(135deg, #ffffff 30%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.slide-title, .slide h2 {
    font-size: clamp(24px, 3.2vw, 40px);
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 3.5vh;
    line-height: 1.25;
    background: linear-gradient(135deg, #ffffff 0%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: clamp(15px, 1.8vw, 22px);
    color: #94a3b8;
    line-height: 1.5;
    margin-bottom: 30px;
}

.slide p, .slide li {
    font-size: clamp(14px, 1.5vw, 18px);
    line-height: 1.6;
    color: #cbd5e1;
}

.content-area, .slide-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    min-height: 0;
}

/* ==========================================
   3. PREMIUM LAYOUTS & GLASSMORPHISM CARDS
   ========================================== */
.title-layout, .qa-layout {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.grid-2, .two-column, .highlight-numbers-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 5vw;
    width: 100%;
    align-items: center;
}

/* Grid 3 ô mờ ảo phong cách SaaS cao cấp */
.tiled-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    width: 100%;
}
.tile {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transition: border-color 0.3s, transform 0.3s;
}
.tile:hover {
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateY(-4px);
}
.tile h3 { font-size: clamp(18px, 1.6vw, 22px); margin: 15px 0 10px 0; color: #ffffff; }
.tile p { margin: 0; color: #94a3b8; font-size: 14px; }
.icon { font-size: 32px; color: #38bdf8; }

/* Ô số nổi bật cực đại */
.number-box {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.03) 100%);
    border: 1px solid rgba(239, 68, 68, 0.25);
    text-align: center;
    padding: 4vh 30px;
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(239, 68, 68, 0.1);
}
.number { font-size: clamp(50px, 7vw, 90px); font-weight: 800; color: #ef4444; line-height: 1; letter-spacing: -2px; }
.label { font-size: 12px; font-weight: 700; color: #f87171; letter-spacing: 2px; margin-top: 10px; }

/* Danh sách kiểm soát cao cấp */
.bullet-list ul { list-style: none; padding: 0; margin: 0; }
.bullet-list li { margin-bottom: 18px; position: relative; padding-left: 32px; }
.bullet-list i { position: absolute; left: 0; top: 4px; color: #38bdf8; font-size: 18px; }

/* Wrapper xử lý ảnh nghệ thuật */
.image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}
.image-wrapper::before {
    content: '';
    position: absolute;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, rgba(0,0,0,0) 70%);
    z-index: 1;
}
.image-wrapper img {
    max-width: 100%;
    max-height: 42vh;
    object-fit: contain;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    z-index: 2;
}

/* Timeline thiết kế siêu mượt */
.timeline-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    position: relative;
}
.timeline-line {
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0) 0%, rgba(56, 189, 248, 0.4) 20%, rgba(56, 189, 248, 0.4) 80%, rgba(56, 189, 248, 0) 100%);
    z-index: 1;
}
.timeline-item {
    position: relative;
    z-index: 2;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 16px;
    backdrop-filter: blur(8px);
    border-top: 3px solid #38bdf8;
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}
.timeline-item h3 { margin: 0 0 10px 0; color: #38bdf8; font-size: 18px; font-weight: 600; }
.timeline-item p { font-size: 13px; margin: 0; color: #94a3b8; }

.contact-info {
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 30px 50px;
    border-radius: 24px;
    margin-top: 30px;
    backdrop-filter: blur(10px);
}

/* ==========================================
   4. TABLES PHONG CÁCH TOKIO/DARK MODE MINIMAL
   ========================================== */
.table-layout, .table-wrapper {
    width: 100%;
    max-height: 48vh;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: auto;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.table-layout table, .table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 650px;
}

.table-layout th, .table-wrapper th {
    background-color: rgba(30, 41, 59, 0.9);
    color: #38bdf8;
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 5;
}

.table-layout td, .table-wrapper td {
    padding: 15px 20px;
    font-size: 15px;
    color: #e2e8f0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.table-layout tr:hover, .table-wrapper tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* ==========================================
   5. MINIMAL CONTROLS (NÚT ĐIỀU HƯỚNG TÀI TÌNH)
   ========================================== */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.03);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-btn:hover { 
    background: #ffffff; 
    color: #070a13; 
    border-color: #ffffff;
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}
.prev-btn { left: 25px; }
.next-btn { right: 25px; }

.counter {
    position: absolute;
    bottom: 25px;
    right: 35px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #64748b;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    z-index: 100;
    backdrop-filter: blur(5px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .timeline-line { display: none; }
    .slide { padding: 6vh 30px; }
    .nav-btn { display: none; } /* Trên mobile ưu tiên chạm vuốt */
    .counter { bottom: 15px; right: 20px; }
}

/* --- THANH ĐIỀU HƯỚNG --- */
.navigation-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 5px;
}

.nav-home-link {
    font-size: 14.5px;
    font-weight: 600;
    color: #f3f5f8;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-home-link:hover {
    color:#f3f5f8;
    transform: translateY(-1px);
}

.nav-separator {
    color: #94a3b8;
    font-size: 14px;
    user-select: none;
}

.nav-current {
    font-size: 14.5px;
    color: #64748b;
    font-weight: 500;
}

@media (max-width: 576px) {
    .navigation-header {
        padding: 10px 15px;
        font-size: 13.5px;
    }
}