/* Theme Name: TechMu Custom
Author: Gemini
Version: 2.5
*/

/* XÓA BỎ TOÀN BỘ CÁC ĐOẠN DEBUG CSS KHÔNG CÒN CẦN THIẾT NỮA */

/* 1. GLOBAL FONT FIX */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&display=swap');

:root {
    --primary-color: #2563eb;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f3f4f6;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.6);
}

html.dark {
    --glass-bg: rgba(30, 41, 59, 0.75);
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Be Vietnam Pro', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* =========================================
   COMMON COMPONENTS
   ========================================= */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s;
}

/* =========================================
   HERO SECTION GRADIENT
   ========================================= */
.hero-aurora-bg {
    background: radial-gradient(circle at top left, #a5f3fc, #e0e7ff, #f3e8ff);
    background-size: 200% 200%;
    animation: gradientMove 15s ease infinite;
}

html.dark .hero-aurora-bg {
    background: radial-gradient(circle at top left, #1e1b4b, #172554, #0f172a);
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* =========================================
   PROJECT CARD STYLES
   ========================================= */
.project-card-custom {
    border-radius: 24px;
    overflow: visible; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.project-card-custom:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.1);
}

.project-img-container {
    height: 280px;
    overflow: hidden;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    position: relative;
    z-index: 1; 
}

.project-img-container img {
    transition: transform 0.5s ease;
}

.project-card-custom:hover .project-img-container img {
    transform: scale(1.05);
}

.link-fab {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #7c3aed; 
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    position: absolute;
    right: 24px;
    top: 255px; 
    z-index: 30; 
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
    transition: all 0.2s;
    border: 4px solid white;
}

html.dark .link-fab {
    border-color: #1e293b;
}

.link-fab:hover {
    transform: scale(1.1);
    background-color: #6d28d9;
}

.project-body {
    padding: 32px 24px 24px 24px; 
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    position: relative;
    z-index: 2;
    flex-grow: 1;
}

/* LIST VIEW MODE STYLES */
.list-view-mode .project-card-custom {
    flex-direction: row;
    overflow: hidden;
    height: auto;
    align-items: center;
}

.list-view-mode .project-img-container {
    width: 40%;
    height: 100%;
    min-height: 250px;
    border-top-right-radius: 0;
    border-bottom-left-radius: 24px;
}

.list-view-mode .project-body {
    width: 60%;
    border-bottom-left-radius: 0;
    border-top-right-radius: 24px;
    padding: 20px 30px;
}

.list-view-mode .link-fab {
    top: 50%;
    transform: translateY(-50%);
    left: 38%; 
    right: auto;
}

@media (max-width: 768px) {
    .list-view-mode .project-card-custom {
        flex-direction: column;
    }
    .list-view-mode .project-img-container {
        width: 100%;
        border-top-right-radius: 24px;
        border-bottom-left-radius: 0;
    }
    .list-view-mode .project-body {
        width: 100%;
    }
    .list-view-mode .link-fab {
        top: 255px;
        left: auto;
        right: 24px;
        transform: none;
    }
}

/* =========================================
   SINGLE PROJECT STYLES
   ========================================= */
.info-sidebar-card {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
}

.info-item {
    border-bottom: 1px dashed #e2e8f0;
    padding: 1rem 0;
}

html.dark .info-item {
    border-color: #334155;
}

.info-item:last-child {
    border-bottom: none;
}

.check-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.925rem;
}

.check-icon {
    color: #2563eb;
    font-size: 20px;
    margin-top: 2px;
}

.related-project-card {
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.related-project-card:hover {
    transform: translateY(-8px);
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* =========================================
   MENU FIXES (PC & MOBILE)
   ========================================= */
.menu-item a {
    font-size: 16px !important; 
    font-weight: 500 !important;
    font-family: 'Be Vietnam Pro', sans-serif !important;
    line-height: 1.5 !important;
}

.sub-menu {
    min-width: 220px; 
}

@media (max-width: 768px) {
    .menu-item-has-children {
        flex-wrap: wrap !important;
    }
    
    .sub-menu {
        width: 100% !important;
        position: static !important;
        box-shadow: none !important;
        background-color: transparent !important;
        padding-left: 0 !important;
        margin-top: 5px !important;
        display: none; 
    }

    .sub-menu.active-sub {
        display: block !important;
    }

    .sub-menu li {
        margin-bottom: 10px; 
        border-left: 2px solid #e5e7eb; 
        margin-left: 10px;
    }

    .sub-menu li a {
        padding-left: 15px !important;
        font-size: 16px !important; 
    }
}

/* =========================================
   RESPONSIVE IMAGE FIX (CHỐNG VỠ LAYOUT)
   ========================================= */
/* Ép ảnh nội dung bài viết và chi tiết dự án nằm gọn trong khung (CHỈ ÁP DỤNG TRONG TRANG CHI TIẾT .single) */
.single .prose img,
.single .project-body img,
.single .check-item img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin-left: auto;
    margin-right: auto;
    border-radius: 8px; /* Tùy chọn làm mềm góc ảnh */
}

/* MỚI THÊM: Thêm thuộc tính này cho thẻ wp-caption và blockquote / pre để giới hạn độ rộng tuyệt đối */
.single .wp-caption {
    max-width: 100% !important;
}

.single blockquote,
.single pre {
    max-width: 100% !important;
    overflow-x: auto !important;
    box-sizing: border-box !important;
}

/* Ép nghiêm ngặt trên Mobile: Giới hạn tầm ảnh hưởng chỉ đối với các trang chi tiết bài viết (Single Post/Project) 
   Điều này giúp bảo vệ hình ảnh Thumbnail, Tab Images ở trang chủ và trang Giới thiệu không bị ép tỷ lệ co lại */
@media (max-width: 768px) {
    .single .prose img,
    .single .content-image-fix,
    .single .check-item img,
    .single .wp-caption img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Đảm bảo class wp-caption và pre không bao giờ vượt qua màn hình thiết bị */
    .single .wp-caption, 
    .single pre,
    .single blockquote {
        max-width: 100% !important;
        overflow-x: auto !important;
        display: block; /* Hỗ trợ trượt ngang thay vì làm giãn layout */
    }
}