/* CSS Variables */
:root {
    --primary-red: #ba0012;
    --gradient-red: linear-gradient(135deg, #ff1b1c, #ba0012);
    --text-dark: #1f2937;
    --text-light: #f3f4f6;
    --bg-light: #ffffff;
    --bg-gray: #f9fafb;
    --bg-dark: #ba0012; /* Thay đen bằng đỏ */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-bg-dark: rgba(255, 255, 255, 0.1); /* Cho nền đỏ */
    --glass-border-dark: rgba(255, 255, 255, 0.2);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 25px rgba(186, 0, 18, 0.15);
    --transition: all 0.3s ease-in-out;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Unbounded', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }
.text-red { color: var(--primary-red); }

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.3;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.text-center .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

.no-line::after {
    display: none !important;
}

.highlight {
    background: var(--gradient-red);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Sticky Top Bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition);
}

.top-bar.scrolled {
    padding: 10px 0;
    box-shadow: var(--shadow-sm);
    background: rgba(255, 255, 255, 0.95);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.logo-cae {
    height: 32px; /* Giảm 20% so với 40px */
}

.logo-divider {
    width: 2px;
    height: 30px;
    background: #e5e7eb;
}

.desktop-nav {
    display: flex;
    gap: 30px;
}

.desktop-nav a {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-red);
    transition: width 0.3s ease;
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
    width: 100%;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--primary-red);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    transition: var(--transition);
    border-radius: 2px;
}

.mobile-menu-btn.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-btn.open span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Nav */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: var(--bg-light);
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    padding: 80px 30px 30px;
    transition: right 0.4s ease;
    z-index: 999;
}

.mobile-nav.open {
    right: 0;
}

.mobile-link {
    font-size: 1.2rem;
    font-weight: 600;
    padding: 15px 0;
    border-bottom: 1px solid #f3f4f6;
}

.mobile-link:hover {
    color: var(--primary-red);
    padding-left: 10px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--gradient-red);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-dark);
    border: 2px solid var(--text-dark);
}

.btn-secondary:hover {
    background: var(--text-dark);
    color: white;
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-light {
    background-color: var(--bg-gray);
}

.section-dark {
    background: var(--primary-red);
    color: var(--text-light);
}

.section-dark .section-title::after {
    background: white;
}

.section-dark .text-red {
    color: white;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
    background: radial-gradient(circle at 50% 50%, #ffffff 0%, var(--bg-gray) 100%);
    overflow: hidden;
}

.hero-bg-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,27,28,0.1) 0%, rgba(255,255,255,0) 70%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero .subtitle {
    font-size: 1.2rem;
    color: #4b5563;
    margin-bottom: 40px;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.section-light strong, .glass-card strong {
    color: var(--primary-red);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.glass-card-dark {
    background: var(--glass-bg-dark);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border-dark);
    border-radius: 16px;
    padding: 30px;
    color: white;
}

.border-red {
    border-left: 4px solid var(--primary-red);
}

/* Grids */
.grid-2-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* Lists */
.feature-list {
    list-style: none;
}

.feature-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-red);
    font-weight: bold;
}

.custom-list {
    list-style: none;
}

.custom-list li {
    padding-left: 20px;
    position: relative;
    margin-bottom: 15px;
}

.custom-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-red);
}

.custom-list.small li {
    font-size: 0.95rem;
    margin-bottom: 10px;
}

/* Teachers Grid */
.teacher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.teacher-card {
    text-align: center;
    transition: var(--transition);
}

.teacher-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 27, 28, 0.3);
}

.placeholder-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #374151, #1f2937);
    margin: 0 auto 20px;
    border: 3px solid rgba(255, 255, 255, 0.1);
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 40px auto 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 30px;
    height: 100%;
    width: 2px;
    background: rgba(186, 0, 18, 0.2);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    padding-left: 80px;
}

.timeline-dot {
    position: absolute;
    left: 11px;
    top: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-red);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 0 0 6px var(--bg-gray);
}

/* Schedule Info (Focus on Date) */
.schedule-info {
    margin-top: 10px;
    text-align: center;
    padding: 10px 0 30px 0;
}

.schedule-item {
    margin-bottom: 20px;
}

.schedule-item h4 {
    font-size: 1.2rem;
    color: #6b7280;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.highlight-date {
    font-size: 3.8rem;
    font-weight: 900;
    color: var(--primary-red);
    text-shadow: 0 8px 15px rgba(186,0,18,0.3);
    margin-top: -10px;
    transform: scale(1.05);
}

.duration-info {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-dark);
}

/* Countdown Timer */
.countdown-wrapper {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
}

.countdown-item {
    background: var(--gradient-red);
    color: white;
    padding: 15px 10px;
    border-radius: 12px;
    min-width: 80px;
    box-shadow: 0 4px 15px rgba(186,0,18,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-value {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 5px;
    font-variant-numeric: tabular-nums;
}

.countdown-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.note {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 20px;
    font-style: italic;
}

/* Form Section */
.section-register {
    background: url('data:image/svg+xml;utf8,<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="2" cy="2" r="1.5" fill="rgba(186,0,18,0.1)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23dots)"/></svg>') var(--bg-gray);
}

.register-wrapper {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-light);
}

.register-text {
    text-align: center;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group.row {
    display: flex;
    gap: 20px;
}

.form-group.row input {
    flex: 1;
}

input, select {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-family: 'Unbounded', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-gray);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(186, 0, 18, 0.1);
    background: var(--bg-light);
}

.btn-submit {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    background: var(--gradient-red);
    color: white;
}

.form-message {
    margin-top: 15px;
    text-align: center;
    font-weight: 500;
    min-height: 24px;
}

.msg-success { color: #10b981; }
.msg-error { color: var(--primary-red); }

/* Footer */
footer {
    background: var(--bg-dark);
    color: white;
    padding: 30px 0;
    font-size: 0.9rem;
}

/* Responsive Mobile Layout */
@media (max-width: 992px) {
    .grid-2-cols {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }

    .logo {
        height: 25px;
    }
    
    .logo-cae {
        height: 20px;
    }

    .section-title {
        font-size: 1.8rem;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        padding-left: 60px;
    }
    
    .timeline-dot {
        left: 0;
    }
    
    .form-group.row {
        flex-direction: column;
        gap: 20px;
    }
    
    /* Mobile Spacing Optimizations */
    .section {
        padding: 60px 0;
    }
    
    .grid-2-cols {
        gap: 20px;
    }
    
    .glass-card, .glass-card-dark {
        padding: 20px;
    }
    
    /* Countdown Mobile Optimizations */
    .countdown-wrapper {
        gap: 8px;
    }
    
    .countdown-item {
        min-width: 65px;
        padding: 10px 5px;
    }
    
    .countdown-value {
        font-size: 1.5rem;
    }
    
    .highlight-date {
        font-size: 2.2rem;
        margin-top: 0;
    }
}

@media (max-width: 480px) {
    .countdown-item {
        min-width: 60px;
        padding: 8px 2px;
    }
    
    .countdown-value {
        font-size: 1.2rem;
    }
    
    .highlight-date {
        font-size: 1.8rem;
    }
    
    .hero {
        padding-top: 100px;
    }
}
