/* ==============================================
   BDS DỰ ÁN - CUSTOM STYLES
   Màu chủ đạo: Đỏ Tươi (#e60000)
   ============================================== */

:root {
    --brand-red: #e60000;
    --brand-darkRed: #cc0000;
    --brand-accent: #ffffff;
    --brand-gray: #1f2937;
    --brand-light: #f8fafc;
}

/* Base Typography */
body {
    font-size: 1rem;
    line-height: 1.6;
}

/* Active Navigation Link */
.active-nav {
    color: #ffffff !important;
    border-bottom: 2px solid #ffffff;
    padding-bottom: 2px;
}

/* Tab Active State */
.tab-active {
    border-bottom: 3px solid #e60000;
    color: #e60000;
    font-weight: 700;
}

/* Line Clamp */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- LONG TEXT / TINYMCE CONTENT GLOBAL STYLE --- */
.prose, .long-text, .tinymce-content {
    line-height: 1.7;
}
.prose p, .long-text p, .tinymce-content p {
    margin-top: 0;
    margin-bottom: 1.2em;
    line-height: 1.7;
}
.prose p + p, .long-text p + p, .tinymce-content p + p {
    margin-top: 0.8em;
}
.prose ul, .long-text ul, .tinymce-content ul,
.prose ol, .long-text ol, .tinymce-content ol {
    margin-bottom: 1.2em;
    padding-left: 1.5em;
}
.prose li, .long-text li, .tinymce-content li {
    margin-bottom: 0.4em;
}
.prose h1, .long-text h1, .tinymce-content h1,
.prose h2, .long-text h2, .tinymce-content h2,
.prose h3, .long-text h3, .tinymce-content h3,
.prose h4, .long-text h4, .tinymce-content h4 {
    margin-top: 1.6em;
    margin-bottom: 0.8em;
    font-weight: 700;
    line-height: 1.3;
}
.prose img, .long-text img, .tinymce-content img {
    margin: 1.2em 0;
    max-width: 100%;
    height: auto;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Fade In Animation */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sticky Sidebar */
.sticky-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 100px;
}

/* Custom Scrollbar */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Slide Animation States */
.slide-active {
    opacity: 1;
    z-index: 10;
}

.slide-hidden {
    opacity: 0;
    z-index: 0;
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Button Transitions */
.btn-primary {
    background-color: var(--brand-red);
    color: white;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--brand-darkRed);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230, 0, 0, 0.3);
}

/* Image Zoom Effect */
.img-zoom {
    overflow: hidden;
}

.img-zoom img {
    transition: transform 0.5s ease;
}

.img-zoom:hover img {
    transform: scale(1.1);
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Focus Outline for Accessibility */
*:focus {
    outline: 2px solid var(--brand-red);
    outline-offset: 2px;
}

/* Mobile Menu Animation */
#mobile-menu {
    transition: all 0.3s ease-in-out;
}

/* Hero Section Background */
.hero-gradient {
    background: linear-gradient(135deg, rgba(230, 0, 0, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
}

/* Section Divider */
.section-divider {
    width: 100px;
    height: 4px;
    background-color: var(--brand-red);
    margin: 0 auto;
    border-radius: 2px;
}

/* Testimonial Card */
.testimonial-card {
    position: relative;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

/* Stats Counter */
.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--brand-red);
    line-height: 1;
}

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(230, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 3px solid var(--brand-red);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.breadcrumb a {
    color: var(--brand-red);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--brand-darkRed);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-red {
    background-color: var(--brand-red);
    color: white;
}

.badge-blue {
    background-color: #3b82f6;
    color: white;
}

.badge-green {
    background-color: #10b981;
    color: white;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .stat-number {
        font-size: 2rem;
    }
    
    .testimonial-card {
        padding: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
}
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-cta-btn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 0, 0.5);
}

/* --- DROPDOWN MENU --- */
.nav-item-wrapper:hover .dropdown-menu {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background-color: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
    z-index: 100;
    border-top: 4px solid var(--color-blue); /* Default border color */
}

.dropdown-item {
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
    transition: all 0.2s;
    font-weight: 500;
    display: block;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #f9f9f9;
    color: var(--color-blue);
    padding-left: 25px; /* Slight indent on hover */
}

/* Customize Dropdown Borders based on Menu Item */
.nav-item-wrapper[data-target="page-gioi-thieu"] .dropdown-menu { border-color: var(--color-green); }
.nav-item-wrapper[data-target="page-gioi-thieu"] .dropdown-item:hover { color: var(--color-green); }

.nav-item-wrapper[data-target="page-lop-hoc"] .dropdown-menu { border-color: var(--color-blue); }
.nav-item-wrapper[data-target="page-lop-hoc"] .dropdown-item:hover { color: var(--color-blue); }

.nav-item-wrapper[data-target="page-tin-tuc"] .dropdown-menu { border-color: var(--color-orange); }
.nav-item-wrapper[data-target="page-tin-tuc"] .dropdown-item:hover { color: var(--color-orange); }

.nav-item-wrapper[data-target="page-tai-nguyen"] .dropdown-menu { border-color: var(--color-purple); }
.nav-item-wrapper[data-target="page-tai-nguyen"] .dropdown-item:hover { color: var(--color-purple); }

/* --- PAGE TRANSITIONS & SECTIONS --- */
.page-section {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.page-section.page-active {
    display: block;
    opacity: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- HERO SLIDER --- */
.hero-slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
    z-index: 10;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 20;
}

.offset-border-bg {
    position: absolute;
    top: 15px;
    right: -15px;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 5px solid var(--color-orange);
    transition: 0.5s;
    z-index: 0;
}

.slide-img-container:hover .offset-border-bg {
    top: 0;
    right: 0;
}

/* --- CHATBOT --- */
.chatbot-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    animation: bounce 3s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-7px); }
}

/* --- MOBILE SUBMENU --- */
.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}
.mobile-submenu.open {
    max-height: 500px; 
    transition: max-height 0.5s ease-in;
}

/* --- SMART STICKY HEADER (TARGET HEADER-PLACEHOLDER) --- */
#header-placeholder {
    /* Đảm bảo vị trí sticky luôn hoạt động ở lớp ngoài cùng */
    position: sticky;
    top: 0;
    z-index: 50; 
    width: 100%;
    transition: transform 0.3s ease-in-out;
}

/* Class để ẩn header khi cuộn xuống */
#header-placeholder.header-hidden {
    transform: translateY(-100%);
}

/* --- SLIDER PAGINATION --- */
.hero-slider-bullet {
    background-color: rgba(255, 255, 255, 0.5); /* Inactive bullet color */
}

.hero-slider-bullet.active {
    background-color: #ffffff; /* Active bullet color */
    transform: scale(1.2);
}

/* --- TEXT GRADIENT FIX --- */
.text-transparent {
    color: transparent !important;
}

.bg-clip-text {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- CUSTOM GRADIENT TEXT --- */
.gradient-text-custom {
    background: linear-gradient(135deg, #0075C9 0%, #9b59b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    font-weight: 900;
    font-size: inherit;
    line-height: inherit;
}