/* ==================== GLOBAL RESET & VARIABLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0f766e;
    --primary-dark: #0d5c56;
    --secondary: #f59e0b;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
    --bg-light: #f8fafc;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Font setups */
h1,
h2,
h3,
h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

/* ==================== HERO SECTION ==================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    text-align: center;
    color: var(--white);
    z-index: 2;
    padding: 0 20px;
    width: 100%;
}

.hero-content h1 {
    font-size: clamp(40px, 8vw, 72px);
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeUp 1s ease forwards 0.3s;
    transform: translateY(30px);
}

.hero-content p {
    font-size: clamp(16px, 2.5vw, 20px);
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeUp 1s ease forwards 0.5s;
    transform: translateY(30px);
}

.hero-btn {
    display: inline-block;
    padding: 16px 40px;
    background: var(--secondary);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    opacity: 0;
    animation: fadeUp 1s ease forwards 0.7s;
    transform: translateY(30px);
    transition: all 0.3s ease;
}

.hero-btn:hover {
    background: var(--white);
    color: var(--primary);
    transform: scale(1.05);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 2;
    opacity: 0;
    animation: fadeUp 1s ease forwards 1s;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--white);
    border-radius: 20px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--white);
    border-radius: 4px;
    animation: scrollMouse 2s infinite;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollMouse {

    0%,
    100% {
        opacity: 1;
        top: 8px;
    }

    50% {
        opacity: 0.3;
        top: 18px;
    }
}

/* ==================== SECTIONS COMMON ==================== */
.intro-section,
.categories-section {
    padding: 120px 60px;
    background: var(--white);
}

/* ==================== INTRO & STATS ==================== */
.intro-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.intro-images {
    position: relative;
    opacity: 0;
    transform: translateX(-50px);
    transition: 0.8s ease;
}

.intro-images.animate {
    opacity: 1;
    transform: translateX(0);
}

.intro-img-main {
    width: 85%;
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.intro-img-secondary {
    position: absolute;
    bottom: -40px;
    right: 0;
    width: 55%;
    border-radius: 20px;
    border: 6px solid var(--white);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.intro-content {
    opacity: 0;
    transform: translateX(50px);
    transition: 0.8s ease 0.3s;
}

.intro-content.animate {
    opacity: 1;
    transform: translateX(0);
}

.intro-label {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(15, 118, 110, 0.1);
    color: var(--primary);
    font-weight: 600;
    border-radius: 30px;
    margin-bottom: 20px;
}

.intro-content h2 {
    font-size: clamp(32px, 4vw, 48px);
    margin-bottom: 24px;
    line-height: 1.2;
}

.intro-content h2 span {
    color: var(--primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
    padding: 30px 20px;
    background: var(--bg-light);
    border-radius: 16px;
    transition: 0.3s;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 42px;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Playfair Display', serif;
}

/* ==================== SLIDER SECTION ==================== */
.slider-section {
    padding: 100px 0;
    background: var(--bg-light);
    overflow: hidden;
}

.slider-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 0 20px;
}

.slider-header h2 {
    font-size: clamp(28px, 4vw, 42px);
    margin-bottom: 16px;
}

.slider-container {
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
}

.slider-track {
    display: flex;
    gap: 30px;
    animation: scroll 50s linear infinite;
    ;
    width: max-content;
}

.slider-track:hover {
    animation-play-state: paused;
}

.slide-item {
    flex-shrink: 0;
    width: 350px;
    height: 380px;
    border-radius: 20px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* .slide-item img { width: 100%; height: 100%; object-fit: contain; transition: 0.5s;} */
.slide-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: var(--white);
    transform: translateY(100%);
    transition: 0.4s;
}

.slide-item:hover .slide-overlay {
    transform: translateY(0);
}

.slide-item:hover .slide-overlay {
    transform: translateY(0);
}

.slide-overlay h3 a {
    color: inherit;
    text-decoration: none;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-50%));
    }

    /* Điều chỉnh tùy số lượng ảnh */
}

/* ==================== CATEGORIES SECTION ==================== */
.categories-container {
    max-width: 1400px;
    margin: 0 auto;
}

.categories-header {
    text-align: center;
    margin-bottom: 60px;
}

.categories-header h1 {
    font-size: clamp(32px, 5vw, 52px);
    margin-bottom: 16px;
}

/* Tabs Logic */
.category-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.category-tab {
    padding: 14px 32px;
    background: var(--bg-light);
    border: none;
    border-radius: 50px;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: 0.3s;
}

.category-tab:hover,
.category-tab.active {
    background: var(--primary);
    color: var(--white);
}

/* Mobile Select */
.category-select-wrapper {
    display: none;
    margin-bottom: 40px;
}

.category-select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--bg-light);
    border-radius: 12px;
    background: var(--white);
    font-size: 16px;
}

/* Grid Content - Đã tối ưu, không cần !important */
.category-content {
    display: block;
    min-height: 200px;
}

.category-intro {
    text-align: center;
    margin-bottom: 50px;
}

.category-intro h3 {
    font-size: 28px;
    margin-bottom: 12px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
}

.category-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: 0.4s;
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.category-card-img {
    height: 250px;
    overflow: hidden;
}

.category-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.category-card:hover .category-card-img img {
    transform: scale(1.1);
}

.category-card-content {
    padding: 24px;
    flex-grow: 1;
}

.category-card-content h4 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.category-card-content h5 {
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 12px;
    font-weight: 600;
}

.category-card-content p {
    font-size: 14px;
    color: var(--text-light);
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 80px 60px 40px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
}

.footer-social a:hover {
    background: var(--primary);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {

    .intro-section,
    .categories-section {
        padding: 80px 30px;
    }

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

    .hero-content h1 {
        font-size: 40px;
        line-height: 1.2;
        margin-bottom: 14px;
    }

    .hero-content p {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .hero-btn {
        padding: 12px 28px;
        font-size: 14px;
    }
}

/* ==================== MOBILE OPTIMIZED (<=768px) ==================== */
@media (max-width: 768px) {

    /* ===== GLOBAL SECTION PADDING ===== */
    .hero,
    .intro-section,
    .categories-section,
    .slider-section,
    .footer {
        padding: 40px 16px;
    }

    /* ===== HERO ===== */
    .hero {
        min-height: 100vh;
        height: auto;
    }

    .hero-video {
        object-position: 45% center;
    }

    .hero-overlay {
        background: linear-gradient(rgba(0, 0, 0, 0.45));
    }

    .hero-content h1 {
        font-size: 32px;
        line-height: 1.2;
        margin-bottom: 14px;
    }

    .hero-content p {
        font-size: 15px;
        margin-bottom: 20px;
    }

    .hero-btn {
        padding: 12px 28px;
        font-size: 14px;
    }

    .scroll-indicator {
        bottom: 16px;
    }

    /* ===== INTRO ===== */
    .intro-container {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .intro-images,
    .intro-img-main {
        width: 100%;
    }

    .intro-img-secondary {
        width: 45%;
        bottom: -16px;
        right: -8px;
    }

    .intro-content h2 {
        font-size: 26px;
        margin-bottom: 12px;
    }

    .intro-content p {
        margin-bottom: 16px;
    }

    /* ===== STATS ===== */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .stat-item {
        padding: 16px 10px;
    }

    .stat-number {
        font-size: 28px;
    }

    /* ===== SLIDER ===== */
    .slider-container {
        padding: 0;
    }

    .slide-item {
        width: 220px;
        height: 240px;
        border-radius: 14px;
        margin-bottom: 20px;
    }

    .slide-overlay {
        padding: 16px;
        font-size: 13px;
    }


    /* ===== CATEGORIES ===== */
    .categories-header h1 {
        font-size: 28px;
        margin-bottom: 16px;
    }

    .category-select {
        font-size: 14px;
        padding: 12px 14px;
    }

    /* Make category grid horizontal and swipeable on mobile */
    .category-grid {
        display: flex;
        flex-direction: row;
        gap: 16px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
        scroll-snap-type: x mandatory;
    }

    .category-card {
        flex: 0 0 85%;
        min-width: 280px;
        scroll-snap-align: start;
    }

    .category-card-img {
        height: 180px;
    }

    /* Horizontal scrollbar styling */
    .category-grid::-webkit-scrollbar {
        height: 6px;
    }

    .category-grid::-webkit-scrollbar-thumb {
        background: rgba(15, 118, 110, 0.15);
        border-radius: 3px;
    }

    .category-grid::-webkit-scrollbar-track {
        background: transparent;
    }

    /* ===== FOOTER ===== */
    .footer {
        padding: 40px 16px 24px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 28px;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    /* Ẩn tabs cũ */
    .category-tabs {
        display: none;
    }

    /* Wrapper chính */
    .category-select-wrapper {
        display: block;
        position: relative;
        z-index: 100;
        /* Để nó nổi lên trên nội dung bên dưới */
        margin-bottom: 30px;
        width: 100%;
    }

    /* 1. Nút bấm chính (Header) */
    .custom-dropdown-header {
        background-color: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        padding: 16px 20px;
        font-size: 16px;
        font-weight: 600;
        color: #0f766e;
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
        transition: all 0.3s ease;
    }

    /* Mũi tên xoay khi mở */
    .dropdown-arrow {
        transition: transform 0.3s ease;
        width: 20px;
        height: 20px;
        fill: none;
        stroke: #0f766e;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    /* Khi dropdown đang mở */
    .custom-dropdown.open .dropdown-arrow {
        transform: rotate(180deg);
    }

    .custom-dropdown.open .custom-dropdown-header {
        border-color: #0f766e;
        box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1);
    }

    /* 2. Danh sách xổ xuống (List) */
    .custom-dropdown-list {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        width: 100%;
        background: #ffffff;
        border-radius: 12px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
        border: 1px solid #f1f5f9;

        /* --- CẤU HÌNH SCROLL (MỚI THÊM) --- */
        max-height: 300px;
        /* Giới hạn chiều cao (khoảng 5-6 mục) */
        overflow-y: auto;
        /* Tự động hiện thanh cuộn khi vượt quá chiều cao */
        -webkit-overflow-scrolling: touch;
        /* Cuộn mượt trên iPhone/iOS */
        overscroll-behavior: contain;
        /* Ngăn trang web bên ngoài cuộn theo khi hết danh sách */

        /* Hiệu ứng ẩn/hiện (Giữ nguyên) */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 105;
        /* Đảm bảo nó nổi lên trên cùng */
    }

    /* --- LÀM ĐẸP THANH CUỘN (SCROLLBAR) --- */
    /* 1. Độ rộng thanh cuộn */
    .custom-dropdown-list::-webkit-scrollbar {
        width: 6px;
        /* Mỏng đẹp */
    }

    /* 2. Màu nền đường ray cuộn */
    .custom-dropdown-list::-webkit-scrollbar-track {
        background: transparent;
        margin: 5px 0;
        /* Cách trên dưới một chút cho đẹp */
    }

    /* 3. Màu của thanh trượt */
    .custom-dropdown-list::-webkit-scrollbar-thumb {
        background-color: #cbd5e1;
        /* Màu xám nhạt */
        border-radius: 10px;
        /* Bo tròn */
    }

    /* 4. Khi di chuột vào thanh trượt thì đậm lên xíu */
    .custom-dropdown-list::-webkit-scrollbar-thumb:hover {
        background-color: #94a3b8;
    }

    /* Class kích hoạt hiển thị */
    .custom-dropdown.open .custom-dropdown-list {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* 3. Từng mục chọn (Item) */
    .dropdown-item {
        padding: 14px 20px;
        cursor: pointer;
        font-size: 15px;
        color: #334155;
        border-bottom: 1px solid #f8fafc;
        transition: background 0.2s;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .dropdown-item:last-child {
        border-bottom: none;
    }

    .dropdown-item:hover {
        background-color: #f0fdfa;
        /* Xanh rất nhạt */
        color: #0f766e;
    }

    /* Mục đang được chọn */
    .dropdown-item.selected {
        background-color: #f0fdfa;
        color: #0f766e;
        font-weight: 600;
    }

    /* Dấu tích V khi chọn */
    .dropdown-item.selected::after {
        content: '✓';
        font-weight: bold;
        color: #0f766e;
    }
}