﻿/* =========================================================================
   Component: _services-bento.css
   Chức năng: Lưới Bento UI và Hiệu ứng Viền Laser (Linear style)
   ========================================================================= */

.bento-services-section {
    padding: 100px 0;
    background-color: #050505; /* Đen sâu thẳm, gần như OLED black */
    font-family: var(--font-primary);
}

/* Typography đặc biệt */
.text-gray {
    color: #8892b0;
}

.text-gradient-red {
    background: linear-gradient(to right, #ff4b2b, #ff416c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Badge trên cùng tiêu đề */
.badge-laser {
    display: inline-block;
    padding: 1px;
    border-radius: 50px;
    background: linear-gradient(90deg, rgba(255,255,255,0.1), rgba(255,255,255,0.3), rgba(255,255,255,0.1));
}

    .badge-laser span {
        display: block;
        padding: 6px 16px;
        background: #111;
        color: #fff;
        border-radius: 50px;
        font-size: 0.8rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 2px;
    }

/* --- Cấu trúc Thẻ Bento (Bento Card) --- */
.bento-card {
    position: relative;
    border-radius: 24px;
    padding: 2px; /* Dành khoảng trống 2px cho viền laser chạy */
    background: rgba(255, 255, 255, 0.03); /* Viền xám mờ mặc định */
    overflow: hidden;
    height: 100%;
    min-height: 320px;
    transition: transform 0.3s ease;
}

/* Định cỡ riêng cho thẻ Lớn và Cao */
.bento-large {
    min-height: 450px;
}

.bento-tall {
    min-height: 450px;
}

/* Lớp lõi bên trong thẻ (chứa nội dung) */
.bento-inner {
    position: relative;
    background: #0e0e11; /* Màu nền thực tế của thẻ */
    border-radius: 22px;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 2; /* Phải nằm đè lên lớp viền laser */
}

/* --- Hiệu ứng Viền Laser (Linear Glowing Edge) --- */
.laser-border {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent 70%, rgba(255, 255, 255, 0.8) 100%);
    animation: rotate-laser 4s linear infinite;
    opacity: 0; /* Ẩn mặc định */
    transition: opacity 0.5s ease;
    z-index: 1;
}

/* Đổi màu laser cho từng thẻ */
.laser-red {
    background: conic-gradient(from 0deg, transparent 70%, var(--brand-red) 100%);
}

.laser-yellow {
    background: conic-gradient(from 0deg, transparent 70%, var(--brand-yellow) 100%);
}

@keyframes rotate-laser {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Kích hoạt laser và nảy nhẹ khi Hover */
.bento-card:hover {
    transform: translateY(-5px);
}

    .bento-card:hover .laser-border {
        opacity: 1; /* Hiện tia sáng chạy vòng quanh viền */
    }

/* --- Hình nền và Lớp phủ (Background & Overlay) --- */
.bento-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    transition: opacity 0.5s ease, transform 1s ease;
    /* Gradient Fade: Đen đậm ở dưới để chữ dễ đọc, mờ dần lên trên */
    mask-image: linear-gradient(to top, rgba(0,0,0,0) 10%, rgba(0,0,0,1) 90%);
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0) 10%, rgba(0,0,0,1) 90%);
}

.bento-card:hover .bento-bg {
    opacity: 0.6;
    transform: scale(1.05); /* Zoom chậm khi hover */
}

/* Hình nền Pattern chấm bi cho thẻ Vá vỏ */
.dot-pattern-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* --- Nội dung bên trong (Content) --- */
.bento-content {
    position: relative;
    z-index: 3;
    padding: 30px;
}

.bento-large .bento-content {
    padding: 40px;
}

.bento-tag {
    background: rgba(211, 47, 47, 0.15);
    color: var(--brand-red);
    border: 1px solid rgba(211, 47, 47, 0.3);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

/* Nút bấm tinh tế */
.btn-bento-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

    .btn-bento-action i {
        transition: transform 0.3s ease;
    }

.bento-card:hover .btn-bento-action {
    color: var(--brand-yellow);
}

.bento-card.card-red-accent:hover .btn-bento-action {
    color: var(--brand-red);
}

.bento-card:hover .btn-bento-action i {
    transform: translateX(6px);
}

/* --- Khối CTA (Tổng đài) --- */
.bg-dark-gradient {
    background: radial-gradient(circle at center, #1a1a24 0%, #0e0e11 100%);
}

.sonar-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
}

.sonar-emitter {
    width: 100%;
    height: 100%;
    background: var(--brand-yellow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    position: relative;
    z-index: 2;
}

    .sonar-emitter::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        background: var(--brand-yellow);
        z-index: -1;
        animation: sonar-wave 2s linear infinite;
    }

@keyframes sonar-wave {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.call-hover {
    transition: text-shadow 0.3s ease;
}

.bento-card:hover .call-hover {
    text-shadow: 0 0 15px rgba(255, 193, 7, 0.5);
}

/* Responsive: Ẩn bớt padding trên mobile */
@media (max-width: 768px) {
    .bento-large .bento-content, .bento-content {
        padding: 20px;
    }

    .bento-large, .bento-tall {
        min-height: 380px;
    }
}
