/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variables */
:root {
    --primary-gradient: linear-gradient(135deg, #ffffff 0%, #f8f9fa 10%, #e6f2ff 20%, #b8d4e3 35%, #6a9bd1 55%, #4a7ba7 75%, #3d5a80 100%);
    --text-light: #f8f9fa;
    --text-dark: #2c3e50;
    --bg-dark: rgba(20, 20, 30, 0.95);
    --bg-card: rgba(255, 255, 255, 0.1);
    --accent-blue: #6a9bd1;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}

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

/* Background with blur effect */
.bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/background.jpg') center/cover no-repeat;
    filter: blur(8px);
    transform: scale(1.1);
    z-index: -2;
}

/* Dark overlay for better readability */
.bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 20, 0.7);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.container {
    text-align: center;
    z-index: 1;

}

.title {
    font-family: 'Montserrat', sans-serif;
    font-size: 6rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    transform: translateY(-50px);
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    margin-top: 1rem;
    opacity: 0.9;
    letter-spacing: 0.05em;
    transform: translateY(-47px);
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-light);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
    cursor: pointer;
    text-decoration: none;
}

/* Sections Base */
section {
    position: relative;
    z-index: 1;
    padding: 40px 20px;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 40px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37), inset 0 0 20px rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.content-wrapper:hover {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 40px 0 rgba(31, 38, 135, 0.45), inset 0 0 30px rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 300;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-blue);
    border-radius: 2px;
}

/* About Section */
.section-description {
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 3rem;
    opacity: 0.9;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.stat-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.stat-item h3 {
    font-size: 3rem;
    font-weight: 600;
    color: var(--accent-blue);
}

.stat-item p {
    margin-top: 0.5rem;
    opacity: 0.8;
}

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.team-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.12);
}

.member-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent-blue);
    box-shadow: 0 4px 15px rgba(106, 155, 209, 0.3);
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-card h3 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.role {
    color: var(--accent-blue);
    font-weight: 400;
    margin-bottom: 1rem;
}

.bio {
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.skill-tag {
    padding: 0.3rem 0.8rem;
    background: rgba(106, 155, 209, 0.2);
    border: 1px solid var(--accent-blue);
    border-radius: 15px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: rgba(106, 155, 209, 0.3);
    transform: scale(1.05);
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-links a {
    color: var(--text-light);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    color: var(--accent-blue);
    transform: translateY(-3px);
    background: rgba(106, 155, 209, 0.2);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.project-icon {
    font-size: 3rem;
    color: var(--accent-blue);
    margin-bottom: 1rem;
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-card p {
    opacity: 0.8;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.project-tags span {
    padding: 0.3rem 0.8rem;
    background: rgba(106, 155, 209, 0.2);
    border: 1px solid var(--accent-blue);
    border-radius: 15px;
    font-size: 0.8rem;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-item {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.12);
}

.service-item i {
    font-size: 2.5rem;
    color: var(--accent-blue);
    margin-bottom: 1rem;
}

.service-item h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.service-item p {
    opacity: 0.8;
    line-height: 1.6;
}

/* Contact Section - Updated for perfect alignment */
.contact-description {
    text-align: center;
    opacity: 0.9;
    max-width: 600px;
    margin: -1rem auto 2rem;
    line-height: 1.6;
}

.contact-grid {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 4rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 1.2rem;
    text-decoration: none;
    color: var(--text-light);
    transition: all 0.3s ease;
    min-width: 120px;
    padding: 1rem;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.03);
}

.contact-item:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.contact-item i {
    font-size: 3.5rem;
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(106, 155, 209, 0.1);
    transition: all 0.3s ease;
    line-height: 1;
}

.contact-item:hover i {
    color: #87ceeb;
    background: rgba(135, 206, 235, 0.2);
    transform: scale(1.1);
}

.contact-item span {
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    margin: 0;
}

/* Footer */
.footer {
    padding: 20px;
    text-align: center;
    background: rgba(10, 10, 20, 0.9);
    margin-top: 40px;
}

.footer-content {
    opacity: 0.7;
    font-size: 0.9rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .title {
        font-size: 3rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .content-wrapper {
        padding: 40px 25px;
        border-radius: 20px;
    }

    .team-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 3rem auto 0;
    }

    .contact-grid {
        gap: 2rem;
    }

    .contact-item i {
        font-size: 3rem;
        width: 70px;
        height: 70px;
    }

    .contact-item span {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2.5rem;
        letter-spacing: 0.1em;
    }

    .content-wrapper {
        padding: 30px 20px;
        border-radius: 15px;
    }

    .contact-grid {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .contact-item {
        width: 200px;
    }
}

.member-image img {
    transition: transform 0.5s ease;
}

.team-card:hover .member-image img {
    transform: rotate(5deg) scale(1.05);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding: 8px 16px;
    background: rgba(74, 144, 226, 0.1);
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 20px;
    color: #4a90e2;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: rgba(74, 144, 226, 0.2);
    border-color: #4a90e2;
    transform: translateY(-2px);
}

.project-link i {
    font-size: 1rem;
}

/* Navigation Toolbar */
.navbar {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    animation: slideDown 0.5s ease-out;
    /* Thêm transition cho hiệu ứng smooth */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease;
    opacity: 1;
}

/* Class để ẩn navbar */
.navbar.hidden {
    transform: translateX(-50%) translateY(-70px);
    opacity: 0;
}

/* Class để hiện navbar */
.navbar.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.nav-container {
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 8px 16px;
    display: flex;
    gap: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
    min-height: 44px;
    align-items: center;
    /* Thêm transition cho container */
    transition: all 0.3s ease;
}

.nav-item {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-item i {
    font-size: 14px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.nav-item span {
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-1px);
}

.nav-item:hover i {
    transform: scale(1.1);
}

.nav-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-item:hover::before {
    opacity: 1;
}

/* Animation ban đầu */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        top: 8px;
        width: 95%;
        left: 50%;
        transform: translateX(-50%);
    }

    .navbar.hidden {
        transform: translateX(-50%) translateY(-60px);
    }

    .nav-container {
        padding: 6px 8px;
        gap: 4px;
        justify-content: space-between;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        min-height: 40px;
    }

    .nav-container::-webkit-scrollbar {
        display: none;
    }

    .nav-item {
        padding: 8px 12px;
        font-size: 12px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .nav-item i {
        font-size: 14px;
    }

    .nav-item span {
        display: none;
        display: none;
    }

    .nav-item:hover span {
        display: inline;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 5px 6px;
        min-height: 36px;
    }

    .nav-item {
        padding: 6px 10px;
    }

    .navbar.hidden {
        transform: translateX(-50%) translateY(-50px);
    }
}

/* Adjust hero section padding to account for navbar */
.hero {
    padding-top: 90px;
}
