/* * ByteSky 3D Hero - Main Stylesheet 
 * Version: 6.1.0 (System Fonts & Gradient Support)
 */

/* --- 1. Container chính (Wrapper) --- */
.bytesky-hero-wrapper {
    position: relative;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    min-height: 600px; 
    overflow: hidden;
    background-color: #0b0c15; /* Fallback color */
    
    /* Hỗ trợ hiển thị ảnh nền đẹp */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    display: flex;
    align-items: center; 
    justify-content: flex-start; /* Default: Left align */
    
    /* Đồng bộ font với giao diện cha (Theme/Elementor) */
    font-family: inherit;
}

/* --- Center Layout Modifier --- */
.bytesky-hero-wrapper.bytesky-layout-center {
    justify-content: center; /* Căn giữa chiều ngang */
    text-align: center;      /* Căn giữa text */
}

/* --- Overlay Hiệu ứng mờ (Center Mode) --- */
.bytesky-center-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%; 
    height: 100%;
    z-index: 2; /* Dưới text (3), trên 3D (1) */
    pointer-events: none; 
    
    /* Gradient mờ dần từ tâm ra ngoài, opacity chỉnh bằng biến CSS */
    background: radial-gradient(
        circle, 
        rgba(11, 12, 21, var(--overlay-opacity, 0.5)) 0%, 
        rgba(11, 12, 21, var(--overlay-opacity, 0.3)) 40%, 
        rgba(11, 12, 21, 0) 70%
    );
}

/* --- 2. Khung nhìn 3D (Visual Canvas) --- */
.bytesky-visual {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; 
    z-index: 1; /* Nằm trên Background Image */
    pointer-events: auto; 
    cursor: grab; 
}

.bytesky-visual:active {
    cursor: grabbing;
}

.bytesky-visual canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    outline: none;
}

/* --- 3. Nội dung chữ (Content) --- */
.bytesky-content {
    position: relative;
    z-index: 3; /* Luôn nằm trên cùng */
    width: 50%; 
    padding-left: 8%;
    padding-right: 20px;
    pointer-events: none; /* Cho phép click xuyên qua vùng trống */
    box-sizing: border-box;
}

/* Điều chỉnh Content khi ở chế độ Center */
.bytesky-hero-wrapper.bytesky-layout-center .bytesky-content {
    width: 80%;       
    max-width: 900px;
    padding-left: 20px; 
    padding-right: 20px;
}

.bytesky-content > * {
    pointer-events: auto; /* Kích hoạt lại click cho text/btn */
}

/* -- Title Styles (Nâng cấp) -- */
.bytesky-title {
    /* Font size được set inline từ PHP */
    line-height: 1.1; 
    margin-bottom: 20px;
    font-weight: 800; /* Dùng độ đậm của font hệ thống */
    margin-top: 0;
    text-transform: capitalize;
    letter-spacing: -0.02em; /* Tinh chỉnh khoảng cách chữ cho đẹp hơn */
}

/* Đảm bảo 2 dòng tiêu đề xếp chồng lên nhau */
.bytesky-title span {
    display: block;
}

/* -- Desc Styles -- */
.bytesky-desc {
    /* Font size & Color được set inline từ PHP */
    margin-bottom: 30px;
    max-width: 90%;
    line-height: 1.6;
    font-weight: 400; /* Font thường */
}

/* Center Mode Desc */
.bytesky-hero-wrapper.bytesky-layout-center .bytesky-desc {
    margin-left: auto;
    margin-right: auto; 
}

/* --- 4. Nút bấm (Button) --- */
.bytesky-btn {
    display: inline-block;
    padding: 12px 32px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 2px solid; /* Màu border lấy từ inline style background */
    cursor: pointer;
    font-family: inherit; /* Kế thừa font hệ thống */
}

.bytesky-btn:hover {
    background: transparent !important; /* Ghi đè inline style khi hover */
    color: #ffffff !important;          /* Text chuyển trắng */
    border-color: #ffffff !important;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* --- 5. Responsive (Mobile & Tablet) --- */

@media (max-width: 1024px) {
    .bytesky-content {
        width: 60%;
    }
    
    .bytesky-hero-wrapper.bytesky-layout-center .bytesky-content {
        width: 90%;
    }
}

@media (max-width: 768px) {
    .bytesky-hero-wrapper {
        display: flex;
        flex-direction: column; /* Xếp dọc trên mobile */
        justify-content: center;
        height: auto; 
        min-height: auto !important; /* Override inline height */
        padding: 60px 20px;
    }

    .bytesky-content {
        width: 100%;
        padding: 0;
        text-align: center; /* Mobile luôn căn giữa */
        text-shadow: none; /* Đã bỏ shadow trên thiết bị di động */
    }
    
    .bytesky-hero-wrapper.bytesky-layout-center .bytesky-content {
        width: 100%;
    }

    .bytesky-visual {
        position: absolute; 
        top: 0; left: 0;
        opacity: 0.6; /* Làm mờ 3D một chút để text rõ hơn */
    }
    
    /* Title trên Mobile */
    .bytesky-title {
        margin-bottom: 15px;
        /* Cho phép font size nhỏ lại chút nếu người dùng đặt quá to trên PC */
        font-size: clamp(2rem, 8vw, 3.5rem) !important; 
    }

    .bytesky-desc {
        font-size: 1rem !important; /* Reset size cho dễ đọc */
        margin-left: auto; 
        margin-right: auto;
        color: #ffffff !important; /* Đảm bảo luôn trắng trên mobile */
    }

    .bytesky-btn {
        margin-top: 20px;
        width: 100%; 
        max-width: 280px; 
        box-shadow: none !important; 
    }
}