/* assets/style.css - Giao diện Corporate Mechatronics + Menu 2 Tầng Flyout kiểu SIMG */
:root {
    --navy-top: #102a71;          /* Thanh ngôn ngữ xanh Navy trên cùng */
    --brand-blue: #1890d8;        /* Màu nút Liên hệ xanh da trời đậm */
    --brand-blue-dark: #0f6ead;
    --brand-orange: #ff7a00;      /* Điểm nhấn cam công nghiệp ở Logo */
    --text-dark: #111827;
    --text-body: #374151;
    --text-muted: #6b7280;
    --bg-white: #ffffff;
    --bg-light: #f4f6f9;
    --border-light: #e5e7eb;
    --shadow-dropdown: 0 12px 32px rgba(16, 42, 113, 0.14);
    --shadow-card: 0 6px 20px rgba(0, 0, 0, 0.06);
    --font-main: 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
    font-family: var(--font-main);
    color: var(--text-body);
    background-color: var(--bg-white);
    line-height: 1.65;
    overflow-x: hidden;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   1. TẦNG 1: TOP LANGUAGE BAR (Nền xanh Navy đậm, căn giữa/phải gọn gàng)
   ========================================================================== */
.top-lang-bar {
    background-color: var(--navy-top);
    color: #ffffff;
    height: 36px;
    display: flex;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 600;
    overflow: hidden;
}

.top-lang-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.top-lang-inner a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    filter: grayscale(70%);
    opacity: 0.75;
}

.top-lang-inner a img {
    width: 24px !important;
    height: 16px !important;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    display: block;
}

.top-lang-inner a:hover,
.top-lang-inner a.active {
    filter: grayscale(0%);
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}
/* ==========================================================================
   2. TẦNG 2: MAIN NAVIGATION BAR + 2-LEVEL FLYOUT MENU (Như ảnh chụp SIMG)
   ========================================================================== */
.main-header {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

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

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 1px; /* Thêm khoảng cách chữ cho H.Y.D.R.A */
    color: var(--navy-top);
}

.logo-icon {
    color: var(--brand-orange);
    font-size: 1.65rem;
}

.logo-brand span {
    color: var(--brand-blue);
}

.nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 32px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 28px 0;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.98rem;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--brand-blue);
}

.caret {
    font-size: 0.78rem;
    transition: transform 0.2s ease;
}

.nav-item.has-dropdown:hover .caret {
    transform: rotate(90deg);
}

/* --- DROPDOWN CẤP 1 --- */
.dropdown-level-1 {
    position: absolute;
    top: 100%;
    left: 0;
    width: 290px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-dropdown);
    list-style: none;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.nav-item.has-dropdown:hover .dropdown-level-1 {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    position: relative;
}

.dropdown-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 20px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all 0.18s ease;
}

/* Hiệu ứng gạch chân xanh Navy đậm khi di chuột vào mục cấp 1 giống ảnh mẫu */
.dropdown-item:hover > .dropdown-link {
    color: var(--navy-top);
    background-color: #f8fafc;
    border-bottom: 2px solid var(--navy-top);
}

.sub-arrow {
    font-size: 0.8rem;
    color: var(--navy-top);
}

/* --- FLYOUT SUBMENU CẤP 2 (Bung sang bên phải như ảnh chụp) --- */
.dropdown-level-2 {
    position: absolute;
    top: 0;
    left: 100%;
    width: 310px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-dropdown);
    list-style: none;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(8px);
    transition: all 0.2s ease;
}

.dropdown-item.has-submenu:hover > .dropdown-level-2 {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.dropdown-level-2 li a {
    display: block;
    padding: 11px 22px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.dropdown-level-2 li a:hover {
    background-color: #f1f5f9;
    color: var(--brand-blue);
    font-weight: 600;
}

/* --- NÚT LIÊN HỆ MÀU XANH BÊN PHẢI HEADER --- */
.btn-contact-header {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--brand-blue);
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 11px 24px;
    border-radius: 7px;
    transition: background 0.2s ease, transform 0.15s ease;
}

.btn-contact-header:hover {
    background-color: var(--brand-blue-dark);
    transform: translateY(-1px);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-light);
    padding: 6px 12px;
    font-size: 1.3rem;
    border-radius: 6px;
    cursor: pointer;
}

/* ==========================================================================
   3. BREADCRUMB & HERO BANNER
   ========================================================================== */
.breadcrumb-bar {
    background: #fafafa;
    border-bottom: 1px solid var(--border-light);
    padding: 12px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.breadcrumb-bar a {
    color: var(--text-muted);
    text-decoration: underline;
}

.hero-banner {
    background: linear-gradient(135deg, #0d1f4d 0%, #102a71 60%, #153c8a 100%);
    color: #ffffff;
    padding: 72px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.95fr;
    gap: 48px;
    align-items: center;
}

.badge-pill {
    display: inline-block;
    background: rgba(24, 144, 216, 0.25);
    border: 1px solid rgba(255,255,255,0.25);
    color: #7dd3fc;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 99px;
    margin-bottom: 18px;
    letter-spacing: 0.5px;
}

.hero-text h1 {
    font-size: clamp(2rem, 3.6vw, 2.85rem);
    font-weight: 800;
    line-height: 1.22;
    margin-bottom: 18px;
}

.hero-text p {
    color: rgba(255,255,255,0.86);
    font-size: 1.05rem;
    margin-bottom: 28px;
}

.hero-btns {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-blue);
    color: #ffffff;
    padding: 13px 26px;
    border-radius: 7px;
    text-decoration: none;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--brand-blue-dark);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.35);
    padding: 13px 26px;
    border-radius: 7px;
    text-decoration: none;
    font-weight: 600;
}

.spec-panel {
    background: rgba(8, 18, 44, 0.75);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 26px;
}

.spec-panel-head {
    font-size: 0.8rem;
    font-weight: 700;
    color: #38bdf8;
    letter-spacing: 1px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    padding-bottom: 10px;
}

.spec-matrix {
    list-style: none;
}

.spec-matrix li {
    padding: 9px 0;
    font-size: 0.9rem;
    border-bottom: 1px dashed rgba(255,255,255,0.1);
    color: #e2e8f0;
}

.spec-matrix li strong {
    color: #ffb703;
}

/* ==========================================================================
   4. SECTIONS, ABOUT SPLIT & PRODUCT CARDS
   ========================================================================== */
.section-padding {
    padding: 72px 0;
}

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

.about-split {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.section-heading {
    font-size: 1.95rem;
    color: var(--text-dark);
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 20px;
}

.lead-para {
    font-size: 1.02rem;
    color: var(--text-body);
    margin-bottom: 16px;
}

.key-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 28px;
}

.metric-box {
    background: var(--bg-light);
    border-left: 4px solid var(--navy-top);
    padding: 14px;
    border-radius: 4px;
}

.m-num {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--navy-top);
}

.m-lbl {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.facility-card {
    border: 1px solid var(--border-light);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.facility-img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
}

.facility-caption {
    padding: 16px 20px;
    background: #ffffff;
}

.facility-caption strong {
    display: block;
    color: var(--text-dark);
}

.facility-caption span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.center-head {
    margin-bottom: 40px;
}

.center-head h2 {
    font-size: 1.85rem;
    color: var(--text-dark);
    font-weight: 800;
}

.service-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.srv-card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
}

.srv-img-wrap {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.srv-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sku-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--navy-top);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
}

.srv-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.srv-body h3 {
    font-size: 1.22rem;
    margin-bottom: 10px;
}

.srv-body h3 a {
    color: var(--text-dark);
    text-decoration: none;
}

.srv-body h3 a:hover {
    color: var(--brand-blue);
}

.read-more-link {
    display: inline-block;
    margin-top: 16px;
    font-weight: 700;
    color: var(--brand-blue);
    text-decoration: none;
}

/* ==========================================================================
   5. PRODUCT DETAIL PAGE (/product/1..4)
   ========================================================================== */
.product-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: start;
}

.product-sidebar {
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 22px;
}

.product-sidebar h3 {
    font-size: 1.05rem;
    color: var(--navy-top);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--navy-top);
}

.side-nav-list {
    list-style: none;
}

.side-nav-list li {
    margin-bottom: 8px;
}

.side-nav-list li a {
    display: block;
    padding: 12px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-dark);
    background: #ffffff;
    border: 1px solid var(--border-light);
    font-size: 0.88rem;
}

.side-nav-list li.active a,
.side-nav-list li a:hover {
    border-color: var(--brand-blue);
    background: #f0f9ff;
}

.side-sku {
    display: block;
    font-size: 0.72rem;
    color: var(--brand-blue);
    font-weight: 700;
}

.sku-badge {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.prod-header-box h1 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.prod-lead {
    font-size: 1.08rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.prod-hero-image img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 28px;
}

.prod-rich-content p,
.prod-rich-content ul {
    margin-bottom: 18px;
}

.prod-rich-content h4 {
    color: var(--navy-top);
    margin: 20px 0 10px;
}

.prod-rich-content ul {
    padding-left: 22px;
}

.specs-table-wrap {
    margin-top: 32px;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.specs-table th,
.specs-table td {
    border: 1px solid var(--border-light);
    padding: 12px 16px;
    text-align: left;
}

.specs-table th {
    width: 32%;
    background: var(--bg-light);
    color: var(--text-dark);
}

.prod-cta-banner {
    margin-top: 36px;
    background: var(--navy-top);
    color: #ffffff;
    padding: 28px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

/* ==========================================================================
   6. CERTIFICATIONS (/pat-cer), R&D (/r-d) & CONTACT (/contact)
   ========================================================================== */
.page-intro {
    max-width: 780px;
    margin-bottom: 44px;
}

.page-intro h1 {
    font-size: 2.1rem;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.cert-grid,
.client-sectors-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.cert-card,
.sector-item {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-top: 4px solid var(--navy-top);
    border-radius: 8px;
    padding: 28px;
    box-shadow: var(--shadow-card);
}

.cert-top {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--brand-blue);
    margin-bottom: 8px;
}

.cert-code {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--navy-top);
    margin-bottom: 10px;
}

.rd-timeline {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.rd-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-left: 5px solid var(--brand-blue);
    border-radius: 8px;
    padding: 28px;
    box-shadow: var(--shadow-card);
}

.rd-code {
    display: block;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--navy-top);
}

.rd-badge {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.75rem;
    background: #e0f2fe;
    color: #0369a1;
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 700;
}

.rd-stack {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-light);
    font-size: 0.88rem;
    color: var(--navy-top);
}

.contact-split {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 48px;
}

.info-cards {
    margin-top: 28px;
    display: grid;
    gap: 16px;
}

.info-item {
    background: var(--bg-light);
    padding: 16px 20px;
    border-radius: 8px;
    border-left: 4px solid var(--brand-blue);
}

.contact-form-panel {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 34px;
    box-shadow: var(--shadow-card);
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-family: var(--font-main);
    font-size: 0.95rem;
}

.btn-block {
    width: 100%;
}

.api-msg {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 0.9rem;
}

.api-msg.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.api-msg.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* ==========================================================================
   7. FOOTER & FLOATING ACTION BUTTONS (Góc dưới bên phải như ảnh SIMG)
   ========================================================================== */
.site-footer {
    background: #0b193d;
    color: rgba(255,255,255,0.78);
    padding: 56px 0;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
}

.footer-brand {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 12px;
}

.footer-brand span {
    color: var(--brand-blue);
}

.footer-col h4 {
    color: #ffffff;
    margin-bottom: 14px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: #ffffff;
}

.floating-quick-btns {
    position: fixed;
    right: 24px;
    bottom: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 990;
}

.float-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.85rem;
    transition: transform 0.2s;
}

.float-btn:hover {
    transform: scale(1.08);
}

.float-btn.wa-btn {
    color: #25D366;
}

.float-btn.zalo-btn {
    color: #0068FF;
}
.float-btn.quote-btn {
    background: #10b981;
    color: #ffffff;
}
/* Khóa cứng kích thước Logo trên Header */
.brand-logo img {
    height: 45px !important;
    width: auto !important;
    object-fit: contain;
    flex-shrink: 0; /* Ngăn trình duyệt tự ý phóng to hay bóp méo hình */
    margin-right: 4px;
}
/* Styling Google Maps on Contact Page */
.contact-map-wrap {
    margin-top: 24px;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.map-iframe-container {
    position: relative;
    width: 100%;
    height: 280px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.map-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.map-navigation a:hover {
    text-decoration: underline !important;
}

/* Responsive adjustment */
@media (max-width: 768px) {
    .map-iframe-container {
        height: 220px; /* Nhỏ lại một chút trên Mobile cho dễ lướt */
    }
}
/* Partner Logos Grid (2 hàng x 4 cột) */
.partner-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    align-items: center;
    justify-items: center;
    max-width: 900px;
    margin: 0 auto;
}

.partner-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 80px; /* Khóa khung cao 80px cho mọi logo */
    padding: 10px;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.partner-link img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain; /* Ép hình vừa vặn vào khung 80px, không bị méo */
    filter: grayscale(0%) opacity(60%); /* Làm mờ ảnh trắng đen */
    transition: all 0.3s ease;
}

/* Đổi màu viền và hiện màu thật của logo khi rê chuột vào */
.partner-link:hover {
    box-shadow: var(--shadow-card);
    border-color: var(--brand-blue);
}

.partner-link:hover img {
    filter: grayscale(0%) opacity(100%);
    transform: scale(1.05);
}

/* Tự động chuyển thành 2 cột trên điện thoại */
@media (max-width: 768px) {
    .partner-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}
/* Responsive Mobile */
@media (max-width: 992px) {
    .mobile-menu-toggle { display: block; }
    .primary-nav {
        display: none;
        position: absolute;
        top: 82px;
        left: 0;
        right: 0;
        background: #ffffff;
        border-bottom: 1px solid var(--border-light);
        padding: 20px;
        box-shadow: var(--shadow-dropdown);
    }
    .primary-nav.open { display: block; }
    .nav-list { flex-direction: column; align-items: flex-start; gap: 12px; }
    .dropdown-level-1, .dropdown-level-2 {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        width: 100%;
        padding-left: 16px;
    }
    .hero-grid, .about-split, .service-cards-grid, .product-layout, .cert-grid, .client-sectors-grid, .rd-card, .contact-split, .footer-grid {
        grid-template-columns: 1fr;
    }
    .key-metrics { grid-template-columns: repeat(2, 1fr); }
}
