/* Custom Utilities */
.text-gradient {
    background: linear-gradient(135deg, #0066FF 0%, #4F46E5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bg-grid-pattern {
    background-size: 40px 40px;
}

.glass-nav {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}

.card-hover {
    transition: all 0.3s ease;
}

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

/* Custom Styles for Polish */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.text-gradient {
    background: linear-gradient(135deg, #0066FF 0%, #4F46E5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.phone-mockup {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 8px solid #1F2937;
    border-radius: 2.5rem;
    overflow: hidden;
    background-color: #fff;
    position: relative;
}

/* Mobile notch simulation */
.phone-mockup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 24px;
    background: #1F2937;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    z-index: 10;
}

/* Mobile Menu Toggle */
.mobile-menu {
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.open {
    transform: translateX(0);
}

/* Navbar mobile */
@media (max-width: 767px) {
    .md\\:flex {
        display: none;
    }

    .md\\:hidden {
        display: flex;
    }

    .mobile-menu {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 80%;
        max-width: 320px;
        background: white;
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
        transform: translateX(100%);
        z-index: 1000;
        flex-direction: column;
        padding: 6rem 2rem 2rem;
    }

    .mobile-menu a {
        display: block;
        padding: 1rem 0;
        font-size: 1.1rem;
        font-weight: 500;
        color: #1e293b;
        border-bottom: 1px solid #f1f5f9;
    }

    .mobile-menu a:last-child {
        border-bottom: none;
    }

    .overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
    }

    .overlay.open {
        opacity: 1;
        visibility: visible;
    }

    /* Padding & spacing mobile */
    .max-w-7xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Hero section mobile */
    h1 {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
    }

    .text-lg {
        font-size: 1.1rem;
    }

    /* Pricing cards */
    .md\\:flex-row {
        flex-direction: column;
    }

    .md\\:-translate-y-4 {
        transform: none;
    }

    /* Form đăng ký */
    input,
    button {
        font-size: 1rem !important;
        /* Tránh zoom iOS */
    }

    /* Phone mockup */
    .phone-mockup {
        width: 260px !important;
        height: 540px !important;
    }

    .translate-x-20 {
        transform: translateX(40px) translateY(40px) !important;
    }
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Ẩn hoàn toàn mobile menu trên desktop */
@media (min-width: 768px) {

    .mobile-menu,
    .overlay {
        display: none !important;
    }
}

/* Đảm bảo menu desktop hiển thị đúng */
@media (max-width: 767px) {
    .md\\:flex {
        display: none !important;
    }

    .md\\:hidden {
        display: flex !important;
    }
}

/* Chỉ áp dụng trên mobile (dưới 768px) */
@media (max-width: 767px) {

    /* Chuyển flex thành grid với 2 cột trên mobile */
    .price-features-container {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        /* 2 cột */
        gap: 12px !important;
        /* Khoảng cách giữa các item */
        justify-items: center;
        /* Căn giữa các item */
    }

    /* Đảm bảo mỗi item vẫn giữ kích thước đẹp */
    .price-features-container>div {
        width: 100%;
        max-width: none;
        justify-content: center;
    }
}

/* Trên tablet trở lên (≥768px) giữ nguyên flex 4 items/hàng */
@media (min-width: 768px) {
    .price-features-container {
        display: flex !important;
        flex-wrap: wrap;
        justify-content: center;
    }
}