/* Global Styles */
:root {
    --primary-color: #27517A;      /* Xanh đậm - màu chính của brand */
    --secondary-color: #F1C711;    /* Vàng sáng - màu phụ của brand */
    --accent-color: #F1EDE8;      /* Trắng kem - màu nhấn */
    --success-color: #4A90A4;      /* Xanh dương nhạt */
    --warning-color: #F1C711;      /* Vàng sáng */
    --danger-color: #E74C3C;       /* Đỏ tươi */
    --info-color: #3498DB;         /* Xanh dương tươi */
    --light-color: #FFFFFF;        /* Trắng sáng */
    --dark-color: #2C3E50;         /* Xanh đậm cho text chính */
    --text-primary: #27517A;       /* Xanh đậm cho text chính */
    --text-secondary: #5D6D7E;     /* Xám xanh cho text phụ */
    --bg-light: #F8F9FA;           /* Nền sáng */
    --bg-white: #FFFFFF;           /* Trắng tinh */
    --border-color: #E8E8E8;       /* Viền nhạt */
    --shadow-light: rgba(39, 81, 122, 0.08); /* Bóng nhẹ với màu brand */
    --shadow-medium: rgba(39, 81, 122, 0.12); /* Bóng vừa với màu brand */
    --gradient-primary: linear-gradient(135deg, #27517A 0%, #4A90A4 100%);
    --gradient-secondary: linear-gradient(135deg, #F1C711 0%, #FFD700 100%);
    --gradient-accent: linear-gradient(135deg, #F1EDE8 0%, #FFFFFF 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(39, 81, 122, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(241, 199, 17, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(74, 144, 164, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Navigation - Thiết kế mới */
.navbar {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1.2rem 0;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(39, 81, 122, 0.1);
    box-shadow: 0 8px 32px rgba(39, 81, 122, 0.1);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    padding: 0.8rem 0;
    box-shadow: 0 4px 20px rgba(39, 81, 122, 0.15);
}

.navbar-brand {
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    font-weight: 700;
    display: flex;
    align-items: center;
    position: relative;
}

.navbar-brand::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-secondary);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.navbar-brand:hover::after {
    width: 100%;
}

.navbar-brand img {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 4px 8px rgba(39, 81, 122, 0.15));
    border-radius: 12px;
}

.navbar-brand:hover img {
    transform: scale(1.08) rotate(2deg);
    filter: drop-shadow(0 8px 16px rgba(39, 81, 122, 0.25));
}

.navbar-nav .nav-link {
    font-weight: 600;
    margin: 0 0.8rem;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
    color: var(--text-secondary) !important;
    border-radius: 25px;
    position: relative;
    overflow: hidden;
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: -1;
    border-radius: 25px;
}

.navbar-nav .nav-link:hover::before {
    left: 0;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    transform: translateY(-2px);
}

/* Hero Section - Thiết kế mới */
.hero-section {
    background: var(--gradient-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 120px 0 80px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>'),
        radial-gradient(circle at 30% 20%, rgba(241, 199, 17, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(74, 144, 164, 0.1) 0%, transparent 50%);
    opacity: 0.6;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.05) 50%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
    color: var(--bg-white);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    position: relative;
}

.hero-section h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--gradient-secondary);
    border-radius: 2px;
}

.hero-section .lead {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.hero-section .btn {
    border-radius: 50px;
    padding: 1rem 2.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-section .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.hero-section .btn:hover::before {
    left: 100%;
}

.hero-section .btn-warning {
    background: var(--gradient-secondary);
    color: var(--dark-color);
}

.hero-section .btn-outline-light {
    background: transparent;
    color: white;
    border: 2px solid white;
    backdrop-filter: blur(10px);
}

.hero-section .btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}

.hero-section .btn-warning:hover {
    background: linear-gradient(135deg, #FFD700 0%, #F1C711 100%);
}

.hero-section .btn-outline-light:hover {
    background: white;
    color: var(--primary-color);
}

.hero-section .img-fluid {
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    transition: all 0.4s ease;
}

.hero-section .img-fluid:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

.text-accent {
    color: var(--accent-color) !important;
}

/* Section Headers - Thiết kế mới */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.section-header h2 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--gradient-secondary);
    border-radius: 2px;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Course Cards - Thiết kế mới */
.course-card {
    border: none;
    border-radius: 25px;
    box-shadow: 0 15px 35px rgba(39, 81, 122, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    background: var(--bg-white);
    position: relative;
    margin-bottom: 2rem;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.course-card:hover::before {
    transform: scaleX(1);
}

.course-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 50px rgba(39, 81, 122, 0.2);
}

.course-card .card-body {
    padding: 2.5rem 2rem;
    background: var(--bg-white);
    position: relative;
}

.course-icon {
    margin-bottom: 2rem;
    text-align: center;
}

.course-icon i {
    font-size: 3rem;
    color: var(--primary-color);
    background: var(--gradient-accent);
    padding: 1.5rem;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(39, 81, 122, 0.15);
    transition: all 0.3s ease;
}

.course-card:hover .course-icon i {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 30px rgba(39, 81, 122, 0.25);
}

.course-card h5 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.course-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.course-features {
    margin-top: 1.5rem;
}

.course-features .badge {
    font-size: 0.8rem;
    padding: 0.6rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    margin: 0.3rem;
    background: var(--gradient-accent);
    color: var(--text-primary);
    border: 1px solid rgba(39, 81, 122, 0.1);
}

/* Teacher Cards - Thiết kế mới */
.teacher-card {
    border: none;
    border-radius: 25px;
    box-shadow: 0 15px 35px rgba(39, 81, 122, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    background: var(--bg-white);
    position: relative;
    margin-bottom: 2rem;
}

.teacher-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-secondary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.teacher-card:hover::before {
    transform: scaleX(1);
}

.teacher-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(39, 81, 122, 0.2);
}

.teacher-card img {
    object-fit: cover;
    border: none;
    transition: all 0.4s ease;
    filter: brightness(0.9);
}

.teacher-card:hover img {
    filter: brightness(1.1);
    transform: scale(1.05);
}

.teacher-card .card-body {
    padding: 2rem;
    text-align: center;
}

.teacher-card h5 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.teacher-card p {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 1rem;
}

/* Contact Form - Thiết kế mới */
.contact-section {
    background: var(--gradient-accent);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(39, 81, 122, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(241, 199, 17, 0.05) 0%, transparent 50%);
}

.contact-section .container {
    position: relative;
    z-index: 2;
}

.form-control, .form-select {
    border-radius: 20px;
    border: 2px solid rgba(39, 81, 122, 0.1);
    padding: 1rem 1.5rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    color: var(--dark-color);
    font-size: 1rem;
    backdrop-filter: blur(10px);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(39, 81, 122, 0.15);
    background: white;
    transform: translateY(-2px);
}

.btn-primary {
    border-radius: 50px;
    padding: 1rem 3rem;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--gradient-primary);
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(39, 81, 122, 0.4);
}

/* Footer - Thiết kế mới */
footer {
    background: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
    color: white;
    padding: 4rem 0 2rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-secondary);
}

footer h5 {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    font-weight: 700;
    font-size: 1.3rem;
}

footer h5 img {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(1.2) contrast(1.1);
    border-radius: 12px;
}

footer h5:hover img {
    transform: scale(1.1) rotate(3deg);
    filter: brightness(1.4) contrast(1.2);
}

.brand-text-footer {
    font-family: 'Lora', serif;
    font-weight: 700;
    line-height: 1.2;
    color: #F1C711;
    display: inline-block;
    vertical-align: middle;
    margin-left: 0.5rem;
}

.brand-line-1-footer {
    font-size: 1rem;
    color: #F1C711;
    display: block;
    font-weight: 600;
}

.brand-line-2-footer {
    font-size: 0.9rem;
    color: #F1C711;
    display: block;
    font-weight: 700;
}

footer p {
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

footer p:hover {
    color: white;
}

footer i {
    color: var(--secondary-color);
    margin-right: 0.8rem;
    width: 20px;
    text-align: center;
}

.social-links {
    margin-top: 2rem;
}

.social-links a {
    display: inline-block;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-links a:hover {
    background: var(--gradient-secondary);
    color: var(--dark-color) !important;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 25px rgba(241, 199, 17, 0.4);
}

/* Responsive Design - Cải thiện */
@media (max-width: 768px) {
    .navbar-brand img {
        width: 100px !important;
    }
    
    footer h5 img {
        width: 60px !important;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .section-header h2 {
        font-size: 2.5rem;
    }
    
    .course-card, .teacher-card {
        margin-bottom: 2rem;
    }
    
    .navbar-nav {
        text-align: center;
        margin-top: 1rem;
    }
    
    .social-links {
        text-align: center;
        margin-top: 1rem;
    }
    
    .hero-section .btn {
        width: 100%;
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 1.5rem 1rem;
    }
    
    .btn-lg {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .navbar {
        padding: 1rem 0;
    }
}

/* Animations - Cải thiện */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Section Animations */
.course-card, .teacher-card {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.course-card:nth-child(2) {
    animation-delay: 0.2s;
}

.course-card:nth-child(3) {
    animation-delay: 0.4s;
}

.course-card:nth-child(4) {
    animation-delay: 0.6s;
}

.teacher-card:nth-child(2) {
    animation-delay: 0.1s;
}

.teacher-card:nth-child(3) {
    animation-delay: 0.2s;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 6px;
    border: 2px solid var(--bg-light);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Loading Animation */
.loading {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

/* Hover Effects */
.card:hover {
    cursor: pointer;
}

.btn:hover {
    cursor: pointer;
}

/* Focus States */
.btn:focus, .form-control:focus, .form-select:focus {
    outline: none;
}

/* Print Styles */
@media print {
    .navbar, .hero-section, .btn, .social-links {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        background: var(--bg-white);
        color: var(--dark-color);
    }
    
    .card {
        border: 1px solid var(--border-color);
        break-inside: avoid;
        background: var(--bg-white);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .card {
        border: 3px solid var(--primary-color);
    }
    
    .btn {
        border: 3px solid currentColor;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --light-color: #F5F5F5;
        --dark-color: #424242;
        --bg-light: #FAFAFA;
        --bg-white: #FFFFFF;
        --border-color: #E0E0E0;
        --text-primary: #2E7D32;
        --text-secondary: #666666;
    }
    
    body {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        color: var(--dark-color);
    }
    
    .card {
        background-color: var(--bg-white);
        color: var(--dark-color);
        border-color: var(--border-color);
    }
    
    .navbar {
        background-color: rgba(255, 255, 255, 0.95) !important;
        border-bottom-color: var(--border-color);
    }
    
    .form-control, .form-select {
        background: rgba(255, 255, 255, 0.9);
        color: var(--dark-color);
        border-color: var(--border-color);
    }
}

/* Utility Classes */
.bg-light {
    background-color: var(--bg-light) !important;
}

.bg-white {
    background-color: var(--bg-white) !important;
}

.text-primary {
    color: var(--text-primary) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

/* Cải thiện contrast cho text */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
}

p, .lead {
    color: var(--text-secondary);
}

/* Làm sáng các card và section */
.card {
    background: var(--bg-white);
    border-color: var(--border-color);
}

.section-title {
    color: var(--text-primary);
    font-weight: 700;
}

/* Cải thiện màu cho badges */
.badge.bg-primary {
    background: var(--gradient-primary) !important;
}

.badge.bg-success {
    background: var(--success-color) !important;
}

.badge.bg-warning {
    background: var(--gradient-secondary) !important;
}

.badge.bg-info {
    background: var(--info-color) !important;
}

.badge.bg-danger {
    background: var(--danger-color) !important;
}

/* Floating elements animation */
.floating {
    animation: float 3s ease-in-out infinite;
}

.floating-delay-1 {
    animation-delay: 0.5s;
}

.floating-delay-2 {
    animation-delay: 1s;
}

/* Glassmorphism effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
}

/* Gradient text */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced shadows */
.shadow-custom {
    box-shadow: 
        0 10px 30px rgba(39, 81, 122, 0.1),
        0 1px 8px rgba(39, 81, 122, 0.05);
}

.shadow-custom:hover {
    box-shadow: 
        0 20px 40px rgba(39, 81, 122, 0.15),
        0 5px 15px rgba(39, 81, 122, 0.1);
} 