/* ===== 1. จัดตำแหน่งเมนูหลัก (ให้อยู่กึ่งกลางพอดี) ===== */
.nav-links {
    display: flex;
    align-items: center; /* บังคับให้อยู่กึ่งกลางแนวตั้ง */
}

.nav-link {
    display: inline-flex;
    align-items: center;
    position: relative;
    transform: translateY(2px); /* ดันตัวหนังสือลงมา 2px ให้พอดีกับปุ่ม */
}

/* ===== 2. Scientific Calculator Button (Clean & Professional) ===== */
.nav-sci-icon {
    position: relative;
    padding: 8px 16px !important;
    border-radius: 50px; 
    transition: all 0.3s ease;
    background: rgba(37, 99, 235, 0.08); 
    border: 1px solid rgba(37, 99, 235, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
    text-decoration: none;
    transform: translateY(0); /* ✅ ย้ายมารวมตรงนี้ (ไม่ให้โดนดันลงเหมือนเมนูอื่น) */
}

/* ไอคอน wrapper */
.sci-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--primary-color, #2563eb); 
    border-radius: 50%; 
    transition: all 0.3s ease;
}

.sci-icon-wrapper i {
    font-size: 0.85em;
    color: white;
}

/* ข้อความ */
.sci-label {
    font-size: 0.9em;
    font-weight: 600;
    color: var(--primary-color, #2563eb);
    transition: all 0.3s ease;
}

/* ✅ Hover Effects */
.nav-sci-icon:hover {
    background: rgba(37, 99, 235, 0.15);
    border-color: rgba(37, 99, 235, 0.4);
    transform: translateY(-2px); /* ลอยขึ้นนิดเดียวเวลากด */
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.1);
}

.nav-sci-icon:hover .sci-icon-wrapper {
    background: var(--accent-color, #06b6d4); 
    transform: rotate(15deg); 
}

.nav-sci-icon:hover .sci-label {
    color: var(--accent-color, #06b6d4);
}

/* ✅ Active State */
.nav-sci-icon.active {
    background: var(--primary-color, #2563eb);
    border-color: var(--primary-color, #2563eb);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.nav-sci-icon.active .sci-icon-wrapper {
    background: white;
}

.nav-sci-icon.active .sci-icon-wrapper i {
    color: var(--primary-color, #2563eb);
}

.nav-sci-icon.active .sci-label {
    color: white;
}



/* ✅ ลบ Effects แสงสีเวอร์ๆ ทิ้ง */
.nav-sci-icon::before,
.nav-sci-icon::after,
.sci-glow {
    display: none !important;
}

/* ✅ Mobile Responsive */
@media (max-width: 768px) {
    .nav-sci-icon {
        justify-content: center;
        margin: 10px 0;
        background: transparent;
        border: none;
        padding: 10px;
    }
    
    .sci-label {
        color: var(--text-primary);
        font-size: 1.1em;
    }
    
    .nav-sci-icon:hover {
        background: rgba(0,0,0,0.05);
        transform: none;
        box-shadow: none;
    }
}





