﻿:root {
    --primary-gold: #ffc107;
    --dark-gold: #c2aa45; /* Tông vàng sẫm hơn một chút cho hiệu ứng hover */
    --light-gold: #fbf8e8; /* Tông vàng rất nhạt dùng cho background nhẹ */
    --primary-blue: #152b65; /* Màu xanh chủ đạo */
    --soft-bg: #f4f6fa; /* Nền sáng thiên sắc xanh nhẹ */
    --text-dark: #152b65; /* Màu chữ chính tông xanh đậm */
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-dark);
    background-color: var(--soft-bg);
}

h1, h2, h3, h4, h5, .navbar-brand {
    font-family: 'Montserrat', sans-serif;
}

/* Utility */
.section-title {
    position: relative;
    margin-bottom: 2.5rem;
    text-align: center;
    color: var(--primary-blue);
}

    .section-title::after {
        content: '';
        display: block;
        width: 60px;
        height: 3px;
        background: var(--primary-gold);
        margin: 10px auto 0;
        border-radius: 2px;
    }

.btn-gold {
    background-color: var(--primary-gold);
    color: #ffffff; /* Mã vàng #dac35d đủ độ đậm để phối chữ trắng rõ nét */
    font-weight: 600;
    border-radius: 25px;
    padding: 10px 24px;
    border: none;
    transition: all 0.3s ease;
}

    .btn-gold:hover {
        background-color: var(--dark-gold);
        color: #ffffff;
        box-shadow: 0 4px 12px rgba(218, 195, 93, 0.35);
    }

/* Top Bar & Nav */
.top-bar {
    background-color: #0d1b40;
    color: #e0e6f5;
    font-size: 0.875rem;
}
.navbar {
    position: sticky !important;
    top: 0;
    z-index: 1030; /* Đảm bảo menu luôn nổi lên trên các thành phần khác khi cuộn */
}
    .navbar.sticky-top {
        top: 0;
        left: 0;
        width: 100%;
        z-index: 9999;
    }
.navbar-light .navbar-nav .nav-link {
    color: var(--primary-gold);
    font-weight: 600;
    padding: 0.5rem 1rem;
}

    .navbar-light .navbar-nav .nav-link:hover {
        color: var(--dark-gold);
    }

/* Hero Banner Carousel */
/* ===================================================
   MATHLINKS FULL WIDTH IMAGE-ONLY BANNER
   =================================================== */

.mathlinks-hero-img {
    width: 100%;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

    /* Định dạng chiều cao ảnh trên PC */
    .mathlinks-hero-img .hero-img {
        height: 75vh;
        min-height: 400px;
        max-height: 650px;
        object-fit: cover; /* Đảm bảo ảnh tự động cân đối không bị méo */
        object-position: center;
    }

    /* Chỉnh nút chỉ số bên dưới */
    .mathlinks-hero-img .carousel-indicators [data-bs-target] {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background-color: #ffffff;
        opacity: 0.6;
        margin: 0 5px;
    }

    .mathlinks-hero-img .carousel-indicators .active {
        opacity: 1;
        background-color: #ffc107;
        width: 28px;
        border-radius: 10px;
    }

/* ===================================================
   RESPONSIVE (ĐIỆN THOẠI & MÁY TÍNH BẢNG)
   =================================================== */

@media (max-width: 991.98px) {
    .mathlinks-hero-img .hero-img {
        height: 50vh;
        min-height: 300px;
    }
}

@media (max-width: 575.98px) {
    .mathlinks-hero-img .hero-img {
        height: 35vh;
        min-height: 200px;
    }
}
/* Stats Counter Bar */
.stat-card {
    background: #ffffff;
    border-bottom: 3px solid var(--primary-gold);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(21, 43, 101, 0.06);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-blue);
}

/* Feature Cards */
.feature-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(21, 43, 101, 0.08);
    border-top: 4px solid var(--primary-gold);
    transition: transform 0.3s ease;
}

    .feature-card:hover {
        transform: translateY(-5px);
    }

.icon-box {
    width: 60px;
    height: 60px;
    background-color: var(--primary-blue);
    color: var(--primary-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

/* Gallery Overlay */
.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(21, 43, 101, 0.1);
}

    .gallery-item img {
        width: 100%;
        height: 260px;
        object-fit: cover;
        transition: transform 0.4s ease;
    }

    .gallery-item:hover img {
        transform: scale(1.08);
    }

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(21, 43, 101, 0.9), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 20px;
    color: #fff;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Teacher Cards */
.teacher-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(21, 43, 101, 0.06);
    text-align: center;
}

.teacher-img {
    height: 250px;
    object-fit: cover;
    width: 100%;
}

/* Course Cards */
.course-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(21, 43, 101, 0.06);
    transition: all 0.3s ease;
}

    .course-card:hover {
        box-shadow: 0 10px 30px rgba(21, 43, 101, 0.15);
    }

.course-img {
    height: 200px;
    object-fit: cover;
}

/* Footer */
footer {
    background-color: var(--primary-blue);
    color: #d0d7ea;
}

    footer h5 {
        color: var(--primary-gold);
    }

    footer a {
        color: #d0d7ea;
        text-decoration: none;
    }

        footer a:hover {
            color: var(--primary-gold);
        }
/* Tự động xổ menu con khi rê chuột vào menu cha (Áp dụng cho màn hình máy tính) */
@media all and (min-width: 992px) {
    .navbar .nav-item.dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0; /* Khắc phục khoảng hở nhỏ khiến menu bị mất khi rê chuột vào */
    }

    /* Thêm hiệu ứng chuyển động nhẹ khi mở menu */
    .navbar .dropdown-menu {
        transition: all 0.2s ease-in-out;
    }
}