/* ================= NAVBAR ================= */

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, #fff, #E5E9EC);
    padding: 15px 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    border-bottom: 1px solid #dfe3e6;
    min-height: 80px;
}

.nav-container {
    max-width: 1200px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

nav .logo img {
    height: 48px;
    display: block;
}

nav ul.nav-links {
    display: flex;
    gap: 25px;
}

nav ul li {
    position: relative;
}

nav ul li a {
    text-decoration: none;
    color: #000;
    padding: 8px 4px;
    display: block;
    white-space: nowrap;
}

/* ================= DESKTOP DROPDOWN (HOVER) ================= */
@media (min-width: 900px) {

    ul.dropdown {
        position: absolute;
        top: calc(100% - 2px);
        left: 0;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        min-width: 230px;
        background: #fff;
        border-radius: 10px;
        padding: 10px 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.14);
        transition: .25s ease;
        z-index: 9999;
    }

    nav ul li:hover > ul.dropdown {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    ul.dropdown li a {
        padding: 12px 20px;
    }

    ul.dropdown li a:hover {
        background: #f0f3f5;
        color: #0072ff;
    }
/* 把第二层（子 content）的 ▼ 隐藏掉，但不影响第 1 层 */
.dropdown .dropdown-toggle {
    display: none !important;
}

    /* ========= DESKTOP FLYOUT (3rd level) ========= */

    /* 孙菜单（右侧飞出） */
    .dropdown .has-dropdown > ul.dropdown {
        position: absolute;
        top: 0;
        left: 100%; /* → 向右飞出 */
        min-width: 220px;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        background: #fff;
        padding: 10px 0;
        border-radius: 10px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.14);
        transition: opacity .25s ease, transform .25s ease;
        transform: translateX(10px);
        z-index: 9999;
    }

    /* hover 子菜单 → 显示孙菜单 */
    .dropdown .has-dropdown:hover > ul.dropdown {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(0);
    }

    /* 子菜单项加上右侧箭头（▶）*/
    .dropdown .has-dropdown > a::after {
        content: "▶";
        margin-left: 8px;
        display: inline-block;
    }

    /* 鼠标 hover 时箭头保持方向（不旋转） */
    .dropdown .has-dropdown:hover > a::after {
        transform: none;
    }
}

/* ================= HAMBURGER (MOBILE) ================= */

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: rgba(255,255,255,0.8);
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 20001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #222;
    border-radius: 2px;
    transition: .3s;
}

.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 20000;
}

.nav-overlay.active {
    display: block;
}

/* ================= ARROW (由 JS 注入，CSS 只负责位置) ================= */

.dropdown-toggle {
    display: inline-block;
    color: #000 !important;
    opacity: 0.9;
    margin-left: 10px;
    cursor: pointer;
}
/* 打开时箭头亮一点 */
    .has-dropdown.open > a .dropdown-toggle {
        color: rgb(147, 147, 147) !important;
        opacity: 1 !important;
    }

/* VERY IMPORTANT: 不允许 dropdown 被 flex 带跑 */
.nav-links li.has-dropdown {
    display: block !important;   /* ← 关键！不允许 flex */
}
/*===============END OF NAVBAR===================*/
/* ================= Footer Base ================= */

.footer {
    position: relative;
    background: #E5E9EC;
    padding: 40px 20px 30px;
    display: flex;
    justify-content: center;
    z-index: 1;
}

.footer-inner-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ================= Main Layout ================= */

.footer-content {
    display: grid;
    grid-template-columns: 260px 1fr; /* 只要两列 */
    gap: 32px;
    width: 90%;
    margin: 0 auto;
}

/* ================= Left: Contact ================= */

.footer-left {
    max-width: 260px;
    text-align: left;
}

.footer-left p,
.footer-left a {
    color: #000000be;
    white-space: normal; /* ❗ 防止分屏溢出 */
}

/* ================= Right Columns ================= */

.footer-right {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 32px 40px;
    flex: 1;
}

.footer-nav {
    text-align: left;
    min-width: 0;
}

.footer-nav h4 {
    margin-bottom: 10px;
    color: #1d2150;
}

.footer-nav li {
    margin-bottom: 4px;
}

.footer-nav li a {
    line-height: 1.3;
}

/* Disable hover for section titles if needed */
.footer-nav h4.no-hover a {
    color: inherit;
    text-decoration: none;
    cursor: default;
    pointer-events: none;
}

/* ================= Social Icons ================= */

.social-icons {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

.social-icons a {
    display: inline-flex;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.social-icons a img {
    width: 28px;
    height: 28px;
}

.social-icons a:hover {
    transform: translateY(-2px);
    opacity: 0.85;
}

/* ================= Footer Title Gradient ================= */

.footer h3 {
    background: linear-gradient(to right, #273bf0, #6de043, #a7fdc1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    margin-bottom: 15px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2); 
}

.footer a:hover {
    color: #5A8DFF;
    font-weight: 600; /* optional，字更明显 */
}

/* ================= Separator ================= */

.footer-separator {
    width: 100%;
    border: none;
    border-top: 1px solid #ddd;
    margin: 30px 0 20px;
}

/* ================= Copyright ================= */

.footer-copyright {
    grid-column: 1 / -1;
    text-align: center;
    color: #2f4639;
    font-size: 14px;
}

/* ================= Waves (保留你原本的) ================= */

.wave {
    position: absolute;
    top: -100px;
    left: 0;
    width: 100%;
    height: 100px;
    background: url("../../images/white-wave1.png");
    background-size: 1000px 100px;
}

.wave#wave1 {
    z-index: 1000;
    opacity: 1;
    animation: animateWaves 4s linear infinite;
}

.wave#wave2 {
    z-index: 999;
    opacity: 0.5;
    animation: animate 4s linear infinite;
}

.wave#wave3 {
    z-index: 998;
    opacity: 0.2;
    animation: animateWaves 3s linear infinite;
}

.wave#wave4 {
    z-index: 997;
    opacity: 0.7;
    animation: animate 3s linear infinite;
}

@keyframes animateWaves {
    0% { background-position-x: 1000px; }
    100% { background-position-x: 0; }
}

@keyframes animate {
    0% { background-position-x: -1000px; }
    100% { background-position-x: 0; }
}

@media screen and (max-width: 1200px) {
  .footer-right {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

/* ================= Tablet ================= */

@media screen and (max-width: 992px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        text-align: center;
    }

    .footer-left,
    .footer-nav {
        text-align: center;
    }

    .social-icons {
        justify-content: center;
    }
}

