/* ═══════════════════════════════════════════════════
   APPLICATION4 TEMPLATE – EDR-STYLE LAYOUT
   ═══════════════════════════════════════════════════ */

/* ── Base ── */
.app4-wrapper { font-family: 'Inter', 'Segoe UI', -apple-system, sans-serif; color: #1a1a2e; line-height: 1.6; overflow-x: hidden; }
.app4-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.app4-section-title { font-size: 32px; font-weight: 700; text-align: center; margin-bottom: 40px; color: #1a1a2e; line-height: 1.3; }

/* ── Buttons ── */
.app4-btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 32px; border-radius: 8px; font-size: 15px; font-weight: 600; text-decoration: none; transition: all .3s ease; cursor: pointer; border: none; }
.app4-btn--primary { background-color: #e53935; color: #fff; }
.app4-btn--primary:hover { background-color: #c62828; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(229,57,53,.35); }
.app4-btn--outline { background: transparent; color: #e53935; border: 1.5px solid #e53935; }
.app4-btn--outline:hover { background-color: #e53935; color: #fff; }
.app4-btn--full { width: 100%; justify-content: center; }
.app4-link-arrow { display: inline-flex; align-items: center; gap: 4px; color: #e53935; font-weight: 600; font-size: 14px; text-decoration: none; transition: gap .2s ease; }
.app4-link-arrow:hover { gap: 8px; }

/* ═══ SECTION 1: BANNER ═══ */
.app4-banner { background: #fafafa; padding: 60px 0 0; overflow: hidden; }
.app4-banner__inner { display: flex; align-items: center; gap: 48px; }
.app4-banner__text { flex: 1; min-width: 0; }
.app4-banner__label { display: inline-block; font-size: 13px; font-weight: 600; color: #666; letter-spacing: .5px; margin-bottom: 16px; }
.app4-banner__title { font-size: 42px; font-weight: 800; line-height: 1.2; margin-bottom: 20px; color: #1a1a2e; }
.app4-banner__desc { font-size: 15px; color: #555; line-height: 1.7; margin-bottom: 32px; max-width: 480px; }
.app4-banner__image { flex: 1; min-width: 0; display: flex; align-items: flex-end; justify-content: center; }
.app4-banner__image img { max-width: 100%; height: auto; display: block; }

/* ═══ SECTION 2: DEFINITION + FEATURE LIST ═══ */
.app4-definition { padding: 80px 0; background: #fff; }

/* Row: ảnh trái + text phải */
.app4-definition__row { display: flex; align-items: flex-start; gap: 48px; margin-bottom: 56px; }
.app4-definition__image { flex: 0 0 45%; max-width: 45%; border-radius: 12px; overflow: hidden; }
.app4-definition__image img { width: 100%; height: auto; display: block; border-radius: 12px; }
.app4-definition__content { flex: 1; }
.app4-definition__content h2 { font-size: 28px; font-weight: 700; margin-bottom: 16px; color: #1a1a2e; line-height: 1.3; }
.app4-definition__content p { font-size: 15px; color: #555; line-height: 1.8; }

/* Feature list with icons */
.app4-definition__features { border-top: 1px solid #f0f0f0; padding-top: 40px; }
.app4-definition__features-label { font-size: 14px; font-weight: 600; color: #777; margin-bottom: 24px; text-align: center; }

.app4-definition__feature-item { display: flex; align-items: flex-start; gap: 20px; padding: 20px 0; border-bottom: 1px solid #f5f5f5; }
.app4-definition__feature-item:last-child { border-bottom: none; }

.app4-definition__feature-icon { flex-shrink: 0; width: 48px; height: 48px; background: #fef2f2; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.app4-definition__feature-icon img { width: 28px; height: 28px; object-fit: contain; }
.app4-definition__feature-icon i { font-size: 22px; color: #e53935; }

.app4-definition__feature-text h4 { font-size: 15px; font-weight: 700; color: #1a1a2e; margin-bottom: 4px; }
.app4-definition__feature-text p { font-size: 13px; color: #666; line-height: 1.7; margin: 0; }

/* ═══ SECTION 3: COMPARISON (AV vs EDR) ═══ */
.app4-comparison { padding: 80px 0; background: #fafafa; }
.app4-comparison__header { text-align: center; max-width: 700px; margin: 0 auto 40px; }
.app4-comparison__subtitle { font-size: 14px; color: #777; line-height: 1.7; }

.app4-comparison__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.app4-comparison__card { background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 32px; transition: box-shadow .3s ease; }
.app4-comparison__card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.app4-comparison__card-title { font-size: 20px; font-weight: 700; color: #1a1a2e; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid #e53935; display: inline-block; }
.app4-comparison__card-desc { font-size: 14px; color: #555; line-height: 1.8; }

/* ═══ SECTION 4: CUSTOMERS ═══ */
.app4-customers { padding: 80px 0; background: #fff; }

/* Layout đơn giản: text + 1 ảnh */
.app4-customers__simple { display: flex; align-items: center; gap: 48px; }
.app4-customers__simple-text { flex: 1; }
.app4-customers__highlight { font-size: 36px; font-weight: 800; color: #1a1a2e; margin-bottom: 20px; line-height: 1.2; }
.app4-customers__simple-text p { font-size: 15px; color: #555; line-height: 1.8; }
.app4-customers__simple-image { flex: 0 0 45%; max-width: 45%; border-radius: 12px; overflow: hidden; }
.app4-customers__simple-image img { width: 100%; height: auto; display: block; border-radius: 12px; }

/* Layout grid cards (fallback nếu có customers_list) */
.app4-customers__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.app4-customers__card { background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid #eee; transition: box-shadow .3s ease, transform .2s ease; }
.app4-customers__card:hover { box-shadow: 0 8px 28px rgba(0,0,0,.08); transform: translateY(-3px); }
.app4-customers__card-image { width: 100%; height: 180px; overflow: hidden; background: #f5f5f5; }
.app4-customers__card-image img { width: 100%; height: 100%; object-fit: cover; }
.app4-customers__card-body { padding: 24px; }
.app4-customers__card-body h3 { font-size: 16px; font-weight: 700; margin-bottom: 10px; color: #1a1a2e; line-height: 1.4; }
.app4-customers__card-body p { font-size: 13px; color: #666; line-height: 1.7; margin-bottom: 16px; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }

/* ═══ SECTION 5: DISTRIBUTED ═══ */
.app4-distributed { padding: 60px 0; background: #fafafa; }
.app4-distributed__logos { display: flex; justify-content: center; align-items: center; gap: 56px; flex-wrap: wrap; }
.app4-distributed__logos img { max-height: 56px; width: auto; object-fit: contain; }

/* ═══ SECTION 6: BENEFITS ═══ */
.app4-benefits { padding: 80px 0; background: #fff; }
.app4-benefits__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-bottom: 40px; }
.app4-benefits__card { background: #fafafa; border: 1px solid #eee; border-radius: 12px; padding: 28px; transition: box-shadow .3s ease; }
.app4-benefits__card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.06); }
.app4-benefits__card-icon { font-size: 24px; color: #e53935; margin-bottom: 12px; }
.app4-benefits__card-title { font-size: 15px; font-weight: 700; color: #1a1a2e; margin-bottom: 8px; }
.app4-benefits__card-desc { font-size: 13px; color: #666; line-height: 1.7; }
.app4-benefits__cta { text-align: center; }

/* ═══ SECTION 7: PRICING ═══ */
.app4-pricing { padding: 80px 0; background: #fafafa; }
.app4-pricing__wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: stretch; }
.app4-pricing__promo { background: linear-gradient(135deg, #1a1a2e 0%, #2d2d4e 100%); border-radius: 16px; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; min-height: 400px; }
.app4-pricing__promo-content h3 { font-size: 24px; font-weight: 700; color: #fff; margin-bottom: 12px; line-height: 1.3; }
.app4-pricing__promo-content p { font-size: 14px; color: rgba(255,255,255,.7); line-height: 1.6; }
.app4-pricing__promo > img { width: 100%; max-width: 280px; margin: 24px auto 0; display: block; }
.app4-pricing__details { background: #fff; border: 1px solid #eee; border-radius: 16px; padding: 36px; display: flex; flex-direction: column; gap: 24px; }
.app4-pricing__details-label { display: inline-block; font-size: 12px; font-weight: 600; color: #e53935; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.app4-pricing__details-header h3 { font-size: 22px; font-weight: 700; color: #1a1a2e; margin-bottom: 6px; }
.app4-pricing__details-header p { font-size: 14px; color: #777; }
.app4-pricing__bullets { display: flex; flex-direction: column; gap: 12px; }
.app4-pricing__bullet-item { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: #444; line-height: 1.5; }
.app4-pricing__bullet-item i { color: #4caf50; font-size: 16px; margin-top: 2px; flex-shrink: 0; }
.app4-pricing__price { font-size: 28px; font-weight: 800; color: #1a1a2e; padding: 16px 0; border-top: 1px solid #f0f0f0; }
.app4-pricing__price small { font-size: 14px; font-weight: 400; color: #999; }
.app4-pricing__notes { display: flex; flex-direction: column; gap: 8px; }
.app4-pricing__note { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: #999; line-height: 1.5; }
.app4-pricing__note i { font-size: 14px; flex-shrink: 0; margin-top: 1px; }

/* ═══ SECTION 8: RELATED ═══ */
.app4-related { padding: 80px 0; background: #fff; }
.app4-related__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.app4-related__card { background: #fafafa; border: 1px solid #eee; border-radius: 12px; padding: 28px; text-decoration: none; transition: box-shadow .3s ease, transform .2s ease, border-color .3s ease; display: block; }
.app4-related__card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); transform: translateY(-2px); border-color: #e53935; }
.app4-related__card-title { font-size: 16px; font-weight: 700; color: #1a1a2e; margin-bottom: 10px; line-height: 1.4; }
.app4-related__card-desc { font-size: 13px; color: #666; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1024px) {
    .app4-banner__title { font-size: 34px; }
    .app4-section-title { font-size: 28px; }
    .app4-pricing__wrapper { grid-template-columns: 1fr; }
    .app4-pricing__promo { min-height: 280px; }
    .app4-customers__highlight { font-size: 30px; }
}

@media (max-width: 768px) {
    .app4-banner__inner { flex-direction: column; gap: 32px; text-align: center; }
    .app4-banner__desc { max-width: 100%; }
    .app4-banner__title { font-size: 28px; }
    .app4-section-title { font-size: 24px; margin-bottom: 28px; }

    .app4-definition__row { flex-direction: column; gap: 24px; }
    .app4-definition__image { flex: none; max-width: 100%; }

    .app4-comparison__grid { grid-template-columns: 1fr; }
    .app4-customers__simple { flex-direction: column; gap: 24px; }
    .app4-customers__simple-image { flex: none; max-width: 100%; }
    .app4-customers__grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }

    .app4-benefits__grid { grid-template-columns: 1fr; }
    .app4-related__grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

@media (max-width: 480px) {
    .app4-container { padding: 0 16px; }
    .app4-banner { padding: 40px 0 0; }
    .app4-banner__title { font-size: 24px; }
    .app4-section-title { font-size: 22px; }
    .app4-customers__highlight { font-size: 24px; }
    .app4-customers__grid { grid-template-columns: 1fr; }
    .app4-related__grid { grid-template-columns: 1fr; }
    .app4-pricing__promo { padding: 28px; min-height: auto; }
    .app4-pricing__details { padding: 24px; }
    .app4-pricing__price { font-size: 22px; }
    .app4-distributed__logos { gap: 32px; }
    .app4-distributed__logos img { max-height: 40px; }
}

/* ==================================================
   APP4 - Fix pricing section theo Figma
   ================================================== */

.app4-pricing {
    padding: 80px 0;
    background: #fafafa;
}

.app4-pricing .app4-container {
    max-width: 1220px;
}

.app4-pricing .app4-section-title {
    font-size: 34px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 42px;
}

/* Figma: card trái nhỏ, card phải lớn */
.app4-pricing__wrapper {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 36px;
    align-items: stretch;
}

/* Card trái */
.app4-pricing__promo {
    background: #db2c11 !important;
    border-radius: 16px;
    min-height: 541px;
    padding: 32px 24px;
    box-shadow: 0 5px 19px rgba(0, 0, 0, 0.08), 0 0 4.4px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.app4-pricing__promo-content h3 {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 14px;
}

.app4-pricing__promo-content p {
    color: #fff;
    font-size: 15px;
    line-height: 1.55;
}

.app4-pricing__promo > img {
    width: 100%;
    max-width: 250px;
    margin: auto auto -32px;
    object-fit: contain;
}

/* Card phải */
.app4-pricing__details {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: 16px;
    min-height: 541px;
    padding: 36px 38px 28px;
    box-shadow: 0 5px 19px rgba(0, 0, 0, 0.08), 0 0 4.4px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 22px;
    overflow: hidden;
    box-sizing: border-box;
}

.app4-pricing__details-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-width: 220px;
    height: 48px;
    padding: 0 28px;
    border: 1.5px solid #db2c11;
    border-radius: 999px;
    color: #db2c11;
    background: #fff;
    font-size: 16px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    margin-bottom: 10px;
}

.app4-pricing__details-header h3 {
    font-size: 30px;
    line-height: 1.25;
    color: #222;
    font-weight: 700;
    margin-bottom: 8px;
}

.app4-pricing__details-header p {
    font-size: 16px;
    color: #515151;
}

/* Bullet */
.app4-pricing__bullets {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 18px;
    border-bottom: 1px dashed #e5e5e5;
}

.app4-pricing__bullet-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #515151;
    font-size: 16px;
    line-height: 1.45;
}

.app4-pricing__bullet-item i {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #db2c11;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin: 0;
    flex: 0 0 24px;
}

/* Giá */
.app4-pricing__price {
    border-top: none;
    padding: 0;
    color: #111827;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
}

.app4-pricing__price strong,
.app4-pricing__price b {
    color: #db2c11;
}

/* Notes */
.app4-pricing__notes {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px 0 18px;
    border-bottom: 1px dashed #e5e5e5;
}

.app4-pricing__note {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #515151;
    font-size: 15px;
    line-height: 1.45;
}

.app4-pricing__note i {
    width: 24px;
    height: 24px;
    border: 2px solid #db2c11;
    border-radius: 50%;
    color: #db2c11;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin: 0;
    flex: 0 0 24px;
}

/* Nút không tràn khỏi card */
.app4-pricing__details .app4-btn--full {
    width: 100%;
    max-width: 100%;
    height: 48px;
    box-sizing: border-box;
    border-radius: 12px;
    background: rgba(219, 44, 17, 0.86);
    color: #fff;
    justify-content: center;
    margin: 0;
    padding: 12px 16px;
    box-shadow: none;
    align-self: stretch;
}

.app4-pricing__details .app4-btn--full:hover {
    background: #db2c11;
    transform: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .app4-pricing__wrapper {
        grid-template-columns: 1fr;
    }

    .app4-pricing__promo {
        min-height: 360px;
    }

    .app4-pricing__promo > img {
        max-width: 230px;
        margin-top: 40px;
    }
}

@media (max-width: 600px) {
    .app4-pricing .app4-container {
        padding: 0 16px;
    }

    .app4-pricing__details {
        padding: 28px 20px;
    }

    .app4-pricing__details-header h3 {
        font-size: 24px;
    }

    .app4-pricing__details-label {
        width: 100%;
        min-width: 0;
    }

    .app4-pricing__price {
        font-size: 24px;
    }
}

/* Application4 typewriter cursor */
.app4-typewriter {
    display: inline-block;
    white-space: normal;
}

.app4-typewriter.is-typing::after {
    content: "|";
    display: inline-block;
    margin-left: 4px;
    color: currentColor;
    animation: app4BlinkCursor 0.8s infinite;
}

@keyframes app4BlinkCursor {
    0%, 50% {
        opacity: 1;
    }

    51%, 100% {
        opacity: 0;
    }
}

/* Refine banner typography */
.app4-banner__label {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #666;
}

.app4-banner__title {
    font-size: 56px;
    font-weight: 800;
    color: #17172a;
}

/* Fix banner label và title nằm 2 dòng riêng */
.app4-banner__label {
    display: block !important;
    width: 100%;
    margin-bottom: 12px !important;
}

.app4-banner__title {
    display: block !important;
    width: 100%;
    clear: both;
    margin-top: 0 !important;
}

.app4-banner__title.app4-typewriter {
    display: block !important;
    width: 100%;
}
