/* ==========================================================================
   1. GLOBAL VARIABLES & FONTS
========================================================================== */
/* Cấu hình phông chữ riêng của Linotech dựa theo sitemap và mẫu Mera AI */
@font-face { font-family: 'SVN-Gilroy'; src: url('../font/SVN-Gilroy%20Thin.otf') format('opentype'); font-weight: 200; font-style: normal; font-display: swap; }
@font-face { font-family: 'SVN-Gilroy'; src: url('../font/SVN-Gilroy%20Light.otf') format('opentype'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'SVN-Gilroy'; src: url('../font/SVN-Gilroy%20Light%20Italic.otf') format('opentype'); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: 'SVN-Gilroy'; src: url('../font/SVN-Gilroy%20Regular.otf') format('opentype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'SVN-Gilroy'; src: url('../font/SVN-Gilroy%20Medium.otf') format('opentype'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'SVN-Gilroy'; src: url('../font/SVN-Gilroy%20SemiBold.otf') format('opentype'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'SVN-Gilroy'; src: url('../font/SVN-Gilroy%20Bold.otf') format('opentype'); font-weight: 700; font-style: normal; font-display: swap; }

/* Các biến màu sắc dùng chung (kế thừa giao diện Mera AI) */
:root {
    --bg-dark: #070b14;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-light: #ffffff;
    --text-muted: #8a94a6;
    --primary-green: #22c55e;
    --primary-blue: #2563eb;
}

html { 
    scroll-behavior: smooth; 
    overflow-x: hidden; 
    width: 100%; 
}

body {
    margin: 0; 
    padding: 0; 
    width: 100%;
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: 'SVN-Gilroy', sans-serif; 
    font-weight: 300; 
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4 { 
    font-weight: 500; 
    margin-top: 0; 
}

/* --- CHUẨN HÓA KHOẢNG CÁCH VÀ NÚT BẤM (DÙNG CHUNG) --- */
.section-container { 
    padding: 100px 5%; 
    max-width: 1400px; 
    margin: 0 auto; 
    position: relative; 
    box-sizing: border-box; 
}

.section-title { 
    font-size: 3.5rem; 
    margin-bottom: 50px; 
    font-weight: 300; 
    text-align: center; 
    line-height: 1.2;
}

.btn {
    padding: 15px 35px; 
    border-radius: 30px; 
    font-weight: 500;
    text-decoration: none; 
    display: inline-block; 
    cursor: pointer;
    transition: all 0.3s ease; 
    border: 1px solid transparent; 
    font-family: 'SVN-Gilroy', sans-serif; 
    font-size: 1rem;
    white-space: nowrap;
}

.btn-outline { 
    background: transparent; 
    border-color: var(--text-light); 
    color: var(--text-light); 
}

.btn-outline:hover { 
    background: rgba(255,255,255,0.1); 
}

.btn-green { 
    background: var(--primary-green); 
    color: #ffffff; 
}

.btn-green:hover { 
    filter: brightness(1.1); 
    box-shadow: 0 5px 15px rgba(34, 197, 94, 0.3); 
}

/* ==========================================================================
   2. HEADER STYLES
========================================================================== */
header {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 10px 5%;
    background: rgba(7, 11, 20, 0.85);
    backdrop-filter: blur(10px);
    position: fixed; 
    top: 0; 
    left: 0; 
    right: 0; 
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
    box-sizing: border-box;
}

.logo-container { 
    display: flex; 
    align-items: center; 
}

.site-logo { 
    height: 4em; 
    width: auto; 
    object-fit: contain; 
}

.main-nav ul { 
    list-style: none; 
    display: flex; 
    gap: 40px; 
    margin: 0; 
    padding: 0; 
}

.main-nav a { 
    color: var(--text-light); 
    text-decoration: none; 
    font-size: 0.95rem; 
    font-weight: 400; 
    transition: color 0.3s; 
}

.main-nav a:hover { 
    color: var(--primary-green); 
}

.contact-info { 
    font-size: 0.9rem; 
    color: var(--text-light); 
    display: flex; 
    gap: 15px; 
    font-weight: 400;
}

/* --- DROPDOWN MENU (DESKTOP) --- */

.has-dropdown { position: relative; }
.dropdown-arrow { 
    font-size: 0.8rem; 
    margin-left: 5px; 
    vertical-align: middle; 
    transition: transform 0.3s; 
    display: inline-block;
}
.has-dropdown:hover .dropdown-arrow { transform: rotate(180deg); }

/* Tạo "cầu nối" vô hình để chuột không bị rớt khi kéo từ chữ xuống menu */
.has-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 15px; /* Độ dài cầu nối */
    display: block;
}

/* Xử lý vùng hover bằng pointer-events và visibility */
.dropdown-menu {
    display: flex;
    visibility: hidden;
    pointer-events: none; /* Chặn click/hover ảo khi đang tàng hình */
    position: absolute; 
    top: calc(100% + 10px); /* Cách chữ một đoạn nhỏ cho thoáng */
    left: -20px;
    background: rgba(7, 11, 20, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 0;
    min-width: 220px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    flex-direction: column;
    gap: 0 !important;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.3s ease;
}

/* Hover ngay trên thẻ li chứa chữ thì mới hiện menu */
@media (min-width: 993px) {
    .has-dropdown:hover .dropdown-menu { 
        visibility: visible;
        pointer-events: auto; /* Bật lại tương tác chuột khi đã hiện */
        opacity: 1; 
        transform: translateY(0);
    }
}

.dropdown-menu li { width: 100%; }
.dropdown-menu a {
    padding: 12px 25px;
    display: block;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease;
}
.dropdown-menu a:hover { 
    background: rgba(255, 255, 255, 0.05); 
    padding-left: 32px; 
    color: var(--primary-green);
}

/* ==========================================================================
   3. CONNECT SECTION & FORM
========================================================================== */
.connect-wrapper { 
    background-color: var(--bg-dark); 
    padding: 80px 0 60px 0;
}

.connect-grid { 
    display: grid; 
    grid-template-columns: 1fr 1.5fr; 
    gap: 60px; 
    align-items: flex-start; 
}

.connect-left { 
    display: flex; 
    flex-direction: column; 
}

.connect-left .section-title { 
    text-align: left; 
    font-size: 4rem; 
    margin-bottom: 30px; 
    line-height: 1; 
}

.contact-info-list { 
    display: flex; 
    flex-direction: column; 
    gap: 25px; 
    margin-top: 30px; 
}

.contact-item { 
    display: flex; 
    align-items: flex-start; 
    gap: 15px; 
    color: var(--text-muted); 
    font-weight: 300;
}

.contact-icon { 
    width: 24px; 
    height: 24px; 
    color: var(--text-light); 
    font-size: 1.2rem;
}

.custom-form { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 20px; 
    background: rgba(255, 255, 255, 0.02); 
    padding: 40px; 
    border-radius: 20px; 
    border: 1px solid var(--border-color); 
    margin: 0; 
    box-sizing: border-box;
}

.form-group { position: relative; }
.form-group.full-width { grid-column: 1 / -1; }

.form-label { 
    display: block; 
    margin-bottom: 8px; 
    font-size: 0.85rem; 
    color: var(--text-muted); 
    font-weight: 300;
}

.asterisk { 
    color: #ff3333; 
    font-weight: bold; 
    margin-left: 3px; 
}

.form-input { 
    width: 100%; 
    box-sizing: border-box; 
    background: transparent; 
    border: 1px solid rgba(255,255,255,0.15); 
    border-radius: 8px; 
    padding: 12px 16px; 
    color: white; 
    font-family: 'SVN-Gilroy', sans-serif; 
    font-weight: 300; 
    font-size: 0.95rem; 
    transition: all 0.3s ease; 
}

.form-input:focus { 
    outline: none; 
    border-color: rgba(255,255,255,0.5); 
    background: rgba(255,255,255,0.05); 
}

textarea.form-input { 
    resize: vertical; 
    min-height: 100px; 
}

.submit-area { 
    grid-column: 1 / -1; 
    display: flex; 
    justify-content: flex-end; 
    align-items: center; 
    gap: 20px; 
    margin-top: 5px; 
}

.success-msg { 
    color: white; 
    font-style: italic; 
    font-size: 0.9rem; 
    font-weight: 300; 
    display: none; 
}

/* ==========================================================================
   4. FOOTER STYLES
========================================================================== */
.site-footer { 
    position: relative; 
    overflow: hidden; 
    background-color: var(--bg-dark); 
    padding: 80px 8% 40px; 
    border-top: 1px solid var(--border-color); 
    font-size: 0.9rem; 
    box-sizing: border-box; 
}

.site-footer::before { 
    content: ''; 
    position: absolute; 
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0; 
    background: radial-gradient(circle at 50% 100%, rgba(34, 197, 94, 0.15), rgba(37, 99, 235, 0.1) 40%, transparent 70%); 
    pointer-events: none; 
    z-index: 0; 
}

.footer-grid, .footer-bottom { 
    position: relative; 
    z-index: 1; 
}

.footer-grid { 
    display: grid; 
    grid-template-columns: 2fr 1fr 1fr 1.5fr; 
    gap: 40px; 
    margin-bottom: 60px; 
}

.footer-heading { 
    color: var(--text-light); 
    font-weight: 500; 
    margin-bottom: 25px; 
    font-size: 1rem;
}

.footer-links { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
}

.footer-links a { 
    color: var(--text-muted); 
    text-decoration: none; 
    transition: color 0.3s; 
    font-weight: 300;
}

.footer-links a:hover { 
    color: var(--text-light); 
}

.footer-bottom { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding-top: 30px; 
    border-top: 1px solid var(--border-color); 
    color: var(--text-muted); 
    font-weight: 300; 
}

.social-icons { 
    display: flex; 
    gap: 15px; 
}

.social-btn { 
    width: 40px; 
    height: 40px; 
    border-radius: 50%; 
    border: 1px solid var(--border-color); 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    color: var(--text-light); 
    text-decoration: none; 
    transition: all 0.3s; 
}

.social-btn:hover { 
    background: var(--text-light); 
    color: var(--bg-dark); 
}

/* ==========================================================================
   5. COMMON RESPONSIVE
========================================================================== */
@media (max-width: 992px) {
    .section-container { padding: 70px 5%; }
    .section-title { font-size: 2.8rem; margin-bottom: 40px; }
    
    /* Header Responsive */
    .mobile-menu-btn { display: block !important; }
    .contact-info { display: none; }
    .main-nav { 
        display: none; 
        position: absolute; 
        top: 100%; 
        left: 0; 
        width: 100%; 
        background: rgba(7, 11, 20, 0.98); 
        padding: 20px 0; 
        border-bottom: 1px solid var(--border-color);
    }
    #menu-toggle:checked ~ .main-nav { display: block; }
    
    /* Cố định chiều rộng để chống giật/nhảy chữ khi mở menu */
    .main-nav ul { flex-direction: column; align-items: center; gap: 10px; width: 100%; padding: 0; }
    .main-nav li { width: 100%; text-align: center; }
    .main-nav a { display: inline-block; padding: 12px 10px; width: 100%; box-sizing: border-box; }

    /* Connect & Footer Responsive */
    .connect-grid { grid-template-columns: 1fr; gap: 40px; }
    .connect-left .section-title { font-size: 3rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
    
    /* Dropdown Mobile Responsive - Animation Mượt mà */
    .has-dropdown {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .has-dropdown .dropdown-menu {
        position: static;
        display: flex;
        flex-direction: column;
        width: 100%;
        background: transparent;
        border: none;
        box-shadow: none;
        
        /* Chuyển sang dùng max-height để các mục bên dưới trượt xuống mượt mà */
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        padding: 0;
        margin: 0;
        transform: none;
        visibility: hidden;
        pointer-events: none;
        transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
    }
    
    .has-dropdown.mobile-open .dropdown-menu {
        max-height: 400px; /* Chiều cao tối đa khi bung ra */
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        padding: 5px 0 15px 0;
    }

    .has-dropdown .dropdown-menu a {
        padding: 10px 0;
        color: var(--text-muted);
        font-size: 0.9rem;
    }
    .has-dropdown .dropdown-menu a:hover {
        color: var(--primary-green);
        background: transparent; /* Bỏ background hover trên mobile cho đỡ rối */
    }
    
    .has-dropdown.mobile-open .dropdown-arrow {
        transform: rotate(180deg);
    }
}

@media (max-width: 768px) {
    .section-container { padding: 50px 5%; }
    .section-title { font-size: 2.2rem; margin-bottom: 30px; }
    .btn { padding: 12px 25px; font-size: 0.9rem; }
    
    .custom-form { grid-template-columns: 1fr; padding: 25px; }
    .connect-left .section-title { font-size: 2.5rem; }

    .footer-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
    .footer-links { align-items: center; }
    .footer-bottom { flex-direction: column; gap: 20px; text-align: center; }
    .social-icons { justify-content: center; }
}