/* Công Cụ AI - Premium Blue Theme */
/* Thêm !important để override theme Moodle */

/* Page-specific CTA variables (blue theme) */
:root {
    --ai-cta-banner-bg: #f2f8ff; /* soft pale blue backdrop */
    --ai-cta-card-top: #2f6edb;   /* card darker blue */
    --ai-cta-card-mid: #4f7cf0;   /* card mid blue */
    --ai-cta-card-bottom: #a9d1ff; /* card bottom light blue */
    --ai-cta-icon-top: #0057d9;  /* icon darker */
    --ai-cta-icon-bottom: #2f88ff; /* icon lighter */
    --ai-cta-shadow: rgba(47, 110, 219, 0.12);
    --ai-cta-btn-dark: #15315e;
    --ai-cta-btn-dark-hover: #0d1f3b;
}

/* ===== FIX SCROLL KÉP VÀ FULL WIDTH ===== */
/* Bỏ scroll bên trong - chỉ giữ scroll chính của body */
body.congcu-ai-page,
body.congcu-ai-page #page,
body.congcu-ai-page #page-wrapper,
body.congcu-ai-page #page-content,
body.congcu-ai-page #region-main,
body.congcu-ai-page #region-main-box,
body.congcu-ai-page .main_content_container,
body.congcu-ai-page [role="main"],
body.congcu-ai-page .main-inner,
body.congcu-ai-page .drawercontent,
body.congcu-ai-page #topofscroll,
body.congcu-ai-page .edly-page-drawers,
body.congcu-ai-page .edly-main,
body.congcu-ai-page .bottom-region-main-box,
body.congcu-ai-page .container.d-print-block,
body.congcu-ai-page .drag-container,
body.congcu-ai-page [data-usertour="scroller"],
body.congcu-ai-page .drawers,
body.congcu-ai-page #wrapper,
body.congcu-ai-page .edly-page-wrapper {
    overflow: visible !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    max-height: none !important;
    height: auto !important;
}

/* Đảm bảo navbar area và các parent của nó không bị overflow hidden cắt */
body.congcu-ai-page .navbar-area,
body.congcu-ai-page .main-navbar {
    overflow: visible !important;
}

/* Loại trừ notification popover - giữ scroll cho nó */
body.congcu-ai-page .navbar-area *:not(.popover-region):not(.popover-region-container):not(.popover-region-content):not(.popover-region-content-container):not(.all-notifications):not(.notification-message):not(.content-item-container) {
    overflow: visible !important;
}

/* Fix notification popover scroll */
body.congcu-ai-page .popover-region-content-container {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: 400px !important;
}

body.congcu-ai-page .popover-region-container {
    overflow: visible !important;
}

/* Override drawercontent specific scroll - QUAN TRỌNG */
body.congcu-ai-page .drawercontent,
body.congcu-ai-page .drawercontent.drag-container,
body.congcu-ai-page [data-usertour="scroller"] {
    overflow: visible !important;
    overflow-y: visible !important;
    overflow-x: hidden !important;
    height: auto !important;
    max-height: none !important;
    position: static !important;
    -webkit-overflow-scrolling: auto !important;
}

/* Full width - bỏ giới hạn container */
body.congcu-ai-page #page,
body.congcu-ai-page #page-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: visible !important; /* Giữ visible để không cắt navbar */
}

body.congcu-ai-page #page-content,
/* body.congcu-ai-page .container-fluid, */
body.congcu-ai-page #region-main,
body.congcu-ai-page #region-main-box,
body.congcu-ai-page .main_content_container,
body.congcu-ai-page [role="main"],
body.congcu-ai-page .main-inner,
body.congcu-ai-page .pagelayout-standard #page.drawers .main-inner,
body.congcu-ai-page #topofscroll,
body.congcu-ai-page .secondary-navigation,
body.congcu-ai-page .activity-header,
body.congcu-ai-page .edly-main,
body.congcu-ai-page .bottom-region-main-box,
body.congcu-ai-page .container.d-print-block {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: hidden !important;
}

/* Bỏ padding của các container cha */
body.congcu-ai-page #topofscroll,
body.congcu-ai-page .pagelayout-standard #page.drawers,
body.congcu-ai-page .drawers,
body.congcu-ai-page #page.drawers,
body.congcu-ai-page .main-inner,
body.congcu-ai-page #region-main-box,
body.congcu-ai-page .edly-main,
body.congcu-ai-page .bottom-region-main-box {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

/* Loại bỏ khoảng trắng do padding-top của #page và các wrapper */
body.congcu-ai-page #page,
body.congcu-ai-page #page-wrapper,
body.congcu-ai-page #wrapper,
body.congcu-ai-page .edly-page-wrapper,
body.congcu-ai-page .edly-page-drawers {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Ẩn drawer trái hoàn toàn vì không cần */
body.congcu-ai-page .drawer.drawer-left,
body.congcu-ai-page .drawer-primary,
body.congcu-ai-page #theme_boost-drawers-primary,
body.congcu-ai-page .drawer-toggles {
    display: none !important;
    width: 0 !important;
    visibility: hidden !important;
}

/* Ẩn secondary navigation và activity header để content sát header hơn */
body.congcu-ai-page .secondary-navigation,
body.congcu-ai-page .activity-header,
body.congcu-ai-page #page-header,
body.congcu-ai-page #page-navbar {
    display: none !important;
}

/* Đảm bảo navbar không bị ẩn */
body.congcu-ai-page .navbar-area {
    display: block !important;
}

/* ẨN THẺ H3 PAGE HEADING CỦA MOODLE */
body .page-context-header,
body .page-header-headings,
body .page-header-headings h3,
body #page-content .page-context-header,
#page .page-context-header,
#region-main .page-context-header {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Background trang - Full width */
.ai-tools-page {
    padding: 0 !important;
    margin-top: 0 !important;
    min-height: auto !important;
    background: white !important;
    overflow: hidden !important;
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
}

/* Loại bỏ khoảng trắng giữa header và content */
body.congcu-ai-page #page-content,
body.congcu-ai-page #region-main,
body.congcu-ai-page #region-main-box,
body.congcu-ai-page [role="main"],
body.congcu-ai-page .main-inner {
    padding-top: 0 !important;
    margin-top: 0 !important;
    border-top: none !important;
}

/* Loại bỏ border/line từ các element Moodle */
body.congcu-ai-page #page,
body.congcu-ai-page #page-wrapper,
body.congcu-ai-page .drawers,
body.congcu-ai-page #topofscroll {
    border: none !important;
    border-top: none !important;
}

/* Container fluid full width */
.ai-tools-page .container-fluid {
    max-width: 100% !important;
    padding: 0 20px !important;
    margin: 0 !important;
}

.ai-tools-page .container-fluid.px-0 {
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* ===== NEW HERO SECTION ===== */
.ai-tools-page .ai-hero-wrapper {
    position: relative !important;
    width: 100vw !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    margin-top: 0 !important;
    background: linear-gradient(180deg, #dbeafe 0%, #e0f2fe 50%, #f0f9ff 100%) !important;
    padding: 40px 20px 30px !important;
    margin-bottom: 40px !important;
    border-top: none !important;
}

.ai-tools-page .ai-hero-content {
    max-width: 1200px !important;
    margin: 0 auto !important;
    text-align: center !important;
}

.ai-tools-page .ai-hero-badge {
    display: inline-block !important;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%) !important;
    color: white !important;
    padding: 8px 20px !important;
    border-radius: 50px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    margin-bottom: 25px !important;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3) !important;
}

.ai-tools-page .ai-hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem) !important;
    font-weight: 900 !important;
    color: #1e3a5f !important;
    margin: 0 0 20px !important;
    line-height: 1.1 !important;
}

.ai-tools-page .ai-hero-desc {
    font-size: 1.15rem !important;
    color: #4b5563 !important;
    max-width: 700px !important;
    margin: 0 auto 35px !important;
    line-height: 1.6 !important;
}

/* Category Tabs */
.ai-tools-page .ai-hero-categories {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 12px !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

.ai-tools-page .ai-hero-cat-btn {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 16px 24px !important;
    background: white !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 16px !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    min-width: 100px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

.ai-tools-page .ai-hero-cat-btn:hover {
    border-color: #2563eb !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15) !important;
}

.ai-tools-page .ai-hero-cat-btn.active {
    background: #1e3a5f !important;
    border-color: #1e3a5f !important;
    color: white !important;
}

.ai-tools-page .ai-hero-cat-btn.active .ai-cat-name {
    color: white !important;
}

.ai-tools-page .ai-cat-icon {
    font-size: 1.5rem !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f3f4f6 !important;
    border-radius: 12px !important;
}

.ai-tools-page .ai-hero-cat-btn.active .ai-cat-icon {
    background: rgba(255, 255, 255, 0.2) !important;
}

.ai-tools-page .ai-cat-name {
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    color: #374151 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Hero Responsive */
@media (max-width: 768px) {
    .ai-tools-page .ai-hero-wrapper {
        padding: 60px 15px 40px !important;
    }
    
    .ai-tools-page .ai-hero-title {
        font-size: 2rem !important;
    }
    
    .ai-tools-page .ai-hero-desc {
        font-size: 1rem !important;
    }
    
    .ai-tools-page .ai-hero-cat-btn {
        padding: 12px 16px !important;
        min-width: 80px !important;
    }
    
    .ai-tools-page .ai-cat-icon {
        font-size: 1.2rem !important;
        width: 32px !important;
        height: 32px !important;
    }
    
    .ai-tools-page .ai-cat-name {
        font-size: 0.7rem !important;
    }
}

/* Header / top line removal (page-scoped) */
body.congcu-ai-page header[role="banner"],
body.congcu-ai-page .navbar,
body.congcu-ai-page .page-header,
body.congcu-ai-page #page #page-header,
body.congcu-ai-page #page .page-header {
    border-bottom: 0 !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
}

/* Loại bỏ hoàn toàn khoảng trắng giữa header và nội dung */
body.congcu-ai-page .navbar-area {
    margin-bottom: 0 !important;
    border-bottom: 0 !important;
    overflow: visible !important;
}

body.congcu-ai-page .main-navbar {
    margin-bottom: 0 !important;
    padding: 5px 0 !important; /* Giữ nguyên padding như theme gốc */
    border-bottom: 0 !important;
    overflow: visible !important;
}

body.congcu-ai-page .main-navbar .navbar {
    overflow: visible !important;
}

/* Ensure navbar fills with a solid background (matches main site pages) */
/* Keep the navbar transparent at the top to preserve hero layout */
body.congcu-ai-page .navbar-area {
    background: transparent !important;
    box-shadow: none !important;
    border-bottom: 0 !important;
    z-index: 999 !important;
    position: relative !important;
    overflow: visible !important;
}

/* Sticky variant: keep the same look when JS adds is-sticky */
/* When scrolled (sticky), apply the filled header look like other pages */
body.congcu-ai-page .navbar-area.is-sticky {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background: var(--white-color, #ffffff) !important;
    box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.12) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    z-index: 9999 !important;
    animation: 500ms ease-in-out 0s normal none 1 running fadeInDown !important;
}


/* Section Card */
/* Full-width section cards */
.ai-tools-page .ai-section-card {
    background: white !important;
    border-radius: 24px !important;
    padding: 40px !important;
    margin-bottom: 30px !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    transition: all 0.3s ease !important;
    max-width: 1400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    scroll-margin-top: 20px !important;
}
.ai-tools-page .ai-section-card:hover {
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.1) !important;
}

/* SECTION TITLE - CĂN GIỮA */
.ai-tools-page .ai-section-title {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #1e3a5f !important;
    margin-bottom: 10px !important;
    text-align: center !important;
    display: flex !important; /* center icon + text */
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
}

/* Force disable any floats or odd display from imported HTML and ensure child elements align */
.ai-tools-page .ai-section-title,
.ai-tools-page .ai-section-title * {
    float: none !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

/* SECTION DESC - CĂN GIỮA */
.ai-tools-page .ai-section-desc {
    color: #64748b !important;
    margin-bottom: 28px !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    text-align: center !important;
    max-width: 800px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Tools Grid */
/* Make the tools grid flexible to fill the wider layout */
.ai-tools-page .ai-tools-grid {
    display: flex !important;
    gap: 24px !important;
    transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1) !important;
}

/* Slider track - overflow hidden for smooth sliding */
.ai-tools-page .ai-tools-slider-track {
    overflow: hidden !important;
    width: 100% !important;
}

/* Slider grid - inline flex for smooth horizontal sliding */
.ai-tools-page .ai-slider-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 24px !important;
    transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1) !important;
}

/* Slider wrapper */
.ai-tools-page .ai-tools-slider-wrapper {
    position: relative !important;
    width: 100% !important;
}

.ai-tools-page .ai-tools-slider-wrapper.has-slider {
    padding: 0 50px !important;
}

/* Slider buttons */
.ai-tools-page .ai-slider-btn {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    cursor: pointer !important;
    z-index: 10 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    color: #1e3a5f !important;
}

.ai-tools-page .ai-slider-btn:hover {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%) !important;
    color: white !important;
    border-color: transparent !important;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3) !important;
}

.ai-tools-page .ai-slider-btn.disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.ai-tools-page .ai-slider-prev {
    left: 0 !important;
}

.ai-tools-page .ai-slider-next {
    right: 0 !important;
}

.ai-tools-page .ai-slider-btn i {
    font-size: 14px !important;
}

/* Slider dots */
.ai-tools-page .ai-slider-dots {
    display: flex !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-top: 20px !important;
}

.ai-tools-page .ai-slider-dot {
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    background: #e2e8f0 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.ai-tools-page .ai-slider-dot:hover {
    background: #94a3b8 !important;
}

.ai-tools-page .ai-slider-dot.active {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
    width: 24px !important;
    border-radius: 5px !important;
}

/* Tool Card - Large vertical card with image on top */
.ai-tools-page .ai-tool-card {
    display: flex !important;
    flex-direction: column !important;
    min-width: calc(25% - 18px) !important;
    max-width: calc(25% - 18px) !important;
    flex-shrink: 0 !important;
    background: #ffffff !important;
    border-radius: 20px !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    color: inherit !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
    overflow: hidden !important;
}

.ai-tools-page .ai-tool-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 20px 50px rgba(30, 58, 95, 0.15) !important;
    border-color: #2563eb !important;
}

/* Tool Image - Large display area */
.ai-tools-page .ai-tool-image {
    width: 100% !important;
    height: 180px !important;
    background: linear-gradient(135deg, #e8f4fc 0%, #dbeafe 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    position: relative !important;
}

.ai-tools-page .ai-tool-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    padding: 20px !important;
    transition: transform 0.3s ease !important;
}

.ai-tools-page .ai-tool-card:hover .ai-tool-image img {
    transform: scale(1.05) !important;
}

.ai-tools-page .ai-tool-placeholder {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #f8fafc 0%, #e8f4fc 100%) !important;
}

.ai-tools-page .ai-tool-placeholder i {
    font-size: 4rem !important;
    color: #94a3b8 !important;
}

/* Tool Content */
.ai-tools-page .ai-tool-content {
    padding: 20px !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

.ai-tools-page .ai-tool-name {
    font-weight: 700 !important;
    font-size: 1.15rem !important;
    color: #1e3a5f !important;
    margin-bottom: 6px !important;
    line-height: 1.4 !important;
}

.ai-tools-page .ai-tool-desc {
    font-size: 0.9rem !important;
    color: #64748b !important;
    margin: 0 !important;
    line-height: 1.5 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* Tool Button */
.ai-tools-page .ai-tool-btn {
    display: block !important;
    margin: 0 20px 20px !important;
    padding: 14px 24px !important;
    background: transparent !important;
    color: #1e3a5f !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    text-align: center !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

.ai-tools-page .ai-tool-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
    color: white !important;
    border-color: transparent !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3) !important;
}

/* ===== CTA BANNER SECTION ===== */
.ai-tools-page .ai-cta-banner {
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    width: 100vw !important;
    /* pale blue backdrop */
    background: var(--ai-cta-banner-bg) !important;
    /* Reduce vertical padding to avoid excessive blue area; keep enough space for visual balance */
    padding: 80px 20px 80px !important;
    margin-top: 40px !important;
    margin-bottom: 0 !important;
}

.ai-tools-page .ai-cta-card {
    max-width: 800px !important;
    margin: 0 auto !important;
    /* Blue gradient with soft dropshadow */
    background: linear-gradient(135deg, var(--ai-cta-card-top) 0%, var(--ai-cta-card-mid) 50%, var(--ai-cta-card-bottom) 100%) !important;
    border-radius: 28px !important;
    border: 1px solid rgba(255,255,255,0.06) !important;
    backdrop-filter: blur(2px) !important;
    padding: 56px 48px !important;
    text-align: center !important;
    box-shadow: 0 36px 120px var(--ai-cta-shadow) !important;
    position: relative !important;
    overflow: hidden !important;
}

.ai-tools-page .ai-cta-card::before {
    content: '' !important;
    position: absolute !important;
    top: -50% !important;
    right: -50% !important;
    width: 100% !important;
    height: 100% !important;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%) !important;
    pointer-events: none !important;
}

.ai-tools-page .ai-cta-icon {
    width: 80px !important;
    height: 80px !important;
    margin: 0 auto 25px !important;
    background: linear-gradient(135deg, var(--ai-cta-icon-top) 0%, var(--ai-cta-icon-bottom) 100%) !important;
    border-radius: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 10px 30px rgba(47, 110, 219, 0.22) !important;
}

.ai-tools-page .ai-cta-icon svg {
    width: 40px !important;
    height: 40px !important;
}

.ai-tools-page .ai-cta-title {
    font-size: 2.2rem !important;
    font-weight: 800 !important;
    color: white !important;
    margin: 0 0 15px !important;
    line-height: 1.3 !important;
}

.ai-tools-page .ai-cta-desc {
    font-size: 1.1rem !important;
    color: rgba(255, 255, 255, 0.94) !important;
    margin: 0 0 30px !important;
    line-height: 1.6 !important;
    max-width: 600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.ai-tools-page .ai-cta-buttons {
    display: flex !important;
    gap: 16px !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
}

.ai-tools-page .ai-cta-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 16px 32px !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

.ai-tools-page .ai-cta-btn-primary {
    /* Dark navy CTA button */
    background: linear-gradient(90deg, var(--ai-cta-btn-dark) 0%, #143454 60%) !important;
    color: white !important;
    box-shadow: 0 10px 36px rgba(20, 40, 80, 0.28) !important;
}

.ai-tools-page .ai-cta-btn-primary:hover {
    background: var(--ai-cta-btn-dark-hover) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(30, 58, 95, 0.5) !important;
}

.ai-tools-page .ai-cta-btn-secondary {
    background: white !important;
    color: var(--ai-cta-btn-dark) !important;
    box-shadow: 0 4px 20px rgba(14, 51, 83, 0.06) !important;
    border: 1px solid rgba(14, 51, 83, 0.08) !important;
}

.ai-tools-page .ai-cta-btn-secondary:hover {
    background: #f8fafc !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

.ai-tools-page .ai-cta-btn svg {
    width: 20px !important;
    height: 20px !important;
}

/* CTA Responsive */
@media (max-width: 768px) {
    .ai-tools-page .ai-cta-banner {
        padding: 60px 15px 60px !important;
    }
    
    .ai-tools-page .ai-cta-card {
        padding: 35px 25px !important;
        border-radius: 20px !important;
    }
    
    .ai-tools-page .ai-cta-title {
        font-size: 1.6rem !important;
    }
    
    .ai-tools-page .ai-cta-desc {
        font-size: 1rem !important;
    }
    
    .ai-tools-page .ai-cta-buttons {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .ai-tools-page .ai-cta-btn {
        width: 100% !important;
        justify-content: center !important;
        padding: 14px 24px !important;
    }
}

/* Source Info */
.ai-tools-page .ai-source-info {
    text-align: center !important;
    padding: 35px 20px 10px !important;
    color: #64748b !important;
    font-size: 0.88rem !important;
}

.ai-tools-page .ai-source-info a {
    color: #2563eb !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}

.ai-tools-page .ai-source-info a:hover {
    text-decoration: underline !important;
    color: #1e3a5f !important;
}

/* Responsive */
@media (max-width: 1200px) {
    .ai-tools-page .ai-tool-card {
        min-width: calc(33.333% - 16px) !important;
        max-width: calc(33.333% - 16px) !important;
    }
    .ai-tools-page .ai-section-card {
        margin-left: 15px !important;
        margin-right: 15px !important;
    }
}

@media (max-width: 992px) {
    .ai-tools-page .ai-tool-card {
        min-width: calc(50% - 12px) !important;
        max-width: calc(50% - 12px) !important;
    }
    .ai-tools-page .ai-tool-image {
        height: 150px !important;
    }
}

@media (max-width: 768px) {
    .ai-tools-page .ai-tools-hero {
        padding: 40px 25px !important;
        border-radius: 18px !important;
    }
    
    .ai-tools-page .ai-tools-hero h1 {
        font-size: 1.8rem !important;
    }
    
    .ai-tools-page .ai-tools-hero p {
        font-size: 1rem !important;
    }
    
    .ai-tools-page .ai-section-card {
        padding: 25px 15px !important;
        border-radius: 16px !important;
        margin-left: 10px !important;
        margin-right: 10px !important;
    }
    
    .ai-tools-page .ai-tool-card {
        min-width: calc(50% - 12px) !important;
        max-width: calc(50% - 12px) !important;
    }
    
    .ai-tools-page .ai-section-title {
        font-size: 1.25rem !important;
    }
    
    .ai-tools-page .ai-tools-slider-wrapper.has-slider {
        padding: 0 40px !important;
    }
    
    .ai-tools-page .ai-slider-btn {
        width: 40px !important;
        height: 40px !important;
    }
    
    .ai-tools-page .ai-tool-image {
        height: 140px !important;
    }
    
    .ai-tools-page .ai-tool-content {
        padding: 15px !important;
    }
    
    .ai-tools-page .ai-tool-btn {
        margin: 0 15px 15px !important;
        padding: 12px 20px !important;
    }
}

@media (max-width: 576px) {
    .ai-tools-page .ai-tool-card {
        min-width: 100% !important;
        max-width: 100% !important;
    }
    
    .ai-tools-page .ai-tools-slider-wrapper.has-slider {
        padding: 0 35px !important;
    }
    
    .ai-tools-page .ai-slider-btn {
        width: 32px !important;
        height: 32px !important;
    }
}

/* On small screens don't overlap header - keep normal spacing */
@media (max-width: 768px) {
    .ai-tools-page {
        margin-top: 0 !important;
        padding: 0 0 40px !important;
        width: 100vw !important;
        left: 50% !important;
        margin-left: -50vw !important;
    }
    .ai-tools-page .ai-tools-hero {
        padding: 20px 18px !important;
        box-shadow: 0 12px 30px rgba(30, 58, 95, 0.12) !important;
        /* reset to container flow on small screens (avoid full bleed) */
        position: static !important;
        left: auto !important;
        right: auto !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: auto !important;
        border-radius: 16px !important;
    }
    
    .ai-tools-page .ai-hero-wrapper {
        padding: 30px 15px 40px !important;
    }
    
    /* Vẫn giữ full-width trên mobile */
    body.congcu-ai-page #page,
    body.congcu-ai-page #page-wrapper,
    body.congcu-ai-page #page-content,
    body.congcu-ai-page #region-main,
    body.congcu-ai-page .main_content_container,
    body.congcu-ai-page .main-inner {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}
