/* --- CẤU HÌNH MÀU SẮC & BIẾN GLOBAL --- */
:root {
    --color-orange: #FF6B00;
    --color-green: #76BC21;
    --color-blue: #0075C9;
    --color-yellow: #FFD600;
    --color-purple: #9b59b6;
    --color-red: #e74c3c;

    --bg-orange: #FFF0E0;
    --bg-green: #F0F9E8;
    --bg-blue: #E6F2FA;
    --bg-yellow: #FFFBE6;

    --text-main: #2c3e50;
}

/* --- BASE STYLES --- */
body {
    font-family: 'Nunito', sans-serif;
    color: var(--text-main);
    overflow-x: hidden;
}

h1, h2, h3, h4, .font-heading {
    font-family: 'Nunito', sans-serif;
}

h2 {
    font-size: 1.6em;
    font-weight:700;
}

h3 {
    font-size: 1.4em;
    font-weight:500;
}

h4 {
    font-size: 1.2em;
    font-weight:400;
}

.font-hand {
    font-family: 'Patrick Hand', cursive;
}

/* --- UI COMPONENTS (BUTTONS, CARDS) --- */
.card-pop {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-pop:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.15);
}

.btn-creative {
    position: relative;
    z-index: 1;
    overflow: hidden;
    transition: all 0.3s;
}

.btn-creative:hover {
    transform: scale(1.05);
}

/* --- NAVIGATION (HEADER) --- */
.nav-item-wrapper {
    position: relative;
    padding: 0.5rem 0.8rem;
    border-radius: 99px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-item-wrapper:hover .nav-link-trigger {
    font-weight: 700;
    color: var(--color-blue);
}

.nav-item-wrapper.active-nav {
    background-color: var(--color-blue);
    color: white !important;
    box-shadow: 0 4px 10px rgba(0, 117, 201, 0.3);
}

.nav-item-wrapper.active-nav .nav-link-trigger {
    color: white !important;
}

/* CTA Button in Menu */
.nav-cta-btn {
    background: linear-gradient(135deg, var(--color-orange), var(--color-red));
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 99px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.4);
    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); }
}

/* --- FOOTER & DECORATION --- */
.footer-rainbow {
    height: 8px;
    background: linear-gradient(to right, var(--color-red), var(--color-orange), var(--color-yellow), var(--color-green), var(--color-blue), var(--color-purple));
}

.bg-doodles {
    background-image: radial-gradient(var(--color-blue) 1px, transparent 1px), radial-gradient(var(--color-orange) 1px, transparent 1px);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    background-color: #ffffff;
    opacity: 0.05;
}

/* --- 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;
}

.prose ul li, .long-text ul li, .tinymce-content ul li, .tinymce-content ul li {
    list-style: disc;
    margin-left: 40px;
}

.prose ul, .long-text ul, .tinymce-content ul, .tinymce-content ul {
    padding-bottom: 1em;
}

.prose p, .long-text p, .tinymce-content p {
    margin-bottom: 1em;
    line-height: 1.7;
}