/* ================================
   Info Features Section Styling
   ================================ */

   .info-features-section {
    padding: 80px 0;
    background-color: var(--bg-primary);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    z-index: 2;
    overflow: visible; /* Cho phép content tràn ra ngoài hoàn toàn */
}

.info-features-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative; /* Để image content có thể định vị tương đối */
    overflow: visible; /* Cho phép content tràn ra ngoài */
}

/* Section Title Styling */
.info-features-section .section-title {
    margin-bottom: 60px;
    text-align: center;
}

.info-features-section .section-main-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333333;
}

.info-features-section .p-md {
    font-size: var(--text-lg);
    line-height: 1.8;
    color: #666666;
    max-width: 800px;
    margin: 0 auto;
}

/* Grid Layout */
.info-features-section .vc_row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
    position: relative; /* Để image content có thể định vị tương đối */
}

.info-features-section .wpb_column {
    padding: 0 15px;
    flex: 1;
}

.info-features-section .vc_col-sm-1 {
    flex: 0 0 8.333333%;
    max-width: 8.333333%;
}

.info-features-section .vc_col-sm-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.info-features-section .vc_col-sm-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.info-features-section .vc_col-sm-10 {
    flex: 0 0 83.333333%;
    max-width: 83.333333%;
}

/* Info Feature Box */
.info-feature-box {
    background: var(--bg-primary);
    padding: 35px 25px;
    margin-bottom: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f5f5f5;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.info-feature-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border-color: #e8e8e8;
}

.info-feature-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #007cba, #0085c7, #4fc3f7);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.info-feature-box:hover::before {
    transform: scaleX(1);
}

/* Icon Styling */
.info-feature-icon {
    margin-bottom: 25px;
    position: relative;
}

.info-feature-icon img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: grayscale(30%);
}

.info-feature-box:hover .info-feature-icon img {
    transform: scale(1.1) rotate(5deg);
    filter: grayscale(0%);
}

.info-feature-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(0, 124, 186, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
    z-index: -1;
}

.info-feature-box:hover .info-feature-icon::after {
    transform: translate(-50%, -50%) scale(1);
}

/* Text Content */
.info-feature-content .h5-sm {
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: 15px;
    color: #333333;
    transition: color 0.3s ease;
}

.info-feature-box:hover .info-feature-content .h5-sm {
    color: #007cba;
}

.info-feature-content .grey-color {
    font-size: var(--radius-xl);
    line-height: 1.7;
    color: #666666;
    margin: 0;
}

/* Two Column Layout */
.info-features-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.info-features-text-block {
    padding: 20px;
}

.info-features-text-block .section-id {
    color: #007cba;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
}

.info-features-text-block .h3-lg {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: #333333;
    line-height: 1.2;
}

/* Image Content - Tràn viền phải hoàn toàn */
.info-features-image-block {
    text-align: center;
    position: absolute; /* Định vị tuyệt đối để tràn viền */
    z-index: 10; /* Đảm bảo hiển thị trên các element khác */
    /* Định vị để tràn sang phải hoàn toàn */
    right: calc(-50vw + 50%); /* Tràn ra ngoài viewport bên phải */
    top: 0;
    width: 50vw; /* Chiều rộng bằng 50% viewport */
    height: 100%; /* Chiều cao bằng với features content */
    max-width: none; /* Bỏ giới hạn chiều rộng */
    overflow: hidden; /* Loại bỏ scroll dọc */
}

.info-features-image-block img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Đảm bảo ảnh lấp đầy container */
    border-radius: 15px 0 0 15px; /* Bo góc trái, không bo góc phải */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    object-position: left center; /* Căn ảnh về bên trái */
}

.info-features-image-block:hover img {
    transform: scale(1.02);
}

/* Đảm bảo image content có height tương đương với features */
.info-features-section .vc_col-sm-5 {
    position: relative;
    min-height: 400px; /* Chiều cao tối thiểu */
    overflow: visible; /* Cho phép image content tràn ra ngoài */
}

/* Animation Classes */
.wow {
    opacity: 0;
}

.wow.fadeInUp {
    animation-fill-mode: both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.perch-fadeInUp {
    animation-name: fadeInUp;
}

/* Responsive Design */
@media (max-width: 991px) {
    .info-features-section {
        padding: 60px 0;
    }
    
    .info-features-section .vc_col-sm-4,
    .info-features-section .vc_col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .info-features-section .vc_col-sm-1,
    .info-features-section .vc_col-sm-10 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .info-features-section .section-main-title {
        font-size: var(--text-2xl);
    }
    
    .info-feature-box {
        padding: 30px 20px;
    }
    
    .info-features-two-column {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .info-features-text-block .h3-lg {
        font-size: var(--text-2xl);
    }
    
    /* Responsive cho image content */
    .info-features-image-block {
        position: relative;
        right: auto;
        width: 100%;
        max-width: 100%;
        height: auto;
        margin-top: 30px;
        overflow: visible; /* Đảm bảo không có scroll trên mobile */
    }
    
    .info-features-image-block img {
        border-radius: 15px;
        height: auto;
        object-fit: contain;
    }
}

@media (max-width: 767px) {
    .info-features-section {
        padding: 40px 0;
    }
    
    .info-features-section .vc_col-sm-4,
    .info-features-section .vc_col-sm-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .info-features-section .section-main-title {
        font-size: 1.8rem;
    }
    
    .info-features-section .p-md {
        font-size: var(--radius-xl);
    }
    
    .info-feature-box {
        padding: 25px 20px;
        margin-bottom: 20px;
    }
    
    .info-feature-icon img {
        width: 70px;
        height: 70px;
    }
    
    .info-feature-content .h5-sm {
        font-size: var(--text-lg);
    }
    
    .info-feature-content .grey-color {
        font-size: 0.95rem;
    }
    
    .info-features-text-block .h3-lg {
        font-size: var(--spacing-lg);
    }
    
    /* Responsive cho image content */
    .info-features-image-block {
        margin-top: 20px;
        overflow: visible; /* Đảm bảo không có scroll trên mobile */
    }
}

@media (max-width: 480px) {
    .info-features-section {
        padding: 30px 0;
    }
    
    .info-features-section .section-title {
        margin-bottom: 40px;
    }
    
    .info-features-section .section-main-title {
        font-size: 1.6rem;
        margin-bottom: 15px;
    }
    
    .info-feature-box {
        padding: 20px 15px;
    }
    
    .info-feature-icon {
        margin-bottom: 20px;
    }
    
    .info-feature-icon img {
        width: 60px;
        height: 60px;
    }
    
    .info-features-text-block .h3-lg {
        font-size: 1.8rem;
    }
    
    .info-features-text-block .section-id {
        font-size: 0.8rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .info-features-section {
        background-color: #1a1a1a;
    }
    
    .info-feature-box {
        background: #2d2d2d;
        border-color: #404040;
    }
    
    .info-feature-box:hover {
        border-color: #505050;
    }
    
    .info-features-section .section-main-title,
    .info-features-text-block .h3-lg {
        color: var(--bg-primary);
    }
    
    .info-features-section .p-md {
        color: #cccccc;
    }
    
    .info-feature-content .h5-sm {
        color: var(--bg-primary);
    }
    
    .info-feature-content .grey-color {
        color: #cccccc;
    }
    
    .info-feature-box:hover .info-feature-content .h5-sm {
        color: #4fc3f7;
    }
    
    .info-features-text-block .section-id {
        color: #4fc3f7;
    }
}

/* Print Styles */
@media print {
    .info-features-section {
        background: white !important;
        padding: 20px 0;
    }
    
    .info-feature-box {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .info-feature-icon img {
        filter: grayscale(100%);
    }
    
    .info-features-two-column {
        grid-template-columns: 1fr;
    }
    
    .info-features-image-block {
        position: relative;
        right: auto;
        width: 100%;
        height: auto;
    }
}

/* ================================
   Compact Variant Overrides (NextApp-like)
   ================================ */
.info-features-section {
    padding: 50px 0;
}

/* Feature item: nhỏ gọn, không card */
.info-feature-box {
    background: transparent;
    padding: 10px 0;
    margin-bottom: 18px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    text-align: left;
}

.info-feature-box:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

.info-feature-box::before { display: none; }

.info-feature-icon { margin: 2px 0 0 0; position: relative; }
.info-feature-icon img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: none;
    transition: none;
}
.info-feature-icon::after { display: none; }

.info-feature-content .h5-sm {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: #111827;
}

.info-feature-content .grey-color {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Image bên phải: tràn, căn phải gọn gàng bằng text content bên trái */
.info-features-image-block {
    position: absolute;
    top: 0;
    right: calc(-45vw + 45%);
    width: 60vw;
    height: 100%;
    margin-left: 0;
    max-width: none;
    overflow: hidden; /* Loại bỏ scroll dọc */
}

.info-features-image-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px 0 0 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

@media (max-width: 991px) {
    .info-features-image-block { 
        max-width: 100%; 
        overflow: visible; /* Đảm bảo không có scroll trên tablet */
    }
    .info-feature-icon img { width: 32px; height: 32px; }
}

/* Compact refinements */
.info-feature-box { margin: 10px 0; padding: 8px 0; }
.info-feature-icon img { width: 28px; height: 28px; }
.info-feature-content .h5-sm { font-size: var(--radius-xl); margin: 0 0 4px; }
.info-feature-content .grey-color { font-size: 0.9rem; line-height: 1.5; }

/* Tăng diện tích ảnh bên phải trên desktop */
@media (min-width: 992px) {
  .info-features-section .vc_col-sm-6.bg-tra { flex: 0 0 40%; max-width: 40%; }
  .info-features-section .vc_col-sm-5.last-column { flex: 0 0 60%; max-width: 60%; }
}