* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #0066cc;
    --color-primary-dark: #004499;
    --color-success: #098B20;
    --color-accent: #ff6b35;
    --color-text: #333333;
    --color-muted: #666666;
    --color-bg: #f8f9fa;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 15px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 15px 40px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Noto Sans', 'Segoe UI', 'Arial Unicode MS', 'Lucida Sans Unicode', 'DejaVu Sans', 'Tahoma', Arial, sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
}

/* Force Vietnamese font for all text elements except icons */
body *:not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.fad):not([class*="fa-"]) {
    font-family: 'Noto Sans', 'Segoe UI', 'Arial Unicode MS', 'Lucida Sans Unicode', 'DejaVu Sans', 'Tahoma', Arial, sans-serif !important;
}

/* Custom Bootstrap overrides */
.navbar-nav .nav-link:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card { border: none; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12); }

/* Banner/Header custom styles */
.logo-banner img {
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Topbar */
.topbar { background: var(--color-primary); color: #fff; font-size: 13px; }
.topbar .nav-link { color: #fff; }
.topbar-logo { height: 25px; }

/* Banner/Header */
.banner { background-color: #F6E6C6; min-height: 150px; }
.banner-inner { background-image: url('https://via.placeholder.com/1200x150/F6E6C6/333333?text=Background'); background-repeat: repeat; height: 150px; }
.logo-img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); }
.site-subtitle { font-size: 16px; color: var(--color-primary); }
.site-title { font-size: 24px; font-weight: 700; color: var(--color-success); }
.site-meta { font-size: 14px; color: var(--color-muted); }

.name-channel-title {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* News and announcement styles */
.news-item:hover,
.announcement-item:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}

.news-item h6 a,
.announcement-item h6 a {
    color: var(--color-primary);
    transition: color 0.3s ease;
}

.news-item h6 a:hover,
.announcement-item h6 a:hover {
    color: var(--color-primary-dark);
}

/* Carousel custom styles */
.carousel-item img {
    height: 400px;
    object-fit: cover;
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    padding: 20px;
}

/* Small carousel variant */
.carousel-250 .carousel-inner { height: 250px; }
.carousel-250 .carousel-item img { height: 250px; object-fit: cover; }

/* Statistics counter animation */
.stats-item h2 { font-weight: 700; font-size: 2.5rem; }

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.counter {
    animation: countUp 0.8s ease-out;
}

/* Social links */
.social-links a { transition: transform 0.2s ease; }
.social-links a:hover { transform: scale(1.08); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Framed middle content */
.content-frame { background: #fff; border: 1px solid #e9ecef; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.card .carousel-inner { border-top-left-radius: .5rem; border-top-right-radius: .5rem; overflow: hidden; }

/* Header Styles (custom header removed - using Bootstrap navbar) */

/* Scope contact info layout to the contact section to avoid footer conflicts */
.contact .contact-info { display: grid; grid-template-columns: repeat(2, minmax(240px, 1fr)); gap: 24px; }

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.contact-item i {
    font-size: 1.1rem;
}

/* Navigation Styles */
.navbar { background: var(--color-primary); box-shadow: 0 2px 10px rgba(0,0,0,0.08); position: sticky; top: 0; z-index: 1000; }
.search-box input { width: 220px; }

/* Removed unused hero and custom button styles to avoid conflicts with Bootstrap */

/* Section Styles */
section { padding: 60px 0; }

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 15px;
    position: relative;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--color-accent);
    border-radius: 2px;
}

/* Programs Section */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.program-card {
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.program-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.program-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.program-icon i {
    font-size: 2rem;
    color: white;
}

.program-card h3 {
    color: var(--color-primary);
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.program-card p {
    color: #666;
    line-height: 1.7;
}

/* News Section */
.news { background: var(--color-bg); }

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.news-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.news-image {
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

.news-content {
    padding: 25px;
}

.news-date {
    color: #ff6b35;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.news-content h3 {
    color: var(--color-primary);
    font-size: 1.3rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.news-content p {
    color: #666;
    line-height: 1.7;
    margin-bottom: 20px;
}

.read-more {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: var(--color-accent);
    gap: 10px;
}

/* Admissions Section */
.admissions-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.admissions-info h3,
.admissions-requirements h3 {
    color: var(--color-primary);
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--color-accent);
    margin-top: 5px;
}

.info-item h4 {
    color: var(--color-primary);
    margin-bottom: 5px;
}

.info-item p {
    color: #666;
    margin: 0;
}

.admissions-requirements ul {
    list-style: none;
    margin-bottom: 30px;
}

.admissions-requirements li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.admissions-requirements i {
    color: #ff6b35;
}

/* Contact Section */
.contact { background: var(--color-bg); }

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.contact .contact-info .contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.contact .contact-info .contact-item i {
    font-size: 1.5rem;
    color: var(--color-accent);
    margin-top: 5px;
}

.contact .contact-info h4 {
    color: var(--color-primary);
    margin-bottom: 5px;
}

.contact .contact-info p {
    color: #666;
    margin: 0;
    line-height: 1.6;
}

.contact-form {
    background: white;
    padding: 28px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 25px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0066cc;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
/* Remove unused .footer custom block (using Bootstrap footer) */

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.footer-logo img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.footer-section h3,
.footer-section h4 {
    color: #0066cc;
    margin-bottom: 20px;
}

.footer-section p {
    line-height: 1.7;
    opacity: 0.9;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: #0066cc;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--color-accent);
    transform: translateY(-2px);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul a:hover { color: var(--color-primary); }

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
    opacity: 0.7;
}

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* Back to top button styles */
.back-to-top { position: fixed; bottom: 24px; right: 24px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: #0066cc; color: #fff; box-shadow: 0 6px 16px rgba(0,0,0,0.2); opacity: 0; transform: translateY(10px); visibility: hidden; transition: opacity .2s ease, transform .2s ease, visibility .2s ease; z-index: 1030; }
.back-to-top.visible { opacity: 1; transform: translateY(0); visibility: visible; }
.back-to-top:hover { background: #0053a6; }

/* About section layout refinements */
.about-content { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; }
.about-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.about-stats .stat-item { background: #fff; border: 1px solid #e9ecef; border-radius: var(--radius-md); padding: 24px; text-align: center; box-shadow: var(--shadow-sm); }
.about-stats .stat-item h4 { color: var(--color-primary); font-size: 2rem; margin-bottom: 6px; }
.values-list { list-style: none; padding: 0; margin: 15px 0 0; }
.values-list li { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--color-muted); }
.values-list i { color: var(--color-accent); }

/* Skip link and focus styles */
.skip-link { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { position: fixed; left: 16px; top: 16px; width: auto; height: auto; padding: 10px 14px; background: var(--color-primary); color: #fff; border-radius: var(--radius-sm); z-index: 1100; }
body.keyboard-navigation a:focus-visible,
body.keyboard-navigation button:focus-visible,
body.keyboard-navigation input:focus-visible,
body.keyboard-navigation textarea:focus-visible,
body.keyboard-navigation [tabindex]:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; border-radius: 6px; }

/* Footer logo image */
.footer-logo-img { width: 50px; height: 50px; border-radius: 50%; margin-right: 15px; }

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content h2 {
        font-size: 2.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-content,
    .admissions-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    section {
        padding: 50px 0;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .programs-grid {
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-form { padding: 24px 18px; }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .logo {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .school-info h1 {
        font-size: 1.4rem;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
    
    .program-card,
    .news-card {
        margin: 0 10px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Footer layout guard to avoid overlap */
footer .row > [class^="col-"] { margin-bottom: 1rem; }
footer .contact-info p { margin-bottom: .5rem; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}