:root {
    --primary-color: #0A3D73; /* Xanh dương đậm ASPT */
    --secondary-color: #F2A900; /* Vàng cam tạo điểm nhấn */
    --text-color: #333333;
    --light-bg: #F5F7FA;
    --white: #FFFFFF;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo a {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-color);
}

.logo span {
    font-size: 16px;
    font-weight: 400;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    font-weight: 600;
    color: var(--text-color);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.lang-btn {
    background: transparent;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.lang-btn:hover, .lang-btn.active {
    border-color: var(--primary-color);
    background-color: rgba(10, 61, 115, 0.05);
    transform: scale(1.1);
}


/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    color: var(--white) !important;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-color) !important;
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

/* Floating Contact */
.floating-contact {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 999;
}

.contact-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    font-size: 24px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: var(--transition);
}

.contact-btn:hover {
    transform: translateY(-5px);
}

.contact-btn.phone { background-color: #28a745; }
.contact-btn.zalo { background-color: #0068ff; font-size: 14px; font-weight: bold; }
.contact-btn.telegram { background-color: #0088cc; }

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.hero-slider {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100% - 80px);
    z-index: 0;
}

.hero-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center top;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slider .slide.active {
    opacity: 1;
}

.hero-bg-overlay {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100% - 80px);
    background: linear-gradient(rgba(10, 61, 115, 0.3), rgba(10, 61, 115, 0.6));
    z-index: 1;
}

.hero-content {
    color: var(--white);
    z-index: 2;
    width: 100%;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.7), 0 2px 5px rgba(0, 0, 0, 0.9);
}

.hero h1 span {
    color: var(--secondary-color);
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 300;
    animation: fadeInUp 1.2s ease;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.7);
}

.hero .sub-text {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 40px;
    animation: fadeInUp 1.4s ease;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.7);
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    animation: fadeInUp 1.6s ease;
    transform: translateZ(10px);
}

.hero-actions .btn-primary, .hero-actions .btn-secondary {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stats Section */
.stats {
    background-color: var(--light-bg);
    padding: 60px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    color: var(--primary-color);
    font-weight: 800;
    margin-bottom: 10px;
}

.stat-item p {
    font-weight: 600;
    color: #555;
}

/* Common Section Styles */
.section {
    padding: 80px 0;
}

.section.bg-light {
    background-color: var(--light-bg);
}

.section.bg-primary {
    background-color: var(--primary-color);
}

.section-title {
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.section-title p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.text-center {
    text-align: center;
}
.text-white {
    color: var(--white) !important;
}
.mb-3 {
    margin-bottom: 1rem;
}

/* Solutions Grid */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.solution-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    text-align: center;
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.solution-card:hover {
    transform: translateY(-10px);
    border-bottom: 4px solid var(--secondary-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.solution-card .icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.solution-card h3 {
    font-size: 1.25rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.portfolio-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    cursor: pointer;
}

.portfolio-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-info {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: rgba(10, 61, 115, 0.9);
    color: var(--white);
    padding: 20px;
    text-align: center;
    transition: bottom 0.4s ease;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-item:hover .portfolio-info {
    bottom: 0;
}

/* Capabilities Grid */
.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    text-align: center;
}

.capability-item i {
    color: var(--secondary-color);
}

.capability-item h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* Footer */
.footer {
    background-color: #052140;
    color: rgba(255,255,255,0.8);
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer h3, .footer h4 {
    color: var(--white);
    margin-bottom: 20px;
}

.footer-about span {
    font-weight: 300;
    font-size: 0.6em;
}

.footer-contact p {
    margin-bottom: 10px;
}

.footer-contact i {
    margin-right: 10px;
    color: var(--secondary-color);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-icons a:hover {
    background: var(--secondary-color);
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Responsive */
/* About Us Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

@media (max-width: 768px) {
    .menu-toggle { display: block !important; }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        padding: 20px 0;
        gap: 15px;
    }
    .nav-links.active { display: flex; }
    .nav-links li { margin: 0; width: 100%; text-align: center; }
    .lang-switcher { justify-content: center; margin-bottom: 15px; }

    /* Hero Section Mobile Optimize */
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 120px 0 60px;
    }
    .hero h1 { 
        font-size: 2.2rem; 
        line-height: 1.3;
    }
    .hero p {
        font-size: 1.2rem;
    }
    .hero .sub-text {
        font-size: 0.95rem;
        margin-bottom: 25px;
    }
    .hero-actions {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        max-width: 340px;
        margin: 0 auto;
    }
    .hero-actions a {
        width: 100%;
        text-align: center;
        padding: 10px 15px;
    }

    /* Stats Mobile */
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .stat-item h3 { font-size: 2.2rem; }
    .stat-item p { font-size: 0.9rem; }
    
    .section-title h2 { font-size: 1.8rem; }
    .about-grid { grid-template-columns: 1fr; text-align: center; }
    .about-content ul { text-align: left; }
    
    .project-detail-container {
        grid-template-columns: 1fr !important;
    }
    
    .groups-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Mobile Touch optimization: Make portfolio title always visible (No Hover) */
    .portfolio-info {
        position: relative;
        bottom: 0 !important;
        background: rgba(10, 61, 115, 0.95);
        padding: 15px 10px;
    }
    .portfolio-item:hover img {
        transform: none;
    }

    /* Floating Contact repositioning to the left on mobile to avoid overlapping with Chatbot on the right */
    .floating-contact {
        left: 20px;
        right: auto;
        bottom: 20px;
    }
    .contact-btn {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    /* Modal Mobile Spacing */
    .modal-content-wrapper {
        padding: 30px 15px 20px; /* Leave space at top for close button */
        width: 95%;
    }
    .modal-content-wrapper h2 {
        padding-right: 45px; /* Leave space for absolute close button */
        font-size: 1.5rem;
    }
    .modal-close {
        top: 10px;
        right: 15px;
        font-size: 32px; /* Bigger touch target */
        color: #333;
        background: rgba(0, 0, 0, 0.05);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
    }
    .menu-toggle {
        display: block !important;
        font-size: 24px;
        color: var(--primary-color);
        cursor: pointer;
        padding: 8px;
        margin-right: 5px;
    }
    .legal-docs-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .groups-grid {
        grid-template-columns: 1fr !important;
    }
}

.project-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.groups-grid {
    grid-template-columns: repeat(4, 1fr);
}

/* --- MODAL STYLES --- */
.custom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.custom-modal.active {
    display: flex;
}

.modal-content-wrapper {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    position: relative;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #888;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--primary-color);
}

/* Modal Tabs */
.modal-tabs {
    display: flex;
    gap: 15px;
    border-bottom: 2px solid #eee;
    margin-bottom: 20px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 15px;
    font-weight: bold;
    cursor: pointer;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.legal-docs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

.doc-card {
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    transition: var(--transition);
}

.doc-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.solutions-modal-width {
    max-width: 850px !important;
}

.solution-detail-wrapper {
    width: 100%;
}

.playlist-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.playlist-active-content {
    display: flex;
    flex-direction: column;
}

.playlist-media {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.playlist-media iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.playlist-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #ffffff;
}

/* Nút điều hướng chuyển ảnh trong Album giới thiệu */
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s, transform 0.2s;
    z-index: 5;
    outline: none;
}

.gallery-nav-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav-btn.prev-btn {
    left: 15px;
}

.gallery-nav-btn.next-btn {
    right: 15px;
}

.playlist-sidebar {
    border-left: 1px solid #eee;
    padding-left: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.playlist-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.playlist-item {
    display: flex;
    gap: 10px;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: var(--transition);
}

.playlist-item:hover, .playlist-item.active {
    background: #f0f4f8;
}

.playlist-item img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.playlist-item-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.playlist-item-info h5 {
    margin: 0 0 5px;
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.3;
}

.playlist-item-info span {
    font-size: 11px;
    color: #888;
}

/* --- CHATBOT WIDGET --- */
.chat-widget {
    position: fixed;
    bottom: -500px;
    right: 30px;
    width: 360px;
    height: 460px;
    background: var(--white);
    border-radius: 12px 12px 0 0;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    z-index: 10000;
    transition: bottom 0.3s cubic-bezier(0.1, 0.8, 0.3, 1);
    overflow: hidden;
}

.chat-widget.active {
    bottom: 0;
}

.chat-header {
    background: var(--primary-color);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.chat-avatar {
    width: 35px;
    height: 35px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.chat-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f8f9fa;
}

.chat-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 15px;
    font-size: 13px;
    line-height: 1.4;
    word-wrap: break-word;
}

.chat-bubble.bot-msg {
    background: white;
    border: 1px solid #e2e8f0;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.chat-bubble.user-msg {
    background: var(--primary-color);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chat-input-area {
    padding: 12px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    background: var(--white);
}

.chat-input-area input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 13px;
    outline: none;
    transition: var(--transition);
}

.chat-input-area input:focus {
    border-color: var(--primary-color);
}

.chat-input-area button {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.2s;
}

.chat-input-area button:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .hero-slider .slide {
        background-position: left top;
    }
    .playlist-container {
        grid-template-columns: 1fr;
    }
    .playlist-sidebar {
        border-left: none;
        border-top: 1px solid #eee;
        padding-left: 0;
        padding-top: 20px;
    }
    .chat-widget {
        width: 100%;
        right: 0;
        border-radius: 12px 12px 0 0;
    }
}