/* Design System & Variables */
:root {
    --primary: #F98012;
    /* Moodle Orange */
    --primary-dark: #d66400;
    --primary-light: #fbc087;
    --secondary: #1E293B;
    --dark: #0F172A;
    --dark-card: #1E293B;
    --light: #F8FAFC;
    --text-main: #334155;
    --text-muted: #64748B;
    --white: #FFFFFF;

    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --radius-md: 16px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(249, 128, 18, 0.4);
}

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

html {
    scroll-behavior: smooth;
}

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

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--dark);
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 700;
}

p {
    margin-bottom: 1.5rem;
}

.text-center {
    text-align: center;
}

/* Language switcher pill (VN/EN) - same style on all pages */
.lang-pill {
    display: inline-flex;
    align-items: center;
    margin-left: 1rem;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    font-size: 0.875rem;
    font-weight: 600;
}
.lang-pill a {
    padding: 0.25rem 0.625rem;
    color: #374151;
    transition: background 0.15s, color 0.15s;
}
.lang-pill a:hover {
    background: #f3f4f6;
}
.lang-pill a.active {
    background: #4f46e5;
    color: #fff;
}

/* Glassmorphism Classes */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    gap: 0.5rem;
    font-size: 1rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(249, 128, 18, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
}

.btn-outline-light {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline-light:hover {
    background: var(--white);
    color: var(--primary);
}

.pulse-btn {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(249, 128, 18, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(249, 128, 18, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(249, 128, 18, 0);
    }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    z-index: 1000;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar.scrolled {
    padding: 0.75rem 0;
    box-shadow: var(--shadow-sm);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo strong {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-links .btn {
    padding: 8px 20px;
    font-size: 0.95rem;
    white-space: nowrap;
}

.nav-links a:not(.btn) {
    font-weight: 500;
    color: var(--text-main);
    transition: var(--transition);
    position: relative;
}

.nav-links a:not(.btn):hover {
    color: var(--primary);
}

.user-actions {
    display: flex;
    gap: 10px;
    margin-left: 20px;
    flex-shrink: 0;
}

.user-actions a {
    font-weight: 500;
    color: var(--text-main);
    transition: var(--transition);
    white-space: nowrap;
}

.user-actions a:hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 160px 0 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at top right, rgba(249, 128, 18, 0.1) 0%, rgba(248, 250, 252, 1) 40%);
    overflow: hidden;
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(249, 128, 18, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(249, 128, 18, 0.2);
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--primary), #FF512F);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 90%;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

/* Mockup CSS */
.mockup-card {
    height: 380px;
    width: 100%;
    display: flex;
    flex-direction: column;
    transform: perspective(1000px) rotateY(-15deg) rotateX(5deg);
    transition: var(--transition);
    box-shadow: 20px 20px 40px rgba(0, 0, 0, 0.1);
}

.mockup-card:hover {
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg) translateY(-10px);
    box-shadow: 30px 30px 60px rgba(0, 0, 0, 0.15);
}

.mockup-header {
    height: 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    padding: 0 15px;
    gap: 6px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red {
    background: #FF5F56;
}

.dot.yellow {
    background: #FFBD2E;
}

.dot.green {
    background: #27C93F;
}

.mockup-body {
    flex: 1;
    padding: 15px;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.dashboard-sim {
    display: flex;
    height: 100%;
    gap: 15px;
}

.dash-sidebar {
    width: 60px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.dash-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dash-top {
    height: 40px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.dash-cards {
    display: flex;
    gap: 10px;
}

.dash-card {
    flex: 1;
    height: 60px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.dash-graph {
    flex: 1;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.skeleton {
    position: relative;
    overflow: hidden;
}

.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    100% {
        left: 100%;
    }
}

/* Section Common */
section {
    padding: 100px 0;
}

.section-header {
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* About Section */
.about {
    background-color: var(--white);
}

.about-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 5rem;
}

@media (max-width: 900px) {
    .about-hero {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
}

.about-image {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
}

.about-image:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.about-image img {
    opacity: 0.95;
    transition: opacity 0.3s ease;
}

.about-image:hover img {
    opacity: 1;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.about-card {
    padding: 2.5rem 2rem;
    text-align: center;
    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-10px);
}

.icon-wrapper {
    width: 70px;
    height: 70px;
    background: rgba(249, 128, 18, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    transition: var(--transition);
}

.about-card:hover .icon-wrapper {
    background: var(--primary);
    color: var(--white);
    transform: scale(1.1);
}

/* CTA Section */
.cta-box {
    background: linear-gradient(135deg, var(--secondary), var(--dark));
    color: var(--white);
    padding: 4rem;
    border: none;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 60%);
    opacity: 0.3;
    border-radius: 50%;
}

.cta-box h2 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.cta-box p {
    font-size: 1.125rem;
    color: #cbd5e1;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 2;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    position: relative;
    z-index: 2;
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .about-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

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

    .about-grid {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-form-row {
        flex-direction: column;
    }
}

/* Footer & Contact Page Styles */
.footer {
    background: var(--light);
    padding-bottom: 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
    padding-top: 4rem;
}

.contact-page {
    padding-top: 150px;
    background-color: var(--light);
    min-height: 80vh;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
}

.contact-form-row {
    display: flex;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s;
    font-family: inherit;
    font-size: 1rem;
    background: var(--white);
}

textarea.form-control {
    resize: vertical;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(249, 128, 18, 0.1);
}